-#-Xlint:ignore,error,warning will set the level for all Xlint warnings. -Xlint, alone, is an abbreviation for
- -Xlint:warning.
+# -Xlint:ignore,error,warning will set the level for all Xlint warnings. -Xlint, alone, is an abbreviation for
+# -Xlint:warning.
+#
+# The -Xlintfile:lint.properties allows fine-grained control. In tools.jar, see
+# org/aspectj/weaver/XlintDefault.properties for the default behavior and a template to copy.
- The -Xlintfile:lint.properties allows fine-grained control. In tools.jar, see
- org/aspectj/weaver/XlintDefault.properties for the default behavior and a template to copy.
-### AspectJ-specific messages
+# TODO: This file contains many duplicates overwriting each other (last defined one supersedes previously defined ones,
+# e.g. 'configure.source' where the shorter message wins against the longer one explaining more) and generally looks
+# chaotic. Hence, duplicates should be removed and always the more desirable message chosen. Caveat: Tests might expect
+# compiler messages, parsing Ajc output. So do not break them or fix them after changes. Also consider that build
+# plugins for Maven, Gradle etc. and users in their own projects might parse the output too.
+
+### AspectJ-specific messages
compiler.name = AspectJ Compiler
-compiler.version = Eclipse Compiler 48c3f7668a46f2 (22Apr2020) - Java14
-compiler.copyright =
+compiler.version = Eclipse Compiler 3caefb8021d710 (09Mar2021) - Java15
+compiler.copyright =
## this next one superceded by above...
-## configure.version = AspectJ Compiler 1.1
+## configure.version = AspectJ Compiler 1.1
configure.directoryNotExist = invalid option: {0}
configure.unsupportedReleaseOption = option --release is supported only when run with JDK 9 or above
configure.unsupportedWithRelease = option {0} is not supported when --release is used
configure.unsupportedReleaseVersion = release version {0} is not supported
-configure.source = source level should be in ''1.1''...''1.8'',''9''...''14'' (or ''5.0''..''14.0''): {0}
+configure.source = source level should be in ''1.1''...''1.8'',''9''...''15'' (or ''5.0''..''15.0''): {0}
configure.invalidSystem = invalid location for system libraries: {0}
configure.unsupportedOption = option {0} not supported at compliance level 9 and above
configure.duplicateOutputPath = duplicate output path specification: {0}
configure.invalidWarningConfiguration = invalid warning configuration: ''{0}''
configure.invalidWarning = invalid warning token: ''{0}''. Ignoring warning and compiling
configure.invalidWarningOption = invalid warning option: ''{0}''. Must specify a warning token
-configure.targetJDK = target level should be in ''1.1''...''1.8'',''9''...''14'': {0}
+configure.targetJDK = target level should be in ''1.1''...''1.8'',''9''...''15'': {0}
configure.incompatibleTargetForSource = Target level ''{0}'' is incompatible with source level ''{1}''. A target level ''{1}'' or better is required
configure.incompatibleTargetForGenericSource = Target level ''{0}'' is incompatible with source level ''{1}''. A source level ''1.5'' or better is required
configure.incompatibleComplianceForSource = Compliance level ''{0}'' is incompatible with source level ''{1}''. A compliance level ''{1}'' or better is required
\ -11 for Java 11 (-source 11 -target 11)\n\
\ -12 for Java 12 (-source 12 -target 12)\n\
\ -13 for Java 13 (-source 13 -target 13)\n\
-\ -14 for Java 14 (-source 14 -target 14)\n\
-\ -source <version> set source level: 1.3 to 14 \n\
-\ -target <version> set classfile target: 1.1 to 14\n\
+\ -14 for Java 14 (-source 14 -target 14)\n\
+\ -15 for Java 14 (-source 15 -target 15)\n\
+\ -source <version> set source level: 1.3 to 15 \n\
+\ -target <version> set classfile target: 1.1 to 15\n\
\ \n\
\ Warning options:\n\
\ -deprecation + deprecation outside deprecated code (equivalent to\n\
\ invalidJavadocTag validate javadoc tag arguments\n\
\ invalidJavadocTagDep validate deprecated references in javadoc tag args\n\
\ invalidJavadocTagNotVisible validate non-visible references in javadoc\n\
-\ tag args\n\
+\ tag args\n\
\ invalidJavadocVisibility(<visibility>) specify visibility modifier\n\
-\ for malformed javadoc tag warnings\n\
+\ for malformed javadoc tag warnings\n\
\ javadoc invalid javadoc\n\
\ localHiding local variable hiding another variable\n\
\ maskedCatchBlock + hidden catch block\n\
\ missingJavadocTagsOverriding missing Javadoc tags in overriding methods\n\
\ missingJavadocTagsMethod missing Javadoc tags for method type parameter\n\
\ missingJavadocTagsVisibility(<visibility>) specify visibility modifier\n\
-\ for missing javadoc tags warnings\n\
+\ for missing javadoc tags warnings\n\
\ missingJavadocComments missing Javadoc comments\n\
\ missingJavadocCommentsOverriding missing Javadoc tags in overriding\n\
-\ methods\n\
+\ methods\n\
\ missingJavadocCommentsVisibility(<visibility>) specify visibility\n\
-\ modifier for missing javadoc comments warnings\n\
+\ modifier for missing javadoc comments warnings\n\
\ nls string literal lacking non-nls tag //$NON-NLS-<n>$\n\
\ noEffectAssign + assignment without effect\n\
\ null potential missing or redundant null check\n\
\ nullAnnot(<annot. names separated by |>) annotation based null analysis,\n\
\ nullable|nonnull|nonnullbydefault annotation types\n\
\ optionally specified using fully qualified names.\n\
-\ Enabling this option enables all null-annotation\n\
-\ related sub-options. These can be individually\n\
-\ controlled using options listed below.\n\
+\ Enabling this option enables all null-annotation\n\
+\ related sub-options. These can be individually\n\
+\ controlled using options listed below.\n\
\ nullAnnotConflict conflict between null annotation specified\n\
-\ and nullness inferred. Is effective only with\n\
-\ nullAnnot option enabled.\n\
+\ and nullness inferred. Is effective only with\n\
+\ nullAnnot option enabled.\n\
\ nullAnnotRedundant redundant specification of null annotation. Is\n\
-\ effective only with nullAnnot option enabled.\n\
+\ effective only with nullAnnot option enabled.\n\
\ nullDereference + missing null check\n\
-\ nullUncheckedConversion unchecked conversion from non-annotated type\n\
-\ to @NonNull type. Is effective only with\n\
-\ nullAnnot option enabled.\n\
+\ nullUncheckedConversion unchecked conversion from non-annotated type\n\
+\ to @NonNull type. Is effective only with\n\
+\ nullAnnot option enabled.\n\
\ over-ann missing @Override annotation (superclass)\n\
\ paramAssign assignment to a parameter\n\
\ pkgDefaultMethod + attempt to override package-default method\n\
\ tasks(<tags separated by |>) tasks identified by tags inside comments\n\
\ typeHiding + type parameter hiding another type\n\
\ unavoidableGenericProblems + ignore unavoidable type safety problems\n\
-\ due to raw APIs\n\
+\ due to raw APIs\n\
\ unchecked + unchecked type operation\n\
\ unlikelyCollectionMethodArgumentType\n\
\ + unlikely argument type for collection method\n\
\ unnecessaryElse unnecessary else clause\n\
\ unqualifiedField unqualified reference to field\n\
\ unused macro for unusedAllocation, unusedArgument,\n\
-\ unusedImport, unusedLabel, unusedLocal,\n\
-\ unusedPrivate, unusedThrown, and unusedTypeArgs,\n\
-\ unusedExceptionParam\n\
+\ unusedImport, unusedLabel, unusedLocal,\n\
+\ unusedPrivate, unusedThrown, and unusedTypeArgs,\n\
+\ unusedExceptionParam\n\
\ unusedAllocation allocating an object that is not used\n\
\ unusedArgument unread method parameter\n\
\ unusedExceptionParam unread exception parameter\n\
\ unusedImport + unused import declaration\n\
\ unusedLabel + unused label\n\
\ unusedLocal + unread local variable\n\
-\ unusedParam unused parameter\n\
+\ unusedParam unused parameter\n\
\ unusedParamOverriding unused parameter for overriding method\n\
\ unusedParamImplementing unused parameter for implementing method\n\
\ unusedParamIncludeDoc unused parameter documented in comment tag\n\
\ unusedPrivate + unused private member declaration\n\
\ unusedThrown unused declared thrown exception\n\
\ unusedThrownWhenOverriding unused declared thrown exception in \n\
-\ overriding method\n\
+\ overriding method\n\
\ unusedThrownIncludeDocComment unused declared thrown exception,\n\
-\ documented in a comment tag\n\
+\ documented in a comment tag\n\
\ unusedThrownExemptExceptionThrowable unused declared thrown exception,\n\
-\ exempt Exception and Throwable\n\
+\ exempt Exception and Throwable\n\
\ unusedTypeArgs + unused type arguments for method and constructor\n\
\ uselessTypeCheck unnecessary cast/instanceof operation\n\
\ varargsCast + varargs argument need explicit cast\n\
###############################################################################
# Copyright (c) 2000, 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
+# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
-#
+#
# Contributors:
# IBM Corporation - initial API and implementation
###############################################################################
### JavaBatchCompiler messages.
-### compiler
+### compiler
#compiler.name = Eclipse Java Compiler
#compiler.version = 0.396
#compiler.copyright = Copyright IBM Corp 2000, 2003. All rights reserved.
configure.invalidWarningConfiguration = invalid warning configuration: {0}
configure.invalidWarning = invalid warning: {0}
configure.invalidWarningOption = invalid warning option: {0}
-configure.targetJDK = target level should be in ''1.1''...''1.8'',''9''...''14'': {0}
+configure.targetJDK = target level should be in ''1.1''...''1.8'',''9''...''15'': {0}
configure.incompatibleTargetForSource14 = ''1.4'' source mode requires ''-target 1.4'' : {0}
configure.incompatibleComplianceForSource14 = ''1.4'' source mode requires ''-1.4'' compliance mode: {0}
configure.incompatibleComplianceForTarget14 = ''1.4'' target mode requires ''-1.4'' compliance mode: {0}
public static final String COMMAND_EDITOR_NAME = AjcTask.class.getName() + ".COMMAND_EDITOR";
- 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" };
- 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" };
- 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" };
+ 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" };
+ 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" };
+ 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" };
private static final ICommandEditor COMMAND_EDITOR;
*/
public class AjcTest {
- // private static boolean is13VMOrGreater = true;
+ // private static boolean is1dot3VMOrGreater = true;
private static boolean is1dot4VMOrGreater = true;
- private static boolean is15VMOrGreater = false;
- private static boolean is16VMOrGreater = false;
- private static boolean is17VMOrGreater = false;
- private static boolean is18VMOrGreater = false;
- private static boolean is19VMOrGreater = false;
- private static boolean is10VMOrGreater = false;
- private static boolean is11VMOrGreater = false;
- private static boolean is12VMOrGreater = false;
- private static boolean is13VMOrGreater = false;
- private static boolean is14VMOrGreater = false;
-
- static { // matching logic is also in org.aspectj.util.LangUtil
- is1dot4VMOrGreater = true;
- is15VMOrGreater = true;
- is16VMOrGreater = true;
- is17VMOrGreater = true;
- is18VMOrGreater = true;
- is19VMOrGreater = LangUtil.is9VMOrGreater();
- is10VMOrGreater = LangUtil.is10VMOrGreater();
- is11VMOrGreater = LangUtil.is11VMOrGreater();
- is12VMOrGreater = LangUtil.is12VMOrGreater();
- is13VMOrGreater = LangUtil.is13VMOrGreater();
- is14VMOrGreater = LangUtil.is14VMOrGreater();
- }
+ private static boolean is1dot5VMOrGreater = true;
+ 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 List<ITestStep> testSteps = new ArrayList<>();
if (vmLevel.equals("1.3")) return true;
boolean canRun = true;
if (vmLevel.equals("1.4")) canRun = is1dot4VMOrGreater;
- if (vmLevel.equals("1.5")) canRun = is15VMOrGreater;
- if (vmLevel.equals("1.6")) canRun = is16VMOrGreater;
- if (vmLevel.equals("1.7")) canRun = is17VMOrGreater;
- if (vmLevel.equals("1.8")) canRun = is18VMOrGreater;
- if (vmLevel.equals("1.9")) canRun = is19VMOrGreater;
+ if (vmLevel.equals("1.5")) canRun = is1dot5VMOrGreater;
+ if (vmLevel.equals("1.6")) canRun = is1dot6VMOrGreater;
+ if (vmLevel.equals("1.7")) canRun = is1dot7VMOrGreater;
+ if (vmLevel.equals("1.8")) canRun = is1dot8VMOrGreater;
+ if (vmLevel.equals("1.9")) canRun = is9VMOrGreater;
if (vmLevel.equals("10")) canRun = is10VMOrGreater;
if (vmLevel.equals("11")) canRun = is11VMOrGreater;
if (vmLevel.equals("12")) canRun = is12VMOrGreater;