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 Thu, 15 Nov 2018 12:41:27 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 484db83  cosmetics
484db83 is described below

commit 484db83713b983a9437253e441fbf796e4b52a5c
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Thu Nov 15 13:41:23 2018 +0100

    cosmetics
---
 .../renderkit/html/HtmlAjaxBehaviorRenderer.java   |  2 +-
 .../myfaces/renderkit/html/HtmlRenderKitImpl.java  | 22 +++++++---------------
 .../renderkit/html/HtmlStylesheetRenderer.java     |  2 +-
 3 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java
index 0301bbf..4721d0b 100644
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlAjaxBehaviorRenderer.java
@@ -255,7 +255,7 @@ public class HtmlAjaxBehaviorRenderer extends ClientBehaviorRenderer
                 {
                     // set the clientId of the component so the behavior can be decoded later,
                     // otherwise the behavior will fail
-                    List<String> list = new ArrayList<String>();
+                    List<String> list = new ArrayList<>();
                     list.add(context.getComponent().getClientId(context.getFacesContext()));
                     executes = mapToString(context, paramBuffer, AJAX_KEY_EXECUTE, list);
                 }
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlRenderKitImpl.java b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlRenderKitImpl.java
index 1ce3ee7..83458a7 100755
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlRenderKitImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlRenderKitImpl.java
@@ -66,10 +66,9 @@ public class HtmlRenderKitImpl extends RenderKit implements LazyRenderKit
 
     public HtmlRenderKitImpl()
     {
-        _renderers = new ConcurrentHashMap<String, Map<String, Renderer>>(64,
0.75f, 1);
+        _renderers = new ConcurrentHashMap<>(64, 0.75f, 1);
         _responseStateManager = new HtmlResponseStateManager();
-        //_families = new HashMap<String, Set<String> >();
-        _clientBehaviorRenderers = new HashMap<String, ClientBehaviorRenderer>();
+        _clientBehaviorRenderers = new HashMap<>();
     }
 
     // ~ Methods ------------------------------------------------------------------------------------
@@ -113,10 +112,12 @@ public class HtmlRenderKitImpl extends RenderKit implements LazyRenderKit
         {
             throw new NullPointerException("component family must not be null.");
         }
+        
         if (rendererType == null)
         {
             throw new NullPointerException("renderer type must not be null.");
         }
+        
         Map <String,Renderer> familyRendererMap = _renderers.get(componentFamily);

         Renderer renderer = null;
         if (familyRendererMap != null)
@@ -203,7 +204,7 @@ public class HtmlRenderKitImpl extends RenderKit implements LazyRenderKit
         Map <String,Renderer> familyRendererMap = _renderers.get(componentFamily);
         if (familyRendererMap == null)
         {
-            familyRendererMap = new ConcurrentHashMap<String, Renderer>(8, 0.75f, 1);
+            familyRendererMap = new ConcurrentHashMap<>(8, 0.75f, 1);
             _renderers.put(componentFamily, familyRendererMap);
         }
         else
@@ -249,25 +250,16 @@ public class HtmlRenderKitImpl extends RenderKit implements LazyRenderKit
         {
             return map.keySet().iterator();
         }
-        /*
-        Set<String> rendererTypes = _families.get(componentFamily);
-        if(rendererTypes != null)
-        {
-            return rendererTypes.iterator();
-        }*/
+
         //If the specified componentFamily is not known to this RenderKit implementation,
return an empty Iterator
         return Collections.<String>emptySet().iterator();
-        
-
-
     }
 
     @Override
     public ResponseWriter createResponseWriter(Writer writer, String contentTypeListString,
String characterEncoding)
     {
         FacesContext facesContext = FacesContext.getCurrentInstance();
-        MyfacesConfig myfacesConfig = MyfacesConfig.getCurrentInstance(
-                facesContext.getExternalContext());
+        MyfacesConfig myfacesConfig = MyfacesConfig.getCurrentInstance(facesContext.getExternalContext());
         String selectedContentType = null;
         String writerContentType = null;
         boolean isAjaxRequest = facesContext.getPartialViewContext().isAjaxRequest();
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlStylesheetRenderer.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlStylesheetRenderer.java
index 1bb123c..1935a60 100644
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlStylesheetRenderer.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlStylesheetRenderer.java
@@ -113,7 +113,7 @@ public class HtmlStylesheetRenderer extends Renderer implements
         {
             if (hasChildren)
             {
-                log.info("Component with resourceName "+ resourceName + 
+                log.info("Component with resourceName " + resourceName + 
                         " and child components found. Child components will be ignored.");
             }
         }


Mime
View raw message