Commits

rainerh  committed e52bbc5

XW-695 NPE if running in JVM without java.home (Google App Engine)
applied patch submitted by Leonard Broman, thanks!

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@1988e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits dc61ee7

Comments (0)

Files changed (1)

File core/src/main/java/com/opensymphony/xwork2/util/finder/UrlSet.java

 
     public UrlSet excludeJavaHome() throws MalformedURLException {
         String path = System.getProperty("java.home");
+        if (path != null) {
 
-        File java = new File(path);
+            File java = new File(path);
 
-        if (path.matches("/System/Library/Frameworks/JavaVM.framework/Versions/[^/]+/Home")){
-            java = java.getParentFile();
+            if (path.matches("/System/Library/Frameworks/JavaVM.framework/Versions/[^/]+/Home")){
+                java = java.getParentFile();
+            }
+            return exclude(java);
+        } else {
+            return this;
         }
-
-        return exclude(java);
     }
 
     public UrlSet excludePaths(String pathString) throws MalformedURLException {