struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject [9/9] struts git commit: Minor code improvements's in the xwork-core module
Date Mon, 15 Jun 2015 17:38:10 GMT
Minor code improvements's in the xwork-core module

- Use Java 7 features like diamond operator and multi catch
- Improve some logging message and don't check LOG.isXxx if not necessary
- Fix some typos
- Use BooleanUtils.toBoolean(string) instead of "true".isEquals to be more robust


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/2e9df577
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/2e9df577
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/2e9df577

Branch: refs/heads/master
Commit: 2e9df577aa8e55ee0fd4145d527007230d03a671
Parents: 9e95d79
Author: Johannes Geppert <jogep@apache.org>
Authored: Mon Jun 15 19:36:35 2015 +0200
Committer: Johannes Geppert <jogep@apache.org>
Committed: Mon Jun 15 19:36:36 2015 +0200

----------------------------------------------------------------------
 .../opensymphony/xwork2/ActionChainResult.java  |   13 +-
 .../com/opensymphony/xwork2/ActionContext.java  |    4 +-
 .../com/opensymphony/xwork2/ActionSupport.java  |    2 -
 .../xwork2/CompositeTextProvider.java           |   18 +-
 .../xwork2/DefaultActionInvocation.java         |   17 +-
 .../xwork2/DefaultLocaleProvider.java           |    4 +-
 .../xwork2/DefaultTextProvider.java             |    2 +-
 .../xwork2/DefaultUnknownHandlerManager.java    |   17 +-
 .../xwork2/TextProviderSupport.java             |    2 +-
 .../xwork2/ValidationAwareSupport.java          |   14 +-
 .../com/opensymphony/xwork2/XWorkException.java |    2 +-
 .../xwork2/config/ConfigurationManager.java     |    8 +-
 .../xwork2/config/ConfigurationUtil.java        |   11 +-
 .../xwork2/config/entities/ActionConfig.java    |   19 +-
 .../config/entities/ExceptionMappingConfig.java |    4 +-
 .../config/entities/InterceptorConfig.java      |    7 +-
 .../config/entities/InterceptorStackConfig.java |    2 +-
 .../xwork2/config/entities/PackageConfig.java   |   44 +-
 .../xwork2/config/entities/ResultConfig.java    |    2 +-
 .../config/entities/ResultTypeConfig.java       |    2 +-
 .../xwork2/config/impl/AbstractMatcher.java     |   36 +-
 .../xwork2/config/impl/ActionConfigMatcher.java |    2 +-
 .../config/impl/DefaultConfiguration.java       |  122 +-
 .../xwork2/config/impl/MockConfiguration.java   |   17 +-
 .../xwork2/config/providers/CycleDetector.java  |    4 +-
 .../config/providers/InterceptorBuilder.java    |   14 +-
 .../providers/XmlConfigurationProvider.java     |  133 +-
 .../xwork2/config/providers/XmlHelper.java      |    9 +-
 .../DefaultConversionAnnotationProcessor.java   |   10 +-
 .../impl/DefaultConversionFileProcessor.java    |    6 +-
 .../impl/DefaultObjectTypeDeterminer.java       |   36 +-
 .../conversion/impl/DefaultTypeConverter.java   |   32 +-
 .../impl/DefaultTypeConverterHolder.java        |    8 +-
 .../impl/InstantiatingNullHandler.java          |   18 +-
 .../xwork2/conversion/impl/StringConverter.java |    8 +-
 .../xwork2/conversion/impl/XWorkConverter.java  |   42 +-
 .../factory/DefaultInterceptorFactory.java      |    2 +-
 .../xwork2/inject/ConstructionContext.java      |   13 +-
 .../xwork2/inject/ContainerBuilder.java         |  953 +++++++-------
 .../xwork2/inject/ContainerImpl.java            | 1164 +++++++++---------
 .../xwork2/inject/ExternalContext.java          |   77 +-
 .../xwork2/inject/InternalContext.java          |    9 +-
 .../com/opensymphony/xwork2/inject/Key.java     |   88 +-
 .../com/opensymphony/xwork2/inject/Scope.java   |  333 +++--
 .../xwork2/inject/util/ReferenceCache.java      |  283 +++--
 .../xwork2/inject/util/ReferenceMap.java        |  967 +++++++--------
 .../xwork2/interceptor/AliasInterceptor.java    |   12 +-
 .../interceptor/ConversionErrorInterceptor.java |    2 +-
 .../interceptor/DefaultWorkflowInterceptor.java |    5 +-
 .../xwork2/interceptor/I18nInterceptor.java     |    9 +-
 .../xwork2/interceptor/LoggingInterceptor.java  |    4 +-
 .../interceptor/MethodFilterInterceptor.java    |    8 +-
 .../MethodFilterInterceptorUtil.java            |    4 +-
 .../interceptor/ParameterFilterInterceptor.java |   19 +-
 .../ParameterRemoverInterceptor.java            |   18 +-
 .../interceptor/ParametersInterceptor.java      |   31 +-
 .../ScopedModelDrivenInterceptor.java           |    2 +-
 .../StaticParametersInterceptor.java            |   30 +-
 .../xwork2/interceptor/TimerInterceptor.java    |    5 +-
 .../AnnotationParameterFilterIntereptor.java    |    5 +-
 .../AnnotationWorkflowInterceptor.java          |    5 +-
 .../xwork2/mock/MockActionInvocation.java       |    4 +-
 .../xwork2/mock/MockActionProxy.java            |    3 +-
 .../opensymphony/xwork2/mock/MockResult.java    |    6 +-
 .../xwork2/ognl/OgnlTypeConverterWrapper.java   |    8 +-
 .../com/opensymphony/xwork2/ognl/OgnlUtil.java  |   64 +-
 .../xwork2/ognl/OgnlValueStack.java             |   20 +-
 .../xwork2/ognl/OgnlValueStackFactory.java      |    7 +-
 .../xwork2/ognl/SecurityMemberAccess.java       |   15 +-
 .../ognl/accessor/CompoundRootAccessor.java     |   22 +-
 .../XWorkCollectionPropertyAccessor.java        |   51 +-
 .../ognl/accessor/XWorkEnumerationAccessor.java |    1 -
 .../accessor/XWorkIteratorPropertyAccessor.java |    1 -
 .../accessor/XWorkListPropertyAccessor.java     |   13 +-
 .../ognl/accessor/XWorkMapPropertyAccessor.java |   27 +-
 .../ognl/accessor/XWorkMethodAccessor.java      |   39 +-
 .../DefaultAcceptedPatternsChecker.java         |    8 +-
 .../DefaultExcludedPatternsChecker.java         |    8 +-
 .../xwork2/spring/SpringObjectFactory.java      |    8 +-
 .../spring/SpringProxyableObjectFactory.java    |    2 +-
 .../ActionAutowiringInterceptor.java            |    6 +-
 .../xwork2/util/AnnotationUtils.java            |   41 +-
 .../opensymphony/xwork2/util/ArrayUtils.java    |    2 +
 .../xwork2/util/ClassLoaderUtil.java            |    4 +-
 .../xwork2/util/ClassPathFinder.java            |   12 +-
 .../com/opensymphony/xwork2/util/DomHelper.java |    7 +-
 .../xwork2/util/LocalizedTextUtil.java          |   25 +-
 .../util/NamedVariablePatternMatcher.java       |    2 +-
 .../xwork2/util/PropertiesReader.java           |  265 ++--
 .../opensymphony/xwork2/util/TextParseUtil.java |   16 +-
 .../com/opensymphony/xwork2/util/URLUtil.java   |   14 +-
 .../com/opensymphony/xwork2/util/XWorkList.java |   29 +-
 .../xwork2/util/XWorkTestCaseHelper.java        |    3 +-
 .../util/classloader/AbstractResourceStore.java |   50 +
 .../util/classloader/FileResourceStore.java     |   30 +-
 .../util/classloader/JarResourceStore.java      |   23 +-
 .../util/classloader/ReloadingClassLoader.java  |    7 +-
 .../classloader/ResourceStoreClassLoader.java   |    6 -
 .../xwork2/util/finder/ClassFinder.java         |   16 +-
 .../xwork2/util/finder/DefaultClassFinder.java  |   61 +-
 .../xwork2/util/finder/ResourceFinder.java      |   97 +-
 .../opensymphony/xwork2/util/finder/UrlSet.java |   38 +-
 .../xwork2/util/fs/DefaultFileManager.java      |   12 +-
 .../util/fs/DefaultFileManagerFactory.java      |    6 +-
 .../util/location/LocatableProperties.java      |    4 +-
 .../xwork2/util/location/LocationImpl.java      |   12 +-
 .../xwork2/util/location/LocationUtils.java     |    8 +-
 .../xwork2/util/profiling/ObjectProfiler.java   |   62 +-
 .../util/profiling/ProfilingTimerBean.java      |   42 +-
 .../xwork2/util/profiling/UtilTimerStack.java   |  424 +++----
 .../util/reflection/ReflectionContextState.java |   20 +-
 .../AnnotationActionValidatorManager.java       |   73 +-
 ...nnotationValidationConfigurationBuilder.java |   92 +-
 .../DefaultActionValidatorManager.java          |   48 +-
 .../validator/DefaultValidatorFactory.java      |   28 +-
 .../validator/DelegatingValidatorContext.java   |    8 +-
 .../xwork2/validator/ValidationInterceptor.java |   20 +-
 .../xwork2/validator/ValidatorConfig.java       |    4 +-
 .../ConditionalVisitorFieldValidator.java       |    2 +-
 .../ConversionErrorFieldValidator.java          |    5 +-
 .../validators/FieldExpressionValidator.java    |    2 +-
 ...ateConversionErrorFieldValidatorSupport.java |   12 +-
 .../validators/StringLengthFieldValidator.java  |    2 +-
 .../validator/validators/ValidatorSupport.java  |   15 +-
 .../opensymphony/xwork2/ActionContextTest.java  |   14 +-
 .../xwork2/ActionInvocationTest.java            |    4 +-
 .../opensymphony/xwork2/ActionNestingTest.java  |    2 +-
 .../opensymphony/xwork2/ActionSupportTest.java  |    4 +-
 .../opensymphony/xwork2/ChainResultTest.java    |    2 +-
 .../xwork2/DefaultActionInvocationTest.java     |    2 +-
 .../xwork2/DefaultTextProviderTest.java         |    4 +-
 .../com/opensymphony/xwork2/GenericsBean.java   |    6 +-
 .../xwork2/ProxyInvocationTest.java             |    4 +-
 .../com/opensymphony/xwork2/SimpleAction.java   |   16 +-
 .../xwork2/SimpleAnnotationAction.java          |    2 +-
 .../com/opensymphony/xwork2/StubValueStack.java |    2 +-
 .../xwork2/TextProviderSupportTest.java         |    2 +-
 .../xwork2/UnknownHandlerManagerMock.java       |    2 +-
 .../com/opensymphony/xwork2/VoidResult.java     |    6 +-
 .../xwork2/config/ConfigurationTest.java        |    4 +-
 .../config/impl/ActionConfigMatcherTest.java    |    6 +-
 .../config/impl/NamespaceMatcherTest.java       |    2 +-
 .../providers/MockConfigurationProvider.java    |   44 +-
 .../XmlConfigurationProviderActionsTest.java    |   24 +-
 ...ConfigurationProviderAllowedMethodsTest.java |    8 -
 ...figurationProviderExceptionMappingsTest.java |    8 +-
 ...mlConfigurationProviderInterceptorsTest.java |   20 +-
 .../XmlConfigurationProviderResultsTest.java    |   10 +-
 .../providers/XmlConfigurationProviderTest.java |    2 +-
 .../impl/AnnotationXWorkConverterTest.java      |   22 +-
 .../conversion/impl/NumberConverterTest.java    |    4 +-
 .../impl/XWorkBasicConverterTest.java           |   18 +-
 .../conversion/impl/XWorkConverterTest.java     |   51 +-
 .../interceptor/AliasInterceptorTest.java       |    2 +-
 .../interceptor/ChainingInterceptorTest.java    |    6 +-
 .../ConversionErrorInterceptorTest.java         |    2 +-
 .../DefaultWorkflowInterceptorTest.java         |   15 +-
 .../ExceptionMappingInterceptorTest.java        |    2 +-
 .../xwork2/interceptor/I18nInterceptorTest.java |    8 +-
 .../MethodFilterInterceptorUtilTest.java        |   10 +-
 .../ParameterFilterInterceptorTest.java         |    6 +-
 .../ParameterRemoverInterceptorTest.java        |   10 +-
 .../interceptor/ParametersInterceptorTest.java  |   97 +-
 .../interceptor/PreResultListenerTest.java      |    8 +-
 .../ScopedModelDrivenInterceptorTest.java       |    2 +-
 ...onInterceptorPrefixMethodInvocationTest.java |    8 +-
 .../annotations/AllowingByDefaultModel.java     |    1 -
 .../AnnotationParameterFilterUnitTest.java      |   28 +-
 .../AnnotationWorkflowInterceptorTest.java      |    6 +-
 .../DefaultExcludedPatternsCheckerTest.java     |    4 +-
 .../xwork2/spring/SpringObjectFactoryTest.java  |   14 +-
 .../ActionAutowiringInterceptorTest.java        |    6 +-
 .../xwork2/util/ClassLoaderUtilTest.java        |   16 +-
 .../com/opensymphony/xwork2/util/Indexed.java   |    2 +-
 .../xwork2/util/MyBeanActionTest.java           |   12 +-
 .../util/NamedVariablePatternMatcherTest.java   |   12 +-
 .../xwork2/util/ResolverUtilTest.java           |    4 +-
 .../xwork2/util/TextParseUtilTest.java          |   19 +-
 .../opensymphony/xwork2/util/URLUtilTest.java   |    8 +-
 .../xwork2/util/WildcardHelperTest.java         |    2 +-
 .../xwork2/util/WildcardUtilTest.java           |    1 -
 .../opensymphony/xwork2/util/XWorkListTest.java |    6 +-
 .../ConversionErrorFieldValidatorTest.java      |    2 +-
 .../validator/DateRangeValidatorTest.java       |   11 +-
 .../validator/DoubleRangeValidatorTest.java     |   13 +-
 .../validator/ExpressionValidatorTest.java      |   11 +-
 .../validator/GenericValidatorContext.java      |   10 +-
 .../xwork2/validator/IntRangeValidatorTest.java |    4 +-
 .../validator/LongRangeValidatorTest.java       |    4 +-
 .../validator/ModelDrivenValidationTest.java    |    4 +-
 .../validator/ShortRangeValidatorTest.java      |    4 +-
 .../validator/SimpleActionValidationTest.java   |   18 +-
 .../xwork2/validator/URLValidatorTest.java      |    1 -
 .../validator/ValidatorAnnotationTest.java      |   24 +-
 .../validator/VisitorFieldValidatorTest.java    |    8 +-
 .../validator/VisitorValidatorTestAction.java   |    2 +-
 196 files changed, 3356 insertions(+), 4073 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java
