You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
method com.google.common.reflect.ClassPath:getClassPathEntries(ClassLoader classloader)
Guava 19, Windows 10, Java 8.
At line 392: File object is created from string entry.getFile()
where entry is URL object from URLClassLoader File file = new File(entry.getFile())
Guava 19.0 is quite old now. What happens if you upgrade from Guava 19.0 to the latest version: 27.0.1-jre at the time of me writing this? Does the code problem you've talked about still exist in that version?
method com.google.common.reflect.ClassPath:getClassPathEntries(ClassLoader classloader)
Guava 19, Windows 10, Java 8.
At line 392: File object is created from string
entry.getFile()
where entry is URL object from URLClassLoader
File file = new File(entry.getFile())
Method URL.getFile() returns absolute file path URL encoded (ex.:
)
File object constructor interprets URL encoded characters literally, therefore this file doesnt exists.
Possible solution to use method URL.toURI():
line 392: File file = new File(entry.toURI());
When File(URI uri) constructor is used, it uses URI.getPath() method internally, and it handles URL encoding characters properly.
The text was updated successfully, but these errors were encountered: