Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0-FINAL, 2.1-dev
-
None
-
Windows XP.
Description
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.