Skip to content

Commit d866715

Browse files
michael-simonssnicoll
authored andcommitted
Polish condition in caching examples
Closes gh-1386
1 parent a9a1f78 commit d866715

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/asciidoc/integration.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8483,7 +8483,7 @@ if the argument `name` has a length shorter than 32:
84838483
[source,java,indent=0]
84848484
[subs="verbatim,quotes"]
84858485
----
8486-
@Cacheable(cacheNames="book", **condition="#name.length < 32"**)
8486+
@Cacheable(cacheNames="book", **condition="#name.length() < 32"**)
84878487
public Book findBook(String name)
84888488
----
84898489

@@ -8495,7 +8495,7 @@ only want to cache paperback books:
84958495
[source,java,indent=0]
84968496
[subs="verbatim,quotes"]
84978497
----
8498-
@Cacheable(cacheNames="book", condition="#name.length < 32", **unless="#result.hardback"**)
8498+
@Cacheable(cacheNames="book", condition="#name.length() < 32", **unless="#result.hardback"**)
84998499
public Book findBook(String name)
85008500
----
85018501

@@ -8506,7 +8506,7 @@ supported wrapper so the previous example can be rewritten as follows:
85068506
[source,java,indent=0]
85078507
[subs="verbatim,quotes"]
85088508
----
8509-
@Cacheable(cacheNames="book", condition="#name.length < 32", **unless="#result.hardback"**)
8509+
@Cacheable(cacheNames="book", condition="#name.length() < 32", **unless="#result.hardback"**)
85108510
public Optional<Book> findBook(String name)
85118511
----
85128512

0 commit comments

Comments
 (0)