diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-03-21 17:34:09 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-03-21 17:34:09 +0700 |
commit | ecb5320c7b61d72edbf4a440e4996171a9c8f7dd (patch) | |
tree | 2b5496ad42ca47d0f3c7e636f2130dbb4d8b6e2c /testing/src/test | |
parent | e4a2a5a5d274bc16bae3d1178789752dba043730 (diff) | |
download | aspectj-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/src/test')
4 files changed, 3 insertions, 4 deletions
diff --git a/testing/src/test/java/org/aspectj/testing/AutowiredXMLBasedAjcTestCase.java b/testing/src/test/java/org/aspectj/testing/AutowiredXMLBasedAjcTestCase.java index ca9a7f431..a0314017b 100644 --- a/testing/src/test/java/org/aspectj/testing/AutowiredXMLBasedAjcTestCase.java +++ b/testing/src/test/java/org/aspectj/testing/AutowiredXMLBasedAjcTestCase.java @@ -53,7 +53,7 @@ public abstract class AutowiredXMLBasedAjcTestCase extends XMLBasedAjcTestCase { // wire the spec file try { - final AutowiredXMLBasedAjcTestCase wired = (AutowiredXMLBasedAjcTestCase) testCaseClass.newInstance(); + final AutowiredXMLBasedAjcTestCase wired = (AutowiredXMLBasedAjcTestCase) testCaseClass.getDeclaredConstructor().newInstance(); System.out.println("LOADING SUITE: " + wired.getSpecFile().getPath()); Digester d = wired.getDigester(); try { diff --git a/testing/src/test/java/org/aspectj/testing/harness/bridge/AjcSpecTest.java b/testing/src/test/java/org/aspectj/testing/harness/bridge/AjcSpecTest.java index 2ff173362..5adf128e3 100644 --- a/testing/src/test/java/org/aspectj/testing/harness/bridge/AjcSpecTest.java +++ b/testing/src/test/java/org/aspectj/testing/harness/bridge/AjcSpecTest.java @@ -13,7 +13,6 @@ package org.aspectj.testing.harness.bridge; -import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; diff --git a/testing/src/test/java/org/aspectj/testing/util/options/OptionChecker.java b/testing/src/test/java/org/aspectj/testing/util/options/OptionChecker.java index 79d1ff286..6c30f97b1 100644 --- a/testing/src/test/java/org/aspectj/testing/util/options/OptionChecker.java +++ b/testing/src/test/java/org/aspectj/testing/util/options/OptionChecker.java @@ -16,7 +16,7 @@ import java.util.Arrays; import org.aspectj.testing.util.LangUtil; -import junit.framework.Assert; +import org.junit.Assert; /** * Drivers to test a given set of Options. diff --git a/testing/src/test/java/org/aspectj/testing/util/options/OptionsTest.java b/testing/src/test/java/org/aspectj/testing/util/options/OptionsTest.java index 5c380d739..f0f4f066c 100644 --- a/testing/src/test/java/org/aspectj/testing/util/options/OptionsTest.java +++ b/testing/src/test/java/org/aspectj/testing/util/options/OptionsTest.java @@ -14,7 +14,7 @@ package org.aspectj.testing.util.options; import org.aspectj.testing.util.options.Option.InvalidInputException; -import junit.framework.Assert; +import org.junit.Assert; import junit.framework.TestCase; /** |