You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2019/07/11 07:42:44 UTC

[myfaces] branch master updated: refactored

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 eeda2d8  refactored
eeda2d8 is described below

commit eeda2d846c99686eb83f57d281c5873671167ade
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Thu Jul 11 09:42:36 2019 +0200

    refactored
---
 .../facelets/compiler/AttributeInstruction.java    |  2 -
 .../myfaces/view/facelets/compiler/Compiler.java   |  2 +-
 .../facelets/compiler/CompositeComponentUnit.java  |  1 +
 .../view/facelets/compiler/DoctypeInstruction.java |  3 --
 .../view/facelets/compiler/DoctypeUnit.java        |  5 ---
 .../facelets/compiler/DuplicateIdException.java    |  1 -
 .../facelets/compiler/EndElementInstruction.java   |  3 ++
 .../facelets/compiler/FaceletsCompilerSupport.java |  3 +-
 .../compiler/FaceletsProcessingInstructions.java   |  8 ----
 .../view/facelets/compiler/NamespaceUnit.java      |  2 +-
 .../compiler/RefreshDynamicComponentListener.java  | 12 +++---
 .../view/facelets/compiler/SAXCompiler.java        |  4 +-
 .../compiler/TagLibraryConfigUnmarshallerImpl.java | 31 ---------------
 .../myfaces/view/facelets/compiler/TagUnit.java    |  4 --
 .../view/facelets/compiler/TextInstruction.java    |  1 -
 .../myfaces/view/facelets/compiler/TextUnit.java   | 10 -----
 .../facelets/compiler/UIInstructionHandler.java    |  5 ---
 .../view/facelets/compiler/UIInstructions.java     |  1 -
 .../facelets/el/CompositeComponentELUtils.java     |  4 +-
 .../view/facelets/el/CompositeFunctionMapper.java  |  1 -
 .../view/facelets/el/CompositeVariableMapper.java  |  1 -
 .../view/facelets/el/DefaultFunctionMapper.java    |  2 +-
 .../view/facelets/el/DefaultVariableMapper.java    |  2 +-
 .../el/ValueExpressionMethodExpression.java        |  4 ++
 .../view/facelets/el/VariableMapperWrapper.java    |  2 +-
 .../view/facelets/impl/FaceletCacheImpl.java       | 13 +++----
 .../impl/FaceletCompositionContextImpl.java        | 37 ++++++++----------
 .../view/facelets/impl/PageContextImpl.java        |  2 +-
 .../view/facelets/impl/SectionUniqueIdCounter.java | 45 +++++++++++-----------
 .../view/facelets/impl/TemplateContextImpl.java    | 25 +++++-------
 30 files changed, 77 insertions(+), 159 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/AttributeInstruction.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/AttributeInstruction.java
index b78fa1e..dad43d5 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/AttributeInstruction.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/AttributeInstruction.java
@@ -31,9 +31,7 @@ import org.apache.myfaces.view.facelets.el.ELText;
 final class AttributeInstruction implements Instruction
 {
     private final String _alias;
-
     private final String _attr;
-
     private final ELText _txt;
 
     public AttributeInstruction(String alias, String attr, ELText txt)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/Compiler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/Compiler.java
index a0d8bde..a10d807 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/Compiler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/Compiler.java
@@ -167,7 +167,7 @@ public abstract class Compiler
         return el;
     }
 
