I wrote the followed lambda expression
int size = ((List<?>) receipt.getPositions().stream().filter(item -> true).collect(Collectors.toList())).size()
The varia size
is computed correctly!
But when I try to tour it (Ctrl+Shift+I) or try to see the results of the expression in Eclipse expressions view, I get the following error:
"Lambda expressions cannot be used in an evaluation expression"
Are there any other options to sees the result by such an language use von storing it to a variable?
P.S.: I am using Java 8 or Eclipses neon.2
receipt.getPositions().size()
. This could be evaluted by the debugger without questions.