myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Kulinski (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (MYFACES-3966) Setting oamEnableViewPool="false" causes NullPointerException in ViewPoolProcessor.pushPartialView()
Date Thu, 26 Mar 2015 09:12:55 GMT

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

Chris Kulinski commented on MYFACES-3966:
-----------------------------------------

Thanks Leonardo. This patch resolves our issues and allows us to disable pooling per view.


> Setting oamEnableViewPool="false" causes NullPointerException in ViewPoolProcessor.pushPartialView()
> ----------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3966
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3966
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.2.0, 2.2.7
>            Reporter: Chris Kulinski
>            Assignee: Leonardo Uribe
>            Priority: Minor
>             Fix For: 2.2.8
>
>
> In testing View Pooling, we disabled it for specific views, using <f:view oamEnableViewPool="false">.
 Using this tag, view pooling is disabled, but there's a NullPointerException in ViewPoolProcessor.pushPartialView().
 We originally saw the issue with 2.2.0, but it persists when upgrading to 2.2.7.
> A simple patch fixed the issue for us, by checking if the viewPool is null, before  executing
isWorthToRecycleThisView().  Is this the preferred way to fix this defect, or will we encounter
additional issues with further testing?
> diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/ViewPoolProcessor.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/ViewPoolProcessor.java
> index 08c10e1..b4d9025 100644
> --- a/impl/src/main/java/org/apache/myfaces/view/facelets/ViewPoolProcessor.java
> +++ b/impl/src/main/java/org/apache/myfaces/view/facelets/ViewPoolProcessor.java
> @@ -447,7 +447,7 @@ public void pushPartialView(FacesContext context, UIViewRoot view,
FaceletState
>      {
>          ViewPool viewPool = getViewPool(context, view);
>          
> -        if (viewPool.isWorthToRecycleThisView(context, view))
> +        if (viewPool != null && viewPool.isWorthToRecycleThisView(context, view))
>          {
>              ViewStructureMetadata viewStructureMetadata = null;
>              if (faceletViewState == null)
>  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message