struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amashche...@apache.org
Subject [1/2] struts git commit: use commons-lang3 classes, use StringUtils removeEnd instead of deprecated chomp
Date Thu, 16 Mar 2017 17:54:23 GMT
Repository: struts
Updated Branches:
  refs/heads/master 9d60f5bbc -> c83e07ec4


use commons-lang3 classes, use StringUtils removeEnd instead of deprecated chomp


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

Branch: refs/heads/master
Commit: d7069fc3932ae0a698157c2d4241dc5fa13cb3c5
Parents: 9d60f5b
Author: Aleksandr Mashchenko <amashchenko@apache.org>
Authored: Thu Mar 16 19:44:15 2017 +0200
Committer: Aleksandr Mashchenko <amashchenko@apache.org>
Committed: Thu Mar 16 19:44:15 2017 +0200

----------------------------------------------------------------------
 core/src/main/java/org/apache/struts2/components/Form.java     | 2 +-
 .../main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/d7069fc3/core/src/main/java/org/apache/struts2/components/Form.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/struts2/components/Form.java b/core/src/main/java/org/apache/struts2/components/Form.java
index 6b2e478..13247a9 100644
--- a/core/src/main/java/org/apache/struts2/components/Form.java
+++ b/core/src/main/java/org/apache/struts2/components/Form.java
@@ -424,7 +424,7 @@ public class Form extends ClosingUIBean {
         if (visitorFieldName == null) {
             return null;
         }
-        String methodName = "get" + org.apache.commons.lang.StringUtils.capitalize(visitorFieldName);
+        String methodName = "get" + StringUtils.capitalize(visitorFieldName);
         try {
             Method method = actionClass.getMethod(methodName, new Class[0]);
             return method.getReturnType();

http://git-wip-us.apache.org/repos/asf/struts/blob/d7069fc3/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
----------------------------------------------------------------------
diff --git a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
index 4e2c57b..04ed2a9 100644
--- a/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
+++ b/plugins/osgi/src/main/java/org/apache/struts2/osgi/host/BaseOsgiHost.java
@@ -25,7 +25,7 @@ import com.opensymphony.xwork2.FileManagerFactory;
 import com.opensymphony.xwork2.util.finder.ResourceFinder;
 import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.LogManager;
-import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.felix.main.AutoProcessor;
 import org.apache.felix.shell.ShellService;
 import org.apache.struts2.ServletActionContext;
@@ -146,7 +146,7 @@ public abstract class BaseOsgiHost implements OsgiHost {
                     if (runLevelDirs != null && runLevelDirs.length > 0) {
                         //add all the dirs to the list
                         for (String runLevel : runLevelDirs) {
-                            dirs.put(runLevel, StringUtils.chomp(dir,  "/") + "/" + runLevel);
+                            dirs.put(runLevel, StringUtils.removeEnd(dir,  "/") + "/" + runLevel);
                         }
                     } else {
                         LOG.debug("No run level directories found under the [{}] directory",
dir);
@@ -258,7 +258,7 @@ public abstract class BaseOsgiHost implements OsgiHost {
         //make a string with the exported packages and add it to the system properties
         if (!exportedPackages.isEmpty()) {
             String systemPackages = (String) configProps.get(Constants.FRAMEWORK_SYSTEMPACKAGES);
-            systemPackages = StringUtils.chomp(systemPackages, ",") + "," + StringUtils.join(exportedPackages,
",");
+            systemPackages = StringUtils.removeEnd(systemPackages, ",") + "," + StringUtils.join(exportedPackages,
",");
             configProps.put(Constants.FRAMEWORK_SYSTEMPACKAGES, systemPackages);
         }
     }


Mime
View raw message