Uploaded image for project: 'XBean'
  1. XBean
  2. XBEAN-92

UrlSet excludePaths() method throws a nullpointer exception if the pathString argument is null

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 3.6
    • finder
    • None
    • IBM JDK 5

    Description

      With IBM JDK 5, when we try to get the system property java.endorsed.dirs, it returns null. This is a critical issue as it prevents OpenEjb from starting

      In UrlSet, the following method will lead to a NullPointerException:

      public UrlSet excludeJavaEndorsedDirs() throws MalformedURLException

      { return excludePaths(System.getProperty("java.endorsed.dirs")); }

      This is because the excludePaths() method assumes that the pathString argument is always non-null.
      public UrlSet excludePaths(String pathString) throws MalformedURLException {
      String[] paths = pathString.split(File.pathSeparator);
      UrlSet urlSet = this;
      for (String path : paths)

      { File file = new File(path); urlSet = urlSet.exclude(file); }

      return urlSet;
      }

      Attachments

        1. XBEAN-92.patch.txt
          1 kB
          Andreas Veithen

        Activity

          People

            genspring Lin Quan Jiang
            karan_malhi karan singh malhi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: