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

GroovyClassLoader.addClasspath should respect URI paths and not use URL.equals

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.9, 2.2.1
    • 2.3.0-beta-1
    • None
    • None

    Description

      GroovyClassLoader.addClasspath has two kinds of problems with URLs.

      For one thing it uses URL.equals to avoid adding duplicate paths to the classpath. That is very bad since it is a blocking operation that performs domain name resolution.

      The second thing is that even though it is a URLClassLoader it doesn't add paths that are URIs/URLs as URLs but instead always makes a file: path.

      The solution for both is to use URI for making and comparing paths before adding them with addURL(URL).

      Attachments

        Activity

          People

            jimwhite James P. White
            jimwhite James P. White
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: