You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xbean-scm@geronimo.apache.org by db...@apache.org on 2009/09/10 09:29:09 UTC

svn commit: r813275 - /geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/UrlSet.java

Author: dblevins
Date: Thu Sep 10 07:29:09 2009
New Revision: 813275

URL: http://svn.apache.org/viewvc?rev=813275&view=rev
Log:
Patch from Andreas Veithen, for XBEAN-92: UrlSet excludePaths() method throws a nullpointer
which is IBM JDK specific.
Thanks, Andreas!

Modified:
    geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/UrlSet.java

Modified: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/UrlSet.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/UrlSet.java?rev=813275&r1=813274&r2=813275&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/UrlSet.java (original)
+++ geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/UrlSet.java Thu Sep 10 07:29:09 2009
@@ -105,7 +105,8 @@
      * @throws MalformedURLException
      */
     public UrlSet excludeJavaExtDirs() throws MalformedURLException {
-        return excludePaths(System.getProperty("java.ext.dirs", ""));
+        String extDirs = System.getProperty("java.ext.dirs");
+        return extDirs == null ? this : excludePaths(extDirs);
     }
 
     /**
@@ -115,7 +116,8 @@
      * @throws MalformedURLException
      */
     public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException {
-        return excludePaths(System.getProperty("java.endorsed.dirs", ""));
+        String endorsedDirs = System.getProperty("java.endorsed.dirs");
+        return endorsedDirs == null ? this : excludePaths(endorsedDirs);
     }
 
     public UrlSet excludeJavaHome() throws MalformedURLException {