Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.8, 2.1.9
-
None
-
None
-
Patch available
Description
Putting a null in a parameter value causes an NPE when creating the SAX events
java.lang.NullPointerException
at org.apache.cocoon.forms.util.I18nMessage.toSAX(I18nMessage.java:128)
at org.apache.cocoon.forms.validation.ValidationError.generateSaxFragment(ValidationError.java:85)
at org.apache.cocoon.forms.formmodel.Field.generateItemSaxFragment(Field.java:453)
at org.apache.cocoon.forms.formmodel.AbstractWidget.generateSaxFragment(AbstractWidget.java:498)
at org.apache.cocoon.forms.generation.JXMacrosHelper.generateWidget(JXMacrosHelper.java:292)
Note: this NPE then causes the Ajax transformer to go wonky for all users in all sessions. I'm still digging into that one.
I am attaching a patch (license granted to ASF) that allows null parameter values (using String.valueOf(parameters[i]) so that nulls are turned into "null".
java.lang.NullPointerException
at org.apache.cocoon.forms.util.I18nMessage.toSAX(I18nMessage.java:128)
at org.apache.cocoon.forms.validation.ValidationError.generateSaxFragment(ValidationError.java:85)
at org.apache.cocoon.forms.formmodel.Field.generateItemSaxFragment(Field.java:453)
at org.apache.cocoon.forms.formmodel.AbstractWidget.generateSaxFragment(AbstractWidget.java:498)
at org.apache.cocoon.forms.generation.JXMacrosHelper.generateWidget(JXMacrosHelper.java:292)
Note: this NPE then causes the Ajax transformer to go wonky for all users in all sessions. I'm still digging into that one.
I am attaching a patch (license granted to ASF) that allows null parameter values (using String.valueOf(parameters[i]) so that nulls are turned into "null".