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: unified utils
Date Mon, 15 Jul 2019 08:42:41 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 66ffcb9  unified utils
66ffcb9 is described below

commit 66ffcb910b7531b2936081bb744fc3f9edb584ba
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Mon Jul 15 10:42:34 2019 +0200

    unified utils
---
 .../myfaces/application/ApplicationImpl.java       | 14 ++---
 .../myfaces/application/NavigationHandlerImpl.java |  5 +-
 .../apache/myfaces/application/ViewIdSupport.java  |  4 +-
 .../application/viewstate/SessionIdGenerator.java  |  6 +--
 .../search/SearchExpressionHandlerImpl.java        |  8 +--
 .../config/DefaultFacesConfigurationMerger.java    | 10 ++--
 .../config/annotation/AnnotationConfigurator.java  |  6 +--
 .../servlet/ServletExternalContextImpl.java        |  4 +-
 .../el/resolver/CompositeComponentELResolver.java  |  4 +-
 .../org/apache/myfaces/flow/FlowHandlerImpl.java   |  4 +-
 .../renderkit/html/HtmlAjaxBehaviorRenderer.java   | 12 ++---
 .../renderkit/html/HtmlCommandScriptRenderer.java  | 11 ++--
 .../renderkit/html/base/HtmlRendererUtils.java     | 17 +++----
 .../apache/myfaces/util/AbstractAttributeMap.java  |  3 ++
 .../java/org/apache/myfaces/util/LangUtils.java    | 59 ----------------------
 .../java/org/apache/myfaces/util/StringUtils.java  | 37 ++++++++++++++
 .../org/apache/myfaces/util/UrlPatternMatcher.java |  4 +-
 .../java/org/apache/myfaces/util/WebXmlParser.java |  4 +-
 .../view/facelets/compiler/TagLibraryConfig.java   |  5 +-
 .../facelets/tag/composite/AttributeHandler.java   |  4 +-
 .../util/FaceletsViewDeclarationLanguageUtils.java |  4 +-
 .../myfaces/webapp/AbstractFacesInitializer.java   |  4 +-
 22 files changed, 103 insertions(+), 126 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java b/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
index a73fc30..a24f74c 100755
--- a/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
@@ -123,7 +123,7 @@ import org.apache.myfaces.lifecycle.LifecycleImpl;
 import org.apache.myfaces.config.MyfacesConfig;
 import org.apache.myfaces.util.Assert;
 import org.apache.myfaces.util.ClassUtils;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 import org.apache.myfaces.view.facelets.FaceletCompositionContext;
 import org.apache.myfaces.view.facelets.el.ELText;
 
@@ -1858,7 +1858,7 @@ public class ApplicationImpl extends Application
             // Get the annotation instance from the class and obtain the values of the name,
library, and 
             // target attributes.
             String name = annotation.name();