index 694dbfe..859ccfd 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ActionChainResult.java
@@ -186,7 +186,7 @@ public class ActionChainResult implements Result {
         LinkedList<String> chainHistory = (LinkedList<String>) ActionContext.getContext().get(CHAIN_HISTORY);
         //  Add if not exists
         if (chainHistory == null) {
-            chainHistory = new LinkedList<String>();
+            chainHistory = new LinkedList<>();
             ActionContext.getContext().put(CHAIN_HISTORY, chainHistory);
         }
 
@@ -211,8 +211,7 @@ public class ActionChainResult implements Result {
 
         if (isInChainHistory(finalNamespace, finalActionName, finalMethodName)) {
             addToHistory(finalNamespace, finalActionName, finalMethodName);
-            throw new XWorkException("Infinite recursion detected: "
-                    + ActionChainResult.getChainHistory().toString());
+            throw new XWorkException("Infinite recursion detected: " + ActionChainResult.getChainHistory().toString());
         }
 
         if (ActionChainResult.getChainHistory().isEmpty() && invocation != null && invocation.getProxy() != null) {
@@ -220,14 +219,12 @@ public class ActionChainResult implements Result {
         }
         addToHistory(finalNamespace, finalActionName, finalMethodName);
 
-        HashMap<String, Object> extraContext = new HashMap<String, Object>();
+        HashMap<String, Object> extraContext = new HashMap<>();
         extraContext.put(ActionContext.VALUE_STACK, ActionContext.getContext().getValueStack());
         extraContext.put(ActionContext.PARAMETERS, ActionContext.getContext().getParameters());
         extraContext.put(CHAIN_HISTORY, ActionChainResult.getChainHistory());
 
-        if (LOG.isDebugEnabled()) {
-            LOG.debug("Chaining to action " + finalActionName);
-        }
+        LOG.debug("Chaining to action {}", finalActionName);
 
         proxy = actionProxyFactory.createActionProxy(finalNamespace, finalActionName, finalMethodName, extraContext);
         proxy.execute();
@@ -261,7 +258,7 @@ public class ActionChainResult implements Result {
             return false;
         } else {
             //  Actions to skip
-            Set<String> skipActionsList = new HashSet<String>();
+            Set<String> skipActionsList = new HashSet<>();
             if (skipActions != null && skipActions.length() > 0) {
                 ValueStack stack = ActionContext.getContext().getValueStack();
                 String finalSkipActions = TextParseUtil.translateVariables(this.skipActions, stack);

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/ActionContext.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ActionContext.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ActionContext.java
index a78761d..60ff183 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ActionContext.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ActionContext.java
@@ -41,7 +41,7 @@ import java.util.Map;
  */
 public class ActionContext implements Serializable {
 
-    static ThreadLocal<ActionContext> actionContext = new ThreadLocal<ActionContext>();
+    static ThreadLocal<ActionContext> actionContext = new ThreadLocal<>();
 
     /**
      * Constant for the name of the action being executed.
@@ -197,7 +197,7 @@ public class ActionContext implements Serializable {
         Map<String, Object> errors = (Map) get(CONVERSION_ERRORS);
 
         if (errors == null) {
-            errors = new HashMap<String, Object>();
+            errors = new HashMap<>();
             setConversionErrors(errors);
         }
 

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ActionSupport.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
index 940dbfa..fd8675b 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
@@ -83,9 +83,7 @@ public class ActionSupport implements Action, Validateable, ValidationAware, Tex
         if (ctx != null) {
             return ctx.getLocale();
         } else {
-            if (LOG.isDebugEnabled()) {
         	LOG.debug("Action context not initialized");
-            }
             return null;
         }
     }

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java b/xwork-core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java
index af18986..3927610 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/CompositeTextProvider.java
@@ -19,7 +19,7 @@ public class CompositeTextProvider implements TextProvider {
 
     private static final Logger LOG = LogManager.getLogger(CompositeTextProvider.class);
 
-    private List<TextProvider> textProviders = new ArrayList<TextProvider>();
+    private List<TextProvider> textProviders = new ArrayList<>();
 
     /**
      * Instantiates a {@link CompositeTextProvider} with some predefined <code>textProviders</code>.
@@ -60,7 +60,7 @@ public class CompositeTextProvider implements TextProvider {
      * It will consult each {@link TextProvider}s and return the first valid message for this
      * <code>key</code>
      *
-     * @param key The key to lookup in ressource bundles.
+     * @param key The key to lookup in resource bundles.
      * @return The i18n text for the requested key.
      * @see {@link com.opensymphony.xwork2.TextProvider#getText(String)}
      */
@@ -83,7 +83,7 @@ public class CompositeTextProvider implements TextProvider {
 
     /**
      * It will consult each {@link TextProvider}s and return the first valid message for this
-     * <code>key</code>, before returining <code>defaultValue</code>
+     * <code>key</code>, before returning <code>defaultValue</code>
      * if every else fails.
      *
      * @param key
@@ -97,8 +97,6 @@ public class CompositeTextProvider implements TextProvider {
             {
                 add(obj);
             }
-
-
         });
     }
 
@@ -131,7 +129,7 @@ public class CompositeTextProvider implements TextProvider {
 
     /**
      * It will consult each {@link TextProvider}s and return the first valid message for this
-     * <code>key</code>, before returining <code>defaultValue</code>
+     * <code>key</code>, before returning <code>defaultValue</code>
      *
      * @param key
      * @param defaultValue
@@ -155,7 +153,7 @@ public class CompositeTextProvider implements TextProvider {
 
     /**
      * It will consult each {@link TextProvider}s and return the first valid message for this
-     * <code>key</code>, before returining <code>defaultValue</code>.
+     * <code>key</code>, before returning <code>defaultValue</code>.
      *
      * @param key
      * @param defaultValue
@@ -179,7 +177,7 @@ public class CompositeTextProvider implements TextProvider {
 
     /**
      * It will consult each {@link TextProvider}s and return the first valid message for this
-     * <code>key</code>, before returining <code>defaultValue</code>
+     * <code>key</code>, before returning <code>defaultValue</code>
      *
      * @param key
      * @param defaultValue
@@ -203,7 +201,7 @@ public class CompositeTextProvider implements TextProvider {
 
     /**
      * It will consult each {@link TextProvider}s and return the first valid message for this
-     * <code>key</code>, before returining <code>defaultValue</code>
+     * <code>key</code>, before returning <code>defaultValue</code>
      *
      * @param key
      * @param defaultValue
@@ -234,7 +232,7 @@ public class CompositeTextProvider implements TextProvider {
      * @see {@link TextProvider#getTexts(String)}
      */
     public ResourceBundle getTexts(String bundleName) {
-        // if there's one text provider that gives us a non-null resource bunlde for this bundleName, we are ok, else try the next
+        // if there's one text provider that gives us a non-null resource bundle for this bundleName, we are ok, else try the next
         // text provider
         for (TextProvider textProvider : textProviders) {
             ResourceBundle bundle = textProvider.getTexts(bundleName);

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
index 1f7cfc4..82c0eec 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
@@ -156,9 +156,9 @@ public class DefaultActionInvocation implements ActionInvocation {
     }
 
     public void setResultCode(String resultCode) {
-        if (isExecuted())
+        if (isExecuted()) {
             throw new IllegalStateException("Result has already been executed.");
-
+        }
         this.resultCode = resultCode;
     }
 
@@ -176,7 +176,7 @@ public class DefaultActionInvocation implements ActionInvocation {
      */
     public void addPreResultListener(PreResultListener listener) {
         if (preResultListeners == null) {
-            preResultListeners = new ArrayList<PreResultListener>(1);
+            preResultListeners = new ArrayList<>(1);
         }
 
         preResultListeners.add(listener);
@@ -236,9 +236,8 @@ public class DefaultActionInvocation implements ActionInvocation {
                 String interceptorMsg = "interceptor: " + interceptor.getName();
                 UtilTimerStack.push(interceptorMsg);
                 try {
-                                resultCode = interceptor.getInterceptor().intercept(DefaultActionInvocation.this);
-                            }
-                finally {
+                    resultCode = interceptor.getInterceptor().intercept(DefaultActionInvocation.this);
+                } finally {
                     UtilTimerStack.pop(interceptorMsg);
                 }
             } else {
@@ -289,7 +288,7 @@ public class DefaultActionInvocation implements ActionInvocation {
             UtilTimerStack.push(timerKey);
             action = objectFactory.buildAction(proxy.getActionName(), proxy.getNamespace(), proxy.getConfig(), contextMap);
         } catch (InstantiationException e) {
-            throw new XWorkException("Unable to intantiate Action!", e, proxy.getConfig());
+            throw new XWorkException("Unable to instantiate Action!", e, proxy.getConfig());
         } catch (IllegalAccessException e) {
             throw new XWorkException("Illegal access to constructor, is it public?", e, proxy.getConfig());
         } catch (Exception e) {
@@ -367,7 +366,7 @@ public class DefaultActionInvocation implements ActionInvocation {
                         + " and result " + getResultCode(), proxy.getConfig());
             } else {
                 if (LOG.isDebugEnabled()) {
-                    LOG.debug("No result returned for action " + getAction().getClass().getName() + " at " + proxy.getConfig().getLocation());
+                    LOG.debug("No result returned for action {} at {}", getAction().getClass().getName(), proxy.getConfig().getLocation());
                 }
             }
         } finally {
@@ -398,7 +397,7 @@ public class DefaultActionInvocation implements ActionInvocation {
         invocationContext.setName(proxy.getActionName());
 
         // get a new List so we don't get problems with the iterator if someone changes the list
-        List<InterceptorMapping> interceptorList = new ArrayList<InterceptorMapping>(proxy.getConfig().getInterceptors());
+        List<InterceptorMapping> interceptorList = new ArrayList<>(proxy.getConfig().getInterceptors());
         interceptors = interceptorList.iterator();
     }
 

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java
index b83339c..09a4daa 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultLocaleProvider.java
@@ -17,9 +17,7 @@ public class DefaultLocaleProvider implements LocaleProvider {
         if (ctx != null) {
             return ctx.getLocale();
         } else {
-            if (LOG.isDebugEnabled()) {
-                LOG.debug("Action context not initialized");
-            }
+            LOG.debug("Action context not initialized");
             return null;
         }
     }

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultTextProvider.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultTextProvider.java b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultTextProvider.java
index 7e331fd..eb57deb 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultTextProvider.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultTextProvider.java
@@ -119,7 +119,7 @@ public class DefaultTextProvider implements TextProvider, Serializable, Unchaina
 
 
     public String getText(String key, String defaultValue, String obj) {
-        List<Object> args = new ArrayList<Object>(1);
+        List<Object> args = new ArrayList<>(1);
         args.add(obj);
         return getText(key, defaultValue, args);
     }

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultUnknownHandlerManager.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultUnknownHandlerManager.java b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultUnknownHandlerManager.java
index b0fffd5..92f7ba7 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultUnknownHandlerManager.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/DefaultUnknownHandlerManager.java
@@ -58,7 +58,7 @@ public class DefaultUnknownHandlerManager implements UnknownHandlerManager {
 
         if (configuration != null && container != null) {
             List<UnknownHandlerConfig> unkownHandlerStack = configuration.getUnknownHandlerStack();
-            unknownHandlers = new ArrayList<UnknownHandler>();
+            unknownHandlers = new ArrayList<>();
 
             if (unkownHandlerStack != null && !unkownHandlerStack.isEmpty()) {
                 //get UnknownHandlers in the specified order
@@ -68,9 +68,9 @@ public class DefaultUnknownHandlerManager implements UnknownHandlerManager {
                 }
             } else {
                 //add all available UnknownHandlers
-                Set<String> unknowHandlerNames = container.getInstanceNames(UnknownHandler.class);
-                for (String unknowHandlerName : unknowHandlerNames) {
-                    UnknownHandler uh = container.getInstance(UnknownHandler.class, unknowHandlerName);
+                Set<String> unknownHandlerNames = container.getInstanceNames(UnknownHandler.class);
+                for (String unknownHandlerName : unknownHandlerNames) {
+                    UnknownHandler uh = container.getInstance(UnknownHandler.class, unknownHandlerName);
                     unknownHandlers.add(uh);
                 }
             }
@@ -83,8 +83,9 @@ public class DefaultUnknownHandlerManager implements UnknownHandlerManager {
     public Result handleUnknownResult(ActionContext actionContext, String actionName, ActionConfig actionConfig, String resultCode) {
         for (UnknownHandler unknownHandler : unknownHandlers) {
             Result result = unknownHandler.handleUnknownResult(actionContext, actionName, actionConfig, resultCode);
-            if (result != null)
+            if (result != null) {
                 return result;
+            }
         }
 
         return null;
@@ -98,8 +99,9 @@ public class DefaultUnknownHandlerManager implements UnknownHandlerManager {
     public Object handleUnknownMethod(Object action, String methodName) throws NoSuchMethodException {
         for (UnknownHandler unknownHandler : unknownHandlers) {
             Object result = unknownHandler.handleUnknownActionMethod(action, methodName);
-            if (result != null)
+            if (result != null) {
                 return result;
+            }
         }
 
         return null;
@@ -111,8 +113,9 @@ public class DefaultUnknownHandlerManager implements UnknownHandlerManager {
     public ActionConfig handleUnknownAction(String namespace, String actionName) {
         for (UnknownHandler unknownHandler : unknownHandlers) {
             ActionConfig result = unknownHandler.handleUnknownAction(namespace, actionName);
-            if (result != null)
+            if (result != null) {
                 return result;
+            }
         }
 
         return null;

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java b/xwork-core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java
index 9476133..8b641a4 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/TextProviderSupport.java
@@ -148,7 +148,7 @@ public class TextProviderSupport implements ResourceBundleTextProvider {
      * @return value of named text or the provided defaultValue if no value is found
      */
     public String getText(String key, String defaultValue, String arg) {
-        List<Object> args = new ArrayList<Object>();
+        List<Object> args = new ArrayList<>();
         args.add(arg);
         return getText(key, defaultValue, args);
     }

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/ValidationAwareSupport.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/ValidationAwareSupport.java b/xwork-core/src/main/java/com/opensymphony/xwork2/ValidationAwareSupport.java
index 5e93b4e..520513b 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/ValidationAwareSupport.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/ValidationAwareSupport.java
@@ -38,7 +38,7 @@ public class ValidationAwareSupport implements ValidationAware, Serializable {
     }
 
     public synchronized Collection<String> getActionErrors() {
-        return new LinkedList<String>(internalGetActionErrors());
+        return new LinkedList<>(internalGetActionErrors());
     }
 
     public synchronized void setActionMessages(Collection<String> messages) {
@@ -46,7 +46,7 @@ public class ValidationAwareSupport implements ValidationAware, Serializable {
     }
 
     public synchronized Collection<String> getActionMessages() {
-        return new LinkedList<String>(internalGetActionMessages());
+        return new LinkedList<>(internalGetActionMessages());
     }
 
     public synchronized void setFieldErrors(Map<String, List<String>> errorMap) {
@@ -54,7 +54,7 @@ public class ValidationAwareSupport implements ValidationAware, Serializable {
     }
 
     public synchronized Map<String, List<String>> getFieldErrors() {
-        return new LinkedHashMap<String, List<String>>(internalGetFieldErrors());
+        return new LinkedHashMap<>(internalGetFieldErrors());
     }
 
     public synchronized void addActionError(String anErrorMessage) {
@@ -70,7 +70,7 @@ public class ValidationAwareSupport implements ValidationAware, Serializable {
         List<String> thisFieldErrors = errors.get(fieldName);
 
         if (thisFieldErrors == null) {
-            thisFieldErrors = new ArrayList<String>();
+            thisFieldErrors = new ArrayList<>();
             errors.put(fieldName, thisFieldErrors);
         }
 
@@ -95,7 +95,7 @@ public class ValidationAwareSupport implements ValidationAware, Serializable {
 
     private Collection<String> internalGetActionErrors() {
         if (actionErrors == null) {
-            actionErrors = new ArrayList<String>();
+            actionErrors = new ArrayList<>();
         }
 
         return actionErrors;
@@ -103,7 +103,7 @@ public class ValidationAwareSupport implements ValidationAware, Serializable {
 
     private Collection<String> internalGetActionMessages() {
         if (actionMessages == null) {
-            actionMessages = new ArrayList<String>();
+            actionMessages = new ArrayList<>();
         }
 
         return actionMessages;
@@ -111,7 +111,7 @@ public class ValidationAwareSupport implements ValidationAware, Serializable {
 
     private Map<String, List<String>> internalGetFieldErrors() {
         if (fieldErrors == null) {
-            fieldErrors = new LinkedHashMap<String, List<String>>();
+            fieldErrors = new LinkedHashMap<>();
         }
 
         return fieldErrors;

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/XWorkException.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/XWorkException.java b/xwork-core/src/main/java/com/opensymphony/xwork2/XWorkException.java
index 3242ce9..8445a1c 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/XWorkException.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/XWorkException.java
@@ -54,7 +54,7 @@ public class XWorkException extends RuntimeException implements Locatable {
      * @param target the target of the exception.
      */
     public XWorkException(String s, Object target) {
-        this(s, (Throwable) null, target);
+        this(s, null, target);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
index a850f79..38920f7 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
@@ -19,8 +19,8 @@ import com.opensymphony.xwork2.XWorkConstants;
 import com.opensymphony.xwork2.config.impl.DefaultConfiguration;
 import com.opensymphony.xwork2.config.providers.XWorkConfigurationProvider;
 import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
-import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -41,8 +41,8 @@ public class ConfigurationManager {
     protected static final Logger LOG = LogManager.getLogger(ConfigurationManager.class);
     protected Configuration configuration;
     protected Lock providerLock = new ReentrantLock();
-    private List<ContainerProvider> containerProviders = new CopyOnWriteArrayList<ContainerProvider>();
-    private List<PackageProvider> packageProviders = new CopyOnWriteArrayList<PackageProvider>();
+    private List<ContainerProvider> containerProviders = new CopyOnWriteArrayList<>();
+    private List<PackageProvider> packageProviders = new CopyOnWriteArrayList<>();
     protected String defaultFrameworkBeanName;
     private boolean providersChanged = false;
     private boolean reloadConfigs = true; // for the first time
@@ -117,7 +117,7 @@ public class ConfigurationManager {
     public void setContainerProviders(List<ContainerProvider> containerProviders) {
         providerLock.lock();
         try {
-            this.containerProviders = new CopyOnWriteArrayList<ContainerProvider>(containerProviders);
+            this.containerProviders = new CopyOnWriteArrayList<>(containerProviders);
             providersChanged = true;
         } finally {
             providerLock.unlock();

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java
index ea84841..e7ba7a6 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationUtil.java
@@ -16,8 +16,9 @@
 package com.opensymphony.xwork2.config;
 
 import com.opensymphony.xwork2.config.entities.PackageConfig;
-import org.apache.logging.log4j.Logger;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -44,7 +45,7 @@ public class ConfigurationUtil {
      */
     public static List<PackageConfig> buildParentsFromString(Configuration configuration, String parent) {
         List<String> parentPackageNames = buildParentListFromString(parent);
-        List<PackageConfig> parentPackageConfigs = new ArrayList<PackageConfig>();
+        List<PackageConfig> parentPackageConfigs = new ArrayList<>();
         for (String parentPackageName : parentPackageNames) {
             PackageConfig parentPackageContext = configuration.getPackageConfig(parentPackageName);
 
@@ -62,17 +63,17 @@ public class ConfigurationUtil {
      * @return A list of tokens from the specified string.
      */
     public static List<String> buildParentListFromString(String parent) {
-        if ((parent == null) || ("".equals(parent))) {
+        if (StringUtils.isEmpty(parent)) {
             return Collections.emptyList();
         }
 
         StringTokenizer tokenizer = new StringTokenizer(parent, ",");
-        List<String> parents = new ArrayList<String>();
+        List<String> parents = new ArrayList<>();
 
         while (tokenizer.hasMoreTokens()) {
             String parentName = tokenizer.nextToken().trim();
 
-            if (!"".equals(parentName)) {
+            if (StringUtils.isNotEmpty(parentName)) {
                 parents.add(parentName);
             }
         }

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ActionConfig.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ActionConfig.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ActionConfig.java
index 0bc9363..d796c02 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ActionConfig.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ActionConfig.java
@@ -20,14 +20,7 @@ import com.opensymphony.xwork2.util.location.Location;
 import org.apache.commons.lang3.StringUtils;
 
 import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 
 
 /**
@@ -82,11 +75,11 @@ public class ActionConfig extends Located implements Serializable {
         this.className = orig.className;
         this.methodName = orig.methodName;
         this.packageName = orig.packageName;
-        this.params = new LinkedHashMap<String,String>(orig.params);
-        this.interceptors = new ArrayList<InterceptorMapping>(orig.interceptors);
-        this.results = new LinkedHashMap<String,ResultConfig>(orig.results);
-        this.exceptionMappings = new ArrayList<ExceptionMappingConfig>(orig.exceptionMappings);
-        this.allowedMethods = new HashSet<String>(orig.allowedMethods);
+        this.params = new LinkedHashMap<>(orig.params);
+        this.interceptors = new ArrayList<>(orig.interceptors);
+        this.results = new LinkedHashMap<>(orig.results);
+        this.exceptionMappings = new ArrayList<>(orig.exceptionMappings);
+        this.allowedMethods = new HashSet<>(orig.allowedMethods);
         this.location = orig.location;
     }
 

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ExceptionMappingConfig.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ExceptionMappingConfig.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ExceptionMappingConfig.java
index 5dcd266..21a791e 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ExceptionMappingConfig.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ExceptionMappingConfig.java
@@ -41,14 +41,14 @@ public class ExceptionMappingConfig extends Located implements Serializable {
         this.name = name;
         this.exceptionClassName = exceptionClassName;
         this.result = result;
-        this.params = new LinkedHashMap<String,String>();
+        this.params = new LinkedHashMap<>();
     }
 
     protected ExceptionMappingConfig(ExceptionMappingConfig target) {
         this.name = target.name;
         this.exceptionClassName = target.exceptionClassName;
         this.result = target.result;
-        this.params = new LinkedHashMap<String,String>(target.params);
+        this.params = new LinkedHashMap<>(target.params);
         this.location = target.location;
     }
 

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorConfig.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorConfig.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorConfig.java
index 288fa55..b04bbd9 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorConfig.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorConfig.java
@@ -37,7 +37,7 @@ public class InterceptorConfig extends Located implements Serializable {
     protected String name;
 
     protected InterceptorConfig(String name, String className) {
-        this.params = new LinkedHashMap<String,String>();
+        this.params = new LinkedHashMap<>();
         this.name = name;
         this.className = className;
     }
@@ -45,7 +45,7 @@ public class InterceptorConfig extends Located implements Serializable {
     protected InterceptorConfig(InterceptorConfig orig) {
         this.name = orig.name;
         this.className = orig.className;
-        this.params = new LinkedHashMap<String,String>(orig.params);
+        this.params = new LinkedHashMap<>(orig.params);
         this.location = orig.location;
     }
 
@@ -73,8 +73,7 @@ public class InterceptorConfig extends Located implements Serializable {
 
         final InterceptorConfig interceptorConfig = (InterceptorConfig) o;
 
-        if ((className != null) ? (!className.equals(interceptorConfig.className)) : (interceptorConfig.className != null))
-        {
+        if ((className != null) ? (!className.equals(interceptorConfig.className)) : (interceptorConfig.className != null)) {
             return false;
         }
 

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorStackConfig.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorStackConfig.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorStackConfig.java
index d3e41f9..b9e2f78 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorStackConfig.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorStackConfig.java
@@ -57,7 +57,7 @@ public class InterceptorStackConfig extends Located implements Serializable {
      */
     protected InterceptorStackConfig(InterceptorStackConfig orig) {
         this.name = orig.name;
-        this.interceptors = new ArrayList<InterceptorMapping>(orig.interceptors);
+        this.interceptors = new ArrayList<>(orig.interceptors);
         this.location = orig.location;
     }
 

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
index 7d0a981..d4a3c5c 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/PackageConfig.java
@@ -17,15 +17,11 @@ package com.opensymphony.xwork2.config.entities;
 
 import com.opensymphony.xwork2.util.location.Located;
 import com.opensymphony.xwork2.util.location.Location;
-import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 
 /**
@@ -57,12 +53,12 @@ public class PackageConfig extends Located implements Comparable, Serializable,
 
     protected PackageConfig(String name) {
         this.name = name;
-        actionConfigs = new LinkedHashMap<String, ActionConfig>();
-        globalResultConfigs = new LinkedHashMap<String, ResultConfig>();
-        interceptorConfigs = new LinkedHashMap<String, Object>();
-        resultTypeConfigs = new LinkedHashMap<String, ResultTypeConfig>();
-        globalExceptionMappingConfigs = new ArrayList<ExceptionMappingConfig>();
-        parents = new ArrayList<PackageConfig>();
+        actionConfigs = new LinkedHashMap<>();
+        globalResultConfigs = new LinkedHashMap<>();
+        interceptorConfigs = new LinkedHashMap<>();
+        resultTypeConfigs = new LinkedHashMap<>();
+        globalExceptionMappingConfigs = new ArrayList<>();
+        parents = new ArrayList<>();
     }
 
     protected PackageConfig(PackageConfig orig) {
@@ -74,12 +70,12 @@ public class PackageConfig extends Located implements Comparable, Serializable,
         this.namespace = orig.namespace;
         this.isAbstract = orig.isAbstract;
         this.needsRefresh = orig.needsRefresh;
-        this.actionConfigs = new LinkedHashMap<String, ActionConfig>(orig.actionConfigs);
-        this.globalResultConfigs = new LinkedHashMap<String, ResultConfig>(orig.globalResultConfigs);
-        this.interceptorConfigs = new LinkedHashMap<String, Object>(orig.interceptorConfigs);
-        this.resultTypeConfigs = new LinkedHashMap<String, ResultTypeConfig>(orig.resultTypeConfigs);
-        this.globalExceptionMappingConfigs = new ArrayList<ExceptionMappingConfig>(orig.globalExceptionMappingConfigs);
-        this.parents = new ArrayList<PackageConfig>(orig.parents);
+        this.actionConfigs = new LinkedHashMap<>(orig.actionConfigs);
+        this.globalResultConfigs = new LinkedHashMap<>(orig.globalResultConfigs);
+        this.interceptorConfigs = new LinkedHashMap<>(orig.interceptorConfigs);
+        this.resultTypeConfigs = new LinkedHashMap<>(orig.resultTypeConfigs);
+        this.globalExceptionMappingConfigs = new ArrayList<>(orig.globalExceptionMappingConfigs);
+        this.parents = new ArrayList<>(orig.parents);
         this.location = orig.location;
     }
 
@@ -99,7 +95,7 @@ public class PackageConfig extends Located implements Comparable, Serializable,
      * @see ActionConfig
      */
     public Map<String, ActionConfig> getAllActionConfigs() {
-        Map<String, ActionConfig> retMap = new LinkedHashMap<String, ActionConfig>();
+        Map<String, ActionConfig> retMap = new LinkedHashMap<>();
 
         if (!parents.isEmpty()) {
             for (PackageConfig parent : parents) {
@@ -120,7 +116,7 @@ public class PackageConfig extends Located implements Comparable, Serializable,
      * @see ResultConfig
      */
     public Map<String, ResultConfig> getAllGlobalResults() {
-        Map<String, ResultConfig> retMap = new LinkedHashMap<String, ResultConfig>();
+        Map<String, ResultConfig> retMap = new LinkedHashMap<>();
 
         if (!parents.isEmpty()) {
             for (PackageConfig parentConfig : parents) {
@@ -142,7 +138,7 @@ public class PackageConfig extends Located implements Comparable, Serializable,
      * @see InterceptorStackConfig
      */
     public Map<String, Object> getAllInterceptorConfigs() {
-        Map<String, Object> retMap = new LinkedHashMap<String, Object>();
+        Map<String, Object> retMap = new LinkedHashMap<>();
 
         if (!parents.isEmpty()) {
             for (PackageConfig parentContext : parents) {
@@ -163,7 +159,7 @@ public class PackageConfig extends Located implements Comparable, Serializable,
      * @see ResultTypeConfig
      */
     public Map<String, ResultTypeConfig> getAllResultTypeConfigs() {
-        Map<String, ResultTypeConfig> retMap = new LinkedHashMap<String, ResultTypeConfig>();
+        Map<String, ResultTypeConfig> retMap = new LinkedHashMap<>();
 
         if (!parents.isEmpty()) {
             for (PackageConfig parentContext : parents) {
@@ -184,7 +180,7 @@ public class PackageConfig extends Located implements Comparable, Serializable,
      * @see ExceptionMappingConfig
      */
     public List<ExceptionMappingConfig> getAllExceptionMappingConfigs() {
-        List<ExceptionMappingConfig> allExceptionMappings = new ArrayList<ExceptionMappingConfig>();
+        List<ExceptionMappingConfig> allExceptionMappings = new ArrayList<>();
 
         if (!parents.isEmpty()) {
             for (PackageConfig parentContext : parents) {
@@ -310,7 +306,7 @@ public class PackageConfig extends Located implements Comparable, Serializable,
     }
 
     public List<PackageConfig> getParents() {
-        return new ArrayList<PackageConfig>(parents);
+        return new ArrayList<>(parents);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ResultConfig.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ResultConfig.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ResultConfig.java
index 3c7ab2d..b9ed588 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ResultConfig.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ResultConfig.java
@@ -40,7 +40,7 @@ public class ResultConfig extends Located implements Serializable {
     protected ResultConfig(String name, String className) {
         this.name = name;
         this.className = className;
-        params = new LinkedHashMap<String, String>();
+        params = new LinkedHashMap<>();
     }
 
     protected ResultConfig(ResultConfig orig) {

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ResultTypeConfig.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ResultTypeConfig.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ResultTypeConfig.java
index 85ef023..96ff4ff 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ResultTypeConfig.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/entities/ResultTypeConfig.java
@@ -43,7 +43,7 @@ public class ResultTypeConfig extends Located implements Serializable {
     protected ResultTypeConfig(String name, String className) {
         this.name = name;
         this.className = className;
-        params = new LinkedHashMap<String,String>();
+        params = new LinkedHashMap<>();
     }
 
     protected ResultTypeConfig(ResultTypeConfig orig) {

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java
index 5a1d33d..5deb7cb 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java
@@ -18,16 +18,12 @@
 package com.opensymphony.xwork2.config.impl;
 
 import com.opensymphony.xwork2.util.PatternMatcher;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.LogManager;
 import org.apache.commons.lang3.math.NumberUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * <p> Matches patterns against pre-compiled wildcard expressions pulled from
@@ -52,7 +48,8 @@ public abstract class AbstractMatcher<E> implements Serializable {
     /**
      * <p> The compiled patterns and their associated target objects </p>
      */
-    List<Mapping<E>> compiledPatterns = new ArrayList<Mapping<E>>();;
+    List<Mapping<E>> compiledPatterns = new ArrayList<>();
+    ;
     
     public AbstractMatcher(PatternMatcher<?> helper) {
         this.wildcard = (PatternMatcher<Object>) helper;
@@ -86,9 +83,7 @@ public abstract class AbstractMatcher<E> implements Serializable {
                 name = name.substring(1);
             }
 
-            if (log.isDebugEnabled()) {
-                log.debug("Compiling pattern '" + name + "'");
-            }
+            log.debug("Compiling pattern '{}'", name);
 
             pattern = wildcard.compilePattern(name);
             compiledPatterns.add(new Mapping<E>(name, pattern, target));
@@ -119,22 +114,13 @@ public abstract class AbstractMatcher<E> implements Serializable {
         E config = null;
 
         if (compiledPatterns.size() > 0) {
-            if (log.isDebugEnabled()) {
-                log.debug("Attempting to match '" + potentialMatch
-                    + "' to a wildcard pattern, "+ compiledPatterns.size()
-                    + " available");
-            }
+            log.debug("Attempting to match '{}' to a wildcard pattern, {} available", potentialMatch, compiledPatterns.size());
 
             Map<String,String> vars = new LinkedHashMap<String,String>();
             for (Mapping<E> m : compiledPatterns) {
                 if (wildcard.match(vars, potentialMatch, m.getPattern())) {
-                    if (log.isDebugEnabled()) {
-                        log.debug("Value matches pattern '"
-                            + m.getOriginalPattern() + "'");
-                    }
-
-                    config =
-                        convert(potentialMatch, m.getTarget(), vars);
+                    log.debug("Value matches pattern '{}'", m.getOriginalPattern());
+                    config = convert(potentialMatch, m.getTarget(), vars);
                     break;
                 }
             }
@@ -159,11 +145,11 @@ public abstract class AbstractMatcher<E> implements Serializable {
      * <p> Replaces parameter values
      * </p>
      *
-     * @param orig  The original parameters with placehold values
+     * @param orig  The original parameters with placeholder values
      * @param vars  A Map of wildcard-matched strings
      */
     protected Map<String,String> replaceParameters(Map<String, String> orig, Map<String,String> vars) {
-        Map<String,String> map = new LinkedHashMap<String,String>();
+        Map<String, String> map = new LinkedHashMap<>();
         
         //this will set the group index references, like {1}
         for (String key : orig.keySet()) {

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/ActionConfigMatcher.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/ActionConfigMatcher.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/ActionConfigMatcher.java
index b92e420..e282c1a 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/ActionConfigMatcher.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/ActionConfigMatcher.java
@@ -120,7 +120,7 @@ public class ActionConfigMatcher extends AbstractMatcher<ActionConfig> implement
 
         Map<String,String> params = replaceParameters(orig.getParams(), vars);
 
-        Map<String,ResultConfig> results = new LinkedHashMap<String,ResultConfig>();
+        Map<String, ResultConfig> results = new LinkedHashMap<>();
         for (String name : orig.getResults().keySet()) {
             ResultConfig result = orig.getResults().get(name);
             name = convertParam(name, vars);

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
index d811c43..7d5e5cc 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
@@ -15,91 +15,29 @@
  */
 package com.opensymphony.xwork2.config.impl;
 
-import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.DefaultLocaleProvider;
-import com.opensymphony.xwork2.DefaultTextProvider;
-import com.opensymphony.xwork2.FileManager;
-import com.opensymphony.xwork2.FileManagerFactory;
-import com.opensymphony.xwork2.LocaleProvider;
-import com.opensymphony.xwork2.ObjectFactory;
-import com.opensymphony.xwork2.TextProvider;
-import com.opensymphony.xwork2.XWorkConstants;
-import com.opensymphony.xwork2.config.Configuration;
-import com.opensymphony.xwork2.config.ConfigurationException;
-import com.opensymphony.xwork2.config.ConfigurationProvider;
-import com.opensymphony.xwork2.config.ContainerProvider;
-import com.opensymphony.xwork2.config.FileManagerFactoryProvider;
-import com.opensymphony.xwork2.config.FileManagerProvider;
-import com.opensymphony.xwork2.config.PackageProvider;
-import com.opensymphony.xwork2.config.RuntimeConfiguration;
-import com.opensymphony.xwork2.config.entities.ActionConfig;
-import com.opensymphony.xwork2.config.entities.InterceptorMapping;
-import com.opensymphony.xwork2.config.entities.PackageConfig;
-import com.opensymphony.xwork2.config.entities.ResultConfig;
-import com.opensymphony.xwork2.config.entities.ResultTypeConfig;
-import com.opensymphony.xwork2.config.entities.UnknownHandlerConfig;
+import com.opensymphony.xwork2.*;
+import com.opensymphony.xwork2.config.*;
+import com.opensymphony.xwork2.config.entities.*;
 import com.opensymphony.xwork2.config.providers.InterceptorBuilder;
-import com.opensymphony.xwork2.conversion.ConversionAnnotationProcessor;
-import com.opensymphony.xwork2.conversion.ConversionFileProcessor;
-import com.opensymphony.xwork2.conversion.ConversionPropertiesProcessor;
-import com.opensymphony.xwork2.conversion.ObjectTypeDeterminer;
-import com.opensymphony.xwork2.conversion.TypeConverter;
-import com.opensymphony.xwork2.conversion.TypeConverterCreator;
-import com.opensymphony.xwork2.conversion.TypeConverterHolder;
-import com.opensymphony.xwork2.conversion.impl.ArrayConverter;
-import com.opensymphony.xwork2.conversion.impl.CollectionConverter;
-import com.opensymphony.xwork2.conversion.impl.DateConverter;
-import com.opensymphony.xwork2.conversion.impl.DefaultConversionAnnotationProcessor;
-import com.opensymphony.xwork2.conversion.impl.DefaultConversionFileProcessor;
-import com.opensymphony.xwork2.conversion.impl.DefaultConversionPropertiesProcessor;
-import com.opensymphony.xwork2.conversion.impl.DefaultObjectTypeDeterminer;
-import com.opensymphony.xwork2.conversion.impl.DefaultTypeConverterCreator;
-import com.opensymphony.xwork2.conversion.impl.DefaultTypeConverterHolder;
-import com.opensymphony.xwork2.conversion.impl.NumberConverter;
-import com.opensymphony.xwork2.conversion.impl.StringConverter;
-import com.opensymphony.xwork2.conversion.impl.XWorkBasicConverter;
-import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
-import com.opensymphony.xwork2.factory.ActionFactory;
-import com.opensymphony.xwork2.factory.ConverterFactory;
-import com.opensymphony.xwork2.factory.DefaultActionFactory;
-import com.opensymphony.xwork2.factory.DefaultConverterFactory;
-import com.opensymphony.xwork2.factory.DefaultInterceptorFactory;
-import com.opensymphony.xwork2.factory.DefaultResultFactory;
-import com.opensymphony.xwork2.factory.DefaultUnknownHandlerFactory;
-import com.opensymphony.xwork2.factory.InterceptorFactory;
-import com.opensymphony.xwork2.factory.ResultFactory;
-import com.opensymphony.xwork2.factory.UnknownHandlerFactory;
-import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.inject.ContainerBuilder;
-import com.opensymphony.xwork2.inject.Context;
-import com.opensymphony.xwork2.inject.Factory;
-import com.opensymphony.xwork2.inject.Scope;
+import com.opensymphony.xwork2.conversion.*;
+import com.opensymphony.xwork2.conversion.impl.*;
+import com.opensymphony.xwork2.factory.*;
+import com.opensymphony.xwork2.inject.*;
 import com.opensymphony.xwork2.ognl.OgnlReflectionProvider;
 import com.opensymphony.xwork2.ognl.OgnlUtil;
 import com.opensymphony.xwork2.ognl.OgnlValueStackFactory;
 import com.opensymphony.xwork2.ognl.accessor.CompoundRootAccessor;
-import com.opensymphony.xwork2.util.CompoundRoot;
-import com.opensymphony.xwork2.util.OgnlTextParser;
-import com.opensymphony.xwork2.util.PatternMatcher;
-import com.opensymphony.xwork2.util.TextParser;
-import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.ValueStackFactory;
+import com.opensymphony.xwork2.util.*;
 import com.opensymphony.xwork2.util.fs.DefaultFileManager;
 import com.opensymphony.xwork2.util.fs.DefaultFileManagerFactory;
 import com.opensymphony.xwork2.util.location.LocatableProperties;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.LogManager;
 import com.opensymphony.xwork2.util.reflection.ReflectionProvider;
 import ognl.PropertyAccessor;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
+import java.util.*;
 
 
 /**
@@ -114,11 +52,11 @@ public class DefaultConfiguration implements Configuration {
 
 
     // Programmatic Action Configurations
-    protected Map<String, PackageConfig> packageContexts = new LinkedHashMap<String, PackageConfig>();
+    protected Map<String, PackageConfig> packageContexts = new LinkedHashMap<>();
     protected RuntimeConfiguration runtimeConfiguration;
     protected Container container;
     protected String defaultFrameworkBeanName;
-    protected Set<String> loadedFileNames = new TreeSet<String>();
+    protected Set<String> loadedFileNames = new TreeSet<>();
     protected List<UnknownHandlerConfig> unknownHandlerStack;
 
 
@@ -173,11 +111,8 @@ public class DefaultConfiguration implements Configuration {
         if (check != null) {
             if (check.getLocation() != null && packageContext.getLocation() != null
                     && check.getLocation().equals(packageContext.getLocation())) {
-                if (LOG.isDebugEnabled()) {
-                    LOG.debug("The package name '" + name
-                    + "' is already been loaded by the same location and could be removed: "
-                    + packageContext.getLocation());
-                }
+                LOG.debug("The package name '{}' is already been loaded by the same location and could be removed: {}",
+                        name, packageContext.getLocation());
             } else {
                 throw new ConfigurationException("The package name '" + name
                         + "' at location "+packageContext.getLocation()
@@ -213,7 +148,7 @@ public class DefaultConfiguration implements Configuration {
     public synchronized void reload(List<ConfigurationProvider> providers) throws ConfigurationException {
 
         // Silly copy necessary due to lack of ability to cast generic lists
-        List<ContainerProvider> contProviders = new ArrayList<ContainerProvider>();
+        List<ContainerProvider> contProviders = new ArrayList<>();
         contProviders.addAll(providers);
 
         reloadContainer(contProviders);
@@ -228,7 +163,7 @@ public class DefaultConfiguration implements Configuration {
     public synchronized List<PackageProvider> reloadContainer(List<ContainerProvider> providers) throws ConfigurationException {
         packageContexts.clear();
         loadedFileNames.clear();
-        List<PackageProvider> packageProviders = new ArrayList<PackageProvider>();
+        List<PackageProvider> packageProviders = new ArrayList<>();
 
         ContainerProperties props = new ContainerProperties();
         ContainerBuilder builder = new ContainerBuilder();
@@ -362,8 +297,8 @@ public class DefaultConfiguration implements Configuration {
      * will have two results.
      */
     protected synchronized RuntimeConfiguration buildRuntimeConfiguration() throws ConfigurationException {
-        Map<String, Map<String, ActionConfig>> namespaceActionConfigs = new LinkedHashMap<String, Map<String, ActionConfig>>();
-        Map<String, String> namespaceConfigs = new LinkedHashMap<String, String>();
+        Map<String, Map<String, ActionConfig>> namespaceActionConfigs = new LinkedHashMap<>();
+        Map<String, String> namespaceConfigs = new LinkedHashMap<>();
 
         for (PackageConfig packageConfig : packageContexts.values()) {
 
@@ -372,7 +307,7 @@ public class DefaultConfiguration implements Configuration {
                 Map<String, ActionConfig> configs = namespaceActionConfigs.get(namespace);
 
                 if (configs == null) {
-                    configs = new LinkedHashMap<String, ActionConfig>();
+                    configs = new LinkedHashMap<>();
                 }
 
                 Map<String, ActionConfig> actionConfigs = packageConfig.getAllActionConfigs();
@@ -418,8 +353,8 @@ public class DefaultConfiguration implements Configuration {
      *
      */
     private ActionConfig buildFullActionConfig(PackageConfig packageContext, ActionConfig baseConfig) throws ConfigurationException {
-        Map<String, String> params = new TreeMap<String, String>(baseConfig.getParams());
-        Map<String, ResultConfig> results = new TreeMap<String, ResultConfig>();
+        Map<String, String> params = new TreeMap<>(baseConfig.getParams());
+        Map<String, ResultConfig> results = new TreeMap<>();
 
         if (!baseConfig.getPackageName().equals(packageContext.getName()) && packageContexts.containsKey(baseConfig.getPackageName())) {
             results.putAll(packageContexts.get(baseConfig.getPackageName()).getAllGlobalResults());
@@ -431,7 +366,7 @@ public class DefaultConfiguration implements Configuration {
 
         setDefaultResults(results, packageContext);
 
-        List<InterceptorMapping> interceptors = new ArrayList<InterceptorMapping>(baseConfig.getInterceptors());
+        List<InterceptorMapping> interceptors = new ArrayList<>(baseConfig.getInterceptors());
 
         if (interceptors.size() <= 0) {
             String defaultInterceptorRefName = packageContext.getFullDefaultInterceptorRef();
@@ -465,7 +400,7 @@ public class DefaultConfiguration implements Configuration {
             this.namespaceActionConfigs = namespaceActionConfigs;
             this.namespaceConfigs = namespaceConfigs;
 
-            this.namespaceActionConfigMatchers = new LinkedHashMap<String, ActionConfigMatcher>();
+            this.namespaceActionConfigMatchers = new LinkedHashMap<>();
             this.namespaceMatcher = new NamespaceMatcher(matcher, namespaceActionConfigs.keySet());
 
             for (String ns : namespaceActionConfigs.keySet()) {
@@ -501,7 +436,7 @@ public class DefaultConfiguration implements Configuration {
             }
 
             // fail over to empty namespace
-            if ((config == null) && (namespace != null) && (!"".equals(namespace.trim()))) {
+            if (config == null && StringUtils.isNotBlank(namespace)) {
                 config = findActionConfigInNamespace("", name);
             }
 
@@ -564,7 +499,7 @@ public class DefaultConfiguration implements Configuration {
         public Object setProperty(String key, String value) {
             String oldValue = getProperty(key);
             if (LOG.isInfoEnabled() && oldValue != null && !oldValue.equals(value) && !defaultFrameworkBeanName.equals(oldValue)) {
-                LOG.info("Overriding property "+key+" - old value: "+oldValue+" new value: "+value);
+                LOG.info("Overriding property {} - old value: {} new value: {}", key, oldValue, value);
             }
             return super.setProperty(key, value);
         }
@@ -572,8 +507,7 @@ public class DefaultConfiguration implements Configuration {
         public void setConstants(ContainerBuilder builder) {
             for (Object keyobj : keySet()) {
                 String key = (String)keyobj;
-                builder.factory(String.class, key,
-                        new LocatableConstantFactory<String>(getProperty(key), getPropertyLocation(key)));
+                builder.factory(String.class, key, new LocatableConstantFactory<>(getProperty(key), getPropertyLocation(key)));
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/MockConfiguration.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/MockConfiguration.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/MockConfiguration.java
index 7238e01..d5359fe 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/MockConfiguration.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/MockConfiguration.java
@@ -16,12 +16,7 @@
 package com.opensymphony.xwork2.config.impl;
 
 import com.opensymphony.xwork2.XWorkConstants;
-import com.opensymphony.xwork2.config.Configuration;
-import com.opensymphony.xwork2.config.ConfigurationException;
-import com.opensymphony.xwork2.config.ConfigurationProvider;
-import com.opensymphony.xwork2.config.ContainerProvider;
-import com.opensymphony.xwork2.config.PackageProvider;
-import com.opensymphony.xwork2.config.RuntimeConfiguration;
+import com.opensymphony.xwork2.config.*;
 import com.opensymphony.xwork2.config.entities.PackageConfig;
 import com.opensymphony.xwork2.config.entities.UnknownHandlerConfig;
 import com.opensymphony.xwork2.config.providers.XWorkConfigurationProvider;
@@ -30,11 +25,7 @@ import com.opensymphony.xwork2.inject.ContainerBuilder;
 import com.opensymphony.xwork2.inject.Scope;
 import com.opensymphony.xwork2.util.location.LocatableProperties;
 
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 
 
 /**
@@ -42,8 +33,8 @@ import java.util.Set;
  */
 public class MockConfiguration implements Configuration {
 
-    private Map<String, PackageConfig> packages = new HashMap<String, PackageConfig>();
-    private Set<String> loadedFiles = new HashSet<String>();
+    private Map<String, PackageConfig> packages = new HashMap<>();
+    private Set<String> loadedFiles = new HashSet<>();
     private Container container;
     protected List<UnknownHandlerConfig> unknownHandlerStack;
     private ContainerBuilder builder;

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/CycleDetector.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/CycleDetector.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/CycleDetector.java
index 0bba85c..82a7266 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/CycleDetector.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/CycleDetector.java
@@ -14,8 +14,8 @@ public class CycleDetector<T> {
 
     public CycleDetector(DirectedGraph<T> graph) {
         this.graph = graph;
-        marks = new HashMap<T, String>();
-        verticesInCycles = new ArrayList<T>();
+        marks = new HashMap<>();
+        verticesInCycles = new ArrayList<>();
     }
 
     public boolean containsCycle() {

http://git-wip-us.apache.org/repos/asf/struts/blob/2e9df577/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
index 5c3e360..1328205 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
@@ -23,8 +23,8 @@ import com.opensymphony.xwork2.config.entities.InterceptorMapping;
 import com.opensymphony.xwork2.config.entities.InterceptorStackConfig;
 import com.opensymphony.xwork2.interceptor.Interceptor;
 import com.opensymphony.xwork2.util.location.Location;
-import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
 
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
@@ -57,14 +57,14 @@ public class InterceptorBuilder {
     public static List<InterceptorMapping> constructInterceptorReference(InterceptorLocator interceptorLocator,
                                                                          String refName, Map<String,String> refParams, Location location, ObjectFactory objectFactory) throws ConfigurationException {
         Object referencedConfig = interceptorLocator.getInterceptorConfig(refName);
-        List<InterceptorMapping> result = new ArrayList<InterceptorMapping>();
+        List<InterceptorMapping> result = new ArrayList<>();
 
         if (referencedConfig == null) {
             throw new ConfigurationException("Unable to find interceptor class referenced by ref-name " + refName, location);
         } else {
             if (referencedConfig instanceof InterceptorConfig) {
                 InterceptorConfig config = (InterceptorConfig) referencedConfig;
-                Interceptor inter = null;
+                Interceptor inter;
                 try {
 
                     inter = objectFactory.buildInterceptor(config, refParams);
@@ -105,7 +105,7 @@ public class InterceptorBuilder {
             InterceptorLocator interceptorLocator, InterceptorStackConfig stackConfig, Map<String,String> refParams,
             ObjectFactory objectFactory) {
         List<InterceptorMapping> result;
-        Map<String, Map<String, String>> params = new LinkedHashMap<String, Map<String, String>>();
+        Map<String, Map<String, String>> params = new LinkedHashMap<>();
 
         /*
          * We strip
@@ -139,7 +139,7 @@ public class InterceptorBuilder {
                 if (params.containsKey(name)) {
                     map = params.get(name);
                 } else {
-                    map = new LinkedHashMap<String, String>();
+                    map = new LinkedHashMap<>();
                 }
 
                 map.put(key, value);
@@ -150,7 +150,7 @@ public class InterceptorBuilder {
             }
         }
 
-        result = new ArrayList<InterceptorMapping>(stackConfig.getInterceptors());
+        result = new ArrayList<>(stackConfig.getInterceptors());
 
         for (String key : params.keySet()) {
 
@@ -192,7 +192,7 @@ public class InterceptorBuilder {
             } else
             if (interceptorCfgObj instanceof InterceptorStackConfig) {  // interceptor-ref param refer to an interceptor stack
 
-                // If its an interceptor-stack, we call this method recursively untill,
+                // If its an interceptor-stack, we call this method recursively until,
                 // all the params (eg. interceptorStack1.interceptor1.param etc.)
                 // are resolved down to a specific interceptor.
 


Mime
View raw message