myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject [myfaces] 02/02: cosmetics
Date Fri, 02 Aug 2019 09:45:23 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

commit 30efb69367fe74fe3354727e3869783a8788a247
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Fri Aug 2 11:43:46 2019 +0200

    cosmetics
---
 .../apache/myfaces/view/facelets/tag/UserTagHandler.java    |  3 ++-
 .../facelets/tag/composite/AttachedObjectTargetImpl.java    |  5 ++---
 .../tag/composite/CompositeComponentPropertyDescriptor.java |  2 +-
 .../view/facelets/tag/composite/InsertFacetHandler.java     |  1 -
 .../view/facelets/tag/jsf/ComponentTagHandlerDelegate.java  | 13 ++++++++-----
 5 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/UserTagHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/UserTagHandler.java
index 99f74a7..c82c0d6 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/UserTagHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/UserTagHandler.java
@@ -116,6 +116,7 @@ final class UserTagHandler extends TagHandler implements TemplateClient,
Compone
             }
             actx.pushTemplateContext(new TemplateContextImpl());
             actx.pushClient(this);
+
             FaceletCompositionContext fcc = FaceletCompositionContext.getCurrentInstance(ctx);
             String uniqueId = fcc.startComponentUniqueIdSection();
             try
@@ -127,7 +128,6 @@ final class UserTagHandler extends TagHandler implements TemplateClient,
Compone
                         FaceletState faceletState = ComponentSupport.getFaceletState(ctx,
parent, true);
                         for (int i = 0; i < this._vars.length; i++)
                         {
-                            //((AbstractFaceletContext) ctx).getTemplateContext().setParameter(names[i],
values[i]);
                             faceletState.putBinding(uniqueId, names[i], values[i]);
                             ValueExpression ve = new FaceletStateValueExpression(uniqueId,
names[i]);
                             actx.getTemplateContext().setParameter(names[i], ve);
@@ -141,6 +141,7 @@ final class UserTagHandler extends TagHandler implements TemplateClient,
Compone
                         }
                     }
                 }
+
                 // Disable caching always, even in 'always' mode
                 // The only mode that can support EL caching in this condition is alwaysRedirect.
                 if (!ELExpressionCacheMode.alwaysRecompile.equals(actx.getELExpressionCacheMode()))
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 2b0a59c..c4cc65c 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
@@ -40,7 +40,6 @@ public class AttachedObjectTargetImpl implements AttachedObjectTarget, Serializa
     private static final long serialVersionUID = -7214478234269252354L;
     
     protected ValueExpression _name;
-    
     protected ValueExpression _targets;
 
     public AttachedObjectTargetImpl()
@@ -65,7 +64,7 @@ public class AttachedObjectTargetImpl implements AttachedObjectTarget, Serializa
         
         if (targetsArray.length > 0)
         {
-            List<UIComponent> targetsList = new ArrayList<UIComponent>(targetsArray.length);
+            List<UIComponent> targetsList = new ArrayList<>(targetsArray.length);
             final char separatorChar = facesContext.getNamingContainerSeparatorChar();
             UIComponent facetBase = topLevelComponent.getFacet(UIComponent.COMPOSITE_FACET_NAME);
             for (String target : targetsArray)
@@ -106,7 +105,7 @@ public class AttachedObjectTargetImpl implements AttachedObjectTarget,
Serializa
                         name, null);
                 if (innerComponent != null)
                 {
-                    List<UIComponent> targetsList = new ArrayList<UIComponent>(1);
+                    List<UIComponent> targetsList = new ArrayList<>(1);
                     targetsList.add(innerComponent);
                     return targetsList;
                 }
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentPropertyDescriptor.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentPropertyDescriptor.java
index 1a92ef4..8d705cb 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentPropertyDescriptor.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeComponentPropertyDescriptor.java
@@ -83,7 +83,7 @@ public class CompositeComponentPropertyDescriptor extends PropertyDescriptor
         
         // Properties that comes here are targets, default, required,
         // method-signature and type.
