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 2018/03/24 18:41:00 UTC

[jira] [Commented] (PLUTO-697) Spec: Fortify Section A.3.2 titled "Clarifications that may make V1.0 Portlets Non-compliant" with additional details

    [ https://issues.apache.org/jira/browse/PLUTO-697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16412730#comment-16412730 ] 

Neil Griffin commented on PLUTO-697:
------------------------------------

@[~msnicklous]: I agree with your corrective findings and have updated the title and description of this issue accordingly. I also reverted the changes to \{{BaseURL.setParameter(String,String)}} and associated TCK test changes in PLUTO-696. If you concur, please consider fortifying Section A.3.2 of the Portlet 3.0 Specification with the suggested details at the end of the description.

> Spec: Fortify Section A.3.2 titled "Clarifications that may make V1.0 Portlets Non-compliant" with additional details
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: PLUTO-697
>                 URL: https://issues.apache.org/jira/browse/PLUTO-697
>             Project: Pluto
>          Issue Type: Bug
>          Components: spec
>    Affects Versions: 3.0.0
>            Reporter: Neil Griffin
>            Assignee: Scott Nicklous
>            Priority: Major
>
> This issue serves as a task for writing additional details in Section A.3.2 of the Portlet 3.0 Specification titled "Clarifications that may make V1.0 Portlets Non-compliant", which states the following:
> {quote}PortletURL.setParameter called with a null value as value did throw an IllegalStateException whereas in V2.0 it results in removing that parameter from the PortletURL.
> {quote}
> This sentence is not found in the Portlet 2.0 Specification but was added in the Portlet 3.0 Specification.
> The reason why this sentence was added was because:
> 1) The Portlet 1.0 Javadoc for [PortletURL.setParameter(String,String)|https://portals.apache.org/pluto/portlet-1.0-apidocs/javax/portlet/PortletURL.html#setParameter(java.lang.String,%20java.lang.String)] and [PorteltURL.setParameter(String,String[])|https://portals.apache.org/pluto/portlet-1.0-apidocs/javax/portlet/PortletURL.html#setParameter(java.lang.String,%20java.lang.String%5B%5D)] state the following:
> {quote}Throws:
>  java.lang.IllegalArgumentException - if name or values are null.
> {quote}
> *AND*
> 2) The Portlet 2.0 Javadoc for [BaseURL.setParameter(String, String)|http://portals.apache.org/pluto/portlet-2.0-apidocs/javax/portlet/BaseURL.html#setParameter(java.lang.String,%20java.lang.String)] and [BaseURL.setParameter(String, String[])|http://portals.apache.org/pluto/portlet-2.0-apidocs/javax/portlet/BaseURL.html#setParameter(java.lang.String,%20java.lang.String%5B%5D)] was changed to this:
> {quote}Throws:
>  java.lang.IllegalArgumentException - if name is null.
> {quote}
> *AND*
> 3) The Portlet 2.0 Javadoc for [BaseURL.setParameter(String, String)|http://portals.apache.org/pluto/portlet-2.0-apidocs/javax/portlet/BaseURL.html#setParameter(java.lang.String,%20java.lang.String)] states:
> {quote}A parameter value of null indicates that this parameter should be removed.
> {quote}
> *HOWEVER*
>  4) The Portlet 2.0 Javadoc for [BaseURL.setParameter(String, String[])|http://portals.apache.org/pluto/portlet-2.0-apidocs/javax/portlet/BaseURL.html#setParameter(java.lang.String,%20java.lang.String%5B%5D)] *does not* state that. In confirmation of this, the legacy Portlet 2.0 TCK SetParameterWithValuesIllegalArgumentExceptionTestPortlet expects that {{IllegalArgumentException}} be thrown (the Portlet 1.0 documented behavior) rather than the parameter being removed (the Portlet 2.0 documented behavior).
> In order to fortify the Portlet 3.0 Specification language with more details, the Portlet 3.0 Specification text should changed to the following:
> {quote}In V1.0 calling PortletURL.setParameter("paramName",(String)null) threw an IllegalStateException whereas in V2.0 it results in removing that parameter from the PortletURL. In V1.0 and V2.0 calling PortletURL.setParameter("paramName",(String[])null) threw an IllegalStateException whereas in V3.0 it results in removing the parameter from the PortletURL.
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)