Neil Griffin created PLUTO-671:
----------------------------------
Summary: TCK: Contesting
V2AddlEnvironmentTests_SPEC2_17_EventPreferences_setValues4
Key: PLUTO-671
URL: https://issues.apache.org/jira/browse/PLUTO-671
Project: Pluto
Issue Type: Bug
Components: tck
Affects Versions: 3.0.0
Reporter: Neil Griffin
Assignee: Scott Nicklous
Fix For: 3.0.1
The Portlet 3.0 Javadoc for [PortletPreferences.getValue(String key, String
def)|https://portals.apache.org/pluto/portlet-3.0-apidocs/javax/portlet/PortletPreferences.html#getValue(java.lang.String,%20java.lang.String)]
states:
{quote}If there are no preference values associated with the given key, or the
backing preference database is unavailable, it returns the given default value.
A null value is treated as a non-existent value.{quote}
And the Javadoc for [PortletPreferences.getValues(String key, String\[\]
def)|https://portals.apache.org/pluto/portlet-3.0-apidocs/javax/portlet/PortletPreferences.html#getValues(java.lang.String,%20java.lang.String%5B%5D)]
states:
{quote} Returns the specified default if there is no value associated with the
key, or if the backing store is inaccessible. A null value is treated as a
non-existent value.{quote}
The Javadoc for [PortletPreferences.setValue(String key, String ...
values)|https://portals.apache.org/pluto/portlet-3.0-apidocs/javax/portlet/PortletPreferences.html#setValues(java.lang.String,%20java.lang.String...)]
states:
{quote}Sets a multi-valued String preference for the specified key. The key
cannot be null, but null values in the values parameter are allowed. If the
same key contained already a String or String[] value it must be replaced by
the new value.{quote}
The V2AddlEnvironmentTests_SPEC2_17_EventPreferences_setValues4 test case
contains the following Java code:
{code:java|title=AddlEnvironmentTests_SPEC2_17_EventPreferences_event.java}
portletPrefs.setValues("tr0", (String[])null);
if (portletPrefs.getValue("tr0", "tr0") == null) {
tr0.setTcSuccess(true);
}
{code}
Given the language in the Javadoc, shouldn't the call to
{{portletPrefs.getValue("tr0", "tr0")}} return {{"tr0"}} and not {{null}}?
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)