Thanks Patrick.
Let's resume:
1/ PortletPreferences.getValue(String key, String def)...
If a null string is retrieved for the key, the default value will be returned.
Having no values bound to the key and having a value which equals
null make no difference.
2/ PortletPreferences.getValues(String key, String[] def)...
If a null array is retrieved for the key, the default array will be returned.
Empty array and array containing null value(s) are valid arrays, thus
should be returned instead of the default array.
3/ portlet.xml...
<preference> element containing no <value> elements should be treated
as a preference with a null value bound to it.
Given the three rules above, some assertions in pluto-testsuite are wrong.
But the portlet TCK has no problem with that.
So, that's the deal.
Regards.
--
ZHENG Zhong
-
http://heavyz.blogspot.com/
-
http://people.apache.org/~zheng/
- [Portlet Spec.] Portlet preferences questions Zhong ZHENG
- Re: [Portlet Spec.] Portlet preferences questions Patrick Huber
- Re: [Portlet Spec.] Portlet preferences questions Zhong ZHENG
- Re: [Portlet Spec.] Portlet preferences questio... Patrick Huber
- Re: [Portlet Spec.] Portlet preferences que... Stefan Hepper
