title: Why doesn't this stream & lambda expression work with SpEL declaration?
body: <p>I'm trying to use a Java 8 stream and lambda expression in a Spring @Cache annotation.</p>
  
  <p>I'm trying to use the following:</p>
  
  <pre><code>@CacheEvict(value = "tags", allEntries = true, 
  condition = "#entity.getTags().stream().anyMatch(tag -&gt; tag.getId() == null)")
  </code></pre>
  
  <p>It is failing with:</p>
  
  <pre><code>SEVERE: The RuntimeException could not be mapped to a response, re-throwing to the HTTP container
  org.springframework.expression.spel.SpelParseException: 
  EL1042E:(pos 40): Problem parsing right operand
  </code></pre>
  
  <p>However, I am able to get it to work if I move the stream into a method on the entity.  The annotation then works as follows without error:</p>
  
  <pre><code>@CacheEvict(value = "tags", beforeInvocation=true, allEntries = true, 
  condition = "#entity.containsNewTag()")
  </code></pre>
  
  <p>I would prefer not to need the 'containtsNewTag()' method and use the stream directly in the SpEL expression if possible.  Can this be done?</p>