cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Meyer (JIRA)" <j...@apache.org>
Subject [jira] Created: (COCOON-1785) I18nMessage - null parameter values causes NPE
Date Tue, 28 Feb 2006 16:48:42 GMT
I18nMessage - null parameter values causes NPE
----------------------------------------------

         Key: COCOON-1785
         URL: http://issues.apache.org/jira/browse/COCOON-1785
     Project: Cocoon
        Type: Bug
  Components: Blocks: Forms  
    Versions: 2.1.8, 2.1.9-dev (current SVN)    
    Reporter: Eric Meyer
 Attachments: I18nMessageNPE.txt

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".

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message