Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-452

NPE in GroovyClassLoader

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-4
    • 1.0-beta-5
    • None
    • None
    • Gentoo Linux, sun-jdk-1.4.2.04

    Description

      GroovyClassLoader fails with NullPointerException if java.class.path system property contains a path that includes .jar file that has no Class-Path attribute in it's Manifest file.

      In the expandClassPath, line 249, null may be returned, which then gets passed to expandClassPath as third parameter. Attempt to call 'split' on it causes NPE:

      java.lang.NullPointerException
      at groovy.lang.GroovyClassLoader.expandClassPath(GroovyClassLoader.java:238)
      at groovy.lang.GroovyClassLoader.expandClassPath(GroovyClassLoader.java:250)
      at groovy.lang.GroovyClassLoader.getClassPath(GroovyClassLoader.java:225)
      at groovy.lang.GroovyClassLoader.findClass(GroovyClassLoader.java:166)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:289)

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            kos Konstantin Nikolaev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: