Return-Path: X-Original-To: apmail-myfaces-dev-archive@www.apache.org Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 84F01172E3 for ; Thu, 26 Mar 2015 09:12:55 +0000 (UTC) Received: (qmail 42473 invoked by uid 500); 26 Mar 2015 09:12:55 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 42421 invoked by uid 500); 26 Mar 2015 09:12:55 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 42400 invoked by uid 99); 26 Mar 2015 09:12:55 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Mar 2015 09:12:55 +0000 Date: Thu, 26 Mar 2015 09:12:55 +0000 (UTC) From: "Chris Kulinski (JIRA)" To: dev@myfaces.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MYFACES-3966) Setting oamEnableViewPool="false" causes NullPointerException in ViewPoolProcessor.pushPartialView() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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 . 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)