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 Tue, 08 Jan 2019 21:31:39 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 2a3159f  cosmetics
2a3159f is described below

commit 2a3159ffd5a9dfe4a4fedb8af9bbf4bb0057f94b
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Tue Jan 8 22:31:57 2019 +0100

    cosmetics
---
 .../myfaces/cdi/scope/FacesScopeBeanHolder.java     | 12 ++++--------
 .../cdi/scope/ViewTransientScopeBeanHolder.java     |  6 ++----
 .../cdi/scope/ViewTransientScopedContextImpl.java   |  3 +++
 .../el/unified/CustomFirstELResolverComparator.java |  1 +
 .../el/unified/CustomLastELResolverComparator.java  |  1 +
 .../el/unified/resolver/ImportHandlerResolver.java  | 21 +++------------------
 6 files changed, 14 insertions(+), 30 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/cdi/scope/FacesScopeBeanHolder.java b/impl/src/main/java/org/apache/myfaces/cdi/scope/FacesScopeBeanHolder.java
index f0a3f3e..a5e9a84 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/scope/FacesScopeBeanHolder.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/scope/FacesScopeBeanHolder.java
@@ -52,8 +52,7 @@ public class FacesScopeBeanHolder
      */
     public static ContextualStorage getContextualStorage(BeanManager beanManager, FacesContext
facesContext)
     {
-        ContextualStorage contextualStorage = (ContextualStorage) 
-                facesContext.getAttributes().get(FACES_SCOPE_MAP);
+        ContextualStorage contextualStorage = (ContextualStorage) facesContext.getAttributes().get(FACES_SCOPE_MAP);
         if (contextualStorage == null)
         {
             contextualStorage = new ContextualStorage(beanManager, false, false);
@@ -68,14 +67,12 @@ public class FacesScopeBeanHolder
         return (ContextualStorage) facesContext.getAttributes().get(FACES_SCOPE_MAP);
     }
 
-    public Map<Object, Object> getFacesScopeMap(
-        BeanManager beanManager, FacesContext facesContext, boolean create)
+    public Map<Object, Object> getFacesScopeMap(BeanManager beanManager, FacesContext
facesContext, boolean create)
     {
         Map<Object, Object> map = null;
         if (create)
         {
-            ContextualStorage contextualStorage = getContextualStorage(
-                beanManager, facesContext);
+            ContextualStorage contextualStorage = getContextualStorage(beanManager, facesContext);
             ContextualInstanceInfo info = contextualStorage.getStorage().get(FACES_SCOPE_MAP_INFO);
             if (info == null)
             {
@@ -91,8 +88,7 @@ public class FacesScopeBeanHolder
         }
         else
         {
-            ContextualStorage contextualStorage = getContextualStorageNoCreate(
-                beanManager, facesContext);
+            ContextualStorage contextualStorage = getContextualStorageNoCreate(beanManager,
facesContext);
             if (contextualStorage != null)
             {
                 ContextualInstanceInfo info = contextualStorage.getStorage().get(FACES_SCOPE_MAP_INFO);
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/scope/ViewTransientScopeBeanHolder.java
b/impl/src/main/java/org/apache/myfaces/cdi/scope/ViewTransientScopeBeanHolder.java
index 216e33f..59e1ab9 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/scope/ViewTransientScopeBeanHolder.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/scope/ViewTransientScopeBeanHolder.java
@@ -70,8 +70,7 @@ public class ViewTransientScopeBeanHolder
         Map<Object, Object> map = null;
         if (create)
         {
-            ContextualStorage contextualStorage = getContextualStorage(
-                beanManager, facesContext);
+            ContextualStorage contextualStorage = getContextualStorage(beanManager, facesContext);
             ContextualInstanceInfo info = contextualStorage.getStorage().get(VIEW_TRANSIENT_SCOPE_MAP_INFO);
             if (info == null)
             {
@@ -87,8 +86,7 @@ public class ViewTransientScopeBeanHolder
         }
         else
         {
-            ContextualStorage contextualStorage = getContextualStorageNoCreate(
-                beanManager, facesContext);
+            ContextualStorage contextualStorage = getContextualStorageNoCreate(beanManager,
facesContext);
             if (contextualStorage != null)
             {
                 ContextualInstanceInfo info = contextualStorage.getStorage().get(VIEW_TRANSIENT_SCOPE_MAP_INFO);
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/scope/ViewTransientScopedContextImpl.java
b/impl/src/main/java/org/apache/myfaces/cdi/scope/ViewTransientScopedContextImpl.java
index 7a37e66..54039a6 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/scope/ViewTransientScopedContextImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/scope/ViewTransientScopedContextImpl.java
@@ -79,11 +79,13 @@ public class ViewTransientScopedContextImpl implements Context
         }
     }
 
+    @Override
     public Class<? extends Annotation> getScope()
     {
         return ViewTransientScoped.class;
     }
 
+    @Override
     public boolean isActive()
     {
         return isActive(FacesContext.getCurrentInstance());
@@ -130,6 +132,7 @@ public class ViewTransientScopedContextImpl implements Context
         return null;
     }
 
+    @Override
     public <T> T get(Contextual<T> bean, CreationalContext<T> creationalContext)
     {
         FacesContext facesContext = FacesContext.getCurrentInstance();
diff --git a/impl/src/main/java/org/apache/myfaces/el/unified/CustomFirstELResolverComparator.java
b/impl/src/main/java/org/apache/myfaces/el/unified/CustomFirstELResolverComparator.java
index da7090f..d227a9b 100644
--- a/impl/src/main/java/org/apache/myfaces/el/unified/CustomFirstELResolverComparator.java
+++ b/impl/src/main/java/org/apache/myfaces/el/unified/CustomFirstELResolverComparator.java
@@ -41,6 +41,7 @@ public class CustomFirstELResolverComparator implements Comparator<ELResolver>
     
     private List<ELResolver> _facesConfigResolvers;
     
+    @Override
     public int compare(ELResolver r1, ELResolver r2)
     {
         List<ELResolver> facesConfigResolvers = _getFacesConfigElResolvers();
diff --git a/impl/src/main/java/org/apache/myfaces/el/unified/CustomLastELResolverComparator.java
b/impl/src/main/java/org/apache/myfaces/el/unified/CustomLastELResolverComparator.java
index 6829408..bcbf996 100644
--- a/impl/src/main/java/org/apache/myfaces/el/unified/CustomLastELResolverComparator.java
+++ b/impl/src/main/java/org/apache/myfaces/el/unified/CustomLastELResolverComparator.java
@@ -37,6 +37,7 @@ public class CustomLastELResolverComparator implements Comparator<ELResolver>
     private CustomFirstELResolverComparator _inverseResolver
             = new CustomFirstELResolverComparator();
     
+    @Override
     public int compare(ELResolver r1, ELResolver r2)
     {
         return _inverseResolver.compare(r2, r1);
diff --git a/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ImportHandlerResolver.java
b/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ImportHandlerResolver.java
index ba676de..08ccd9d 100644
--- a/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ImportHandlerResolver.java
+++ b/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ImportHandlerResolver.java
@@ -110,26 +110,11 @@ public class ImportHandlerResolver extends ScopedAttributeResolver
                     }
                 }
             } 
-            catch (IllegalAccessException ex) 
+            catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException
| SecurityException
+                    | InstantiationException ex) 
             {
                 //No op
-            } 
-            catch (IllegalArgumentException ex) 
-            {
-                //No op
-            } 
-            catch (InvocationTargetException ex) 
-            {
-                //No op
-            } 
-            catch (SecurityException ex) 
-            {
-                //No op
-            } 
-            catch (InstantiationException e) 
-            {
-                //No op
-            }
+            }            
         }
         return null;
     }


Mime
View raw message