File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8483,7 +8483,7 @@ if the argument `name` has a length shorter than 32:
8483
8483
[source,java,indent=0]
8484
8484
[subs="verbatim,quotes"]
8485
8485
----
8486
- @Cacheable(cacheNames="book", **condition="#name.length < 32"**)
8486
+ @Cacheable(cacheNames="book", **condition="#name.length() < 32"**)
8487
8487
public Book findBook(String name)
8488
8488
----
8489
8489
@@ -8495,7 +8495,7 @@ only want to cache paperback books:
8495
8495
[source,java,indent=0]
8496
8496
[subs="verbatim,quotes"]
8497
8497
----
8498
- @Cacheable(cacheNames="book", condition="#name.length < 32", **unless="#result.hardback"**)
8498
+ @Cacheable(cacheNames="book", condition="#name.length() < 32", **unless="#result.hardback"**)
8499
8499
public Book findBook(String name)
8500
8500
----
8501
8501
@@ -8506,7 +8506,7 @@ supported wrapper so the previous example can be rewritten as follows:
8506
8506
[source,java,indent=0]
8507
8507
[subs="verbatim,quotes"]
8508
8508
----
8509
- @Cacheable(cacheNames="book", condition="#name.length < 32", **unless="#result.hardback"**)
8509
+ @Cacheable(cacheNames="book", condition="#name.length() < 32", **unless="#result.hardback"**)
8510
8510
public Optional<Book> findBook(String name)
8511
8511
----
8512
8512
You can’t perform that action at this time.
0 commit comments