Closed pizzi80 closed 1 year ago
fixed
Can you please put the fix for a separate issue in a separate PR?
Left comment in PR.
Another issue with same root cause: https://github.com/eclipse-ee4j/mojarra/issues/5220
I'll analyze and fix it for 2.3/3.0/4.0 because it also needs to be fixed in 2.3 and 3.0.
The propsed PR #5228 causes #{bean.action(null)}
/ #{bean.setValue(null)}
to retrieve empty string as argument which goes against the whole idea behind EmptyStringToNullELResolver
.
On second thought I don't think #{'hello'.concat(null)}
should work. I think the behavior is expected. I would find it unexpected when #{bean.method(null)}
gives an empty string as argument. If you want to automatically coerce null to empty string in this specific case then you should be using the +=
operator as in #{'hello' += null}
. This correctly prints hello
without NPE.
Describe the bug
with the
EmptyStringToNullELResolver
activeEL string concatenation has problems
To Reproduce
#{'hello'.concat(null)}
Expected behavior
hello
Additional context
Faces current master Java 17 Tomcat 10.1 Weld 5.0