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; also set initial sizes of collections
Date Wed, 30 Jan 2019 22:16:12 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 ec58676  refactored; also set initial sizes of collections
ec58676 is described below

commit ec5867642195c8d6596a7c5d653d15cc0238ec1d
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Wed Jan 30 23:16:47 2019 +0100

    refactored; also set initial sizes of collections
---
 .../view/facelets/FaceletViewDeclarationLanguage.java        |  2 +-
 .../myfaces/view/facelets/impl/DefaultFaceletContext.java    |  3 +--
 .../myfaces/view/facelets/tag/LegacyUserTagHandler.java      |  8 ++++----
 .../facelets/tag/composite/AttachedObjectTargetHandler.java  |  8 +++-----
 .../facelets/tag/composite/AttachedObjectTargetImpl.java     | 12 ++++--------
 .../view/facelets/tag/composite/AttributeHandler.java        |  3 +--
 .../composite/ClientBehaviorAttachedObjectTargetImpl.java    |  2 +-
 .../view/facelets/tag/composite/ClientBehaviorHandler.java   |  8 +++-----
 .../facelets/tag/composite/CompositeMetadataTargetImpl.java  |  1 +
 .../EditableValueHolderAttachedObjectTargetImpl.java         |  3 ---
 .../facelets/tag/composite/EditableValueHolderHandler.java   |  3 +--
 .../view/facelets/tag/composite/InsertChildrenHandler.java   |  3 +--
 .../view/facelets/tag/composite/InsertFacetHandler.java      |  7 ++-----
 .../view/facelets/tag/composite/InterfaceHandler.java        |  3 +--
 .../view/facelets/tag/jsf/html/HtmlOutputScriptHandler.java  |  3 +--
 .../myfaces/view/facelets/tag/ui/CompositionHandler.java     |  9 +++++----
 .../apache/myfaces/view/facelets/tag/ui/DecorateHandler.java | 10 ++++++----
 .../view/facelets/tag/ui/LegacyCompositionHandler.java       |  2 +-
 18 files changed, 37 insertions(+), 53 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
