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 Sat, 18 Apr 2020 10:03:50 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 72d5dfd  cosmetics
72d5dfd is described below

commit 72d5dfd3b87855d667437f1fed86e5d796b14048
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Sat Apr 18 12:03:41 2020 +0200

    cosmetics
---
 .../java/org/apache/myfaces/renderkit/html/HtmlMessageRenderer.java  | 5 ++---
 .../java/org/apache/myfaces/renderkit/html/HtmlMessagesRenderer.java | 5 ++---
 .../org/apache/myfaces/renderkit/html/base/HtmlBodyRendererBase.java | 3 +--
 .../apache/myfaces/renderkit/html/base/HtmlCheckboxRendererBase.java | 5 ++---
 .../org/apache/myfaces/renderkit/html/base/HtmlLinkRendererBase.java | 3 +--
 .../apache/myfaces/renderkit/html/base/HtmlListboxRendererBase.java  | 5 ++---
 .../apache/myfaces/renderkit/html/base/HtmlMessageRendererBase.java  | 2 +-
 .../apache/myfaces/renderkit/html/base/HtmlSecretRendererBase.java   | 3 +--
 .../apache/myfaces/renderkit/html/base/HtmlTableRendererBase.java    | 3 +--
 .../apache/myfaces/renderkit/html/base/HtmlTextareaRendererBase.java | 3 +--
 .../myfaces/renderkit/html/util/ClientBehaviorRendererUtils.java     | 2 +-
 .../org/apache/myfaces/renderkit/html/util/HtmlRendererUtils.java    | 5 ++---
 12 files changed, 17 insertions(+), 27 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlMessageRenderer.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlMessageRenderer.java
