From 33fd94c0982c0a7e9101970e751f3f41eb501042 Mon Sep 17 00:00:00 2001 From: "Michael J. Simons" Date: Thu, 13 Apr 2017 08:08:52 +0200 Subject: [PATCH] Polish condition in caching examples Closes gh-1386 --- src/docs/asciidoc/integration.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/docs/asciidoc/integration.adoc b/src/docs/asciidoc/integration.adoc index 82bc7fae192..20d4d249fc1 100644 --- a/src/docs/asciidoc/integration.adoc +++ b/src/docs/asciidoc/integration.adoc @@ -8304,7 +8304,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) ---- @@ -8316,7 +8316,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) ---- @@ -8327,7 +8327,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 findBook(String name) ----