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, 13 Aug 2019 12:54: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 fdfb226  refactored
fdfb226 is described below

commit fdfb226ed22c40ffa358beba04fb0f833c3d5e52
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Tue Aug 13 14:54:05 2019 +0200

    refactored
---
 .../elements/facelets/FaceletBehaviorTagImpl.java  |  5 ++-
 .../elements/facelets/FaceletComponentTagImpl.java |  7 ++--
 .../elements/facelets/FaceletConverterTagImpl.java |  5 ++-
 .../elements/facelets/FaceletFunctionImpl.java     |  6 ++--
 .../elements/facelets/FaceletHandlerTagImpl.java   |  4 +--
 .../elements/facelets/FaceletSourceTagImpl.java    |  1 +
 .../impl/elements/facelets/FaceletTagImpl.java     |  5 ++-
 .../elements/facelets/FaceletTagLibraryImpl.java   | 39 +++++++++++++++-------
 .../elements/facelets/FaceletValidatorTagImpl.java |  5 ++-
 9 files changed, 44 insertions(+), 33 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletBehaviorTagImpl.java
b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletBehaviorTagImpl.java
index ad60335..5d308b8 100644
--- a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletBehaviorTagImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletBehaviorTagImpl.java
@@ -21,9 +21,6 @@ package org.apache.myfaces.config.impl.elements.facelets;
 import java.io.Serializable;
 import org.apache.myfaces.config.element.facelets.FaceletBehaviorTag;
 
-/**
- *
- */
 public class FaceletBehaviorTagImpl extends FaceletBehaviorTag implements Serializable
 {
     private String behaviorId;
@@ -44,6 +41,7 @@ public class FaceletBehaviorTagImpl extends FaceletBehaviorTag implements
Serial
         this.handlerClass = handlerClass;
     }
 
+    @Override
     public String getBehaviorId()
     {
         return behaviorId;
@@ -54,6 +52,7 @@ public class FaceletBehaviorTagImpl extends FaceletBehaviorTag implements
Serial
         this.behaviorId = behaviorId;
     }
 
