From c540b0f60ef5e46b33cad1b23c36d1c51af82aef Mon Sep 17 00:00:00 2001 From: Alexander Kriegisch Date: Sat, 1 Oct 2022 17:51:45 +0200 Subject: First Java 19 version, barely tested. Signed-off-by: Alexander Kriegisch --- .../org/aspectj/ajdt/internal/core/builder/AjBuildNotifier.java | 7 ++++--- .../org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java | 5 +++-- pom.xml | 4 ++-- taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java | 6 +++--- util/src/main/java/org/aspectj/util/LangUtil.java | 4 ++++ 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildNotifier.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildNotifier.java index 1a82cb6a0..53fb5750c 100644 --- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildNotifier.java +++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildNotifier.java @@ -11,10 +11,11 @@ package org.aspectj.ajdt.internal.core.builder; import org.aspectj.bridge.IProgressListener; -import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IProgressMonitor; import org.aspectj.org.eclipse.jdt.internal.core.builder.BuildNotifier; +import java.util.function.BooleanSupplier; + /** * @author colyer * @@ -26,8 +27,8 @@ public class AjBuildNotifier extends BuildNotifier implements IProgressListener * @param monitor * @param project */ - public AjBuildNotifier(IProgressMonitor monitor, IProject project) { - super(monitor, project); + public AjBuildNotifier(IProgressMonitor monitor, int buildKind, BooleanSupplier interruptSupplier) { + super(monitor, buildKind, interruptSupplier); } /* (non-Javadoc) diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java index 6435903c8..f352a7690 100644 --- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java +++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AspectJBuilder.java @@ -16,6 +16,7 @@ import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.Properties; +import java.util.function.BooleanSupplier; import org.aspectj.ajdt.core.AspectJCore; import org.aspectj.ajdt.internal.compiler.CompilerAdapter; @@ -149,8 +150,8 @@ public class AspectJBuilder extends JavaBuilder implements ICompilerAdapterFacto * @see org.eclipse.jdt.internal.core.builder.JavaBuilder#createBuildNotifier(org.eclipse.core.runtime.IProgressMonitor, * org.eclipse.core.resources.IProject) */ - protected BuildNotifier createBuildNotifier(IProgressMonitor monitor, IProject currentProject) { - return new AjBuildNotifier(monitor, currentProject); + protected BuildNotifier createBuildNotifier(IProgressMonitor monitor, int buildKind, BooleanSupplier interruptSupplier) { + return new AjBuildNotifier(monitor, buildKind, interruptSupplier); } private void initWorldAndWeaver(AjCompilerOptions options) { diff --git a/pom.xml b/pom.xml index 07777058c..41805cbf8 100644 --- a/pom.xml +++ b/pom.xml @@ -21,8 +21,8 @@ true - 1.9.9.1 - 9.2 + 1.9.10-SNAPSHOT + 9.3 1.6.3 2.6.2 1.2 diff --git a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java index 650fdc4e5..dc83ed7fa 100644 --- a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java +++ b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java @@ -252,15 +252,15 @@ public class AjcTask extends MatchingTask { static final String[] TARGET_INPUTS = new String[] { "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18" + "10", "11", "12", "13", "14", "15", "16", "17", "18", "19" }; static final String[] SOURCE_INPUTS = new String[] { "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "9", - "10", "11", "12", "13", "14", "15", "16", "17", "18" + "10", "11", "12", "13", "14", "15", "16", "17", "18", "19" }; static final String[] COMPLIANCE_INPUTS = new String[] { "-1.3", "-1.4", "-1.5", "-1.6", "-1.7", "-1.8", "-1.9", "-9", - "-10", "-11", "-12", "-13", "-14", "-15", "-16", "-17", "-18" + "-10", "-11", "-12", "-13", "-14", "-15", "-16", "-17", "-18", "-19" }; private static final ICommandEditor COMMAND_EDITOR; diff --git a/util/src/main/java/org/aspectj/util/LangUtil.java b/util/src/main/java/org/aspectj/util/LangUtil.java index d916002b6..944e95040 100644 --- a/util/src/main/java/org/aspectj/util/LangUtil.java +++ b/util/src/main/java/org/aspectj/util/LangUtil.java @@ -182,6 +182,10 @@ public class LangUtil { return 19 <= vmVersion; } + public static boolean is20VMOrGreater() { + return 20 <= vmVersion; + } + /** * Shorthand for "if null, throw IllegalArgumentException" * -- cgit v1.2.3