Polish condition in caching examples

Closes gh-1386
This commit is contained in:
Michael J. Simons 2017-04-13 08:08:52 +02:00 committed by Stephane Nicoll
parent a9a1f783c5
commit d866715556
1 changed files with 3 additions and 3 deletions

View File

@ -8483,7 +8483,7 @@ if the argument `name` has a length shorter than 32:
[source,java,indent=0]
[subs="verbatim,quotes"]
----
@Cacheable(cacheNames="book", **condition="#name.length < 32"**)
@Cacheable(cacheNames="book", **condition="#name.length() < 32"**)
public Book findBook(String name)
----
@ -8495,7 +8495,7 @@ only want to cache paperback books:
[source,java,indent=0]
[subs="verbatim,quotes"]
----
@Cacheable(cacheNames="book", condition="#name.length < 32", **unless="#result.hardback"**)
@Cacheable(cacheNames="book", condition="#name.length() < 32", **unless="#result.hardback"**)
public Book findBook(String name)
----
@ -8506,7 +8506,7 @@ supported wrapper so the previous example can be rewritten as follows:
[source,java,indent=0]
[subs="verbatim,quotes"]
----
@Cacheable(cacheNames="book", condition="#name.length < 32", **unless="#result.hardback"**)
@Cacheable(cacheNames="book", condition="#name.length() < 32", **unless="#result.hardback"**)
public Optional<Book> findBook(String name)
----