You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "ZHENG Zhong (JIRA)" <ji...@apache.org> on 2006/02/18 19:15:24 UTC

[jira] Commented: (PLUTO-210) [TCK] default preference value not returned correctly

    [ http://issues.apache.org/jira/browse/PLUTO-210?page=comments#action_12366905 ] 

ZHENG Zhong commented on PLUTO-210:
-----------------------------------

The portlet preferences rules (thanks to Patrick):

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.


> [TCK] default preference value not returned correctly
> -----------------------------------------------------
>
>          Key: PLUTO-210
>          URL: http://issues.apache.org/jira/browse/PLUTO-210
>      Project: Pluto
>         Type: Bug
>   Components: portlet container
>     Versions: 1.1.0
>     Reporter: ZHENG Zhong
>     Assignee: ZHENG Zhong
>      Fix For: 1.1.0

>
> If a preference is declared to have null value, getValue(name, def) will return null instead of the default value.

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