-        Map<String,Object> map = new HashMap<String, Object>(6,1);
+        Map<String,Object> map = new HashMap<>(6,1);
         
         for (Enumeration<String> e = attributeNames(); e.hasMoreElements();)
         {
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 6bd1c18..7bf9e3b 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
@@ -143,7 +143,6 @@ public class InsertFacetHandler extends TagHandler
             String facetName = _name.getValue(ctx);
             
             AbstractFaceletContext actx = (AbstractFaceletContext) ctx;
-            
             actx.includeCompositeComponentDefinition(parent, facetName);
         }
         
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentTagHandlerDelegate.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentTagHandlerDelegate.java
index 0396b7e..0034385 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentTagHandlerDelegate.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/jsf/ComponentTagHandlerDelegate.java
@@ -236,6 +236,7 @@ public class ComponentTagHandlerDelegate extends TagHandlerDelegate
                 }
             }
         }
+
         boolean componentFound = false;
         if (c != null)
         {
@@ -284,8 +285,7 @@ public class ComponentTagHandlerDelegate extends TagHandlerDelegate
 
             if (facesContext.isProjectStage(ProjectStage.Development))
             {
-                c.getAttributes().put(UIComponent.VIEW_LOCATION_KEY,
-                        _delegate.getTag().getLocation());
+                c.getAttributes().put(UIComponent.VIEW_LOCATION_KEY, _delegate.getTag().getLocation());
             }
 
             // assign our unique id
@@ -330,8 +330,7 @@ public class ComponentTagHandlerDelegate extends TagHandlerDelegate
             if (_relocatableResourceHandler != null && 
                 _relocatableResourceHandler instanceof ComponentRelocatableResourceHandler)
             {
-                UIComponent parentCompositeComponent
-                        = mctx.getCompositeComponentFromStack();
+                UIComponent parentCompositeComponent = mctx.getCompositeComponentFromStack();
                 if (parentCompositeComponent != null)
                 {
                     c.getAttributes().put(CompositeComponentELUtils.LOCATION_KEY,
@@ -391,6 +390,7 @@ public class ComponentTagHandlerDelegate extends TagHandlerDelegate
                 }
                 ComponentSupport.setCachedFacesContext(c, facesContext);
             }
+            
             if (facetName == null)
             {
                 parent.getChildren().remove(c);
@@ -399,6 +399,7 @@ public class ComponentTagHandlerDelegate extends TagHandlerDelegate
             {
                 ComponentSupport.removeFacet(ctx, parent, c, facetName);
             }
+            
             if (mctx.isRefreshingSection())
             {
                 ComponentSupport.setCachedFacesContext(c, null);
@@ -406,7 +407,6 @@ public class ComponentTagHandlerDelegate extends TagHandlerDelegate
             }
         }
 
-
         if (!componentFound)
         {
             if (c instanceof ClientBehaviorHolder && !UIComponent.isCompositeComponent(c))
@@ -438,6 +438,7 @@ public class ComponentTagHandlerDelegate extends TagHandlerDelegate
                 facesContext.setProcessingEvents(false);
                 ComponentSupport.setCachedFacesContext(c, facesContext);
             }
+            
             if (facetName == null)
             {
                 parent.getChildren().add(c);
@@ -446,6 +447,7 @@ public class ComponentTagHandlerDelegate extends TagHandlerDelegate
             {
                 ComponentSupport.addFacet(ctx, parent, c, facetName);
             }
+            
             if (componentFound && mctx.isRefreshingSection())
             {
                 ComponentSupport.setCachedFacesContext(c, null);
@@ -667,6 +669,7 @@ public class ComponentTagHandlerDelegate extends TagHandlerDelegate
                 addEnclosingValidator(context, component, entry.getKey(), entry.getValue());
             }
         }
+        
         // add all defaultValidators
         Map<String, String> defaultValidators = context.getApplication().getDefaultValidatorInfo();
         if (defaultValidators != null && !defaultValidators.isEmpty())


Mime
View raw message