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 "Neil Griffin (JIRA)" <ji...@apache.org> on 2017/11/25 18:27:00 UTC

[jira] [Created] (PLUTO-670) TCK: Contesting V2AddlRequestTests_SPEC2_11_Action_parameters6

Neil Griffin created PLUTO-670:
----------------------------------

             Summary: TCK: Contesting V2AddlRequestTests_SPEC2_11_Action_parameters6
                 Key: PLUTO-670
                 URL: https://issues.apache.org/jira/browse/PLUTO-670
             Project: Pluto
          Issue Type: Bug
          Components: tck
    Affects Versions: 3.0.0
            Reporter: Neil Griffin
            Assignee: Neil Griffin
             Fix For: 3.0.1


The test for V2AddlRequestTests_SPEC2_11_Action_parameters6 states:
{quote}Details: "The getParameterMap method must return an unmodifiable Map object"{quote}

The tests verifies this by trying to mutate a map value and then verifying that the mutation did not have any effect on the underlying map (a no-op):
{code:java|title=AddlRequestTests_SPEC2_11_Action.java}
        String tr2TestStringArray[] = {"Modified Value"};
        portletReq.getParameterMap().put("inputval", tr2TestStringArray);
        if ("V2AddlRequestTests_SPEC2_11_Action_parameters6"
            .equals(portletReq.getParameterMap().get("inputval")[0])) {
          tr2.setTcSuccess(true);
        }
{code}

The [JavaDoc for PortletRequest.getParameterMap()|https://portals.apache.org/pluto/portlet-3.0-apidocs/javax/portlet/PortletRequest.html#getParameterMap()] states:
{quote}Returns: an immutable Map containing parameter names as keys and parameter values as map values, or an empty Map if no parameters exist.{quote}

In order to fulfill this requirement, Liferay Portal wraps the underlying parameter map with {{Collections.unmodifiableMap()}}. Because of this, calling the {{put}} method throws an {{UnsupportedOperationException}} on Liferay.

The fix would be to have the test also pass if the {{put}} operation throws {{UnsupportedOperationException}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)