Skip to content

Commit

Permalink
fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed Dec 2, 2023
1 parent a097bcd commit 909211c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import java.io.IOException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.jar.JarFile;
import org.eclipse.core.runtime.FileLocator;
Expand Down Expand Up @@ -166,8 +168,8 @@ private static URL fixupFileURLSpaces(URL url) {
lastIndex = spaceIndex + 1;
}
try {
return new URL(fixedUpUrl.toString());
} catch (MalformedURLException e) {
return (new URI(fixedUpUrl.toString())).toURL();
} catch (MalformedURLException | URISyntaxException e) {
e.printStackTrace();
Assertions.UNREACHABLE();
}
Expand Down

0 comments on commit 909211c

Please sign in to comment.