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: cosmetics
Date Fri, 02 Nov 2018 09:43:28 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 311a2c3  cosmetics
311a2c3 is described below

commit 311a2c396f3f793707cd7be16b16d5c734a7565e
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Fri Nov 2 10:43:23 2018 +0100

    cosmetics
---
 .../behavior/FacesBehaviorAnnotationLiteral.java   |  3 ---
 .../cdi/behavior/FacesBehaviorCDIWrapper.java      |  9 ++++---
 .../cdi/behavior/FacesBehaviorExtension.java       |  3 ---
 .../myfaces/cdi/behavior/FacesBehaviorInfo.java    | 12 ----------
 .../cdi/behavior/FacesBehaviorProducer.java        |  3 ---
 .../behavior/FacesClientBehaviorCDIWrapper.java    |  9 ++++---
 .../myfaces/cdi/config/FacesConfigBeanHolder.java  | 11 ---------
 .../myfaces/cdi/config/FacesConfigExtension.java   |  6 +----
 .../myfaces/cdi/converter/FacesConverterInfo.java  | 11 ---------
 .../cdi/managedproperty/ManagedPropertyInfo.java   | 11 ---------
 .../cdi/model/FacesDataModelAnnotationLiteral.java |  1 +
 .../cdi/model/FacesDataModelClassBeanHolder.java   | 28 ++++------------------
 .../cdi/validator/FacesValidatorCDIWrapper.java    |  9 ++++---
 .../myfaces/cdi/validator/FacesValidatorInfo.java  | 10 --------
 .../cdi/view/ViewScopeContextExtension.java        |  3 +--
 .../myfaces/cdi/view/ViewScopeContextImpl.java     |  4 ++++
 16 files changed, 23 insertions(+), 110 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorAnnotationLiteral.java
b/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorAnnotationLiteral.java
index ae6f60c..1aec98b 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorAnnotationLiteral.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorAnnotationLiteral.java
@@ -22,9 +22,6 @@ import java.util.Objects;
 import javax.enterprise.util.AnnotationLiteral;
 import javax.faces.component.behavior.FacesBehavior;
 
-/**
- *
- */
 public class FacesBehaviorAnnotationLiteral extends AnnotationLiteral<FacesBehavior>
