java 8 - using lambdas makes JSF to crash -
i have found unexpected behaviour need solve.
if use lambdas in getter of managed-bean of current view, following error:
javax.el.propertynotfoundexception: target unreachable, identifier 'logbookoperationsbean' resolved null viewid=/logbookoperations.xhtml .... phaseid=process_validations(3) caused by: javax.el.propertynotfoundexception - target unreachable, identifier 'logbookoperationsbean' resolved null @ org.apache.el.parser.astvalue.gettarget(astvalue.java:74)
by using line:
if (collectionutils.isnotempty(changes)) { changes.stream().foreach((element) -> system.out.println(element)); }
when remove lambda , replace 'old' version:
changes.stream().foreach(new consumer<treenode>() { @override public void accept(final treenode element) { system.out.println(element); } });
everything works fine.
any ideas why?
i using tomcat 8 , jre1.8.0_71
Comments
Post a Comment