You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "Marc F." <ma...@gmail.com> on 2006/10/31 00:20:20 UTC
Storing null in PortletPreferences
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. So, I think Jetspeed 2 is
not following the specification correctly, right? The Portlet API docs says:
"The key cannot be null, but null values for the value parameter are
allowed."
Am I missing something, or is Jetspeed 2 really not obeying the rules very
well?
Re: Storing null in PortletPreferences
Posted by "Marc F." <ma...@gmail.com>.
Ate Douma wrote:
>
> This definitely looks like a bug.
> Can you create a JIRA issue for it
> (http://issues.apache.org/jira/browse/JS2)?
> I'll look into it then ASAP.
>
> Regards,
>
> Ate
>
Yes, it´s certainly a bug. I´ve already opened an issue:
http://issues.apache.org/jira/browse/JS2-607
Thanks!
Marc
--
View this message in context: http://www.nabble.com/Storing-null-in-PortletPreferences-tf2542812.html#a7184017
Sent from the Jetspeed - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: Storing null in PortletPreferences
Posted by Ate Douma <at...@douma.nu>.
Marc F. wrote:
> 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. So, I think Jetspeed 2 is
> not following the specification correctly, right? The Portlet API docs
> says:
>
> "The key cannot be null, but null values for the value parameter are
> allowed."
>
>
> Am I missing something, or is Jetspeed 2 really not obeying the rules very
> well?
This definitely looks like a bug.
Can you create a JIRA issue for it (http://issues.apache.org/jira/browse/JS2)?
I'll look into it then ASAP.
Regards,
Ate
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org