aboutsummaryrefslogtreecommitdiffstats
path: root/testing-util/src/main
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2021-03-21 17:34:09 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2021-03-21 17:34:09 +0700
commitecb5320c7b61d72edbf4a440e4996171a9c8f7dd (patch)
tree2b5496ad42ca47d0f3c7e636f2130dbb4d8b6e2c /testing-util/src/main
parente4a2a5a5d274bc16bae3d1178789752dba043730 (diff)
downloadaspectj-ecb5320c7b61d72edbf4a440e4996171a9c8f7dd.tar.gz
aspectj-ecb5320c7b61d72edbf4a440e4996171a9c8f7dd.zip
Fix some deprecated Java and JUnit warnings by using newer API calls
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'testing-util/src/main')
-rw-r--r--testing-util/src/main/java/org/aspectj/testing/util/TestUtil.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/testing-util/src/main/java/org/aspectj/testing/util/TestUtil.java b/testing-util/src/main/java/org/aspectj/testing/util/TestUtil.java
index ddd6a7caf..79ae9a776 100644
--- a/testing-util/src/main/java/org/aspectj/testing/util/TestUtil.java
+++ b/testing-util/src/main/java/org/aspectj/testing/util/TestUtil.java
@@ -40,13 +40,12 @@ import org.aspectj.util.Reflection;
import jdiff.text.FileLine;
import jdiff.util.Diff;
import jdiff.util.DiffNormalOutput;
-import junit.framework.Assert;
+import org.junit.Assert;
import junit.framework.AssertionFailedError;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestResult;
import junit.framework.TestSuite;
-import sun.net.www.ParseUtil;
/**
* Things that junit should perhaps have, but doesn't. Note the file-comparison methods require JDiff to run, but JDiff types are
@@ -163,7 +162,7 @@ public final class TestUtil {
public static URL fileToURL(File file) {
try {
- return file.toURL();
+ return file.toURI().toURL();
} catch (MalformedURLException e) {
return null;
}
@@ -303,7 +302,7 @@ public final class TestUtil {
public static URL libURL(String rpath) {
File file = libFile(rpath);
try {
- return file.toURL();
+ return file.toURI().toURL();
} catch (MalformedURLException e) {
throw new IllegalArgumentException("bad URL from: " + file);
}