+    @Override
     public String getHandlerClass()
     {
         return handlerClass;
diff --git a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletComponentTagImpl.java
b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletComponentTagImpl.java
index 744402a..52c194c 100644
--- a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletComponentTagImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletComponentTagImpl.java
@@ -21,9 +21,6 @@ package org.apache.myfaces.config.impl.elements.facelets;
 import java.io.Serializable;
 import org.apache.myfaces.config.element.facelets.FaceletComponentTag;
 
-/**
- *
- */
 public class FaceletComponentTagImpl extends FaceletComponentTag implements Serializable
 {
     private String componentType;
@@ -43,6 +40,7 @@ public class FaceletComponentTagImpl extends FaceletComponentTag implements
Seri
         this.resourceId = resourceId;
     }
 
+    @Override
     public String getComponentType()
     {
         return componentType;
@@ -53,6 +51,7 @@ public class FaceletComponentTagImpl extends FaceletComponentTag implements
Seri
         this.componentType = componentType;
     }
 
+    @Override
     public String getResourceId()
     {
         return resourceId;
@@ -63,6 +62,7 @@ public class FaceletComponentTagImpl extends FaceletComponentTag implements
Seri
         this.resourceId = resourceId;
     }
 
+    @Override
     public String getHandlerClass()
     {
         return handlerClass;
@@ -73,6 +73,7 @@ public class FaceletComponentTagImpl extends FaceletComponentTag implements
Seri
         this.handlerClass = handlerClass;
     }
 
+    @Override
     public String getRendererType()
     {
         return rendererType;
diff --git a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletConverterTagImpl.java
b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletConverterTagImpl.java
index ac8818b..c9e74aa 100644
--- a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletConverterTagImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletConverterTagImpl.java
@@ -21,9 +21,6 @@ package org.apache.myfaces.config.impl.elements.facelets;
 import java.io.Serializable;
 import org.apache.myfaces.config.element.facelets.FaceletConverterTag;
 
-/**
- *
- */
 public class FaceletConverterTagImpl extends FaceletConverterTag implements Serializable
 {
     private String converterId;
@@ -44,6 +41,7 @@ public class FaceletConverterTagImpl extends FaceletConverterTag implements
Seri
         this.handlerClass = handlerClass;
     }
 
+    @Override
     public String getConverterId()
     {
         return converterId;
@@ -54,6 +52,7 @@ public class FaceletConverterTagImpl extends FaceletConverterTag implements
Seri
         this.converterId = converterId;
     }
 
+    @Override
     public String getHandlerClass()
     {
         return handlerClass;
diff --git a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletFunctionImpl.java
b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletFunctionImpl.java
index a68a921..de82251 100644
--- a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletFunctionImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletFunctionImpl.java
@@ -21,9 +21,6 @@ package org.apache.myfaces.config.impl.elements.facelets;
 import java.io.Serializable;
 import org.apache.myfaces.config.element.facelets.FaceletFunction;
 
-/**
- *
- */
 public class FaceletFunctionImpl extends FaceletFunction implements Serializable
 {
     private String functionName;
@@ -41,6 +38,7 @@ public class FaceletFunctionImpl extends FaceletFunction implements Serializable
         this.functionSignature = functionSignature;
     }
 
+    @Override
     public String getFunctionName()
     {
         return functionName;
@@ -51,6 +49,7 @@ public class FaceletFunctionImpl extends FaceletFunction implements Serializable
         this.functionName = functionName;
     }
 
+    @Override
     public String getFunctionClass()
     {
         return functionClass;
@@ -61,6 +60,7 @@ public class FaceletFunctionImpl extends FaceletFunction implements Serializable
         this.functionClass = functionClass;
     }
 
+    @Override
     public String getFunctionSignature()
     {
         return functionSignature;
diff --git a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletHandlerTagImpl.java
b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletHandlerTagImpl.java
index 46b795d..a3f43c7 100644
--- a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletHandlerTagImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletHandlerTagImpl.java
@@ -21,9 +21,6 @@ package org.apache.myfaces.config.impl.elements.facelets;
 import java.io.Serializable;
 import org.apache.myfaces.config.element.facelets.FaceletHandlerTag;
 
-/**
- *
- */
 public class FaceletHandlerTagImpl extends FaceletHandlerTag implements Serializable
 {
     private String handlerClass;
@@ -37,6 +34,7 @@ public class FaceletHandlerTagImpl extends FaceletHandlerTag implements
Serializ
         this.handlerClass = handlerClass;
     }
 
+    @Override
     public String getHandlerClass()
     {
         return handlerClass;
diff --git a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletSourceTagImpl.java
b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletSourceTagImpl.java
index 2399daa..ae2c9b7 100644
--- a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletSourceTagImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletSourceTagImpl.java
@@ -37,6 +37,7 @@ public class FaceletSourceTagImpl extends FaceletSourceTag implements Serializab
         this.source = source;
     }
 
+    @Override
     public String getSource()
     {
         return source;
diff --git a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletTagImpl.java
b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletTagImpl.java
index fed8f8f..d61d673 100644
--- a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletTagImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletTagImpl.java
@@ -22,9 +22,6 @@ import java.io.Serializable;
 import org.apache.myfaces.config.element.facelets.FaceletTag;
 import org.apache.myfaces.config.element.facelets.FaceletTagDefinition;
 
-/**
- *
- */
 public class FaceletTagImpl extends FaceletTag implements Serializable
 {
     private String name;
@@ -46,6 +43,7 @@ public class FaceletTagImpl extends FaceletTag implements Serializable
         this.name = name;
     }
 
+    @Override
     public String getName()
     {
         return name;
@@ -56,6 +54,7 @@ public class FaceletTagImpl extends FaceletTag implements Serializable
         this.name = name;
     }
 
+    @Override
     public FaceletTagDefinition getTagDefinition()
     {
         return tagDefinition;
diff --git a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletTagLibraryImpl.java
b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletTagLibraryImpl.java
index 0faca0a..c2e517a 100644
--- a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletTagLibraryImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletTagLibraryImpl.java
@@ -20,27 +20,22 @@ package org.apache.myfaces.config.impl.elements.facelets;
 
 import java.io.Serializable;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import org.apache.myfaces.config.element.facelets.FaceletFunction;
 import org.apache.myfaces.config.element.facelets.FaceletTag;
 import org.apache.myfaces.config.element.facelets.FaceletTagLibrary;
 
-/**
- *
- */
 public class FaceletTagLibraryImpl extends FaceletTagLibrary implements Serializable
 {
     private String namespace;
     private String shortName;
     private String compositeLibraryName;
     private String libraryClass;
-    private List<FaceletTag> tags = new ArrayList<FaceletTag>();
-    private List<FaceletFunction> functions = new ArrayList<FaceletFunction>();
-
-    public FaceletTagLibraryImpl()
-    {
-    }
+    private List<FaceletTag> tags;
+    private List<FaceletFunction> functions;
 
+    @Override
     public String getNamespace()
     {
         return namespace;
@@ -51,6 +46,7 @@ public class FaceletTagLibraryImpl extends FaceletTagLibrary implements
Serializ
         this.namespace = namespace;
     }
 
+    @Override
     public String getShortName()
     {
         return shortName;
@@ -61,6 +57,7 @@ public class FaceletTagLibraryImpl extends FaceletTagLibrary implements
Serializ
         this.shortName = shortName;
     }
 
+    @Override
     public String getCompositeLibraryName()
     {
         return compositeLibraryName;
@@ -71,6 +68,7 @@ public class FaceletTagLibraryImpl extends FaceletTagLibrary implements
Serializ
         this.compositeLibraryName = compositeLibraryName;
     }
 
+    @Override
     public String getLibraryClass()
     {
         return libraryClass;
@@ -81,25 +79,42 @@ public class FaceletTagLibraryImpl extends FaceletTagLibrary implements
Serializ
         this.libraryClass = libraryClass;
     }
 
+    @Override
     public List<FaceletTag> getTags()
     {
+        if (tags == null)
+        {
+            return Collections.emptyList();
+        }
         return tags;
     }
 
     public void addTag(FaceletTag tag)
     {
-        this.tags.add(tag);
+        if (tags == null)
+        {
+            tags = new ArrayList<>();
+        }
+        tags.add(tag);
     }
 
     @Override
     public List<FaceletFunction> getFunctions()
     {
-        return this.functions;
+        if (functions == null)
+        {
+            return Collections.emptyList();
+        }
+        return functions;
     }
     
     public void addFunction(FaceletFunction function)
     {
-        this.functions.add(function);
+        if (functions == null)
+        {
+            functions = new ArrayList<>();
+        }
+        functions.add(function);
     }
     
 }
diff --git a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletValidatorTagImpl.java
b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletValidatorTagImpl.java
index 57e958b..163790c 100644
--- a/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletValidatorTagImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/config/impl/elements/facelets/FaceletValidatorTagImpl.java
@@ -21,9 +21,6 @@ package org.apache.myfaces.config.impl.elements.facelets;
 import java.io.Serializable;
 import org.apache.myfaces.config.element.facelets.FaceletValidatorTag;
 
-/**
- *
- */
 public class FaceletValidatorTagImpl extends FaceletValidatorTag implements Serializable
 {
     private String validatorId;
@@ -44,6 +41,7 @@ public class FaceletValidatorTagImpl extends FaceletValidatorTag implements
Seri
         this.handlerClass = handlerClass;
     }
 
+    @Override
     public String getValidatorId()
     {
         return validatorId;
@@ -54,6 +52,7 @@ public class FaceletValidatorTagImpl extends FaceletValidatorTag implements
Seri
         this.validatorId = validatorId;
     }
 
+    @Override
     public String getHandlerClass()
     {
         return handlerClass;


Mime
View raw message