index 0f43439..a5d2198 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
@@ -1036,7 +1036,7 @@ public class FaceletViewDeclarationLanguage extends FaceletViewDeclarationLangua
                             if (ve != null)
                             {
                                 Object requiredValue = ve.getValue(elContext);
-                                Boolean required = null;
+                                Boolean required;
                                 if (requiredValue instanceof Boolean)
                                 {
                                     required = (Boolean) requiredValue;
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/impl/DefaultFaceletContext.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/impl/DefaultFaceletContext.java
index cab5b72..b915917 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/impl/DefaultFaceletContext.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/impl/DefaultFaceletContext.java
@@ -633,8 +633,7 @@ final class DefaultFaceletContext extends AbstractFaceletContext
     }
 
     @Override
-    public void pushAjaxHandlerToStack(
-            AjaxHandler parent)
+    public void pushAjaxHandlerToStack(AjaxHandler parent)
     {
         if (_ajaxHandlerStack == null)
         {
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/LegacyUserTagHandler.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/LegacyUserTagHandler.java
index 584b9d4..ccbe504 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/LegacyUserTagHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/LegacyUserTagHandler.java
@@ -64,15 +64,15 @@ final class LegacyUserTagHandler extends TagHandler implements TemplateClient,
C
         this._vars = this.tag.getAttributes().getAll();
         this._location = location;
         
-        Collection<DefineHandler> defines = TagHandlerUtils.findNextByType(nextHandler,
DefineHandler.class);
-        if (defines.isEmpty())
+        Collection<DefineHandler> handlers = TagHandlerUtils.findNextByType(nextHandler,
DefineHandler.class);
+        if (handlers.isEmpty())
         {
             _handlers = null;
         }
         else
         {
-            _handlers = new HashMap<String, DefineHandler>();
-            for (DefineHandler handler : defines)
+            _handlers = new HashMap<>(handlers.size());
+            for (DefineHandler handler : handlers)
             {
                 _handlers.put(handler.getName(), handler);
             }
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttachedObjectTargetHandler.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttachedObjectTargetHandler.java
index 0c4f5cb..da8c885 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttachedObjectTargetHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttachedObjectTargetHandler.java
@@ -102,8 +102,7 @@ public abstract class AttachedObjectTargetHandler<T extends AttachedObjectTarget
                 = FaceletCompositionContext.getCurrentInstance(ctx).getCompositeComponentFromStack();
 
         CompositeComponentBeanInfo beanInfo = 
-            (CompositeComponentBeanInfo) compositeBaseParent.getAttributes()
-            .get(UIComponent.BEANINFO_KEY);
+            (CompositeComponentBeanInfo) compositeBaseParent.getAttributes().get(UIComponent.BEANINFO_KEY);
         
         if (beanInfo == null)
         {
@@ -118,13 +117,12 @@ public abstract class AttachedObjectTargetHandler<T extends AttachedObjectTarget
         
         //1. Obtain the list mentioned as "targetList" on ViewDeclarationLanguage.retargetAttachedObjects
         List<AttachedObjectTarget> targetList = (List<AttachedObjectTarget>)
-            beanDescriptor.getValue(
-                    AttachedObjectTarget.ATTACHED_OBJECT_TARGETS_KEY);
+            beanDescriptor.getValue(AttachedObjectTarget.ATTACHED_OBJECT_TARGETS_KEY);
         
         if (targetList == null)
         {
             //2. If not found create it and set
-            targetList = new ArrayList<AttachedObjectTarget>();
+            targetList = new ArrayList<>(5);
             beanDescriptor.setValue(
                     AttachedObjectTarget.ATTACHED_OBJECT_TARGETS_KEY,
                     targetList);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttachedObjectTargetImpl.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttachedObjectTargetImpl.java
index abb58c8..7e7ebfa 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttachedObjectTargetImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttachedObjectTargetImpl.java
@@ -26,6 +26,7 @@ import javax.el.ValueExpression;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.view.AttachedObjectTarget;
+import org.apache.myfaces.util.ArrayUtils;
 import org.apache.myfaces.util.StringUtils;
 import org.apache.myfaces.view.facelets.tag.jsf.ComponentSupport;
 
@@ -36,9 +37,6 @@ import org.apache.myfaces.view.facelets.tag.jsf.ComponentSupport;
  */
 public class AttachedObjectTargetImpl implements AttachedObjectTarget, Serializable
 {    
-    /**
-     * 
-     */
     private static final long serialVersionUID = -7214478234269252354L;
     
     protected ValueExpression _name;
@@ -63,7 +61,7 @@ public class AttachedObjectTargetImpl implements AttachedObjectTarget, Serializa
     public List<UIComponent> getTargets(UIComponent topLevelComponent)
     {
         FacesContext facesContext = FacesContext.getCurrentInstance();
-        String [] targetsArray = getTargets(facesContext);
+        String[] targetsArray = getTargets(facesContext);
         
         if (targetsArray.length > 0)
         {
@@ -72,8 +70,6 @@ public class AttachedObjectTargetImpl implements AttachedObjectTarget, Serializa
             UIComponent facetBase = topLevelComponent.getFacet(UIComponent.COMPOSITE_FACET_NAME);
             for (String target : targetsArray)
             {
-                //UIComponent innerComponent = topLevelComponent.findComponent(
-                //        topLevelComponent.getId() + UINamingContainer.getSeparatorChar(facesContext)
+ target);
                 int separator = target.indexOf(separatorChar);
                 UIComponent innerComponent = null;
                 if (separator == -1)
@@ -119,13 +115,13 @@ public class AttachedObjectTargetImpl implements AttachedObjectTarget,
Serializa
         }
     }
     
-    public String [] getTargets(FacesContext context)
+    public String[] getTargets(FacesContext context)
     {
         if (_targets != null)
         {
             return StringUtils.splitShortString((String) _targets.getValue(context.getELContext()),
' ');
         }
-        return org.apache.myfaces.util.ArrayUtils.EMPTY_STRING_ARRAY;
+        return ArrayUtils.EMPTY_STRING_ARRAY;
     }
     
     public void setName(ValueExpression ve)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java
index 80421af..caf155f 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java
@@ -240,8 +240,7 @@ public class AttributeHandler extends TagHandler implements InterfaceDescriptorC
                 = FaceletCompositionContext.getCurrentInstance(ctx).getCompositeComponentFromStack();
 
         CompositeComponentBeanInfo beanInfo = 
-            (CompositeComponentBeanInfo) compositeBaseParent.getAttributes()
-            .get(UIComponent.BEANINFO_KEY);
+            (CompositeComponentBeanInfo) compositeBaseParent.getAttributes().get(UIComponent.BEANINFO_KEY);
         
         if (beanInfo == null)
         {
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/ClientBehaviorAttachedObjectTargetImpl.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/ClientBehaviorAttachedObjectTargetImpl.java
index 8ed569a..0a8d40e 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/ClientBehaviorAttachedObjectTargetImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/ClientBehaviorAttachedObjectTargetImpl.java
@@ -120,7 +120,7 @@ public class ClientBehaviorAttachedObjectTargetImpl implements ClientBehaviorAtt
         }
     }
     
-    public String [] getTargets(FacesContext context)
+    public String[] getTargets(FacesContext context)
     {
         if (_targets != null)
         {
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/ClientBehaviorHandler.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/ClientBehaviorHandler.java
index e416aa9..d229d0f 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/ClientBehaviorHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/ClientBehaviorHandler.java
@@ -131,8 +131,7 @@ public class ClientBehaviorHandler extends TagHandler implements InterfaceDescri
                 = FaceletCompositionContext.getCurrentInstance(ctx).getCompositeComponentFromStack();
 
         CompositeComponentBeanInfo beanInfo = 
-            (CompositeComponentBeanInfo) compositeBaseParent.getAttributes()
-            .get(UIComponent.BEANINFO_KEY);
+            (CompositeComponentBeanInfo) compositeBaseParent.getAttributes().get(UIComponent.BEANINFO_KEY);
         
         if (beanInfo == null)
         {
@@ -147,13 +146,12 @@ public class ClientBehaviorHandler extends TagHandler implements InterfaceDescri
         
         //1. Obtain the list mentioned as "targetList" on ViewDeclarationLanguage.retargetAttachedObjects
         List<AttachedObjectTarget> targetList = (List<AttachedObjectTarget>)
-            beanDescriptor.getValue(
-                    AttachedObjectTarget.ATTACHED_OBJECT_TARGETS_KEY);
+            beanDescriptor.getValue(AttachedObjectTarget.ATTACHED_OBJECT_TARGETS_KEY);
         
         if (targetList == null)
         {
             //2. If not found create it and set
-            targetList = new ArrayList<AttachedObjectTarget>();
+            targetList = new ArrayList<>(5);
             beanDescriptor.setValue(
                     AttachedObjectTarget.ATTACHED_OBJECT_TARGETS_KEY,
                     targetList);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeMetadataTargetImpl.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeMetadataTargetImpl.java
index 44a3955..27376b4 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeMetadataTargetImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeMetadataTargetImpl.java
@@ -59,6 +59,7 @@ final class CompositeMetadataTargetImpl extends MetadataTarget
         }
     }
 
+    @Override
     public PropertyDescriptor getProperty(String name)
     {
         PropertyDescriptor pd = _delegate.getProperty(name); 
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/EditableValueHolderAttachedObjectTargetImpl.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/EditableValueHolderAttachedObjectTargetImpl.java
index 7e6d40b..e0713d5 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/EditableValueHolderAttachedObjectTargetImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/EditableValueHolderAttachedObjectTargetImpl.java
@@ -29,9 +29,6 @@ public class EditableValueHolderAttachedObjectTargetImpl extends
         AttachedObjectTargetImpl implements EditableValueHolderAttachedObjectTarget
 {
 
-    /**
-     * 
-     */
     private static final long serialVersionUID = -9102891289180454L;
 
 }
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/EditableValueHolderHandler.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/EditableValueHolderHandler.java
index 5533f3a..9f7c523 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/EditableValueHolderHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/EditableValueHolderHandler.java
@@ -38,8 +38,7 @@ public class EditableValueHolderHandler extends AttachedObjectTargetHandler<Edit
     }
 
     @Override
-    protected EditableValueHolderAttachedObjectTarget createAttachedObjectTarget(
-            FaceletContext ctx)
+    protected EditableValueHolderAttachedObjectTarget createAttachedObjectTarget(FaceletContext
ctx)
     {
         EditableValueHolderAttachedObjectTargetImpl target = new EditableValueHolderAttachedObjectTargetImpl();
         
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertChildrenHandler.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertChildrenHandler.java
index 1954f71..750fc0b 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertChildrenHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertChildrenHandler.java
@@ -59,8 +59,7 @@ public class InsertChildrenHandler extends TagHandler implements ComponentContai
         if (actx.isBuildingCompositeComponentMetadata())
         {
             CompositeComponentBeanInfo beanInfo = 
-                (CompositeComponentBeanInfo) parentCompositeComponent.getAttributes()
-                .get(UIComponent.BEANINFO_KEY);
+                (CompositeComponentBeanInfo) parentCompositeComponent.getAttributes().get(UIComponent.BEANINFO_KEY);
             
             if (beanInfo == null)
             {
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertFacetHandler.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertFacetHandler.java
index 1f1907a..b00651f 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertFacetHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InsertFacetHandler.java
@@ -102,8 +102,7 @@ public class InsertFacetHandler extends TagHandler
                     = FaceletCompositionContext.getCurrentInstance(ctx).getCompositeComponentFromStack();
             
             CompositeComponentBeanInfo beanInfo = 
-                (CompositeComponentBeanInfo) compositeBaseParent.getAttributes()
-                .get(UIComponent.BEANINFO_KEY);
+                (CompositeComponentBeanInfo) compositeBaseParent.getAttributes().get(UIComponent.BEANINFO_KEY);
             
             if (beanInfo == null)
             {
@@ -122,9 +121,7 @@ public class InsertFacetHandler extends TagHandler
             {
                 //2. If not found create it and set
                 facetList = new ArrayList<String>();
-                beanDescriptor.setValue(
-                        INSERT_FACET_USED,
-                        facetList);
+                beanDescriptor.setValue(INSERT_FACET_USED, facetList);
             }
             
             facetList.add(facetName);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InterfaceHandler.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InterfaceHandler.java
index 5136f67..9f7a9b7 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InterfaceHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/InterfaceHandler.java
@@ -206,8 +206,7 @@ public class InterfaceHandler extends TagHandler implements InterfaceDescriptorC
                     = fcc.getCompositeComponentFromStack();
             
             CompositeComponentBeanInfo beanInfo = 
-                (CompositeComponentBeanInfo) compositeBaseParent.getAttributes()
-                .get(UIComponent.BEANINFO_KEY);
+                (CompositeComponentBeanInfo) compositeBaseParent.getAttributes().get(UIComponent.BEANINFO_KEY);
             
             if (beanInfo == null)
             {
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlOutputScriptHandler.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlOutputScriptHandler.java
index b7732f3..3d31f51 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlOutputScriptHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/html/HtmlOutputScriptHandler.java
@@ -76,8 +76,7 @@ public class HtmlOutputScriptHandler extends HtmlComponentHandler implements
Rel
 
 
     @Override
-    public void onComponentCreated(FaceletContext ctx, UIComponent c,
-            UIComponent parent)
+    public void onComponentCreated(FaceletContext ctx, UIComponent c, UIComponent parent)
     {
         UIComponent parentCompositeComponent
                 = FaceletCompositionContext.getCurrentInstance(ctx).getCompositeComponentFromStack();
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/CompositionHandler.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/CompositionHandler.java
index f28c8bc..0f38944 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/CompositionHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/CompositionHandler.java
@@ -19,7 +19,7 @@
 package org.apache.myfaces.view.facelets.tag.ui;
 
 import java.io.IOException;
-import java.util.Collection;
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.logging.Level;
@@ -74,8 +74,9 @@ public final class CompositionHandler extends TagHandler implements TemplateClie
         _template = getAttribute("template");
         if (_template != null)
         {
-            _handlers = new HashMap<>();
-            for (DefineHandler handler : TagHandlerUtils.findNextByType(nextHandler, DefineHandler.class))
+            ArrayList<DefineHandler> handlers = TagHandlerUtils.findNextByType(nextHandler,
DefineHandler.class);
+            _handlers = new HashMap<>(handlers.size());
+            for (DefineHandler handler : handlers)
             {
                 _handlers.put(handler.getName(), handler);
                 if (log.isLoggable(Level.FINE))
@@ -84,7 +85,7 @@ public final class CompositionHandler extends TagHandler implements TemplateClie
                 }
             }
 
-            Collection<ParamHandler> params = TagHandlerUtils.findNextByType(nextHandler,
ParamHandler.class);
+            ArrayList<ParamHandler> params = TagHandlerUtils.findNextByType(nextHandler,
ParamHandler.class);
             if (params.isEmpty())
             {
                 _params = null;
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/DecorateHandler.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/DecorateHandler.java
index ebaf144..a5c8e32 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/DecorateHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/DecorateHandler.java
@@ -19,6 +19,7 @@
 package org.apache.myfaces.view.facelets.tag.ui;
 
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
@@ -83,9 +84,10 @@ public final class DecorateHandler extends TagHandler implements TemplateClient,
     {
         super(config);
         _template = getRequiredAttribute("template");
-        _handlers = new HashMap<String, DefineHandler>();
-
-        for (DefineHandler handler : TagHandlerUtils.findNextByType(nextHandler, DefineHandler.class))
+        
+        ArrayList<DefineHandler> handlers = TagHandlerUtils.findNextByType(nextHandler,
DefineHandler.class);
+        _handlers = new HashMap<>(handlers.size());
+        for (DefineHandler handler : handlers)
         {
             _handlers.put(handler.getName(), handler);
             if (log.isLoggable(Level.FINE))
@@ -153,7 +155,7 @@ public final class DecorateHandler extends TagHandler implements TemplateClient,
                     if (!PhaseId.RESTORE_VIEW.equals(ctx.getFacesContext().getCurrentPhaseId()))
                     {
                         path = this._template.getValue(ctx);
-                        if (path == null || path.length() == 0)
+                        if (path == null || path.isEmpty())
                         {
                             return;
                         }
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyCompositionHandler.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyCompositionHandler.java
index d543a59..7078872 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyCompositionHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/ui/LegacyCompositionHandler.java
@@ -81,7 +81,7 @@ public final class LegacyCompositionHandler extends TagHandler implements
Templa
                 }
             }
 
-            ArrayList<LegacyParamHandler> params = TagHandlerUtils.findNextByType(nextHandler,

+            ArrayList<LegacyParamHandler> params = TagHandlerUtils.findNextByType(nextHandler,
                     LegacyParamHandler.class);
             if (params.isEmpty())
             {


Mime
View raw message