-    private final Object featureInstance(String name)
+    private Object featureInstance(String name)
     {
         String type = (String) this.features.get(name);
         if (type != null)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/CompositeComponentUnit.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/CompositeComponentUnit.java
index 65088b7..f83e6e0 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/CompositeComponentUnit.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/CompositeComponentUnit.java
@@ -36,6 +36,7 @@ class CompositeComponentUnit extends CompilationUnit
     {
     }
 
+    @Override
     public FaceletHandler createFaceletHandler()
     {
         return new CompositeComponentDefinitionTagHandler(this.getNextFaceletHandler());
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/DoctypeInstruction.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/DoctypeInstruction.java
index e821195..3ff6c87 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/DoctypeInstruction.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/DoctypeInstruction.java
@@ -30,11 +30,8 @@ import javax.faces.context.FacesContext;
 public class DoctypeInstruction implements Instruction
 {
     private final String name;
-    
     private final String publicId;
-    
     private final String systemId;
-    
     private final boolean html5Doctype;
 
     public DoctypeInstruction(String name, String publicId, String systemId, boolean html5Doctype)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/DoctypeUnit.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/DoctypeUnit.java
index 2fd5996..2c14412 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/DoctypeUnit.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/DoctypeUnit.java
@@ -29,15 +29,10 @@ import org.apache.myfaces.view.facelets.el.ELText;
 final class DoctypeUnit extends CompilationUnit
 {
     private final String alias;
-
     private final String id;
-    
     private final String name;
-    
     private final String publicId;
-    
     private final String systemId;
-    
     private final boolean html5Doctype;
 
     public DoctypeUnit(String alias, String id, String name, String publicId, String systemId, boolean html5Doctype)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/DuplicateIdException.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/DuplicateIdException.java
index b2330ff..34de79c 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/DuplicateIdException.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/DuplicateIdException.java
@@ -30,7 +30,6 @@ public class DuplicateIdException extends FacesException
 {
 
     private final UIComponent firstComponent;
-
     private final UIComponent secondComponent;
 
     public DuplicateIdException(String message, UIComponent firstComponent, UIComponent secondComponent)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/EndElementInstruction.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/EndElementInstruction.java
index 0f5e467..bf371d2 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/EndElementInstruction.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/EndElementInstruction.java
@@ -33,16 +33,19 @@ final class EndElementInstruction implements Instruction
         this.element = element;
     }
 
+    @Override
     public void write(FacesContext context) throws IOException
     {
         context.getResponseWriter().endElement(this.element);
     }
 
+    @Override
     public Instruction apply(ExpressionFactory factory, ELContext ctx)
     {
         return this;
     }
 
+    @Override
     public boolean isLiteral()
     {
         return true;
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsCompilerSupport.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsCompilerSupport.java
index c4fafc5..00b38f8 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsCompilerSupport.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsCompilerSupport.java
@@ -187,8 +187,7 @@ public class FaceletsCompilerSupport
                         context.getExternalContext()).getFaceletProcessingConfigurations());
     }
     
-    private static class LoadComponentTagDeclarationFacesContextWrapper 
-        extends FacesContextWrapper
+    private static class LoadComponentTagDeclarationFacesContextWrapper extends FacesContextWrapper
     {
         private FacesContext delegate;
         private UIViewRoot root;
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsProcessingInstructions.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsProcessingInstructions.java
index 406a280..27e6add 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsProcessingInstructions.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/FaceletsProcessingInstructions.java
@@ -63,21 +63,13 @@ public final class FaceletsProcessingInstructions
                 true, true, true, true, false, true, false, true);
 
     private final boolean consumeXmlDocType;
-    
     private final boolean consumeXmlDeclaration;
-    
     private final boolean consumeProcessingInstructions;
-    
     private final boolean consumeCDataSections;
-    
     private final boolean escapeInlineText;
-    
     private final boolean consumeXMLComments;
-    
     private final boolean swallowCDataContent;
-    
     private final boolean compressSpaces;
-    
     private final boolean html5Doctype;
     
     public static FaceletsProcessingInstructions getProcessingInstructions(String processAs)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/NamespaceUnit.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/NamespaceUnit.java
index 5dad060..48e7df5 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/NamespaceUnit.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/NamespaceUnit.java
@@ -33,7 +33,7 @@ import org.apache.myfaces.view.facelets.tag.TagLibrary;
 final class NamespaceUnit extends CompilationUnit
 {
 
-    private final Map<String, String> ns = new HashMap<String, String>();
+    private final Map<String, String> ns = new HashMap<>();
     private final TagLibrary library;
 
     public NamespaceUnit(TagLibrary library)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/RefreshDynamicComponentListener.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/RefreshDynamicComponentListener.java
index 47a4dc8..08f2193 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/RefreshDynamicComponentListener.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/RefreshDynamicComponentListener.java
@@ -203,15 +203,15 @@ public final class RefreshDynamicComponentListener implements
         }
         else if (values[0] instanceof Object[])
         {
-            Object[] def = (Object[])values[0];
-            String ns = ( ((Integer)def[0]).intValue() == 0) ? 
+            Object[] def = (Object[]) values[0];
+            String ns = (((Integer) def[0]) == 0) ? 
                 CompositeResourceLibrary.NAMESPACE_PREFIX :
                 CompositeResourceLibrary.ALIAS_NAMESPACE_PREFIX;
-            taglibURI = ns + (String)(((Object[])values[0])[1]);
+            taglibURI = ns + (String) ((Object[]) values[0])[1];
         }
-        tagName = (String)values[1];
-        attributes = (Map<String,Object>) values[2];
-        baseKey = (String)values[3];
+        tagName = (String) values[1];
+        attributes = (Map<String, Object>) values[2];
+        baseKey = (String) values[3];
     }
 
     @Override
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/SAXCompiler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/SAXCompiler.java
index 6d48bd6..fb4ce1c 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/SAXCompiler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/SAXCompiler.java
@@ -127,8 +127,8 @@ public final class SAXCompiler extends Compiler
             TagAttribute[] ta = new TagAttribute[len];
             for (int i = 0; i < len; i++)
             {
-                ta[i] = new TagAttributeImpl(this.createLocation(), attrs.getURI(i), attrs.getLocalName(i), attrs
-                        .getQName(i), attrs.getValue(i));
+                ta[i] = new TagAttributeImpl(this.createLocation(), attrs.getURI(i), attrs.getLocalName(i),
+                        attrs.getQName(i), attrs.getValue(i));
             }
             return new TagAttributesImpl(ta);
         }
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfigUnmarshallerImpl.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfigUnmarshallerImpl.java
index c1e82a9..23c751e 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfigUnmarshallerImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfigUnmarshallerImpl.java
@@ -135,33 +135,19 @@ public class TagLibraryConfigUnmarshallerImpl
     private static class LibraryHandler extends DefaultHandler
     {
         private final URL source;
-        
         private FaceletTagLibraryImpl library;
-
         private final StringBuffer buffer;
-
         private Locator locator;
-
         private String tagName;
-
         private String converterId;
-
         private String validatorId;
-        
         private String behaviorId;
-
         private String componentType;
-
         private String rendererType;
-
         private String functionName;
-
         private String handlerClass;
-
         private String functionClass;
-
         private String functionSignature;
-        
         private String resourceId;
        
         public LibraryHandler(URL source)
@@ -261,13 +247,10 @@ public class TagLibraryConfigUnmarshallerImpl
                         throw new IllegalStateException("No <namespace> element");
                     }
 
