Skip to content

Commit 5d5640f

Browse files
committed
Stop using deprecated in URL constructor in PluginBasedLaunchTest
As every URL is supposed to be an URI if if tailed to parse as URI it shouldn't parse as URL either. It's also known that it should be local folder so one can create Path directly rather than getting it from the URL.
1 parent aaaa0c0 commit 5d5640f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/launcher/PluginBasedLaunchTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727

2828
import java.io.File;
2929
import java.io.InputStream;
30-
import java.net.MalformedURLException;
3130
import java.net.URI;
32-
import java.net.URL;
3331
import java.nio.file.Files;
3432
import java.nio.file.Path;
3533
import java.util.Arrays;
@@ -1052,7 +1050,7 @@ private static ILaunchConfigurationWorkingCopy createPluginLaunchConfig(String n
10521050
private static final Pattern WHITESPACE = Pattern.compile("\\s+");
10531051

10541052
private Path getConfigurationFolder(ILaunchConfigurationWorkingCopy launchConfig)
1055-
throws CoreException, MalformedURLException {
1053+
throws CoreException {
10561054
ILaunch launch = new Launch(launchConfig, ILaunchManager.RUN_MODE, null);
10571055
var config = new EclipseApplicationLaunchConfiguration();
10581056
String commandLine = config.showCommandLine(launchConfig, ILaunchManager.RUN_MODE, launch, null);
@@ -1062,7 +1060,7 @@ private Path getConfigurationFolder(ILaunchConfigurationWorkingCopy launchConfig
10621060
try {
10631061
return Path.of(URI.create(configURL));
10641062
} catch (IllegalArgumentException e) {
1065-
return Path.of(new URL(configURL).getPath());
1063+
return Path.of(configURL);
10661064
}
10671065
}
10681066

0 commit comments

Comments
 (0)