From 68ad86eb6ed70c15ad4209295903a9a977b001f6 Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Sun, 21 Mar 2021 02:16:20 +0700 Subject: Add Java 16 test suite for AspectJ 1.9.7 + test refactorings - Test all features which were preview in 14+15 and are now final in 16, compiling them with language level 16. - For Java 15 we only have sanity tests (and of course the Java <14 tests), compiling Java 16 features to target 15 does not seem to work. - Test remaining Java 16 preview feature (sealed classes). - Instead of overriding runTest(String) in several base classes like XMLBasedAjcTestCaseForJava*Only or XMLBasedAjcTestCaseForJava*OrLater, we now override setUp() from JUnit's TestCase base class. This will run before runTest(String) and make the tests fail much faster, if a user tries to run them on the wrong VM. Signed-off-by: Alexander Kriegisch --- util/src/main/java/org/aspectj/util/LangUtil.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'util') diff --git a/util/src/main/java/org/aspectj/util/LangUtil.java b/util/src/main/java/org/aspectj/util/LangUtil.java index a0535d389..8128174aa 100644 --- a/util/src/main/java/org/aspectj/util/LangUtil.java +++ b/util/src/main/java/org/aspectj/util/LangUtil.java @@ -186,6 +186,10 @@ public class LangUtil { return 16 <= vmVersion; } + public static boolean is17VMOrGreater() { + return 17 <= vmVersion; + } + /** * Shorthand for "if null, throw IllegalArgumentException" * -- cgit v1.2.3