index fa25b99..adb85f7 100755
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlMessageRenderer.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlMessageRenderer.java
@@ -45,11 +45,10 @@ public class HtmlMessageRenderer extends HtmlMessageRendererBase
     public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException
     {
         super.encodeEnd(facesContext, component); // check for NP
-        
-        Map<String, List<ClientBehavior>> behaviors = null;
+
         if (component instanceof ClientBehaviorHolder)
         {
-            behaviors = ((ClientBehaviorHolder) component).getClientBehaviors();
+            Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder)
component).getClientBehaviors();
             if (!behaviors.isEmpty())
             {
                 ResourceUtils.renderDefaultJsfJsInlineIfNecessary(facesContext, facesContext.getResponseWriter());
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlMessagesRenderer.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlMessagesRenderer.java
index fd40a26..5f41396 100755
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlMessagesRenderer.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlMessagesRenderer.java
@@ -46,11 +46,10 @@ public class HtmlMessagesRenderer extends HtmlMessagesRendererBase
     public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException
     {
         super.encodeEnd(facesContext, component); // check for NP�
-        
-        Map<String, List<ClientBehavior>> behaviors = null;
+
         if (component instanceof ClientBehaviorHolder)
         {
-            behaviors = ((ClientBehaviorHolder) component).getClientBehaviors();
+            Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder)
component).getClientBehaviors();
             if (!behaviors.isEmpty())
             {
                 ResourceUtils.renderDefaultJsfJsInlineIfNecessary(facesContext, facesContext.getResponseWriter());
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlBodyRendererBase.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlBodyRendererBase.java
index 7676496..8b83727 100644
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlBodyRendererBase.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlBodyRendererBase.java
@@ -61,10 +61,9 @@ public class HtmlBodyRendererBase extends HtmlRenderer
         super.encodeBegin(facesContext, component); //check for NP
 
         ResponseWriter writer = facesContext.getResponseWriter();
-        Map<String, List<ClientBehavior>> behaviors = null;
         if (component instanceof ClientBehaviorHolder)
         {
-            behaviors = ((ClientBehaviorHolder) component).getClientBehaviors();
+            Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder)
component).getClientBehaviors();
             if (!behaviors.isEmpty())
             {
                 ResourceUtils.renderDefaultJsfJsInlineIfNecessary(facesContext, writer);
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlCheckboxRendererBase.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlCheckboxRendererBase.java
index e9b39c6..4c4b287 100644
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlCheckboxRendererBase.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlCheckboxRendererBase.java
@@ -62,11 +62,10 @@ public class HtmlCheckboxRendererBase extends HtmlRenderer
     public void encodeEnd(FacesContext facesContext, UIComponent uiComponent) throws IOException
     {
         RendererUtils.checkParamValidity(facesContext, uiComponent, null);
-        
-        Map<String, List<ClientBehavior>> behaviors = null;
+
         if (uiComponent instanceof ClientBehaviorHolder)
         {
-            behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
+            Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder)
uiComponent).getClientBehaviors();
             if (!behaviors.isEmpty())
             {
                 ResourceUtils.renderDefaultJsfJsInlineIfNecessary(facesContext, facesContext.getResponseWriter());
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlLinkRendererBase.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlLinkRendererBase.java
index 6e72e11..fb2f3e9 100644
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlLinkRendererBase.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlLinkRendererBase.java
@@ -127,10 +127,9 @@ public abstract class HtmlLinkRendererBase extends HtmlRenderer
     {
         super.encodeBegin(facesContext, component);  //check for NP
 
-        Map<String, List<ClientBehavior>> behaviors = null;
         if (component instanceof ClientBehaviorHolder)
         {
-            behaviors = ((ClientBehaviorHolder) component).getClientBehaviors();
+            Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder)
component).getClientBehaviors();
             if (!behaviors.isEmpty())
             {
                 ResourceUtils.renderDefaultJsfJsInlineIfNecessary(facesContext, facesContext.getResponseWriter());
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlListboxRendererBase.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlListboxRendererBase.java
index 9ad6675..074b1c0 100644
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlListboxRendererBase.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlListboxRendererBase.java
@@ -48,11 +48,10 @@ public class HtmlListboxRendererBase
             throws IOException
     {
         RendererUtils.checkParamValidity(facesContext, uiComponent, null);
-        
-        Map<String, List<ClientBehavior>> behaviors = null;
+
         if (uiComponent instanceof ClientBehaviorHolder)
         {
-            behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
+            Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder)
uiComponent).getClientBehaviors();
             if (!behaviors.isEmpty())
             {
                 ResourceUtils.renderDefaultJsfJsInlineIfNecessary(
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlMessageRendererBase.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlMessageRendererBase.java
index 929536e..0049f2f 100644
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlMessageRendererBase.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlMessageRendererBase.java
@@ -246,7 +246,7 @@ public abstract class HtmlMessageRendererBase
             wrapSpan = wrapSpan || !behaviors.isEmpty();
         }
         
-        if ( wrapSpan )
+        if (wrapSpan)
         {
             span = true;
 
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlSecretRendererBase.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlSecretRendererBase.java
index fc88c81..83ec76a 100644
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlSecretRendererBase.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlSecretRendererBase.java
@@ -105,10 +105,9 @@ public class HtmlSecretRendererBase extends HtmlRenderer
             writer.writeAttribute(HTML.VALUE_ATTR, strValue, JSFAttr.VALUE_ATTR);
         }
 
-        Map<String, List<ClientBehavior>> behaviors = null;
         if (uiComponent instanceof ClientBehaviorHolder)
         {
-            behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
+            Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder)
uiComponent).getClientBehaviors();
             
             long commonPropertiesMarked = 0L;
             if (isCommonPropertiesOptimizationEnabled(facesContext))
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlTableRendererBase.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlTableRendererBase.java
index 1bd611d..1cb7356 100644
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlTableRendererBase.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlTableRendererBase.java
@@ -110,10 +110,9 @@ public class HtmlTableRendererBase extends HtmlRenderer
     {
         RendererUtils.checkParamValidity(facesContext, uiComponent, UIData.class);
 
-        Map<String, List<ClientBehavior>> behaviors = null;
         if (uiComponent instanceof ClientBehaviorHolder)
         {
-            behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
+            Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder)
uiComponent).getClientBehaviors();
             if (!behaviors.isEmpty())
             {
                 ResourceUtils.renderDefaultJsfJsInlineIfNecessary(facesContext, facesContext.getResponseWriter());
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlTextareaRendererBase.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlTextareaRendererBase.java
index c4b6d2a..51b5346 100644
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlTextareaRendererBase.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlTextareaRendererBase.java
@@ -50,10 +50,9 @@ public class HtmlTextareaRendererBase extends HtmlRenderer
     {
         RendererUtils.checkParamValidity(facesContext, uiComponent, UIInput.class);
 
-        Map<String, List<ClientBehavior>> behaviors = null;
         if (uiComponent instanceof ClientBehaviorHolder)
         {
-            behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
+            Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder)
uiComponent).getClientBehaviors();
             if (!behaviors.isEmpty())
             {
                 ResourceUtils.renderDefaultJsfJsInlineIfNecessary(facesContext, 
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/util/ClientBehaviorRendererUtils.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/util/ClientBehaviorRendererUtils.java
index 42e2619..70b6158 100644
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/util/ClientBehaviorRendererUtils.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/util/ClientBehaviorRendererUtils.java
@@ -104,7 +104,7 @@ public class ClientBehaviorRendererUtils
         {
             return false;
         }
-        return (behaviors.get(eventName) != null);
+        return behaviors.get(eventName) != null;
     }
 
     public static Collection<ClientBehaviorContext.Parameter> getClientBehaviorContextParameters(
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/util/HtmlRendererUtils.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/util/HtmlRendererUtils.java
index ed5a4d5..fd9ea83 100644
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/util/HtmlRendererUtils.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/util/HtmlRendererUtils.java
@@ -419,11 +419,10 @@ public final class HtmlRendererUtils
         {
             writer.writeAttribute(HTML.SIZE_ATTR, Integer.toString(size), null);
         }
-        
-        Map<String, List<ClientBehavior>> behaviors = null;
+
         if (uiComponent instanceof ClientBehaviorHolder)
         {
-            behaviors = ((ClientBehaviorHolder) uiComponent).getClientBehaviors();
+            Map<String, List<ClientBehavior>> behaviors = ((ClientBehaviorHolder)
uiComponent).getClientBehaviors();
             renderBehaviorizedOnchangeEventHandler(facesContext, writer, uiComponent, behaviors);
             renderBehaviorizedEventHandlers(facesContext, writer, uiComponent, behaviors);
             renderBehaviorizedFieldEventHandlersWithoutOnchange(facesContext, writer, uiComponent,
behaviors);


Mime
View raw message