JSF Expression Language Coercion for nulls to Non-Primitive Types Always Returns Null
Issue
-
NullPointerException
migrating older application, or from a different implementationjava.lang.NullPointerException
at com.sun.faces.facelets.tag.TagAttributeImpl.getBoolean(TagAttributeImpl.java:136)
at com.sun.faces.facelets.tag.jstl.core.IfHandler.apply(IfHandler.java:91)
at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:95)
at com.sun.faces.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:166)
at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:93) -
Documentation says
org.apache.el.parser.COERCE_TO_ZERO
works, but it doesn't seem to - Revert to EL 2.2 behavior returning default instead of: "The default coercion for nulls to non-primitive types (except String) returns nulls." from the EL 3.3 spec.
Environment
- Red Hat JBoss Enterprise Application Platform (JBoss EAP) 7
- Java Server Faces (JSF)
- Java Expression Language (EL)
- Upgrading an older application that used JSF 2.2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.