Neil Griffin created PLUTO-667:
----------------------------------
Summary: 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)