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 /org.aspectj.ajdt.core/src | |
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 'org.aspectj.ajdt.core/src')
3 files changed, 3 insertions, 3 deletions
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/ajc/BuildArgParser.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/ajc/BuildArgParser.java index 202abcadd..8548ce51e 100644 --- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/ajc/BuildArgParser.java +++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/ajc/BuildArgParser.java @@ -350,7 +350,7 @@ public class BuildArgParser extends Main { List<String> ret = new ArrayList<>(); if (parser.bootclasspath == null) { - if (LangUtil.is9VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(9)) { addClasspath(LangUtil.getJrtFsFilePath(),ret); } else { addClasspath(System.getProperty("sun.boot.class.path", ""), ret); diff --git a/org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/CommandTestCase.java b/org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/CommandTestCase.java index e259bf6d3..794ee351c 100644 --- a/org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/CommandTestCase.java +++ b/org.aspectj.ajdt.core/src/test/java/org/aspectj/ajdt/internal/compiler/batch/CommandTestCase.java @@ -169,7 +169,7 @@ public abstract class CommandTestCase extends TestCase { /** get the location of the org.aspectj.lang & runtime classes */ protected static String getRuntimeClasspath() { StringBuilder classpath = new StringBuilder(); - if (LangUtil.is9VMOrGreater()) { + if (LangUtil.isVMGreaterOrEqual(9)) { classpath.append(LangUtil.getJrtFsFilePath()).append(File.pathSeparator); } classpath.append(Constants.aspectjrtClasspath()); diff --git a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java index 6fb2d2602..11b90c3b7 100644 --- a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java +++ b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java @@ -960,7 +960,7 @@ public abstract class AjcTestCase extends TestCase { args = newargs; } } - boolean needsJRTFS = LangUtil.is9VMOrGreater(); + boolean needsJRTFS = LangUtil.isVMGreaterOrEqual(9); if (needsJRTFS) { if (!args[cpIndex].contains(LangUtil.JRT_FS)) { String jrtfsPath = LangUtil.getJrtFsFilePath(); |