-            if (LangUtils.isNotEmpty(name))
+            if (StringUtils.isNotEmpty(name))
             {
                 name = ELText.parse(getExpressionFactory(),context.getELContext(), name)
                         .toString(context.getELContext());
@@ -1883,7 +1883,7 @@ public class ApplicationImpl extends Application
             
             // If library is the empty string, let library be null.
             String library = annotation.library();
-            if (LangUtils.isNotEmpty(library))
+            if (StringUtils.isNotEmpty(library))
             {
                 library = ELText.parse(getExpressionFactory(), context.getELContext(), library)
                         .toString(context.getELContext());
@@ -1897,7 +1897,7 @@ public class ApplicationImpl extends Application
             
             // If target is the empty string, let target be null.
             String target = annotation.target();
-            if (LangUtils.isNotEmpty(target))
+            if (StringUtils.isNotEmpty(target))
             {
                 target = ELText.parse(getExpressionFactory(),context.getELContext(), target)
                         .toString(context.getELContext());
@@ -2298,7 +2298,7 @@ public class ApplicationImpl extends Application
             // Get the annotation instance from the class and obtain the values of the name,
library, and
             // target attributes.
             String name = annotation.name();
-            if (LangUtils.isNotEmpty(name))
+            if (StringUtils.isNotEmpty(name))
             {
                 name = ELText.parse(getExpressionFactory(), context.getELContext(), name)
                         .toString(context.getELContext());
@@ -2324,7 +2324,7 @@ public class ApplicationImpl extends Application
 
             // If library is the empty string, let library be null.
             String library = annotation.library();
-            if (LangUtils.isNotEmpty(library))
+            if (StringUtils.isNotEmpty(library))
             {
                 library = ELText.parse(getExpressionFactory(), context.getELContext(), library)
                         .toString(context.getELContext());
@@ -2350,7 +2350,7 @@ public class ApplicationImpl extends Application
 
             // If target is the empty string, let target be null.
             String target = annotation.target();
-            if (LangUtils.isNotEmpty(target))
+            if (StringUtils.isNotEmpty(target))
             {
                 target = ELText.parse(getExpressionFactory(), context.getELContext(), target)
                         .toString(context.getELContext());
diff --git a/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
b/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
index 9464458..e105e03 100755
--- a/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
@@ -70,7 +70,6 @@ import org.apache.myfaces.util.ClassUtils;
 import org.apache.myfaces.util.HashMapUtils;
 import org.apache.myfaces.util.StringUtils;
 import org.apache.myfaces.util.FilenameUtils;
-import org.apache.myfaces.util.LangUtils;
 import org.apache.myfaces.component.visit.MyFacesVisitHints;
 import org.apache.myfaces.view.facelets.ViewPoolProcessor;
 import org.apache.myfaces.view.facelets.tag.jsf.PreDisposeViewEvent;
@@ -881,7 +880,7 @@ public class NavigationHandlerImpl extends ConfigurableNavigationHandler
         targetFlow = flowHandler.getFlow(facesContext, 
             calledFlowDocumentId, 
             flowCallNode.getCalledFlowId(facesContext));
-        if (targetFlow == null && LangUtils.isNotBlank(calledFlowDocumentId))
+        if (targetFlow == null && StringUtils.isNotBlank(calledFlowDocumentId))
         {
             targetFlow = flowHandler.getFlow(facesContext, "", flowCallNode.getCalledFlowId(facesContext));
         }
@@ -1128,7 +1127,7 @@ public class NavigationHandlerImpl extends ConfigurableNavigationHandler
             // Append all params from the queryString
             // (excluding faces-redirect, includeViewParams and faces-include-view-params)
             Map<String, List<String>> params = null;
-            if (LangUtils.isNotBlank(queryString))
+            if (StringUtils.isNotBlank(queryString))
             {
                 String[] splitQueryParams = AMP_PATTERN.split(queryString); // "&" or
"&amp;"
                 params = new HashMap<>(splitQueryParams.length, (splitQueryParams.length*
4 + 3) / 3);
diff --git a/impl/src/main/java/org/apache/myfaces/application/ViewIdSupport.java b/impl/src/main/java/org/apache/myfaces/application/ViewIdSupport.java
index 28d93ed..1f700e0 100644
--- a/impl/src/main/java/org/apache/myfaces/application/ViewIdSupport.java
+++ b/impl/src/main/java/org/apache/myfaces/application/ViewIdSupport.java
@@ -34,7 +34,7 @@ import org.apache.myfaces.config.MyfacesConfig;
 import org.apache.myfaces.util.ConcurrentLRUCache;
 import org.apache.myfaces.util.SharedStringBuilder;
 import org.apache.myfaces.util.ExternalContextUtils;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 import org.apache.myfaces.util.UrlPatternMatcher;
 
 /**
@@ -358,7 +358,7 @@ public class ViewIdSupport
         // For example, if the incoming value was /faces/faces/faces/view.xhtml 
         // the result would be simply view.xhtml.
         
-        if (LangUtils.isBlank(prefix))
+        if (StringUtils.isBlank(prefix))
         {
             // if prefix is an empty string (Spring environment), we let it be "//"
             // in order to prevent an infinite loop in uri.startsWith(-emptyString-).
diff --git a/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionIdGenerator.java
b/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionIdGenerator.java
index 5f8929b..71c07ee 100644
--- a/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionIdGenerator.java
+++ b/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionIdGenerator.java
@@ -26,7 +26,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import org.apache.myfaces.util.ClassUtils;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 
 /**
  * NOTE: Class taken from tomcat 7 org.apache.catalina.util.SessionIdGenerator
@@ -228,13 +228,13 @@ class SessionIdGenerator
             // No secureRandomClass or creation failed. Use SecureRandom.
             try
             {
-                if (LangUtils.isNotBlank(secureRandomProvider))
+                if (StringUtils.isNotBlank(secureRandomProvider))
                 {
                     result = SecureRandom.getInstance(secureRandomAlgorithm, secureRandomProvider);
                 }
                 else
                 {
-                    if (LangUtils.isNotBlank(secureRandomAlgorithm))
+                    if (StringUtils.isNotBlank(secureRandomAlgorithm))
                     {
                         result = SecureRandom.getInstance(secureRandomAlgorithm);
                     }
diff --git a/impl/src/main/java/org/apache/myfaces/component/search/SearchExpressionHandlerImpl.java
b/impl/src/main/java/org/apache/myfaces/component/search/SearchExpressionHandlerImpl.java
index afda745..2c3d252 100644
--- a/impl/src/main/java/org/apache/myfaces/component/search/SearchExpressionHandlerImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/component/search/SearchExpressionHandlerImpl.java
@@ -35,7 +35,7 @@ import javax.faces.component.search.SearchKeywordContext;
 import javax.faces.context.FacesContext;
 import org.apache.myfaces.util.SharedStringBuilder;
 import org.apache.myfaces.util.ComponentUtils;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 
 /**
  *
@@ -598,7 +598,7 @@ public class SearchExpressionHandlerImpl extends SearchExpressionHandler
     @Override
     public boolean isPassthroughExpression(SearchExpressionContext searchExpressionContext,
String topExpression)
     {
-        if (LangUtils.isBlank(topExpression))
+        if (StringUtils.isBlank(topExpression))
         {
             return false;
         }
@@ -656,7 +656,7 @@ public class SearchExpressionHandlerImpl extends SearchExpressionHandler
     @Override
     public boolean isValidExpression(SearchExpressionContext searchExpressionContext, String
topExpression)
     {
-        if (LangUtils.isBlank(topExpression))
+        if (StringUtils.isBlank(topExpression))
         {
             return true;
         }
@@ -796,7 +796,7 @@ public class SearchExpressionHandlerImpl extends SearchExpressionHandler
 
     private static String[] split(FacesContext context, String value, char... separators)
     {
-        if (LangUtils.isBlank(value))
+        if (StringUtils.isBlank(value))
         {
             return null;
         }
diff --git a/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationMerger.java
b/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationMerger.java
index 44b4da1..9d38c2a 100644
--- a/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationMerger.java
+++ b/impl/src/main/java/org/apache/myfaces/config/DefaultFacesConfigurationMerger.java
@@ -42,7 +42,7 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 
 /**
  * Default impl of the FacesConfigurationMerger-SPI.
@@ -419,7 +419,7 @@ public class DefaultFacesConfigurationMerger extends FacesConfigurationMerger
                     if (slot instanceof FacesConfigNameSlot)
                     {
                         String name = ((FacesConfigNameSlot) slot).getName();
-                        if (LangUtils.isNotEmpty(name))
+                        if (StringUtils.isNotEmpty(name))
                         {
                             boolean founded = false;
                             for (int j = i+1; j < sortedList.size(); j++)
@@ -578,7 +578,7 @@ public class DefaultFacesConfigurationMerger extends FacesConfigurationMerger
                     if (slot instanceof FacesConfigNameSlot)
                     {
                         String name = ((FacesConfigNameSlot) slot).getName();
-                        if (LangUtils.isNotEmpty(name))
+                        if (StringUtils.isNotEmpty(name))
                         {
                             boolean founded = false;
                             for (int j = i-1; j >= 0; j--)
@@ -602,7 +602,7 @@ public class DefaultFacesConfigurationMerger extends FacesConfigurationMerger
                     if (slot instanceof FacesConfigNameSlot)
                     {
                         String name = ((FacesConfigNameSlot) slot).getName();
-                        if (LangUtils.isNotEmpty(name))
+                        if (StringUtils.isNotEmpty(name))
                         {
                             boolean founded = false;
                             for (int j = i+1; j < sortedList.size(); j++)
@@ -774,7 +774,7 @@ public class DefaultFacesConfigurationMerger extends FacesConfigurationMerger
         for (FacesConfig resource : appConfigResources)
         {
             String name = resource.getName();
-            if (LangUtils.isNotEmpty(name))
+            if (StringUtils.isNotEmpty(name))
             {
                 availableReferences.add(name);
             }
diff --git a/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
b/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
index 3d3afb4..515cd13 100644
--- a/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
+++ b/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
@@ -44,7 +44,7 @@ import org.apache.myfaces.config.impl.elements.ConverterImpl;
 import org.apache.myfaces.config.impl.elements.FacesConfigImpl;
 import org.apache.myfaces.spi.AnnotationProvider;
 import org.apache.myfaces.spi.AnnotationProviderFactory;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 
 /**
  * Configure all annotations that needs to be defined at startup.
@@ -109,7 +109,7 @@ public class AnnotationConfigurator
                                 + clazz.getName() + ')');
                     }
                     String value = comp.value();
-                    if (LangUtils.isEmpty(value))
+                    if (StringUtils.isEmpty(value))
                     {
                         String simpleName = clazz.getSimpleName();
                         value = Character.toLowerCase(simpleName.charAt(0)) + simpleName.substring(1);
@@ -119,7 +119,7 @@ public class AnnotationConfigurator
                     if (comp.createTag())
                     {
                         String tagName = comp.tagName();
-                        if (LangUtils.isEmpty(tagName))
+                        if (StringUtils.isEmpty(tagName))
                         {
                             tagName = clazz.getSimpleName();
                             tagName = Character.toLowerCase(tagName.charAt(0)) + tagName.substring(1);
diff --git a/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
b/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
index 4eb24f7..b694aec 100755
--- a/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
@@ -60,7 +60,7 @@ import org.apache.myfaces.context.flash.FlashImpl;
 import org.apache.myfaces.util.Assert;
 import org.apache.myfaces.util.EnumerationIterator;
 import org.apache.myfaces.util.ExternalSpecifications;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 
 /**
  * Implements the external context for servlet request. JSF 1.2, 6.1.3
@@ -915,7 +915,7 @@ public final class ServletExternalContextImpl extends ServletExternalContextImpl
             for (Map.Entry<String, List<String>> pair : parameters.entrySet())
             {
                 String key = pair.getKey();
-                if (LangUtils.isNotBlank(key))
+                if (StringUtils.isNotBlank(key))
                 {
                     if (paramMap == null)
                     {
diff --git a/impl/src/main/java/org/apache/myfaces/el/resolver/CompositeComponentELResolver.java
b/impl/src/main/java/org/apache/myfaces/el/resolver/CompositeComponentELResolver.java
index 50bd69d..bcbaf5e 100644
--- a/impl/src/main/java/org/apache/myfaces/el/resolver/CompositeComponentELResolver.java
+++ b/impl/src/main/java/org/apache/myfaces/el/resolver/CompositeComponentELResolver.java
@@ -37,7 +37,7 @@ import javax.faces.el.CompositeComponentExpressionHolder;
 
 import org.apache.myfaces.config.MyfacesConfig;
 import org.apache.myfaces.util.ClassUtils;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 import org.apache.myfaces.view.facelets.tag.composite.CompositeComponentBeanInfo;
 
 /**
@@ -99,7 +99,7 @@ public final class CompositeComponentELResolver extends ELResolver
                     exprType = ve.getType(context);
                 }
 
-                if (LangUtils.isNotBlank((String) property))
+                if (StringUtils.isNotBlank((String) property))
                 {
                     if (evalMap._propertyDescriptors != null)
                     {
diff --git a/impl/src/main/java/org/apache/myfaces/flow/FlowHandlerImpl.java b/impl/src/main/java/org/apache/myfaces/flow/FlowHandlerImpl.java
index d6cef3d..a928e03 100644
--- a/impl/src/main/java/org/apache/myfaces/flow/FlowHandlerImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/flow/FlowHandlerImpl.java
@@ -43,7 +43,7 @@ import org.apache.myfaces.event.PostClientWindowAndViewInitializedEvent;
 import org.apache.myfaces.spi.FacesFlowProvider;
 import org.apache.myfaces.spi.FacesFlowProviderFactory;
 import org.apache.myfaces.util.Assert;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 
 /**
  *
@@ -89,7 +89,7 @@ public class FlowHandlerImpl extends FlowHandler implements SystemEventListener
         }
         
         //if definingDocumentId is an empty string, 
-        if (LangUtils.isEmpty(definingDocumentId))
+        if (StringUtils.isEmpty(definingDocumentId))
         {
             return _flowMapById.get(id);
         }
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 c9b3605..70b2a24 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
@@ -40,7 +40,7 @@ import javax.faces.context.FacesContext;
 import javax.faces.event.AjaxBehaviorEvent;
 import javax.faces.event.PhaseId;
 import javax.faces.render.ClientBehaviorRenderer;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 import org.apache.myfaces.util.SharedStringBuilder;
 
 /**
@@ -147,7 +147,7 @@ public class HtmlAjaxBehaviorRenderer extends ClientBehaviorRenderer
         String render = mapToString(context, paramBuffer, AJAX_KEY_RENDER, behavior.getRender());
 
         String onError = behavior.getOnerror();
-        if (LangUtils.isNotBlank(onError))
+        if (StringUtils.isNotBlank(onError))
         {
             paramBuffer.setLength(0);
             paramBuffer.append(AJAX_KEY_ONERROR);
@@ -161,7 +161,7 @@ public class HtmlAjaxBehaviorRenderer extends ClientBehaviorRenderer
         }
         
         String onEvent = behavior.getOnevent();
-        if (LangUtils.isNotBlank(onEvent))
+        if (StringUtils.isNotBlank(onEvent))
         {
             paramBuffer.setLength(0);
             paramBuffer.append(AJAX_KEY_ONEVENT);
@@ -175,7 +175,7 @@ public class HtmlAjaxBehaviorRenderer extends ClientBehaviorRenderer
         }
 
         String delay = behavior.getDelay();
-        if (LangUtils.isNotBlank(delay))
+        if (StringUtils.isNotBlank(delay))
         {
             paramBuffer.setLength(0);
             paramBuffer.append(AJAX_KEY_DELAY);
@@ -368,7 +368,7 @@ public class HtmlAjaxBehaviorRenderer extends ClientBehaviorRenderer
         for (int i = 0, size = options.size(); i < size; i++)
         {
             String option = options.get(i);
-            if (LangUtils.isNotBlank(option))
+            if (StringUtils.isNotBlank(option))
             {
                 if (!first)
                 {
@@ -456,7 +456,7 @@ public class HtmlAjaxBehaviorRenderer extends ClientBehaviorRenderer
             int size, StringBuilder retVal, int cnt,
             String strVal, SearchExpressionContext searchExpressionContext)
     {
-        if (LangUtils.isNotBlank(strVal))
+        if (StringUtils.isNotBlank(strVal))
         {
             SearchExpressionHandler handler = context.getFacesContext().getApplication().getSearchExpressionHandler();
             String clientId = handler.resolveClientId(searchExpressionContext, strVal.trim());
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCommandScriptRenderer.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCommandScriptRenderer.java
index e4fe970..8a56eb1 100644
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCommandScriptRenderer.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCommandScriptRenderer.java
@@ -47,9 +47,8 @@ import org.apache.myfaces.renderkit.html.util.JavascriptContext;
 import org.apache.myfaces.renderkit.html.util.JavascriptUtils;
 import org.apache.myfaces.renderkit.html.util.ResourceUtils;
 import org.apache.myfaces.util.ComponentUtils;
-import org.apache.myfaces.util.LangUtils;
-import org.apache.myfaces.util.SharedStringBuilder;
 import org.apache.myfaces.util.StringUtils;
+import org.apache.myfaces.util.SharedStringBuilder;
 
 @JSFRenderer(renderKitId = "HTML_BASIC", family = "javax.faces.Command", type = "javax.faces.Script")
 public class HtmlCommandScriptRenderer extends HtmlRenderer
@@ -212,7 +211,7 @@ public class HtmlCommandScriptRenderer extends HtmlRenderer
                 searchExpressionContext);
 
         String onError = commandScript.getOnerror();
-        if (LangUtils.isNotBlank(onError))
+        if (StringUtils.isNotBlank(onError))
         {
             paramBuffer.setLength(0);
             paramBuffer.append(AJAX_KEY_ONERROR);
@@ -226,7 +225,7 @@ public class HtmlCommandScriptRenderer extends HtmlRenderer
         }
 
         String onEvent = commandScript.getOnevent();
-        if (LangUtils.isNotBlank(onEvent))
+        if (StringUtils.isNotBlank(onEvent))
         {
             paramBuffer.setLength(0);
             paramBuffer.append(AJAX_KEY_ONEVENT);
@@ -402,7 +401,7 @@ public class HtmlCommandScriptRenderer extends HtmlRenderer
         for (int i = 0, size = options.size(); i < size; i++)
         {
             String option = options.get(i);
-            if (LangUtils.isNotBlank(option))
+            if (StringUtils.isNotBlank(option))
             {
                 if (!first)
                 {
@@ -422,7 +421,7 @@ public class HtmlCommandScriptRenderer extends HtmlRenderer
     private String resolveExpressionsAsParameter(StringBuilder retVal, String target, String
expressions,
             SearchExpressionContext searchExpressionContext)
     {
-        if (LangUtils.isNotBlank(expressions))
+        if (StringUtils.isNotBlank(expressions))
         {
             retVal.setLength(0);
             retVal.append(target);
diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlRendererUtils.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlRendererUtils.java
index 123bf60..d0fbef2 100644
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlRendererUtils.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/base/HtmlRendererUtils.java
@@ -68,9 +68,8 @@ import org.apache.myfaces.renderkit.RendererUtils;
 import org.apache.myfaces.renderkit.html.util.HTMLEncoder;
 import org.apache.myfaces.renderkit.html.util.OutcomeTargetUtils;
 import org.apache.myfaces.util.ComponentUtils;
-import org.apache.myfaces.util.StringUtils;
 import org.apache.myfaces.renderkit.html.util.HTML;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 import org.apache.myfaces.component.visit.MyFacesVisitHints;
 
 public final class HtmlRendererUtils
@@ -1508,7 +1507,7 @@ public final class HtmlRendererUtils
             String userEventCode, String serverEventCode)
     {
         List<String> finalParams = new ArrayList<>(3);
-        if (LangUtils.isNotBlank(userEventCode))
+        if (StringUtils.isNotBlank(userEventCode))
         {
             // escape every ' in the user event code since it will
             // be a string attribute of jsf.util.chain
@@ -1521,11 +1520,11 @@ public final class HtmlRendererUtils
                 eventName, clientBehaviors, behaviorCode, params);
         
         String behaviorCodeStr = behaviorCode.toString();
-        if (LangUtils.isNotBlank(behaviorCodeStr))
+        if (StringUtils.isNotBlank(behaviorCodeStr))
         {
             finalParams.add(behaviorCodeStr);
         }
-        if (LangUtils.isNotBlank(serverEventCode))
+        if (StringUtils.isNotBlank(serverEventCode))
         {
             finalParams.add('\'' + escapeJavaScriptForChain(serverEventCode) + '\'');
         }
@@ -1594,7 +1593,7 @@ public final class HtmlRendererUtils
             String userEventCode, String serverEventCode)
     {
         List<String> finalParams = new ArrayList<String>(3);
-        if (LangUtils.isNotBlank(userEventCode))
+        if (StringUtils.isNotBlank(userEventCode))
         {
             finalParams.add('\'' + escapeJavaScriptForChain(userEventCode) + '\'');
         }
@@ -1613,18 +1612,18 @@ public final class HtmlRendererUtils
         boolean submitting = submitting1 || submitting2;
         
         String behaviorCodeStr = behaviorCode.toString();
-        if (LangUtils.isNotBlank(behaviorCodeStr))
+        if (StringUtils.isNotBlank(behaviorCodeStr))
         {
             finalParams.add(behaviorCodeStr);
         }
 
         String behaviorCode2Str = behaviorCode2.toString();
-        if (LangUtils.isNotBlank(behaviorCode2Str))
+        if (StringUtils.isNotBlank(behaviorCode2Str))
         {
             finalParams.add(behaviorCode2Str);
         }
 
-        if (LangUtils.isNotBlank(serverEventCode))
+        if (StringUtils.isNotBlank(serverEventCode))
         {
             finalParams.add('\'' + escapeJavaScriptForChain(serverEventCode) + '\'');
         }
diff --git a/impl/src/main/java/org/apache/myfaces/util/AbstractAttributeMap.java b/impl/src/main/java/org/apache/myfaces/util/AbstractAttributeMap.java
index ab42857..884a9d0 100644
--- a/impl/src/main/java/org/apache/myfaces/util/AbstractAttributeMap.java
+++ b/impl/src/main/java/org/apache/myfaces/util/AbstractAttributeMap.java
@@ -381,16 +381,19 @@ public abstract class AbstractAttributeMap<V> extends AbstractMap<String,
V>
             _currentKey = currentKey;
         }
 
+        @Override
         public String getKey()
         {
             return _currentKey;
         }
 
+        @Override
         public V getValue()
         {
             return AbstractAttributeMap.this.get(_currentKey);
         }
 
+        @Override
         public V setValue(final V value)
         {
             return AbstractAttributeMap.this.put(_currentKey, value);
diff --git a/impl/src/main/java/org/apache/myfaces/util/LangUtils.java b/impl/src/main/java/org/apache/myfaces/util/LangUtils.java
deleted file mode 100644
index 4dd7878..0000000
--- a/impl/src/main/java/org/apache/myfaces/util/LangUtils.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.myfaces.util;
-
-public class LangUtils
-{
-    public static boolean isEmpty(String value)
-    {
-        return value == null || value.isEmpty();
-    }
-    
-    public static boolean isBlank(String str)
-    {
-        if (str == null)
-        {
-            return true;
-        }
-        int strLen = str.length();
-        if (strLen == 0)
-        {
-            return true;
-        }
-
-        for (int i = 0; i < strLen; i++) 
-        {
-            if (!Character.isWhitespace(str.charAt(i)))
-            {
-                return false;
-            }
-        }
-        return true;
-    }
-
-    public static boolean isNotEmpty(String value)
-    {
-        return !isEmpty(value);
-    }
-    
-    public static boolean isNotBlank(String value)
-    {
-        return !isBlank(value);
-    }
-}
diff --git a/impl/src/main/java/org/apache/myfaces/util/StringUtils.java b/impl/src/main/java/org/apache/myfaces/util/StringUtils.java
index b30eba3..81048c1 100755
--- a/impl/src/main/java/org/apache/myfaces/util/StringUtils.java
+++ b/impl/src/main/java/org/apache/myfaces/util/StringUtils.java
@@ -38,6 +38,43 @@ public final class StringUtils
 
     //~ Methods ------------------------------------------------------------------------------------
 
+    public static boolean isEmpty(String value)
+    {
+        return value == null || value.isEmpty();
+    }
+    
+    public static boolean isBlank(String str)
+    {
+        if (str == null)
+        {
+            return true;
+        }
+        int strLen = str.length();
+        if (strLen == 0)
+        {
+            return true;
+        }
+
+        for (int i = 0; i < strLen; i++) 
+        {
+            if (!Character.isWhitespace(str.charAt(i)))
+            {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public static boolean isNotEmpty(String value)
+    {
+        return !isEmpty(value);
+    }
+    
+    public static boolean isNotBlank(String value)
+    {
+        return !isBlank(value);
+    }
+    
     /**
      * Checks that the string represents a floating point number that CANNOT be
      * in exponential notation
diff --git a/impl/src/main/java/org/apache/myfaces/util/UrlPatternMatcher.java b/impl/src/main/java/org/apache/myfaces/util/UrlPatternMatcher.java
index 350a4f7..550ff24 100644
--- a/impl/src/main/java/org/apache/myfaces/util/UrlPatternMatcher.java
+++ b/impl/src/main/java/org/apache/myfaces/util/UrlPatternMatcher.java
@@ -34,11 +34,11 @@ public class UrlPatternMatcher
     public static boolean match(String path, String pattern)
     {
         // Normalize the argument strings
-        if (LangUtils.isEmpty(path))
+        if (StringUtils.isEmpty(path))
         {
             path = "/";
         }
-        if (LangUtils.isEmpty(pattern))
+        if (StringUtils.isEmpty(pattern))
         {
             pattern = "/";
         }
diff --git a/impl/src/main/java/org/apache/myfaces/util/WebXmlParser.java b/impl/src/main/java/org/apache/myfaces/util/WebXmlParser.java
index 4ab0071..ea4af4d 100755
--- a/impl/src/main/java/org/apache/myfaces/util/WebXmlParser.java
+++ b/impl/src/main/java/org/apache/myfaces/util/WebXmlParser.java
@@ -276,12 +276,12 @@ public class WebXmlParser
         {
             String defaultLocation = xpath.compile(ERROR_CODE_500_LOCATION_EXPRESSION).evaluate(webXml).trim();
 
-            if (LangUtils.isBlank(defaultLocation))
+            if (StringUtils.isBlank(defaultLocation))
             {
                 defaultLocation = xpath.compile(ERROR_PAGE_NO_CODE_AND_TYPE_EXPRESSION).evaluate(webXml).trim();
             }
 
-            if (!LangUtils.isBlank(defaultLocation))
+            if (!StringUtils.isBlank(defaultLocation))
             {
                 errorPages.put(null, defaultLocation);
             }
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfig.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfig.java
index f743919..39a9167 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfig.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/compiler/TagLibraryConfig.java
@@ -19,7 +19,6 @@
 package org.apache.myfaces.view.facelets.compiler;
 
 import org.apache.myfaces.util.ArrayUtils;
-import org.apache.myfaces.util.StringUtils;
 import org.apache.myfaces.util.WebConfigParamUtils;
 import org.apache.myfaces.view.facelets.tag.AbstractTagLibrary;
 import org.apache.myfaces.view.facelets.tag.TagLibrary;
@@ -52,7 +51,7 @@ import org.apache.myfaces.config.element.facelets.FaceletTagLibrary;
 import org.apache.myfaces.config.element.facelets.FaceletValidatorTag;
 import org.apache.myfaces.util.Assert;
 import org.apache.myfaces.util.ClassUtils;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 
 /**
  * Handles creating a {@link org.apache.myfaces.view.facelets.tag.TagLibrary TagLibrary}
@@ -407,7 +406,7 @@ public final class TagLibraryConfig
     
     public static TagLibrary create(FacesContext facesContext, FaceletTagLibrary faceletTagLibrary)
     {
-        if (LangUtils.isNotEmpty(faceletTagLibrary.getLibraryClass()))
+        if (StringUtils.isNotEmpty(faceletTagLibrary.getLibraryClass()))
         {
             TagLibrary t = null;
             Class<?> type;
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java
index caf155f..bc3b589 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/AttributeHandler.java
@@ -37,7 +37,7 @@ import javax.faces.view.facelets.TagHandler;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFaceletAttribute;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFaceletTag;
 import org.apache.myfaces.util.ClassUtils;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 import org.apache.myfaces.view.facelets.FaceletCompositionContext;
 
 /**
@@ -331,7 +331,7 @@ public class AttributeHandler extends TagHandler implements InterfaceDescriptorC
                     Class clazz = String.class;
                     
                     String type = _type.getValue(ctx);
-                    if (LangUtils.isNotBlank(type))
+                    if (StringUtils.isNotBlank(type))
                     {
                         try
                         {
diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/util/FaceletsViewDeclarationLanguageUtils.java
b/impl/src/main/java/org/apache/myfaces/view/facelets/util/FaceletsViewDeclarationLanguageUtils.java
index bf6e058..418af6f 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/util/FaceletsViewDeclarationLanguageUtils.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/util/FaceletsViewDeclarationLanguageUtils.java
@@ -27,7 +27,7 @@ import javax.faces.context.FacesContext;
 import org.apache.myfaces.renderkit.html.util.JSFAttr;
 import org.apache.myfaces.renderkit.html.util.ResourceUtils;
 import org.apache.myfaces.util.ClassUtils;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 
 /**
  * Utility methods used in FaceletsViewDeclarationLanguage
@@ -84,7 +84,7 @@ public class FaceletsViewDeclarationLanguageUtils
                 lastArg = true;
             }
             String arg = signature.substring(start, p);
-            if (LangUtils.isNotBlank(arg))
+            if (StringUtils.isNotBlank(arg))
             {
                 try
                 {
diff --git a/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java b/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
index 786d501..75d03de 100644
--- a/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
+++ b/impl/src/main/java/org/apache/myfaces/webapp/AbstractFacesInitializer.java
@@ -73,7 +73,7 @@ import org.apache.myfaces.spi.ServiceProviderFinder;
 import org.apache.myfaces.spi.ServiceProviderFinderFactory;
 import org.apache.myfaces.view.facelets.ViewPoolProcessor;
 import org.apache.myfaces.context.ReleasableExternalContext;
-import org.apache.myfaces.util.LangUtils;
+import org.apache.myfaces.util.StringUtils;
 
 /**
  * Performs common initialization tasks.
@@ -419,7 +419,7 @@ public abstract class AbstractFacesInitializer implements FacesInitializer
     {
         String expressionFactoryClassName
                 = MyfacesConfig.getCurrentInstance(externalContext).getExpressionFactory();
-        if (LangUtils.isNotBlank(expressionFactoryClassName))
+        if (StringUtils.isNotBlank(expressionFactoryClassName))
         {
             if (log.isLoggable(Level.FINE))
             {


Mime
View raw message