struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject struts git commit: WW-4688 Excludes "java.ext.dirs" when scanning for actions
Date Wed, 14 Sep 2016 06:17:39 GMT
Repository: struts
Updated Branches:
  refs/heads/master 7605c1641 -> ac10fa9cf


WW-4688 Excludes "java.ext.dirs" when scanning for actions


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

Branch: refs/heads/master
Commit: ac10fa9cf5415026a0c6a675bb5903428dd8aef6
Parents: 7605c16
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Wed Sep 14 08:17:24 2016 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Wed Sep 14 08:17:24 2016 +0200

----------------------------------------------------------------------
 .../java/com/opensymphony/xwork2/util/finder/UrlSet.java  | 10 ++++++++++
 .../convention/PackageBasedActionConfigBuilder.java       |  6 ++++--
 2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/ac10fa9c/core/src/main/java/com/opensymphony/xwork2/util/finder/UrlSet.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/util/finder/UrlSet.java b/core/src/main/java/com/opensymphony/xwork2/util/finder/UrlSet.java
index dd7f5d7..0a1960f 100644
--- a/core/src/main/java/com/opensymphony/xwork2/util/finder/UrlSet.java
+++ b/core/src/main/java/com/opensymphony/xwork2/util/finder/UrlSet.java
@@ -138,6 +138,16 @@ public class UrlSet {
         return excludePaths(System.getProperty("java.endorsed.dirs", ""));
     }
 
+    /**
+     * Calls excludePaths(System.getProperty("java.ext.dirs"))
+     *
+     * @return url set
+     * @throws MalformedURLException in case if incorrect URL
+     */
+    public UrlSet excludeUserExtensionsDir() throws MalformedURLException {
+        return excludePaths(System.getProperty("java.ext.dirs", ""));
+    }
+
     public UrlSet excludeJavaHome() throws MalformedURLException {
         String path = System.getProperty("java.home");
         if (path != null) {

http://git-wip-us.apache.org/repos/asf/struts/blob/ac10fa9c/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
----------------------------------------------------------------------
diff --git a/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
b/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
index 45c71a3..25083e2 100644
--- a/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
+++ b/plugins/convention/src/main/java/org/apache/struts2/convention/PackageBasedActionConfigBuilder.java
@@ -443,8 +443,10 @@ public class PackageBasedActionConfigBuilder implements ActionConfigBuilder
{
         });
 
 
-        urlSet = urlSet.excludeJavaExtDirs();
-        urlSet = urlSet.excludeJavaEndorsedDirs();
+        urlSet = urlSet.excludeJavaExtDirs()
+                    .excludeJavaEndorsedDirs()
+                    .excludeUserExtensionsDir();
+
         try {
         	urlSet = urlSet.excludeJavaHome();
         } catch (NullPointerException e) {


Mime
View raw message