JSF string conversion to null after migrating from EAP 6 to EAP 7
Issue
- JSF selectOneRadio: null instead of empty string after upgrade to EAP 7
- Incoherent string conversions to null on selectOneMenu
- We are migrating from EAP 6.4 to 7.0 and have many NullPointerExceptions on jsf pages containing selectOneMenus working on string.
If the selectOneMenu has an empty option (in which the value is initialized as empty string), on EAP7 the submitted value is null while on EAP6 is, as expected, empty string.
As a consequence we have NullPointerExceptions because our code does not test for values != null assuming strings always not null.
This behaviour differs from, for example, inputTexts in which empty strings are always submitted as empty strings (on both EAP6 and EAP7).
So this behaviour is not related to a global configuration which defines the coercion strategy but differs from uiInput to uiInput.
Environment
Red Hat JBoss Enterprise Application Platform (EAP) 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.