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/22 19:55:00 UTC

[jira] [Closed] (PLUTO-667) TCK: Contesting V2ResponseTests_MimeResponse_ApiRender_setContentType4 and V2ResponseTests_RenderResponse_ApiRender_setContentType2

     [ https://issues.apache.org/jira/browse/PLUTO-667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Neil Griffin closed PLUTO-667.
------------------------------
    Resolution: Fixed

Fixed in commit [280e27344b78c9ac514296b47e21a22855f7a6bd|https://github.com/apache/portals-pluto/commit/280e27344b78c9ac514296b47e21a22855f7a6bd]

> TCK: Contesting V2ResponseTests_MimeResponse_ApiRender_setContentType4 and V2ResponseTests_RenderResponse_ApiRender_setContentType2
> -----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PLUTO-667
>                 URL: https://issues.apache.org/jira/browse/PLUTO-667
>             Project: Pluto
>          Issue Type: Bug
>          Components: tck
>    Affects Versions: 3.0.0
>            Reporter: Neil Griffin
>            Assignee: Neil Griffin
>             Fix For: 3.0.1
>
>
> V2ResponseTests_MimeResponse_ApiRender_setContentType4 and V2ResponseTests_RenderResponse_ApiRender_setContentType2 simply try to call {{portletResp.setContentType("Invalid")}} in order to verify that {{IllegalArgumentException}} is thrown.
> While these tests are verifying a requirement as to validity of a content-type value, they execute *after* {{MimeResponse.getWriter()}} has been called. This conflicts with the [JavaDoc requirements in MimeResponse.setContentType(String)|https://portals.apache.org/pluto/portlet-3.0-apidocs/javax/portlet/MimeResponse.html#setContentType(java.lang.String)] which state:
> {quote} The portlet should set the content type before calling {{getWriter()}} or {{getPortletOutputStream()}}.{quote}
> The fix would be to re-order the test code so that the TCK calls {{portletResp.setContentType("Invalid")}} prior to calling {{getWriter()}}.



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