myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject [myfaces] branch master updated: refactored
Date Tue, 18 Dec 2018 21:19:55 GMT
This is an automated email from the ASF dual-hosted git repository.

tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/master by this push:
     new 9a2f5b5  refactored
9a2f5b5 is described below

commit 9a2f5b576a7190b5f8085517ac83a2d236e08b14
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Tue Dec 18 22:20:02 2018 +0100

    refactored
---
 .../javax/faces/view/facelets/CompositeFaceletHandler.java     |  1 +
 .../org/apache/myfaces/view/facelets/impl/DefaultFacelet.java  | 10 ++++------
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/api/src/main/java/javax/faces/view/facelets/CompositeFaceletHandler.java b/api/src/main/java/javax/faces/view/facelets/CompositeFaceletHandler.java
index 319f580..e9cf177 100644
--- a/api/src/main/java/javax/faces/view/facelets/CompositeFaceletHandler.java
+++ b/api/src/main/java/javax/faces/view/facelets/CompositeFaceletHandler.java
@@ -39,6 +39,7 @@ public final class CompositeFaceletHandler implements FaceletHandler
     /**
      * {@inheritDoc}
      */
+    @Override
     public void apply(FaceletContext ctx, UIComponent parent) throws IOException
     {
         for (int i = 0; i < len; i++)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/impl/DefaultFacelet.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/impl/DefaultFacelet.java
index 3191f19..3e66141 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/impl/DefaultFacelet.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/impl/DefaultFacelet.java
@@ -126,19 +126,18 @@ final class DefaultFacelet extends AbstractFacelet
     public void apply(FacesContext facesContext, UIComponent parent) throws IOException,
FacesException,
             FaceletException, ELException
     {
-        FaceletCompositionContext myFaceletContext = null;
+        FaceletCompositionContext myFaceletContext = FaceletCompositionContext.getCurrentInstance(facesContext);
         boolean faceletCompositionContextInitialized = false;
         boolean recordUniqueIds = false;
-        myFaceletContext = FaceletCompositionContext.getCurrentInstance(facesContext);
         if (myFaceletContext == null)
         {
             myFaceletContext = new FaceletCompositionContextImpl(_factory, facesContext);
             myFaceletContext.init(facesContext);
             faceletCompositionContextInitialized = true;
             if (_encodingHandler
-                    && !myFaceletContext.isBuildingViewMetadata()
                     && viewUniqueIdsCacheEnabled
-                    && _refreshPeriod <= 0)
+                    && _refreshPeriod <= 0
+                    && !myFaceletContext.isBuildingViewMetadata())
             {
                 List<String> uniqueIdList = ((EncodingHandler)_root).getUniqueIdList();
                 if (uniqueIdList == null)
@@ -221,8 +220,7 @@ final class DefaultFacelet extends AbstractFacelet
                 List<String> uniqueIdList = ((EncodingHandler)_root).getUniqueIdList();
                 if (recordUniqueIds &&  uniqueIdList == null)
                 {
-                    uniqueIdList = Collections.unmodifiableList(
-                            myFaceletContext.getUniqueIdList());
+                    uniqueIdList = Collections.unmodifiableList(myFaceletContext.getUniqueIdList());
                     ((EncodingHandler)_root).setUniqueIdList(uniqueIdList);
                 }
             }


Mime
View raw message