struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [2/2] struts git commit: Cleans up code
Date Sun, 18 Jun 2017 09:11:33 GMT
Cleans up code


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

Branch: refs/heads/master
Commit: 216c52095ecabbe87ff4c121d7602ec35ce65123
Parents: 843693f
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Sun Jun 18 11:07:25 2017 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Sun Jun 18 11:11:25 2017 +0200

----------------------------------------------------------------------
 .../org/apache/struts2/tiles/StrutsTilesAnnotationProcessor.java | 4 ++--
 .../java/org/apache/struts2/tiles/StrutsTilesLocaleResolver.java | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/216c5209/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesAnnotationProcessor.java
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesAnnotationProcessor.java
index fa5f735..e36b75d 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesAnnotationProcessor.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesAnnotationProcessor.java
@@ -54,14 +54,14 @@ public class StrutsTilesAnnotationProcessor {
      * @return {@link TilesDefinition}
      */
     public TilesDefinition findAnnotation(Object action, String tileName) {
-        Class<? extends Object> clazz = action.getClass();
+        Class<?> clazz = action.getClass();
         TilesDefinition tilesDefinition = clazz.getAnnotation(TilesDefinition.class);
         TilesDefinitions tilesDefinitions = clazz.getAnnotation(TilesDefinitions.class);
 
         if (tilesDefinition == null && tilesDefinitions != null) {
             if (!StringUtils.isEmpty(tileName)) {
                 for (TilesDefinition i : tilesDefinitions.value()) {
-                    if (i.name() != null && i.name().equals(tileName)) {
+                    if (i.name().equals(tileName)) {
                         tilesDefinition = i;
                         break;
                     }

http://git-wip-us.apache.org/repos/asf/struts/blob/216c5209/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesLocaleResolver.java
----------------------------------------------------------------------
diff --git a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesLocaleResolver.java
b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesLocaleResolver.java
index e75cd48..90b9fa0 100644
--- a/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesLocaleResolver.java
+++ b/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesLocaleResolver.java
@@ -20,7 +20,6 @@
 package org.apache.struts2.tiles;
 
 import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.LocaleProvider;
 import com.opensymphony.xwork2.LocaleProviderFactory;
 import com.opensymphony.xwork2.config.ConfigurationException;
 import org.apache.logging.log4j.LogManager;


Mime
View raw message