implements FacesBehavior
 {
     private static final long serialVersionUID = 1L;
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorCDIWrapper.java
b/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorCDIWrapper.java
index f1142ed..3f2f1e5 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorCDIWrapper.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorCDIWrapper.java
@@ -26,15 +26,13 @@ import javax.faces.context.FacesContext;
 import javax.faces.event.BehaviorEvent;
 import org.apache.myfaces.cdi.util.CDIUtils;
 
-/**
- *
- */
 public class FacesBehaviorCDIWrapper implements PartialStateHolder, Behavior, FacesWrapper<Behavior>
 {
     private transient Behavior delegate;
     
     private String behaviorId;
     private boolean _transient;
+    private boolean _initialStateMarked = false;
 
     public FacesBehaviorCDIWrapper()
     {
@@ -97,18 +95,19 @@ public class FacesBehaviorCDIWrapper implements PartialStateHolder, Behavior,
Fa
         _transient = newTransientValue;
     }
 
-    private boolean _initialStateMarked = false;
-
+    @Override
     public void clearInitialState()
     {
         _initialStateMarked = false;
     }
 
+    @Override
     public boolean initialStateMarked()
     {
         return _initialStateMarked;
     }
 
+    @Override
     public void markInitialState()
     {
         _initialStateMarked = true;
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorExtension.java
b/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorExtension.java
index eab2d54..d6f08f4 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorExtension.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorExtension.java
@@ -31,9 +31,6 @@ import javax.enterprise.inject.spi.Extension;
 import javax.enterprise.inject.spi.ProcessManagedBean;
 import javax.faces.component.behavior.FacesBehavior;
 
-/**
- *
- */
 public class FacesBehaviorExtension implements Extension
 {
     private Set<FacesBehaviorInfo> types = new HashSet<FacesBehaviorInfo>();
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorInfo.java b/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorInfo.java
index f97be1a..4595566 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorInfo.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorInfo.java
@@ -23,13 +23,9 @@ import java.io.Serializable;
 import java.lang.reflect.Type;
 import java.util.Objects;
 
-/**
- *
- */
 public class FacesBehaviorInfo implements Serializable
 {
     private Type type;
-    
     private String behaviorId;
 
     public FacesBehaviorInfo(Type type, String behaviorId)
@@ -38,17 +34,11 @@ public class FacesBehaviorInfo implements Serializable
         this.behaviorId = behaviorId;
     }
 
-    /**
-     * @return the behaviorId
-     */
     public String getBehaviorId()
     {
         return behaviorId;
     }
 
-    /**
-     * @param behaviorId the behaviorId to set
-     */
     public void setBehaviorId(String behaviorId)
     {
         this.behaviorId = behaviorId;
@@ -95,6 +85,4 @@ public class FacesBehaviorInfo implements Serializable
         }
         return true;
     }
-
-
 }
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorProducer.java
b/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorProducer.java
index 2f3f67a..e22773e 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorProducer.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesBehaviorProducer.java
@@ -30,9 +30,6 @@ import javax.faces.component.behavior.Behavior;
 import org.apache.myfaces.cdi.util.AbstractDynamicProducer;
 import org.apache.myfaces.shared.util.ClassUtils;
 
-/**
- *
- */
 @Typed
 public class FacesBehaviorProducer extends AbstractDynamicProducer<Behavior>
 {
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesClientBehaviorCDIWrapper.java
b/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesClientBehaviorCDIWrapper.java
index 37dea92..504eb76 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesClientBehaviorCDIWrapper.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/behavior/FacesClientBehaviorCDIWrapper.java
@@ -30,15 +30,13 @@ import javax.faces.context.FacesContext;
 import javax.faces.event.BehaviorEvent;
 import org.apache.myfaces.cdi.util.CDIUtils;
 
-/**
- *
- */
 public class FacesClientBehaviorCDIWrapper implements PartialStateHolder, ClientBehavior,
FacesWrapper<ClientBehavior>
 {
     private transient ClientBehavior delegate;
     
     private String behaviorId;
     private boolean _transient;
+    private boolean _initialStateMarked = false;
 
     public FacesClientBehaviorCDIWrapper()
     {
@@ -119,18 +117,19 @@ public class FacesClientBehaviorCDIWrapper implements PartialStateHolder,
Client
         _transient = newTransientValue;
     }
 
-    private boolean _initialStateMarked = false;
-
+    @Override
     public void clearInitialState()
     {
         _initialStateMarked = false;
     }
 
+    @Override
     public boolean initialStateMarked()
     {
         return _initialStateMarked;
     }
 
+    @Override
     public void markInitialState()
     {
         _initialStateMarked = true;
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/config/FacesConfigBeanHolder.java b/impl/src/main/java/org/apache/myfaces/cdi/config/FacesConfigBeanHolder.java
index e31af3e..82fe96b 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/config/FacesConfigBeanHolder.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/config/FacesConfigBeanHolder.java
@@ -22,29 +22,18 @@ package org.apache.myfaces.cdi.config;
 import javax.enterprise.context.ApplicationScoped;
 import javax.faces.annotation.FacesConfig;
 
-/**
- *
- */
 @ApplicationScoped
 public class FacesConfigBeanHolder
 {
-    
     private FacesConfig.Version facesConfigVersion = null;
 
-    /**
-     * @return the facesConfigVersion
-     */
     public FacesConfig.Version getFacesConfigVersion()
     {
         return facesConfigVersion;
     }
 
-    /**
-     * @param facesConfigVersion the facesConfigVersion to set
-     */
     public void setFacesConfigVersion(FacesConfig.Version facesConfigVersion)
     {
         this.facesConfigVersion = facesConfigVersion;
     }
-    
 }
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/config/FacesConfigExtension.java b/impl/src/main/java/org/apache/myfaces/cdi/config/FacesConfigExtension.java
index e106bae..c868e2d 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/config/FacesConfigExtension.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/config/FacesConfigExtension.java
@@ -30,15 +30,11 @@ import javax.enterprise.inject.spi.ProcessManagedBean;
 import javax.faces.annotation.FacesConfig;
 import org.apache.myfaces.cdi.util.CDIUtils;
 
-/**
- *
- */
 public class FacesConfigExtension implements Extension
 {
     private FacesConfig.Version facesConfigVersion;
     
-    void beforeBeanDiscovery(
-        @Observes final BeforeBeanDiscovery event, BeanManager beanManager)
+    void beforeBeanDiscovery(@Observes BeforeBeanDiscovery event, BeanManager beanManager)
     {
         AnnotatedType beanHolder = beanManager.createAnnotatedType(FacesConfigBeanHolder.class);
         event.addAnnotatedType(beanHolder, beanHolder.getJavaClass().getName());
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/converter/FacesConverterInfo.java b/impl/src/main/java/org/apache/myfaces/cdi/converter/FacesConverterInfo.java
index 9d25c8f..4707c60 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/converter/FacesConverterInfo.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/converter/FacesConverterInfo.java
@@ -23,15 +23,10 @@ import java.io.Serializable;
 import java.lang.reflect.Type;
 import java.util.Objects;
 
-/**
- *
- */
 public class FacesConverterInfo implements Serializable
 {
     private Type type;
-    
     private Class forClass;
-    
     private String converterId;
 
     public FacesConverterInfo(Type type, Class forClass, String converterId)
@@ -41,17 +36,11 @@ public class FacesConverterInfo implements Serializable
         this.converterId = converterId;
     }
 
-    /**
-     * @return the converterId
-     */
     public String getConverterId()
     {
         return converterId;
     }
 
-    /**
-     * @param converterId the converterId to set
-     */
     public void setConverterId(String converterId)
     {
         this.converterId = converterId;
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/managedproperty/ManagedPropertyInfo.java
b/impl/src/main/java/org/apache/myfaces/cdi/managedproperty/ManagedPropertyInfo.java
index f640a55..6c8334a 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/managedproperty/ManagedPropertyInfo.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/managedproperty/ManagedPropertyInfo.java
@@ -22,14 +22,9 @@ import java.io.Serializable;
 import java.lang.reflect.Type;
 import java.util.Objects;
 
-/**
- *
- */
 public class ManagedPropertyInfo implements Serializable
 {
-
     private Type type;
-
     private String expression;
 
     public ManagedPropertyInfo(Type type, String expression)
@@ -38,17 +33,11 @@ public class ManagedPropertyInfo implements Serializable
         this.expression = expression;
     }
 
-    /**
-     * @return the type
-     */
     public Type getType()
     {
         return type;
     }
 
-    /**
-     * @return the expression
-     */
     public String getExpression()
     {
         return expression;
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/model/FacesDataModelAnnotationLiteral.java
b/impl/src/main/java/org/apache/myfaces/cdi/model/FacesDataModelAnnotationLiteral.java
index c877494..6625398 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/model/FacesDataModelAnnotationLiteral.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/model/FacesDataModelAnnotationLiteral.java
@@ -36,6 +36,7 @@ public class FacesDataModelAnnotationLiteral extends AnnotationLiteral<FacesData
         this.forClass=forClass;
     }
 
+    @Override
     public Class<?> forClass()
     {
         return forClass;
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/model/FacesDataModelClassBeanHolder.java
b/impl/src/main/java/org/apache/myfaces/cdi/model/FacesDataModelClassBeanHolder.java
index f5a160c..ec315fd 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/model/FacesDataModelClassBeanHolder.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/model/FacesDataModelClassBeanHolder.java
@@ -140,35 +140,15 @@ public class FacesDataModelClassBeanHolder extends DataModelBuilder
                 return dm;
             }
         } 
-        catch (NoSuchMethodException ex)
+        catch (NoSuchMethodException | IllegalArgumentException | InvocationTargetException
ex)
         {
             throw new FacesException(
-                    "Cannot find constructor of DataModel with "+forClass.getName()+" as
parameter", ex);
+                    "Cannot find constructor of DataModel with " + forClass.getName() + "
as parameter", ex);
         }
-        catch (SecurityException ex)
+        catch (SecurityException | InstantiationException | IllegalAccessException ex)
         {
             throw new FacesException(
-                    "Cannot access constructor of DataModel with "+forClass.getName()+" as
parameter", ex);
+                    "Cannot access constructor of DataModel with " + forClass.getName() +
" as parameter", ex);
         } 
-        catch (InstantiationException ex)
-        {
-            throw new FacesException(
-                    "Cannot access constructor of DataModel with "+forClass.getName()+" as
parameter", ex);
-        }
-        catch (IllegalAccessException ex)
-        {
-            throw new FacesException(
-                    "Cannot access constructor of DataModel with "+forClass.getName()+" as
parameter", ex);
-        } 
-        catch (IllegalArgumentException ex)
-        {
-            throw new FacesException(
-                    "Cannot find constructor of DataModel with "+forClass.getName()+" as
parameter", ex);
-        } 
-        catch (InvocationTargetException ex)
-        {
-            throw new FacesException(
-                    "Cannot find constructor of DataModel with "+forClass.getName()+" as
parameter", ex);
-        }
     }
 }
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/validator/FacesValidatorCDIWrapper.java
b/impl/src/main/java/org/apache/myfaces/cdi/validator/FacesValidatorCDIWrapper.java
index fabdc2e..c30c81a 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/validator/FacesValidatorCDIWrapper.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/validator/FacesValidatorCDIWrapper.java
@@ -27,15 +27,13 @@ import javax.faces.validator.Validator;
 import javax.faces.validator.ValidatorException;
 import org.apache.myfaces.cdi.util.CDIUtils;
 
-/**
- *
- */
 public class FacesValidatorCDIWrapper implements PartialStateHolder, Validator, FacesWrapper<Validator>
 {
     private transient Validator delegate;
     
     private String validatorId;
     private boolean _transient;
+    private boolean _initialStateMarked = false;
 
     public FacesValidatorCDIWrapper()
     {
@@ -98,18 +96,19 @@ public class FacesValidatorCDIWrapper implements PartialStateHolder, Validator,
         _transient = newTransientValue;
     }
 
-    private boolean _initialStateMarked = false;
-
+    @Override
     public void clearInitialState()
     {
         _initialStateMarked = false;
     }
 
+    @Override
     public boolean initialStateMarked()
     {
         return _initialStateMarked;
     }
 
+    @Override
     public void markInitialState()
     {
         _initialStateMarked = true;
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/validator/FacesValidatorInfo.java b/impl/src/main/java/org/apache/myfaces/cdi/validator/FacesValidatorInfo.java
index e19d77f..7a5de10 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/validator/FacesValidatorInfo.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/validator/FacesValidatorInfo.java
@@ -23,13 +23,9 @@ import java.io.Serializable;
 import java.lang.reflect.Type;
 import java.util.Objects;
 
-/**
- *
- */
 public class FacesValidatorInfo implements Serializable
 {
     private Type type;
-    
     private String validatorId;
 
     public FacesValidatorInfo(Type type, String validatorId)
@@ -38,17 +34,11 @@ public class FacesValidatorInfo implements Serializable
         this.validatorId = validatorId;
     }
 
-    /**
-     * @return the validatorId
-     */
     public String getValidatorId()
     {
         return validatorId;
     }
 
-    /**
-     * @param validatorId the validatorId to set
-     */
     public void setValidatorId(String validatorId)
     {
         this.validatorId = validatorId;
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextExtension.java
b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextExtension.java
index 35f49f8..938970d 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextExtension.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextExtension.java
@@ -35,8 +35,7 @@ public class ViewScopeContextExtension implements Extension
 {
     private ViewScopeContextImpl viewScopeContext;
 
-    void beforeBeanDiscovery(
-        @Observes final BeforeBeanDiscovery event, BeanManager beanManager)
+    void beforeBeanDiscovery(@Observes BeforeBeanDiscovery event, BeanManager beanManager)
     {
         event.addScope(ViewScoped.class, true, true);
         // Register ViewScopeBeanHolder as a bean with CDI annotations, so the system
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
index ab89ed6..7baa0ff 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/view/ViewScopeContextImpl.java
@@ -108,6 +108,7 @@ public class ViewScopeContextImpl implements Context
         return null;
     }
 
+    @Override
     public Class<? extends Annotation> getScope()
     {
         return ViewScoped.class;
@@ -117,6 +118,7 @@ public class ViewScopeContextImpl implements Context
      * The WindowContext is active once a current windowId is set for the current Thread.
      * @return
      */
+    @Override
     public boolean isActive()
     {
         FacesContext facesContext = FacesContext.getCurrentInstance();
@@ -131,6 +133,7 @@ public class ViewScopeContextImpl implements Context
         }
     }
 
+    @Override
     public <T> T get(Contextual<T> bean)
     {
         checkActive();
@@ -151,6 +154,7 @@ public class ViewScopeContextImpl implements Context
         return (T) contextualInstanceInfo.getContextualInstance();
     }
 
+    @Override
     public <T> T get(Contextual<T> bean, CreationalContext<T> creationalContext)
     {
         checkActive();


Mime
View raw message