Bug 56522 - jasper-el 8 does not comply to EL Spec 3.0 regarding null value handling
Summary: jasper-el 8 does not comply to EL Spec 3.0 regarding null value handling
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: EL (show other bugs)
Version: 8.0.5
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2014-05-14 08:11 UTC by Hanspeter Dünnenberger
Modified: 2022-06-14 12:52 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Hanspeter Dünnenberger 2014-05-14 08:11:03 UTC

Comment 1 Hanspeter Dünnenberger 2014-05-14 08:19:24 UTC
According to EL 3.0 Spec 1.23.1 and 1.23.2 the Rule for null String is to coerce to "". EL RI 3.0 behaves that way, but jasper-el 8 doesn't.

The null-String to "" coercion works well in ValueExpression.getValue(elContext), but in case of ValueExpression.setValue(elContext, null) jasper-el 8 does not coerce null-String to "", instead null ends up on the VE target.
Comment 2 Hanspeter Dünnenberger 2014-05-14 11:31:53 UTC
One more thing to mention: I think the EL Spec is wrong to define null String must be converted to "". 

If you also think the spec'ed behavior for null String is wrong, support the EL spec issue https://java.net/jira/browse/EL_SPEC-18
Comment 3 Mark Thomas 2014-05-14 21:21:09 UTC
This has been fixed in 8.0.x for 8.0.7 onwards.
Comment 4 Igor 2016-03-11 08:09:57 UTC
Please remove this aligment to spec on setValue method.

Because javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL do not WORK with jasper-el 8

EL RI javax.el-3.0.1-b08.jar - already did this.
Comment 5 Mark Thomas 2016-03-11 08:44:47 UTC
We can look at adding an option to make this configurable but, by default, Tomcat is going to remain specification compliant.
Comment 6 Mark Thomas 2022-06-14 12:52:44 UTC
As of 8.0.16 this can be worked around using a custom resolver (thanks to the fix for bz 57309).