diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2024-02-19 10:22:10 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2024-02-19 11:21:19 +0700 |
commit | 198957fd26d1e5cd347c0c1c3a0c9100295af4cf (patch) | |
tree | 38e4be75f6abf612b04cf4a938607a5acbe5f370 /testing | |
parent | 08d0c4435b61512f55f8d0e357b09496fdbe155a (diff) | |
download | aspectj-198957fd26d1e5cd347c0c1c3a0c9100295af4cf.tar.gz aspectj-198957fd26d1e5cd347c0c1c3a0c9100295af4cf.zip |
LangUtil: remove methods like 'is11VMOrGreater', 'is1dot5VMOrGreater'
Replace them by a uniform method 'isVMGreaterOrEqual(double)', also
overloaded for int.
This gets rid of one 'AspectJ_JDK_Update' tag. One less place to check
and update with each newly supported Java version. :-)
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'testing')
25 files changed, 40 insertions, 36 deletions
diff --git a/testing/src/test/java/org/aspectj/testing/AjcTest.java b/testing/src/test/java/org/aspectj/testing/AjcTest.java index 5ae803205..8686e87b9 100644 --- a/testing/src/test/java/org/aspectj/testing/AjcTest.java +++ b/testing/src/test/java/org/aspectj/testing/AjcTest.java @@ -26,13 +26,13 @@ public class AjcTest { private static boolean is1dot6VMOrGreater = true; private static boolean is1dot7VMOrGreater = true; private static boolean is1dot8VMOrGreater = true; - private static boolean is9VMOrGreater = LangUtil.is9VMOrGreater(); - private static boolean is10VMOrGreater = LangUtil.is10VMOrGreater(); - private static boolean is11VMOrGreater = LangUtil.is11VMOrGreater(); - private static boolean is12VMOrGreater = LangUtil.is12VMOrGreater(); - private static boolean is13VMOrGreater = LangUtil.is13VMOrGreater(); - private static boolean is14VMOrGreater = LangUtil.is14VMOrGreater(); - private static boolean is15VMOrGreater = LangUtil.is15VMOrGreater(); + private static boolean is9VMOrGreater = LangUtil.isVMGreaterOrEqual(9); + private static boolean is10VMOrGreater = LangUtil.isVMGreaterOrEqual(10); + private static boolean is11VMOrGreater = LangUtil.isVMGreaterOrEqual(11); + private static boolean is12VMOrGreater = LangUtil.isVMGreaterOrEqual(12); + private static boolean is13VMOrGreater = LangUtil.isVMGreaterOrEqual(13); + private static boolean is14VMOrGreater = LangUtil.isVMGreaterOrEqual(14); + private static boolean is15VMOrGreater = LangUtil.isVMGreaterOrEqual(15); private List<ITestStep> testSteps = new ArrayList<>(); diff --git a/testing/src/test/java/org/aspectj/testing/AntSpec.java b/testing/src/test/java/org/aspectj/testing/AntSpec.java index 33668d509..927749657 100644 --- a/testing/src/test/java/org/aspectj/testing/AntSpec.java +++ b/testing/src/test/java/org/aspectj/testing/AntSpec.java @@ -25,8 +25,7 @@ import org.apache.tools.ant.Target; import org.apache.tools.ant.taskdefs.Java; import org.apache.tools.ant.types.Path; import org.aspectj.tools.ajc.AjcTestCase; - -import static org.aspectj.util.LangUtil.is16VMOrGreater; +import org.aspectj.util.LangUtil; /** * Element that allow to run an abritrary Ant target in a sandbox. @@ -110,8 +109,14 @@ public class AntSpec implements ITestStep { // // Attention: Ant 1.6.3 under Linux neither likes "" (empty string) nor " " (space), on Windows it would not be // a problem. So we use "_dummy" Java system properties, even though they pollute the command line. - p.setUserProperty("aj.addOpensKey", is16VMOrGreater() ? "--add-opens" : "-D_dummy"); - p.setUserProperty("aj.addOpensValue", is16VMOrGreater() ? "java.base/java.lang=ALL-UNNAMED" : "-D_dummy"); + p.setUserProperty( + "aj.addOpensKey", + LangUtil.isVMGreaterOrEqual(16) ? "--add-opens" : "-D_dummy" + ); + p.setUserProperty( + "aj.addOpensValue", + LangUtil.isVMGreaterOrEqual(16) ? "java.base/java.lang=ALL-UNNAMED" : "-D_dummy" + ); // create the test implicit path aj.path that contains the sandbox + regular test infra path Path path = new Path(p, inTestCase.getSandboxDirectory().getAbsolutePath()); diff --git a/testing/src/test/java/org/aspectj/testing/RunSpec.java b/testing/src/test/java/org/aspectj/testing/RunSpec.java index 4d7526f44..259f675d8 100644 --- a/testing/src/test/java/org/aspectj/testing/RunSpec.java +++ b/testing/src/test/java/org/aspectj/testing/RunSpec.java @@ -21,8 +21,7 @@ import java.util.StringTokenizer; import org.aspectj.tools.ajc.AjcTestCase; import org.aspectj.util.FileUtil; - -import static org.aspectj.util.LangUtil.is16VMOrGreater; +import org.aspectj.util.LangUtil; /** * @author Adrian Colyer @@ -82,7 +81,7 @@ public class RunSpec implements ITestStep { // unwanted illegal access warnings during weaving in 'useFullLTW' mode, either making existing tests fail or // having to assert on the warning messages. // - // vmargs += is16VMOrGreater() ? " --add-opens java.base/java.lang=ALL-UNNAMED" : ""; + // vmargs += LangUtil.isVMGreaterOrEqual(16) ? " --add-opens java.base/java.lang=ALL-UNNAMED" : ""; AjcTestCase.RunResult rr = inTestCase.run(getClassToRun(), getModuleToRun(), args, vmargs, getClasspath(), getModulepath(), useLtw, "true".equalsIgnoreCase(usefullltw)); diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava10OrLater.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava10OrLater.java index cde3c077e..c7d67e4ab 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava10OrLater.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava10OrLater.java @@ -22,7 +22,7 @@ public abstract class XMLBasedAjcTestCaseForJava10OrLater extends XMLBasedAjcTes @Override public void setUp() throws Exception { - if (!LangUtil.is10VMOrGreater()) + if (!LangUtil.isVMGreaterOrEqual(10)) throw new IllegalStateException("These tests should be run on Java 10 or later"); super.setUp(); } diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava11OrLater.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava11OrLater.java index 2083f462e..08f0e0d78 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava11OrLater.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava11OrLater.java @@ -22,7 +22,7 @@ public abstract class XMLBasedAjcTestCaseForJava11OrLater extends XMLBasedAjcTes @Override public void setUp() throws Exception { - if (!LangUtil.is11VMOrGreater()) + if (!LangUtil.isVMGreaterOrEqual(11)) throw new IllegalStateException("These tests should be run on Java 11 or later"); super.setUp(); } diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava12OrLater.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava12OrLater.java index 86da7d4a4..fdd94de51 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava12OrLater.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava12OrLater.java @@ -22,7 +22,7 @@ public abstract class XMLBasedAjcTestCaseForJava12OrLater extends XMLBasedAjcTes @Override public void setUp() throws Exception { - if (!LangUtil.is12VMOrGreater()) + if (!LangUtil.isVMGreaterOrEqual(12)) throw new IllegalStateException("These tests should be run on Java 12 or later"); super.setUp(); } diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava13OrLater.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava13OrLater.java index a280f157f..635785c20 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava13OrLater.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava13OrLater.java @@ -22,7 +22,7 @@ public abstract class XMLBasedAjcTestCaseForJava13OrLater extends XMLBasedAjcTes @Override public void setUp() throws Exception { - if (!LangUtil.is13VMOrGreater()) + if (!LangUtil.isVMGreaterOrEqual(13)) throw new IllegalStateException("These tests should be run on Java 13 or later"); super.setUp(); } diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava14Only.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava14Only.java index 70ebef477..e4c864049 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava14Only.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava14Only.java @@ -25,7 +25,7 @@ public abstract class XMLBasedAjcTestCaseForJava14Only extends XMLBasedAjcTestCa ); // Activate this block before upgrading to JDT Core Java 15 /* - if (!LangUtil.is14VMOrGreater() || LangUtil.is15VMOrGreater()) { + if (!LangUtil.isVMGreaterOrEqual(14) || LangUtil.isVMGreaterOrEqual(15)) { throw new IllegalStateException( "These tests should be run on Java 14 only " + "(e.g. because they use version-specific preview features)" diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava14OrLater.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava14OrLater.java index d147c572f..7f6b7c7d3 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava14OrLater.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava14OrLater.java @@ -19,7 +19,7 @@ public abstract class XMLBasedAjcTestCaseForJava14OrLater extends XMLBasedAjcTes @Override public void setUp() throws Exception { - if (!LangUtil.is14VMOrGreater()) + if (!LangUtil.isVMGreaterOrEqual(14)) throw new IllegalStateException("These tests should be run on Java 14 or later"); super.setUp(); } diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava15Only.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava15Only.java index 5b64445a9..dd6ef21e5 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava15Only.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava15Only.java @@ -25,7 +25,7 @@ public abstract class XMLBasedAjcTestCaseForJava15Only extends XMLBasedAjcTestCa ); // Activate this block before upgrading to JDT Core Java 16 /* - if (!LangUtil.is15VMOrGreater() || LangUtil.is16VMOrGreater()) { + if (!LangUtil.isVMGreaterOrEqual(15) || LangUtil.isVMGreaterOrEqual(16)) { throw new IllegalStateException( "These tests should be run on Java 15 only " + "(e.g. because they use version-specific preview features)" diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava15OrLater.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava15OrLater.java index 3027825a2..ad5f3e108 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava15OrLater.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava15OrLater.java @@ -19,7 +19,7 @@ public abstract class XMLBasedAjcTestCaseForJava15OrLater extends XMLBasedAjcTes @Override public void setUp() throws Exception { - if (!LangUtil.is15VMOrGreater()) + if (!LangUtil.isVMGreaterOrEqual(15)) throw new IllegalStateException("These tests should be run on Java 15 or later"); super.setUp(); } diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava16Only.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava16Only.java index 115e01289..794d5276d 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava16Only.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava16Only.java @@ -27,7 +27,7 @@ public abstract class XMLBasedAjcTestCaseForJava16Only extends XMLBasedAjcTestCa ); // Activate this block before upgrading to JDT Core Java 17 /* - if (!LangUtil.is16VMOrGreater() || LangUtil.is17VMOrGreater()) { + if (!LangUtil.isVMGreaterOrEqual(16) || LangUtil.isVMGreaterOrEqual(17)) { throw new IllegalStateException( "These tests should be run on Java 16 only " + "(e.g. because they use version-specific preview features)" diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava16OrLater.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava16OrLater.java index 7f5da29b0..3a763af47 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava16OrLater.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava16OrLater.java @@ -19,7 +19,7 @@ public abstract class XMLBasedAjcTestCaseForJava16OrLater extends XMLBasedAjcTes @Override public void setUp() throws Exception { - if (!LangUtil.is16VMOrGreater()) + if (!LangUtil.isVMGreaterOrEqual(16)) throw new IllegalStateException("These tests should be run on Java 16 or later"); super.setUp(); } diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava17Only.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava17Only.java index 78941fcab..eeb681b6d 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava17Only.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava17Only.java @@ -27,7 +27,7 @@ public abstract class XMLBasedAjcTestCaseForJava17Only extends XMLBasedAjcTestCa ); // Activate this block before upgrading to JDT Core Java 18 /* - if (!LangUtil.is17VMOrGreater() || LangUtil.is18VMOrGreater()) { + if (!LangUtil.isVMGreaterOrEqual(17) || LangUtil.isVMGreaterOrEqual(18)) { throw new IllegalStateException( "These tests should be run on Java 17 only " + "(e.g. because they use version-specific preview features)" diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava17OrLater.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava17OrLater.java index 1e18e2f7a..bb32898b1 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava17OrLater.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava17OrLater.java @@ -19,7 +19,7 @@ public abstract class XMLBasedAjcTestCaseForJava17OrLater extends XMLBasedAjcTes @Override public void setUp() throws Exception { - if (!LangUtil.is17VMOrGreater()) + if (!LangUtil.isVMGreaterOrEqual(17)) throw new IllegalStateException("These tests should be run on Java 17 or later"); super.setUp(); } diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava18Only.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava18Only.java index fade6c92f..21c1dce4f 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava18Only.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava18Only.java @@ -27,7 +27,7 @@ public abstract class XMLBasedAjcTestCaseForJava18Only extends XMLBasedAjcTestCa ); // Activate this block before upgrading to JDT Core Java 19 /* - if (!LangUtil.is18VMOrGreater() || LangUtil.is19VMOrGreater()) { + if (!LangUtil.isVMGreaterOrEqual(18) || LangUtil.isVMGreaterOrEqual(19)) { throw new IllegalStateException( "These tests should be run on Java 18 only " + "(e.g. because they use version-specific preview features)" diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava18OrLater.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava18OrLater.java index 20e26862f..65fcc325e 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava18OrLater.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava18OrLater.java @@ -19,7 +19,7 @@ public abstract class XMLBasedAjcTestCaseForJava18OrLater extends XMLBasedAjcTes @Override public void setUp() throws Exception { - if (!LangUtil.is18VMOrGreater()) + if (!LangUtil.isVMGreaterOrEqual(18)) throw new IllegalStateException("These tests should be run on Java 18 or later"); super.setUp(); } diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava19Only.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava19Only.java index 36b642c30..e931bc3f9 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava19Only.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava19Only.java @@ -27,7 +27,7 @@ public abstract class XMLBasedAjcTestCaseForJava19Only extends XMLBasedAjcTestCa ); // Activate this block before upgrading to JDT Core Java 20 /* - if (!LangUtil.is19VMOrGreater() || LangUtil.is20VMOrGreater()) { + if (!LangUtil.isVMGreaterOrEqual(19) || LangUtil.isVMGreaterOrEqual(20)) { throw new IllegalStateException( "These tests should be run on Java 19 only " + "(e.g. because they use version-specific preview features)" diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava19OrLater.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava19OrLater.java index 95beffef5..e33862f32 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava19OrLater.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava19OrLater.java @@ -19,7 +19,7 @@ public abstract class XMLBasedAjcTestCaseForJava19OrLater extends XMLBasedAjcTes @Override public void setUp() throws Exception { - if (!LangUtil.is19VMOrGreater()) + if (!LangUtil.isVMGreaterOrEqual(19)) throw new IllegalStateException("These tests should be run on Java 19 or later"); super.setUp(); } diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava20Only.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava20Only.java index 4e0567d0d..43b50a6bc 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava20Only.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava20Only.java @@ -27,7 +27,7 @@ public abstract class XMLBasedAjcTestCaseForJava20Only extends XMLBasedAjcTestCa ); // Activate this block before upgrading to JDT Core Java 21 /* - if (!LangUtil.is20VMOrGreater() || LangUtil.is21VMOrGreater()) { + if (!LangUtil.isVMGreaterOrEqual(20) || LangUtil.isVMGreaterOrEqual(21)) { throw new IllegalStateException( "These tests should be run on Java 20 only " + "(e.g. because they use version-specific preview features)" diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava20OrLater.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava20OrLater.java index 352136529..1289d9672 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava20OrLater.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava20OrLater.java @@ -19,7 +19,7 @@ public abstract class XMLBasedAjcTestCaseForJava20OrLater extends XMLBasedAjcTes @Override public void setUp() throws Exception { - if (!LangUtil.is20VMOrGreater()) + if (!LangUtil.isVMGreaterOrEqual(20)) throw new IllegalStateException("These tests should be run on Java 20 or later"); super.setUp(); } diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava21Only.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava21Only.java index 2c582c106..3014e1a96 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava21Only.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava21Only.java @@ -30,7 +30,7 @@ public abstract class XMLBasedAjcTestCaseForJava21Only extends XMLBasedAjcTestCa */ // AspectJ_JDK_Update // Activate this block before upgrading to JDT Core Java 22 - if (!LangUtil.is21VMOrGreater() || LangUtil.is22VMOrGreater()) { + if (!LangUtil.isVMGreaterOrEqual(21) || LangUtil.isVMGreaterOrEqual(22)) { throw new IllegalStateException( "These tests should be run on Java 21 only " + "(e.g. because they use version-specific preview features)" diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava21OrLater.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava21OrLater.java index 4c1d59d15..11fc3ba7f 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava21OrLater.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava21OrLater.java @@ -19,7 +19,7 @@ public abstract class XMLBasedAjcTestCaseForJava21OrLater extends XMLBasedAjcTes @Override public void setUp() throws Exception { - if (!LangUtil.is21VMOrGreater()) + if (!LangUtil.isVMGreaterOrEqual(21)) throw new IllegalStateException("These tests should be run on Java 21 or later"); super.setUp(); } diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava9OrLater.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava9OrLater.java index 5a8ae0b01..d5decf8b9 100644 --- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava9OrLater.java +++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCaseForJava9OrLater.java @@ -22,7 +22,7 @@ public abstract class XMLBasedAjcTestCaseForJava9OrLater extends XMLBasedAjcTest @Override public void setUp() throws Exception { - if (!LangUtil.is9VMOrGreater()) + if (!LangUtil.isVMGreaterOrEqual(9)) throw new IllegalStateException("These tests should be run on Java 9 or later"); super.setUp(); } diff --git a/testing/src/test/java/org/aspectj/testing/taskdefs/AjcTaskCompileCommandTest.java b/testing/src/test/java/org/aspectj/testing/taskdefs/AjcTaskCompileCommandTest.java index 94ed0767d..70dfffbb8 100644 --- a/testing/src/test/java/org/aspectj/testing/taskdefs/AjcTaskCompileCommandTest.java +++ b/testing/src/test/java/org/aspectj/testing/taskdefs/AjcTaskCompileCommandTest.java @@ -48,7 +48,7 @@ public class AjcTaskCompileCommandTest extends TestCase { list.add("-classpath"); StringBuilder classpath = new StringBuilder(); classpath.append(Globals.F_aspectjrt_jar.getAbsolutePath()); - if (LangUtil.is9VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(9)) { classpath.append(File.pathSeparator).append(LangUtil.getJrtFsFilePath()); } list.add(classpath.toString()); |