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

Neil Griffin commented on PLUTO-666:
------------------------------------

Fixed with commits 
[0e1b4897af42977293e9437d578563c9e9937d7f|https://github.com/apache/portals-pluto/commit/0e1b4897af42977293e9437d578563c9e9937d7f]
 and 
[a1d2a602e0231426cd6e51c22b6a2a024150b1e9|https://github.com/apache/portals-pluto/commit/a1d2a602e0231426cd6e51c22b6a2a024150b1e9].

> 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
>             Fix For: 3.0.1
>
>
> 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)

Reply via email to