You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Chris Kulinski (JIRA)" <de...@myfaces.apache.org> on 2015/03/23 01:25:10 UTC
[jira] [Created] (MYFACES-3966) Setting oamEnableViewPool="false"
causes NullPointerException in ViewPoolProcessor.pushPartialView()
Chris Kulinski created MYFACES-3966:
---------------------------------------
Summary: 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.7, 2.2.0
Reporter: Chris Kulinski
Priority: Minor
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)