Dante Wang created PLUTO-666:
--------------------------------
Summary: TCK: Contesting AddlResponseTests_SPEC2_12_Render
Key: PLUTO-666
URL: https://issues.apache.org/jira/browse/PLUTO-666
Project: Pluto
Issue Type: Bug
Components: tck
Affects Versions: 3.0.0
Reporter: Dante Wang
Assignee: Scott Nicklous
According to 4.7.6:
{quote}In order to allow portlets running on streaming portals to set header
data, the portlet can set the javax.portlet.renderHeaders container runtime to
true. A portlet container supporting this container runtime option will set the
RENDER_PART render request attribute to indicate that header requests will be
processed.{quote}
According to 14.1.2.3:
{quote}If the RENDER_PART portlet request attribute is set, it indicates that
the render request will be processed twice in order to allow portlets running
on streaming portals to set header information and document HEAD section data.
Non-streaming portals will not set this attribute and thus the portlet should
set all necessary headers and produce markup in a single render request.{quote}
To summarize, if the portlet container doesn't support
"javax.portlet.renderHeaders", or the portal is not a streaming portal, the
RENDER_PART portlet request attribute shouldn't be set.
In AddlResponseTests_SPEC2_12_Render.render method, there are lines like
{code:java}
portletReq.getAttribute(PortletRequest.RENDER_PART).equals("RENDER_MARKUP")
{code}
which assumes that a non-null value can be returned by
{{getAttribute(PortletRequest.RENDER_PART)}}, which is wrong and causes NPE
since there are cases that the Portal doesn't need to set the attribute.
The following test cases are affected because of the NPE:
V2AddlResponseTests_SPEC2_12_Render_cookie8
V2AddlResponseTests_SPEC2_12_Render_cookie9
V2AddlResponseTests_SPEC2_12_Render_cookie10
V2AddlResponseTests_SPEC2_12_Render_cookie11
V2AddlResponseTests_SPEC2_12_Render_cookie12
V2AddlResponseTests_SPEC2_12_Render_contentType5
V2AddlResponseTests_SPEC2_12_Render_characterEncoding4
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)