I wrote the following lambda expression
int size = ((List<?>) receipt.getPositions().stream().filter(item -> true).collect(Collectors.toList())).size()
The variable size
is computed correctly!
But when I try to inspect it (Ctrl+Shift+I) or try to see the result 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 opportunities to see the result of such an expression instead of storing it to a variable?
P.S.: I am using Java 8 and Eclipse neon.2
receipt.getPositions().size()
. This can be evaluted by the debugger without problems.