Skip to content

Commit

Permalink
Merge pull request #9 from qxo/fix4addRootPath
Browse files Browse the repository at this point in the history
fixed for URI is not hierarchical(issue found on jdk 11)
  • Loading branch information
mfatihercik authored Sep 5, 2019
2 parents 04dfdac + 04c49b2 commit 8466bc2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.io.*;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URI;
import java.net.URLClassLoader;
import java.util.HashSet;
import java.util.Set;
Expand Down Expand Up @@ -51,7 +52,11 @@ protected void init() {
@Override
protected void addRootPath(URL path) {
try {
File pathAsFile = new File(path.toURI());
URI uri = path.toURI();
if(uri.isOpaque()) {
return;
}
File pathAsFile = new File(uri);

for (File fileSystemRoot : File.listRoots()) {
if (pathAsFile.equals(fileSystemRoot)) { //don't include root
Expand Down

0 comments on commit 8466bc2

Please sign in to comment.