-                    //TagLibraryImpl impl = (TagLibraryImpl) this.library;
-
                     if ("tag".equals(qName))
                     {
                         if (this.handlerClass != null)
                         {
-                            //impl.putTagHandler(this.tagName, this.handlerClass);
                             getLibraryImpl().addTag(
                                 new FaceletTagImpl(this.tagName, 
                                     new FaceletHandlerTagImpl(this.handlerClass)) );
@@ -276,15 +259,12 @@ public class TagLibraryConfigUnmarshallerImpl
                     }
                     else if ("handler-class".equals(qName))
                     {
-                        //String cName = this.captureBuffer();
-                        //this.handlerClass = createClass(TagHandler.class, cName);
                         this.handlerClass = this.captureBufferEmptyNull();
                     }
                     else if ("component".equals(qName))
                     {
                         if (this.handlerClass != null)
                         {
-                            //impl.putComponent(this.tagName, this.componentType, this.rendererType, this.handlerClass);
                             getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                 new FaceletComponentTagImpl(this.componentType, this.rendererType, 
                                     this.handlerClass, null)));
@@ -292,7 +272,6 @@ public class TagLibraryConfigUnmarshallerImpl
                         }
                         else if (this.resourceId != null)
                         {
-                            //impl.putComponentFromResourceId(this.tagName, this.resourceId);
                             getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                 new FaceletComponentTagImpl(null, null, null, this.resourceId)));
                             this.resourceId = null;
@@ -303,7 +282,6 @@ public class TagLibraryConfigUnmarshallerImpl
                             getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                 new FaceletComponentTagImpl(this.componentType, this.rendererType, null, null)));
                             this.handlerClass = null;
-                            //impl.putComponent(this.tagName, this.componentType, this.rendererType);
                         }
                     }
                     else if ("converter-id".equals(qName))
@@ -314,14 +292,12 @@ public class TagLibraryConfigUnmarshallerImpl
                     {
                         if (this.handlerClass != null)
                         {
-                            //impl.putConverter(this.tagName, this.converterId, handlerClass);
                             getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                 new FaceletConverterTagImpl(this.converterId, this.handlerClass)));
                             this.handlerClass = null;
                         }
                         else
                         {
-                            //impl.putConverter(this.tagName, this.converterId);
                             getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                 new FaceletConverterTagImpl(this.converterId)));
                         }
@@ -335,14 +311,12 @@ public class TagLibraryConfigUnmarshallerImpl
                     {
                         if (this.handlerClass != null)
                         {
-                            //impl.putValidator(this.tagName, this.validatorId, handlerClass);
                             getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                 new FaceletValidatorTagImpl(this.validatorId, this.handlerClass)));
                             this.handlerClass = null;
                         }
                         else
                         {
-                            //impl.putValidator(this.tagName, this.validatorId);
                             getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                 new FaceletValidatorTagImpl(this.validatorId)));
                         }
@@ -356,14 +330,12 @@ public class TagLibraryConfigUnmarshallerImpl
                     {
                         if (this.handlerClass != null)
                         {
-                            //impl.putBehavior(this.tagName, this.behaviorId, handlerClass);
                             getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                 new FaceletBehaviorTagImpl(this.behaviorId, this.handlerClass)));
                             this.handlerClass = null;
                         }
                         else
                         {
-                            //impl.putBehavior(this.tagName, this.behaviorId);
                             getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                                 new FaceletBehaviorTagImpl(this.behaviorId)));
                         }
@@ -373,7 +345,6 @@ public class TagLibraryConfigUnmarshallerImpl
                     {
                         String path = this.captureBuffer();
                         URL url = new URL(this.source, path);
-                        //impl.putUserTag(this.tagName, url);
                         getLibraryImpl().addTag(new FaceletTagImpl(this.tagName,
                             new FaceletSourceTagImpl(url.toString())));
                     }
