Change the spec like this:
- 1.23.1, If X is null and Y is not a primitive type, return null.
- 1.23.2, If A is null: return null
JSF uses EL expressions to get and set bean properties. With the String behavior as defined in EL spec 3 null String will be converted to "" also without any user input. This is wrong behavior - null String should remain null also after an form edit roundtrip.
JSF has explicitly a parameter to define if empty String input should be handled as null. With EL 3 this null handling is rendered useless.
The problematic sections in the spec are:
- 1.2.1 the part: In the case of lvalues, the expected type is ignored and the provided value is coerced to the actual type of the property the expression points to, before that property is set.
- 1.23.1, If X is null and Y is not a primitive type and also not a String, return null.
- 1.23.2, If A is null: return ""
1.2.1 is problematic for JSF using mostly Object.class as expected type for ValueExpression - but according to 1.2.1 in VE.setValue(elContext, value) the expected type is ignored and therefore the String specific exceptional rules in 1.23.1 and 1.23.2 cause null to "" conversion in VE.setValue(elContext, value).
Looking at the rules 1.23.3 - 1.23.6 for all other non-primitive types null is always remaining null. Why not also for String - it's also a non-primitive.