You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "König, Andreas, NM-HVD" <an...@bertelsmann.de> on 2022/08/03 08:04:25 UTC

JSF NULL-String is coercing to NULL instead of empty String

Tomcat Version: 9.0.60
Primefaces: 11.0.5

Hello,
recently we updated our environment from Tomcat Version 9.0.59 to 9.0.60.
Since the update, we are having issues with some views because NULL-Strings are no longer coerced to Empty-Strings.
I know the current behaviour is compliant to the EL specification and the former behaviour was not.
But this update has caused some trouble, because we didn't expect such a change in a minor version.

The NPE is thrown when we use String.concat method in expression language,  e.g. .concat(hist.newValue)
Currently we fixed it with implementing NULL-Checks.

But is there a possibility to configure the former behaviour?

Thank you in advance.
Best regards,
Andreas König

Re: JSF NULL-String is coercing to NULL instead of empty String

Posted by Han Li <ao...@gmail.com>.
You can read Mark’s comment, I hope it will help you.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66161#c3

> 2022年8月3日 16:04,König, Andreas, NM-HVD <an...@bertelsmann.de> 写道:
> 
> Tomcat Version: 9.0.60
> Primefaces: 11.0.5
> 
> Hello,
> recently we updated our environment from Tomcat Version 9.0.59 to 9.0.60.
> Since the update, we are having issues with some views because NULL-Strings are no longer coerced to Empty-Strings.
> I know the current behaviour is compliant to the EL specification and the former behaviour was not.
> But this update has caused some trouble, because we didn't expect such a change in a minor version.
> 
> The NPE is thrown when we use String.concat method in expression language,  e.g. .concat(hist.newValue)
> Currently we fixed it with implementing NULL-Checks.
> 
> But is there a possibility to configure the former behaviour?
> 
> Thank you in advance.
> Best regards,
> Andreas König


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org