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 E0599CA7B for ; Sun, 15 Sep 2013 00:14:51 +0000 (UTC) Received: (qmail 20615 invoked by uid 500); 15 Sep 2013 00:14:51 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 20580 invoked by uid 500); 15 Sep 2013 00:14:51 -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 20573 invoked by uid 99); 15 Sep 2013 00:14:51 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Sep 2013 00:14:51 +0000 Date: Sun, 15 Sep 2013 00:14:51 +0000 (UTC) From: "Leonardo Uribe (JIRA)" To: dev@myfaces.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (MYFACES-3745) No need to set FACELET_CONTEXT_KEY in DefaultFaceletContext constructor 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-3745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Leonardo Uribe resolved MYFACES-3745. ------------------------------------- Resolution: Fixed Fix Version/s: 2.1.13 2.0.19 Assignee: Leonardo Uribe Thanks to Paul Nicolucci for remember me this one. > No need to set FACELET_CONTEXT_KEY in DefaultFaceletContext constructor > ----------------------------------------------------------------------- > > Key: MYFACES-3745 > URL: https://issues.apache.org/jira/browse/MYFACES-3745 > Project: MyFaces Core > Issue Type: Improvement > Components: JSR-314 > Affects Versions: 2.0.18, 2.1.12 > Reporter: Paul Nicolucci > Assignee: Leonardo Uribe > Priority: Trivial > Fix For: 2.0.19, 2.1.13 > > Attachments: MyFaces-3745.patch > > Original Estimate: 1h > Remaining Estimate: 1h > > In MYFACES-3246 the following constructor was updated: > DefaultFaceletContext(FacesContext faces, AbstractFacelet facelet, FaceletCompositionContext mctx) > It no longer does the following: > //Set FACELET_CONTEXT_KEY on FacesContext attribute map, to > //reflect the current facelet context instance > faces.getAttributes().put(FaceletContext.FACELET_CONTEXT_KEY, this); > Setting the FACELET_CONTEXT_KEY is now done where ever the DefaultFaceletContext is created for instance in DefaultFacelet. > DefaultFaceletContext ctxWrapper = new DefaultFaceletContext((DefaultFaceletContext)ctx, this, false); > ctx.getFacesContext().getAttributes().put(FaceletContext.FACELET_CONTEXT_KEY, ctxWrapper); > However, the other constructor which is actually being called above still sets the FACELET_CONTEXT_KEY and so it is set in the constructor and then set again directly after creation. > //Update FACELET_CONTEXT_KEY on FacesContext attribute map, to > //reflect the current facelet context instance > ctx.getFacesContext().getAttributes().put(FaceletContext.FACELET_CONTEXT_KEY, this); > I think this was just an oversight when fixing this bug. But I think we should clean this up and I'll provide the trivial patch that can be applied. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira