Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.9, 2.2.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).