From 0d59a158499310ac882bca566d7aa16077fb5ee4 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 16 Aug 2016 13:45:10 +0200 Subject: [PATCH] Better document #result semantic Commit 240f254 has introduced support for `java.util.Optional` in the cache abstraction. If such type is present, the contained value is cached if it is present. This new feature slightly changed the semantic of `#result` that was documented up till this commit as the "return value of the method invocation". This is no longer true as `#result` for `Optional` refers to the `T` instance and not the `Optional` instance. This commit clarifies both the javadoc and the documentation. Issue: SPR-14587 --- .../cache/annotation/CacheEvict.java | 4 +++- .../cache/annotation/CachePut.java | 12 +++++++++--- .../cache/annotation/Cacheable.java | 8 ++++++-- src/asciidoc/integration.adoc | 15 ++++++++++++++- 4 files changed, 32 insertions(+), 7 deletions(-) diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java b/spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java index f12d2119ad..9364e800f2 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java @@ -69,7 +69,9 @@ public @interface CacheEvict { * following meta-data: *