aboutsummaryrefslogtreecommitdiffstats
path: root/util/src/main/java/org
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2024-02-19 22:01:05 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2024-02-19 22:01:05 +0700
commit47db35bb48a1ef0919dff62521ca38cd7cf3ccec (patch)
treefce4041a52368870ec8beb8eb5b9a16f36b98ecc /util/src/main/java/org
parent4e4641f8cc06176377a1faf8378e93df9bf248e1 (diff)
downloadaspectj-47db35bb48a1ef0919dff62521ca38cd7cf3ccec.tar.gz
aspectj-47db35bb48a1ef0919dff62521ca38cd7cf3ccec.zip
New abstract class JavaVersionSpecificXMLBasedAjcTestCase
Replaces now obsolete base classes - XMLBasedAjcTestCaseForJava[n]OrLater, - XMLBasedAjcTestCaseForJava[n]Only. The new class is parametrised with minimum and maximum Java version and hence can replace all the other classes. This does not only apply the DRY principle, but also makes adding tests for new Java versions less tedious. By chance, I also noticed missing sanity tests for Java 12, which I added as a little drive-by benefit. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'util/src/main/java/org')
-rw-r--r--util/src/main/java/org/aspectj/util/LangUtil.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/util/src/main/java/org/aspectj/util/LangUtil.java b/util/src/main/java/org/aspectj/util/LangUtil.java
index baf8d440e..f686cd1a3 100644
--- a/util/src/main/java/org/aspectj/util/LangUtil.java
+++ b/util/src/main/java/org/aspectj/util/LangUtil.java
@@ -115,7 +115,15 @@ public class LangUtil {
}
public static boolean isVMGreaterOrEqual(double javaVersion) {
- return javaVersion <= vmVersion;
+ return vmVersion >= javaVersion;
+ }
+
+ public static boolean isVMLessOrEqual(int javaVersion) {
+ return isVMLessOrEqual((double) javaVersion);
+ }
+
+ public static boolean isVMLessOrEqual(double javaVersion) {
+ return vmVersion <= javaVersion;
}
/**