@@ -382,8 +353,6 @@ public class TagLibraryConfigUnmarshallerImpl
                         this.functionSignature = this.captureBuffer();
                         getLibraryImpl().addFunction(
                             new FaceletFunctionImpl(this.functionName, this.functionClass, functionSignature));
-                        //Method m = createMethod(this.functionClass, this.functionSignature);
-                        //impl.putFunction(this.functionName, m);
                     }
                 }
             }
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagUnit.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagUnit.java
index c6f6ded..69a048b 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagUnit.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagUnit.java
@@ -33,13 +33,9 @@ class TagUnit extends CompilationUnit implements TagConfig
 {
 
     private final TagLibrary library;
-
     private final String id;
-
     private final Tag tag;
-
     private final String namespace;
-
     private final String name;
 
     public TagUnit(TagLibrary library, String namespace, String name, Tag tag, String id)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TextInstruction.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TextInstruction.java
index c88848b..23a2a0f 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TextInstruction.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TextInstruction.java
@@ -30,7 +30,6 @@ import org.apache.myfaces.view.facelets.el.ELText;
 final class TextInstruction implements Instruction
 {
     private final ELText txt;
-
     private final String alias;
 
     public TextInstruction(String alias, ELText txt)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TextUnit.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TextUnit.java
index f66fee2..09e4dea 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TextUnit.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TextUnit.java
@@ -43,25 +43,15 @@ final class TextUnit extends CompilationUnit
 {
 
     private final StringBuffer buffer;
-
     private final StringBuffer textBuffer;
-
     private final List<Instruction> instructionBuffer;
-
     private final Stack<Tag> tags;
-
     private final List<Object> children;
-
     private boolean startTagOpen;
-
     private final String alias;
-
     private final String id;
-    
     private final List<Object> messages;
-
     private final boolean escapeInlineText;
-
     private final boolean compressSpaces;
 
     public TextUnit(String alias, String id)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructionHandler.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructionHandler.java
index 950fb88..041efb7 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructionHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructionHandler.java
@@ -41,15 +41,10 @@ final class UIInstructionHandler extends AbstractUIHandler
 {
 
     private final String alias;
-
     private final String id;
-
     private final ELText txt;
-
     private final Instruction[] instructions;
-
     private final int length;
-
     private final boolean literal;
 
     public UIInstructionHandler(String alias, String id, Instruction[] instructions, ELText txt)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructions.java b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructions.java
index 589ddaa..fe5c630 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructions.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/UIInstructions.java
@@ -29,7 +29,6 @@ final class UIInstructions extends UILeaf
 {
 
     private final ELText txt;
-
     private final Instruction[] instructions;
 
     public UIInstructions(ELText txt, Instruction[] instructions)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeComponentELUtils.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeComponentELUtils.java
index d5062df..96ab13c 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeComponentELUtils.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeComponentELUtils.java
@@ -240,7 +240,7 @@ public final class CompositeComponentELUtils
         {
             return 0;
         }
-        return ccLevel.intValue();
+        return ccLevel;
     }
     
     public static UIComponent getCompositeComponentBasedOnLocation(final FacesContext facesContext, 
@@ -430,7 +430,7 @@ public final class CompositeComponentELUtils
         List<UIComponent> list = (List<UIComponent>) facesContext.getAttributes().get(CURRENT_COMPOSITE_COMPONENT_KEY);
         if (list == null)
         {
-            list = new ArrayList<UIComponent>();
+            list = new ArrayList<>();
             facesContext.getAttributes().put(CURRENT_COMPOSITE_COMPONENT_KEY, list);
         }
         list.add(cc);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeFunctionMapper.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeFunctionMapper.java
index 7b1b54f..28bf293 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeFunctionMapper.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeFunctionMapper.java
@@ -36,7 +36,6 @@ public final class CompositeFunctionMapper extends FunctionMapper
 {
 
     private final FunctionMapper fn0;
-
     private final FunctionMapper fn1;
 
     public CompositeFunctionMapper(FunctionMapper fn0, FunctionMapper fn1)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeVariableMapper.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeVariableMapper.java
index 516c49b..c5a2b03 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeVariableMapper.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/CompositeVariableMapper.java
@@ -35,7 +35,6 @@ public final class CompositeVariableMapper extends VariableMapper
 {
 
     private final VariableMapper var0;
-
     private final VariableMapper var1;
 
     public CompositeVariableMapper(VariableMapper var0, VariableMapper var1)
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/DefaultFunctionMapper.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/DefaultFunctionMapper.java
index e315c30..0d36e31 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/DefaultFunctionMapper.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/DefaultFunctionMapper.java
@@ -67,7 +67,7 @@ public final class DefaultFunctionMapper extends FunctionMapper implements Exter
     {
         if (_functions == null)
         {
-            _functions = new HashMap<String, Function>();
+            _functions = new HashMap<>();
         }
         
         Function f = new Function(prefix, localName, m);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/DefaultVariableMapper.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/DefaultVariableMapper.java
index 346e076..24f12d6 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/DefaultVariableMapper.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/DefaultVariableMapper.java
@@ -149,7 +149,7 @@ public final class DefaultVariableMapper extends VariableMapperBase
     {
         if (_vars == null)
         {
-            _vars = new HashMap<String, ValueExpression>();
+            _vars = new HashMap<>();
         }
         
         return _vars.put(name, expression);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ValueExpressionMethodExpression.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ValueExpressionMethodExpression.java
index 1f5d9bf..db76c43 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/ValueExpressionMethodExpression.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/ValueExpressionMethodExpression.java
@@ -153,15 +153,19 @@ public class ValueExpressionMethodExpression extends MethodExpression
         }
     }
 
+    @Override
     public ValueExpression getWrapped()
     {
         return valueExpression;
     }
+    
+    @Override
     public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
     {
         this.valueExpression = (ValueExpression) in.readObject();
     }
 
+    @Override
     public void writeExternal(ObjectOutput out) throws IOException
     {
         out.writeObject(this.valueExpression);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/el/VariableMapperWrapper.java b/impl/src/main/java/org/apache/myfaces/view/facelets/el/VariableMapperWrapper.java
index d1d61e7..e115015 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/el/VariableMapperWrapper.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/el/VariableMapperWrapper.java
@@ -98,7 +98,7 @@ public final class VariableMapperWrapper extends VariableMapperBase implements F
     {
         if (_vars == null)
         {
-            _vars = new HashMap<String, ValueExpression>();
+            _vars = new HashMap<>();
         }
         
         return _vars.put(variable, expression);
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCacheImpl.java b/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCacheImpl.java
index b3f9d79..60d857e 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCacheImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCacheImpl.java
@@ -63,10 +63,8 @@ class FaceletCacheImpl extends FaceletCache<DefaultFacelet>
     FaceletCacheImpl(long refreshPeriod)
     {
         _refreshPeriod = refreshPeriod < 0 ? INFINITE_DELAY : refreshPeriod * 1000;
-        
-        _facelets = new HashMap<String, DefaultFacelet>();
-        
-        _viewMetadataFacelets = new HashMap<String, DefaultFacelet>();
+        _facelets = new HashMap<>();
+        _viewMetadataFacelets = new HashMap<>();
     }
 
     @Override
@@ -75,16 +73,15 @@ class FaceletCacheImpl extends FaceletCache<DefaultFacelet>
         Assert.notNull(url, "url");
         
         String key = url.toString();
-        
+
         DefaultFacelet f = _facelets.get(key);
-        
         if (f == null || this.needsToBeRefreshed(f))
         {
             //f = this._createFacelet(url);
             f = getMemberFactory().newInstance(url);
             if (_refreshPeriod != NO_CACHE_DELAY)
             {
-                Map<String, DefaultFacelet> newLoc = new HashMap<String, DefaultFacelet>(_facelets);
+                Map<String, DefaultFacelet> newLoc = new HashMap<>(_facelets);
                 newLoc.put(key, f);
                 _facelets = newLoc;
             }
@@ -114,7 +111,7 @@ class FaceletCacheImpl extends FaceletCache<DefaultFacelet>
             f = getMetadataMemberFactory().newInstance(url);
             if (_refreshPeriod != NO_CACHE_DELAY)
             {
-                Map<String, DefaultFacelet> newLoc = new HashMap<String, DefaultFacelet>(_viewMetadataFacelets);
+                Map<String, DefaultFacelet> newLoc = new HashMap<>(_viewMetadataFacelets);
                 newLoc.put(key, f);
                 _viewMetadataFacelets = newLoc;
             }
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCompositionContextImpl.java b/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCompositionContextImpl.java
index 532aad7..f1d88a7 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCompositionContextImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/impl/FaceletCompositionContextImpl.java
@@ -123,8 +123,8 @@ public class FaceletCompositionContextImpl extends FaceletCompositionContext
         super();
         _factory = factory;
         _facesContext = facesContext;
-        _componentsMarkedForDeletion = new ArrayList<Map<String,UIComponent>>();
-        _relocatableResourceForDeletion = new HashMap<String, UIComponent>();
+        _componentsMarkedForDeletion = new ArrayList<>();
+        _relocatableResourceForDeletion = new HashMap<>();
         _deletionLevel = -1;
         _sectionUniqueIdCounter = new Lazy(() -> new SectionUniqueIdCounter());
         //Cached at facelet view
@@ -188,7 +188,7 @@ public class FaceletCompositionContextImpl extends FaceletCompositionContext
     @Override
     public void initUniqueIdRecording()
     {
-        _uniqueIdsList = new LinkedList<String>();
+        _uniqueIdsList = new LinkedList<>();
         _uniqueIdsIterator = null;
     }
     
@@ -263,7 +263,7 @@ public class FaceletCompositionContextImpl extends FaceletCompositionContext
     {
         if (_compositeComponentStack == null)
         {
-            _compositeComponentStack = new LinkedList<UIComponent>();
+            _compositeComponentStack = new LinkedList<>();
         }
         _compositeComponentStack.addFirst(parent);
         _ccLevel++;
@@ -309,7 +309,7 @@ public class FaceletCompositionContextImpl extends FaceletCompositionContext
     {
         if (_uniqueIdVendorStack == null)
         {
-            _uniqueIdVendorStack = new LinkedList<UniqueIdVendor>();
+            _uniqueIdVendorStack = new LinkedList<>();
         }
         _uniqueIdVendorStack.addFirst(parent);
     }
@@ -333,13 +333,10 @@ public class FaceletCompositionContextImpl extends FaceletCompositionContext
     {
         if (_enclosingValidatorIdsStack == null)
         {
-            _enclosingValidatorIdsStack = 
-                new LinkedList<Map.Entry<String, EditableValueHolderAttachedObjectHandler>>();
+            _enclosingValidatorIdsStack = new LinkedList<>();
         }
 
-        _enclosingValidatorIdsStack.addFirst(
-                new SimpleEntry<String, EditableValueHolderAttachedObjectHandler>
-                    (validatorId, attachedObjectHandler));
+        _enclosingValidatorIdsStack.addFirst(new SimpleEntry<>(validatorId, attachedObjectHandler));
     }
 
     public Iterator<Map.Entry<String, EditableValueHolderAttachedObjectHandler>> getEnclosingValidatorIdsAndHandlers()
@@ -454,7 +451,7 @@ public class FaceletCompositionContextImpl extends FaceletCompositionContext
         List<AttachedObjectHandler> list = null;
         if (_attachedObjectHandlers == null)
         {
-            _attachedObjectHandlers = new HashMap<UIComponent, List<AttachedObjectHandler>>();
+            _attachedObjectHandlers = new HashMap<>();
         }
         else
         {
@@ -463,7 +460,7 @@ public class FaceletCompositionContextImpl extends FaceletCompositionContext
 
         if (list == null)
         {
-            list = new ArrayList<AttachedObjectHandler>();
+            list = new ArrayList<>();
             _attachedObjectHandlers.put(compositeComponentParent, list);
         }
 
@@ -496,7 +493,7 @@ public class FaceletCompositionContextImpl extends FaceletCompositionContext
         Map<String, Object> map = null;
         if (_methodExpressionsTargeted == null)
         {
-            _methodExpressionsTargeted = new HashMap<UIComponent, Map<String, Object>>();
+            _methodExpressionsTargeted = new HashMap<>();
         }
         else
         {
@@ -505,7 +502,7 @@ public class FaceletCompositionContextImpl extends FaceletCompositionContext
 
         if (map == null)
         {
-            map = new HashMap<String, Object>(8);
+            map = new HashMap<>(8);
             _methodExpressionsTargeted.put(targetedComponent, map);
         }
 
@@ -525,7 +522,7 @@ public class FaceletCompositionContextImpl extends FaceletCompositionContext
             return false;
         }
         Boolean v = map.get(attributeName);
-        return v == null ? false : v.booleanValue();
+        return v == null ? false : v;
     }
     
     @Override
@@ -534,7 +531,7 @@ public class FaceletCompositionContextImpl extends FaceletCompositionContext
         Map<String, Boolean> map = null;
         if (_compositeComponentAttributesMarked == null)
         {
-            _compositeComponentAttributesMarked = new HashMap<UIComponent, Map<String, Boolean>>(); 
+            _compositeComponentAttributesMarked = new HashMap<>(); 
         }
         else
         {
@@ -543,7 +540,7 @@ public class FaceletCompositionContextImpl extends FaceletCompositionContext
         
         if (map == null)
         {
-            map = new HashMap<String, Boolean>(8);
+            map = new HashMap<>(8);
             _compositeComponentAttributesMarked.put(compositeComponentParent, map);
         }
         map.put(attributeName, Boolean.TRUE);
@@ -591,7 +588,6 @@ public class FaceletCompositionContextImpl extends FaceletCompositionContext
         if (_componentsMarkedForDeletion.size() <= _deletionLevel)
         {
             _componentsMarkedForDeletion.add(new HashMap<String, UIComponent>());
-            
         }
     }
 
@@ -1081,10 +1077,9 @@ public class FaceletCompositionContextImpl extends FaceletCompositionContext
                     getApplicationMap().get("oam.vf.VisitContextFactory");
             if (_visitContextFactory == null)
             {
-                VisitContextFactory factory = (VisitContextFactory) 
+                VisitContextFactory factory = (VisitContextFactory)
                         FactoryFinder.getFactory(FactoryFinder.VISIT_CONTEXT_FACTORY);
-                _facesContext.getExternalContext().
-                        getApplicationMap().put("oam.vf.VisitContextFactory", factory);
+                _facesContext.getExternalContext().getApplicationMap().put("oam.vf.VisitContextFactory", factory);
                 _visitContextFactory = factory;
             }
         }
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/impl/PageContextImpl.java b/impl/src/main/java/org/apache/myfaces/view/facelets/impl/PageContextImpl.java
index 18e0928..2aae4b4 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/impl/PageContextImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/impl/PageContextImpl.java
@@ -42,7 +42,7 @@ public class PageContextImpl extends PageContext
     {
         if (_attributes == null)
         {
-            _attributes = new HashMap<String, ValueExpression>();
+            _attributes = new HashMap<>();
         }
         return _attributes;
     }
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/impl/SectionUniqueIdCounter.java b/impl/src/main/java/org/apache/myfaces/view/facelets/impl/SectionUniqueIdCounter.java
index 5a393e1..b75951b 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/impl/SectionUniqueIdCounter.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/impl/SectionUniqueIdCounter.java
@@ -41,8 +41,8 @@ public class SectionUniqueIdCounter
     {
         _activeSection = 0;
         _radix = Character.MAX_RADIX;
-        _counterStack = new ArrayList<Section>();
-        _counterStack.add(new Section(null,1,_radix));
+        _counterStack = new ArrayList<>();
+        _counterStack.add(new Section(null, 1, _radix));
         _prefix = null;
         _builder = new StringBuilder(30);
         _bufferConversion = new char[15];
@@ -53,8 +53,8 @@ public class SectionUniqueIdCounter
     {
         _activeSection = 0;
         _radix = Character.MAX_RADIX;
-        _counterStack = new ArrayList<Section>();
-        _counterStack.add(new Section(null,1,_radix));
+        _counterStack = new ArrayList<>();
+        _counterStack.add(new Section(null, 1, _radix));
         _prefix = prefix;
         _builder = new StringBuilder(30);
         _bufferConversion = new char[15];
@@ -65,8 +65,8 @@ public class SectionUniqueIdCounter
     {
         _activeSection = 0;
         _radix = Character.MAX_RADIX;
-        _counterStack = new ArrayList<Section>();
-        _counterStack.add(new Section(null,1,_radix));
+        _counterStack = new ArrayList<>();
+        _counterStack.add(new Section(null, 1 ,_radix));
         _prefix = prefix;
         _builder = new StringBuilder(30);
         _bufferConversion = new char[15];
@@ -77,8 +77,8 @@ public class SectionUniqueIdCounter
     {
         _activeSection = 0;
         _radix = radix;
-        _counterStack = new ArrayList<Section>();
-        _counterStack.add(new Section(null,1,_radix));
+        _counterStack = new ArrayList<>();
+        _counterStack.add(new Section(null, 1, _radix));
         _prefix = prefix;
         _builder = new StringBuilder(30);
         _bufferConversion = new char[15];
@@ -148,7 +148,7 @@ public class SectionUniqueIdCounter
             _builder.append('_');
             _builder.append(base);
         }
-        _counterStack.add(new Section(_builder.toString(),1,_radix));
+        _counterStack.add(new Section(_builder.toString(), 1, _radix));
         _activeSection++;
         return _builder.toString();
     }
@@ -214,21 +214,20 @@ public class SectionUniqueIdCounter
     
     private static class Section
     {
-        
         private String prefix;
         private long counter;
-        private final StringBuilder _builder;
-        private char[] _bufferConversion;
-        private final int _radix;
+        private final StringBuilder builder;
+        private char[] bufferConversion;
+        private final int radix;
         
         public Section(String prefix, long counter, int radix)
         {
             super();
             this.prefix = prefix;
             this.counter = counter;
-            _builder = new StringBuilder(30);
-            _bufferConversion = new char[15];
-            _radix = radix;
+            this.builder = new StringBuilder(30);
+            this.bufferConversion = new char[15];
+            this.radix = radix;
         }
 
         public long getCounter()
@@ -257,28 +256,28 @@ public class SectionUniqueIdCounter
             }
             // By performance reasons, Long.toString is a very expensive
             // operation in this location, because it triggers a new String()
-            appendToBuilder(i, _radix, builder, _bufferConversion);
+            appendToBuilder(i, radix, builder, bufferConversion);
         }
         
         public String generateUniqueId(String base)
         {
             long i = this.counter;
             this.counter++;
-            _builder.delete(0, _builder.length());
+            builder.delete(0, builder.length());
             if (base != null)
             {
-                _builder.append(base);
+                builder.append(base);
             }
             if (this.prefix != null)
             {
-                _builder.append(this.prefix);
-                _builder.append('_');
+                builder.append(this.prefix);
+                builder.append('_');
             }
             // By performance reasons, Long.toString is a very expensive
             // operation in this location, because it triggers a new String()
             //_builder.append(Long.toString(i, _radix));
-            appendToBuilder(i, _radix, _builder, _bufferConversion);
-            return _builder.toString();
+            appendToBuilder(i, radix, builder, bufferConversion);
+            return builder.toString();
         }
 
         public String getPrefix()
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java b/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java
index af6d384..2d9d0f5 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/impl/TemplateContextImpl.java
@@ -78,7 +78,7 @@ public class TemplateContextImpl extends TemplateContext
     public TemplateContextImpl()
     {
         super();
-        _clients = new ArrayList<TemplateManagerImpl>(4);
+        _clients = new ArrayList<>(4);
         // Parameters registered using ui:param now are bound to template manager instances, because
         // it should follow the same rules as template clients registered here. For example, to resolve
         // params on nested ui:decorate and ui:composition the same rules applies than for ui:define and
@@ -86,7 +86,7 @@ public class TemplateContextImpl extends TemplateContext
         // page context, so when a new context is added (like in a ui:include), all params registered go 
         // to this manager. 
         _clients.add(new TemplateManagerImpl(null, INITIAL_TEMPLATE_CLIENT, true, INITIAL_PAGE_CONTEXT));
-        _lastClient = _clients.get(0); //_clients.getFirst();
+        _lastClient = _clients.get(0);
         _isCacheELExpressions = true;
         _templateClientAttributeMap = new TemplateClientAttributeMap();
         _templateClientKnownParameterMap = new TemplateClientKnownParameterMap();
@@ -110,7 +110,7 @@ public class TemplateContextImpl extends TemplateContext
     public TemplateManager popExtendedClient(final AbstractFaceletContext actx)
     {
         _lastClient = null;
-        return _clients.remove(_clients.size()-1);
+        return _clients.remove(_clients.size() - 1);
     }
     
     @Override
@@ -118,7 +118,7 @@ public class TemplateContextImpl extends TemplateContext
                              final TemplateClient client)
     {
         _clients.add(new TemplateManagerImpl(owner, client, false, actx.getPageContext()));
-        _lastClient = _clients.get(_clients.size()-1);
+        _lastClient = _clients.get(_clients.size() - 1);
     }
 
     @Override
@@ -142,17 +142,11 @@ public class TemplateContextImpl extends TemplateContext
     private final static class TemplateManagerImpl extends TemplateManager implements TemplateClient
     {
         private final AbstractFacelet _owner;
-
         private final TemplateClient _target;
-
         private final boolean _root;
-
         private Set<String> _names;
-        
         private final PageContext _pageContext;
-        
         private Map<String, ValueExpression> _parameters = null;
-        
         private Set<String> _knownParameters;
 
         public TemplateManagerImpl(AbstractFacelet owner, TemplateClient target,
@@ -182,7 +176,7 @@ public class TemplateContextImpl extends TemplateContext
             {
                 if (this._names == null)
                 {
-                    this._names =  new HashSet<String>();
+                    this._names =  new HashSet<>();
                 }
                 this._names.add(testName);
                 boolean found = false;
@@ -210,7 +204,7 @@ public class TemplateContextImpl extends TemplateContext
         {
             if (_parameters == null)
             {
-                _parameters = new HashMap<String, ValueExpression>();
+                _parameters = new HashMap<>();
             }
             return _parameters;
         }
@@ -224,7 +218,7 @@ public class TemplateContextImpl extends TemplateContext
         {
             if (_knownParameters == null)
             {
-                _knownParameters = new HashSet<String>(4);
+                _knownParameters = new HashSet<>(4);
             }
             return _knownParameters;
         }
@@ -410,7 +404,6 @@ public class TemplateContextImpl extends TemplateContext
         @Override
         protected void setAttribute(String key, ValueExpression value)
         {
-            //Use the parent methods.
             throw new UnsupportedOperationException();
         }
 
@@ -423,7 +416,7 @@ public class TemplateContextImpl extends TemplateContext
         @Override
         protected Enumeration<String> getAttributeNames()
         {
-            Set<String> attributeNames = new HashSet<String>();
+            Set<String> attributeNames = new HashSet<>();
             TemplateManagerImpl client;
             for (int i = 0; i < _clients.size(); i++)
             {
@@ -505,7 +498,7 @@ public class TemplateContextImpl extends TemplateContext
         @Override
         protected Enumeration<String> getAttributeNames()
         {
-            Set<String> attributeNames = new HashSet<String>();
+            Set<String> attributeNames = new HashSet<>();
             TemplateManagerImpl client;
             for (int i = 0; i < _clients.size(); i++)
             {