Skip to content

Commit

Permalink
Stop using deprecated URL constructors in EEDefinitionTests
Browse files Browse the repository at this point in the history
Constants are being passed to it thus it's safe to switch to URI.
  • Loading branch information
akurtakov committed Jan 14, 2025
1 parent af2f63a commit 5ef64d0
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.io.File;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -164,7 +165,7 @@ public void testJavadocLocation() throws CoreException, MalformedURLException {
assertNotNull("Missing EE file", file);
ExecutionEnvironmentDescription ee = new ExecutionEnvironmentDescription(file);
URL location = EEVMType.getJavadocLocation(ee);
URL expectedLocation = new URL("http://a.javadoc.location");
URL expectedLocation = URI.create("http://a.javadoc.location").toURL();
assertEquals("Incorrect javadoc location", expectedLocation, location);
}

Expand All @@ -178,7 +179,7 @@ public void testIndexLocation() throws Exception {
assertNotNull("Missing EE file", file);
ExecutionEnvironmentDescription ee = new ExecutionEnvironmentDescription(file);
URL location = EEVMType.getIndexLocation(ee);
URL expectedLocation = new URL("http://a.index.location");
URL expectedLocation = URI.create("http://a.index.location").toURL();
assertEquals("Incorrect index location", expectedLocation, location);
}

Expand Down

0 comments on commit 5ef64d0

Please sign in to comment.