portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc F. (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Created: (JS2-607) An error occur when trying storing a null value in preferences
Date Sun, 05 Nov 2006 11:10:16 GMT
An error occur when trying storing a null value in preferences
--------------------------------------------------------------

                 Key: JS2-607
                 URL: http://issues.apache.org/jira/browse/JS2-607
             Project: Jetspeed 2
          Issue Type: Bug
          Components: Portlet Entities and Preferences
    Affects Versions: 2.0-FINAL
         Environment: Windows XP.
            Reporter: Marc F.


When I try storing a null value, like below:

public void processAction(ActionRequest aRequest, ActionResponse aResponse)
  throws PortletException, IOException {

  //...
  PortletPreferences prefs = aRequest.getPreferences();
  prefs.setValue("cellPhone", null);
  //...
}


An exception occur:

java.lang.NullPointerException
        at java.util.prefs.AbstractPreferences.put(AbstractPreferences.java
:224)
        at org.apache.jetspeed.om.preference.impl.PrefsPreference.setValueAt
(PrefsPreference.java:138)
        at org.apache.jetspeed.om.preference.impl.PrefsPreference.setValues(
PrefsPreference.java:235)
etc...


It occurs only when I try storing a null value. It is not in conformity to the Portlet API
documentation:

"The key cannot be null, but null values for the value parameter are
allowed."


Certainly Jetspeed 2 is not obeying the rules very
well.

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message