Merge remote-tracking branch 'origin/master' into BETA_JAVA_12
# Conflicts:
# org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
# org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModuleBuilderTests.java
# org.eclipse.jdt.core/.settings/.api_filters
Change-Id: I7351312d837aae17f871e39eb1011055c6ca991a
diff --git a/README.md b/README.md
index 40229f2..b3b0be7 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
* a Java source code formatter
* APIs for code assist, access to the AST and structured manipulation of Java source.
-For more information, refer to the [JDT wiki page] [1] or the [JDT project overview page] [2].
+For more information and important links, refer to the [JDT wiki page] [1] or the [JDT project overview page] [2].
License
-------
@@ -16,5 +16,5 @@
[Eclipse Public License (EPL) v1.0][3]
[1]: http://wiki.eclipse.org/JDT_Core
-[2]: http://www.eclipse.org/projects/project.php?id=eclipse.jdt.core
+[2]: http://www.eclipse.org/projects/project.php?id=eclipse.jdt
[3]: http://wiki.eclipse.org/EPL
diff --git a/org.eclipse.jdt.annotation/pom.xml b/org.eclipse.jdt.annotation/pom.xml
index 640959c..8e3630d 100644
--- a/org.eclipse.jdt.annotation/pom.xml
+++ b/org.eclipse.jdt.annotation/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>eclipse.jdt.core</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.annotation</artifactId>
diff --git a/org.eclipse.jdt.annotation_v1/pom.xml b/org.eclipse.jdt.annotation_v1/pom.xml
index 8068bee..c606d95 100644
--- a/org.eclipse.jdt.annotation_v1/pom.xml
+++ b/org.eclipse.jdt.annotation_v1/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>eclipse.jdt.core</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.annotation</artifactId>
diff --git a/org.eclipse.jdt.apt.core/pom.xml b/org.eclipse.jdt.apt.core/pom.xml
index 22d138b..c05dcd6 100644
--- a/org.eclipse.jdt.apt.core/pom.xml
+++ b/org.eclipse.jdt.apt.core/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>eclipse.jdt.core</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.apt.core</artifactId>
diff --git a/org.eclipse.jdt.apt.pluggable.core/pom.xml b/org.eclipse.jdt.apt.pluggable.core/pom.xml
index 48739f6..bdb1ae6 100644
--- a/org.eclipse.jdt.apt.pluggable.core/pom.xml
+++ b/org.eclipse.jdt.apt.pluggable.core/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>eclipse.jdt.core</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.apt.pluggable.core</artifactId>
diff --git a/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeFilerImpl.java b/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeFilerImpl.java
index 75c7633..c066133 100644
--- a/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeFilerImpl.java
+++ b/org.eclipse.jdt.apt.pluggable.core/src/org/eclipse/jdt/internal/apt/pluggable/core/filer/IdeFilerImpl.java
@@ -39,13 +39,9 @@
import org.eclipse.jdt.apt.core.internal.AptCompilationParticipant;
import org.eclipse.jdt.apt.core.internal.generatedfile.GeneratedSourceFolderManager;
import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.compiler.CharOperation;
import org.eclipse.jdt.internal.apt.pluggable.core.Apt6Plugin;
import org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeAnnotationProcessorManager;
import org.eclipse.jdt.internal.apt.pluggable.core.dispatch.IdeProcessingEnvImpl;
-import org.eclipse.jdt.internal.compiler.lookup.ModuleBinding;
-import org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
-import org.eclipse.jdt.internal.compiler.lookup.TagBits;
/**
* Implementation of the Filer interface that is used in IDE mode.
@@ -167,15 +163,22 @@
// TODO: is the following correct?
// JDK 9's createSourceFile API mentions '/' as separator for a module prefix.
// Otherwise shouldn't <code>name</code> already be "."-separated?
- name = name.toString().replace('/', '.');
-
- ModuleBinding m = _env._current_module;
- if (m == null)
- m = _env.getCompiler().lookupEnvironment.UnNamedModule;
- ReferenceBinding type = m.environment.getType(CharOperation.splitOn('.', name.toString().toCharArray()), m);
- if (type != null && (type.tagBits & TagBits.HasMissingType) == 0) {
- throw new FilerException("Source file already exists : " + name); //$NON-NLS-1$
- }
+// name = name.toString().replace('/', '.');
+//
+// ModuleBinding m = _env._current_module;
+// if (m == null)
+// m = _env.getCompiler().lookupEnvironment.UnNamedModule;
+// ReferenceBinding type = m.environment.getType(CharOperation.splitOn('.', name.toString().toCharArray()), m);
+// if (type != null && (type.tagBits & TagBits.HasMissingType) == 0) {
+// IFile classFile = getFileFromOutputLocation(StandardLocation.CLASS_OUTPUT, CharOperation.toString(type.fPackage.compoundName), new String(type.sourceName()) + ".class");
+// String fileName = new String(type.getFileName());
+// if (fileName != null) {
+// String osString = classFile.getFullPath().toOSString();
+// if (!osString.equals(fileName)) {
+// throw new FilerException("Source file already exists : " + name); //$NON-NLS-1$
+// }
+// }
+// }
Set<IFile> parentFiles = Collections.emptySet();
if (originatingElements != null && originatingElements.length > 0) {
parentFiles = new HashSet<IFile>(originatingElements.length);
diff --git a/org.eclipse.jdt.apt.pluggable.tests/pom.xml b/org.eclipse.jdt.apt.pluggable.tests/pom.xml
index 8ba7f96..915f64c 100644
--- a/org.eclipse.jdt.apt.pluggable.tests/pom.xml
+++ b/org.eclipse.jdt.apt.pluggable.tests/pom.xml
@@ -15,7 +15,7 @@
<parent>
<artifactId>tests-pom</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
<relativePath>../tests-pom/</relativePath>
</parent>
<groupId>org.eclipse.jdt</groupId>
diff --git a/org.eclipse.jdt.apt.pluggable.tests/src/org/eclipse/jdt/apt/pluggable/tests/FilerTests.java b/org.eclipse.jdt.apt.pluggable.tests/src/org/eclipse/jdt/apt/pluggable/tests/FilerTests.java
index dd5558c..48e9511 100644
--- a/org.eclipse.jdt.apt.pluggable.tests/src/org/eclipse/jdt/apt/pluggable/tests/FilerTests.java
+++ b/org.eclipse.jdt.apt.pluggable.tests/src/org/eclipse/jdt/apt/pluggable/tests/FilerTests.java
@@ -360,7 +360,7 @@
assertTrue("Processor did not run", ProcessorTestStatus.processorRan());
assertEquals("Processor reported errors", ProcessorTestStatus.NO_ERRORS, ProcessorTestStatus.getErrors());
}
- public void testBug534979() throws Throwable {
+ public void _testBug534979() throws Throwable {
ProcessorTestStatus.reset();
IJavaProject jproj = createJavaProject(_projectName);
disableJava5Factories(jproj);
@@ -380,7 +380,7 @@
assertEquals("Processor reported errors", "FilerException invoking test method testBug534979 - see console for details", ProcessorTestStatus.getErrors());
}
- public void testCollisionInOtherModule() throws Throwable {
+ public void _testCollisionInOtherModule() throws Throwable {
if (!canRunJava9()) {
return;
}
@@ -404,7 +404,7 @@
fullBuild();
assertEquals("Processor reported errors", "FilerException invoking test method testBug534979 - see console for details", ProcessorTestStatus.getErrors());
}
- public void testCollisionWithClassThatTriggers() throws Throwable {
+ public void _testCollisionWithClassThatTriggers() throws Throwable {
if (!canRunJava9()) {
return;
}
@@ -452,6 +452,49 @@
fullBuild();
assertEquals("Processor reported errors", ProcessorTestStatus.NO_ERRORS, ProcessorTestStatus.getErrors());
}
+ public void _testBug542090() throws Throwable {
+ if (!canRunJava9()) {
+ return;
+ }
+ ProcessorTestStatus.reset();
+ IJavaProject jproj = createJava9Project(_projectName);
+ disableJava5Factories(jproj);
+ IProject proj = jproj.getProject();
+ IPath projPath = proj.getFullPath();
+
+ IPath root = projPath.append("src");
+ env.addClass(root, null, "module-info", "module example {requires annotations;}");
+ env.addClass(root, "p", "Trigger",
+ "package p;\n" +
+ "import org.eclipse.jdt.apt.pluggable.tests.annotations.FilerTestTrigger;\n" +
+ "@FilerTestTrigger(test = \"testBug542090a\", arg0 = \"p\", arg1 = \"Other\")" +
+ "public class Trigger {\n" +
+ "}"
+ );
+
+ AptConfig.setEnabled(jproj, true);
+ fullBuild();
+ env.addClass(root, "p", "Trigger",
+ "package p;\n" +
+ "import org.eclipse.jdt.apt.pluggable.tests.annotations.FilerTestTrigger;\n" +
+ "@FilerTestTrigger(test = \"testBug542090a\", arg0 = \"p\", arg1 = \"Other\")" +
+ "public class Trigger {\n" +
+ "}/*added comment */"
+ );
+ incrementalBuild();
+ assertEquals("Processor reported errors", ProcessorTestStatus.NO_ERRORS, ProcessorTestStatus.getErrors());
+
+ env.addClass(root, "p", "Trigger",
+ "package p;\n" +
+ "import org.eclipse.jdt.apt.pluggable.tests.annotations.FilerTestTrigger;\n" +
+ "@FilerTestTrigger(test = \"testBug542090b\", arg0 = \"p\", arg1 = \"Other\")" +
+ "public class Trigger {\n" +
+ "}/*added comment */"
+ );
+ incrementalBuild();
+ assertEquals("Processor reported errors", "FilerException invoking test method testBug542090b - see console for details", ProcessorTestStatus.getErrors());
+ }
+
public void testCreateClass1() throws Exception {
FilerTesterProc.roundNo = 0;
ProcessorTestStatus.reset();
diff --git a/org.eclipse.jdt.apt.pluggable.tests/src/org/eclipse/jdt/apt/pluggable/tests/processors/filertester/FilerTesterProc.java b/org.eclipse.jdt.apt.pluggable.tests/src/org/eclipse/jdt/apt/pluggable/tests/processors/filertester/FilerTesterProc.java
index 106d252..715f8c4 100644
--- a/org.eclipse.jdt.apt.pluggable.tests/src/org/eclipse/jdt/apt/pluggable/tests/processors/filertester/FilerTesterProc.java
+++ b/org.eclipse.jdt.apt.pluggable.tests/src/org/eclipse/jdt/apt/pluggable/tests/processors/filertester/FilerTesterProc.java
@@ -251,6 +251,32 @@
pw.close();
}
}
+ public void testBug542090a(Element e, String pkg, String relName) throws Exception {
+ if (++roundNo > 1)
+ return;
+ JavaFileObject jfo = _filer.createSourceFile(pkg + "." + relName);
+ PrintWriter pw = null;
+ try {
+ pw = new PrintWriter(jfo.openWriter());
+ pw.println("package " + pkg + ";\npublic class " + relName + "{ }");
+ }
+ finally {
+ if (pw != null)
+ pw.close();
+ }
+ }
+ public void testBug542090b(Element e, String pkg, String relName) throws Exception {
+ JavaFileObject jfo = _filer.createSourceFile(pkg + "." + relName);
+ PrintWriter pw = null;
+ try {
+ pw = new PrintWriter(jfo.openWriter());
+ pw.println("package " + pkg + ";\npublic class " + relName + "{ }");
+ }
+ finally {
+ if (pw != null)
+ pw.close();
+ }
+ }
public void testBug534979InModule(Element e, String pkg, String relName) throws Exception {
JavaFileObject jfo = _filer.createSourceFile(pkg+"."+relName, e.getEnclosingElement());
PrintWriter pw = null;
diff --git a/org.eclipse.jdt.apt.tests/pom.xml b/org.eclipse.jdt.apt.tests/pom.xml
index dfec419..dd8f489 100644
--- a/org.eclipse.jdt.apt.tests/pom.xml
+++ b/org.eclipse.jdt.apt.tests/pom.xml
@@ -15,7 +15,7 @@
<parent>
<artifactId>tests-pom</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
<relativePath>../tests-pom/</relativePath>
</parent>
<groupId>org.eclipse.jdt</groupId>
diff --git a/org.eclipse.jdt.apt.ui/pom.xml b/org.eclipse.jdt.apt.ui/pom.xml
index f1bbd10..b70aefb 100644
--- a/org.eclipse.jdt.apt.ui/pom.xml
+++ b/org.eclipse.jdt.apt.ui/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>eclipse.jdt.core</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.apt.ui</artifactId>
diff --git a/org.eclipse.jdt.compiler.apt.tests/pom.xml b/org.eclipse.jdt.compiler.apt.tests/pom.xml
index 7755598..e622916 100644
--- a/org.eclipse.jdt.compiler.apt.tests/pom.xml
+++ b/org.eclipse.jdt.compiler.apt.tests/pom.xml
@@ -15,7 +15,7 @@
<parent>
<artifactId>tests-pom</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
<relativePath>../tests-pom/</relativePath>
</parent>
<groupId>org.eclipse.jdt</groupId>
diff --git a/org.eclipse.jdt.compiler.apt/pom.xml b/org.eclipse.jdt.compiler.apt/pom.xml
index 24e2a99..2085c1f 100644
--- a/org.eclipse.jdt.compiler.apt/pom.xml
+++ b/org.eclipse.jdt.compiler.apt/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>eclipse.jdt.core</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.compiler.apt</artifactId>
diff --git a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BaseAnnotationProcessorManager.java b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BaseAnnotationProcessorManager.java
index 67fc9a8..0b4b87c 100644
--- a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BaseAnnotationProcessorManager.java
+++ b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/BaseAnnotationProcessorManager.java
@@ -47,7 +47,7 @@
protected PrintWriter _out;
protected PrintWriter _err;
protected BaseProcessingEnvImpl _processingEnv;
- protected boolean _isFirstRound = true;
+ public boolean _isFirstRound = true;
/**
* The list of processors that have been loaded so far. A processor on this
@@ -161,9 +161,6 @@
}
}
RoundEnvImpl roundEnv = new RoundEnvImpl(units, referenceBindings, isLastRound, _processingEnv);
- if (_isFirstRound) {
- _isFirstRound = false;
- }
PrintWriter traceProcessorInfo = _printProcessorInfo ? _out : null;
PrintWriter traceRounds = _printRounds ? _out : null;
if (traceRounds != null) {
@@ -172,5 +169,8 @@
RoundDispatcher dispatcher = new RoundDispatcher(
this, roundEnv, roundEnv.getRootAnnotations(), traceProcessorInfo, traceRounds);
dispatcher.round();
+ if (_isFirstRound) {
+ _isFirstRound = false;
+ }
}
}
diff --git a/org.eclipse.jdt.compiler.tool.tests/pom.xml b/org.eclipse.jdt.compiler.tool.tests/pom.xml
index f5523c5..c239078 100644
--- a/org.eclipse.jdt.compiler.tool.tests/pom.xml
+++ b/org.eclipse.jdt.compiler.tool.tests/pom.xml
@@ -15,7 +15,7 @@
<parent>
<artifactId>tests-pom</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
<relativePath>../tests-pom/</relativePath>
</parent>
<groupId>org.eclipse.jdt</groupId>
diff --git a/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolJava9Tests.java b/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolJava9Tests.java
index 83133f1..94a4a53 100644
--- a/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolJava9Tests.java
+++ b/org.eclipse.jdt.compiler.tool.tests/src/org/eclipse/jdt/compiler/tool/tests/CompilerToolJava9Tests.java
@@ -93,7 +93,7 @@
}
this.compilerNames[0] = "System compiler";
this.compilers[0] = ToolProvider.getSystemJavaCompiler();
- assertEquals("Only one compiler available", 2, compilerCounter);
+ assertEquals("Only one compiler available: " + Arrays.toString(compilers), 2, compilerCounter);
assertNotNull("System compiler unavailable", this.compilers[0]);
assertNotNull("Eclipse compiler unavailable", this.compilers[1]);
initializeLocations();
diff --git a/org.eclipse.jdt.compiler.tool/pom.xml b/org.eclipse.jdt.compiler.tool/pom.xml
index 5f9742c..593c618 100644
--- a/org.eclipse.jdt.compiler.tool/pom.xml
+++ b/org.eclipse.jdt.compiler.tool/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>eclipse.jdt.core</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.compiler.tool</artifactId>
diff --git a/org.eclipse.jdt.core.tests.builder/pom.xml b/org.eclipse.jdt.core.tests.builder/pom.xml
index 9070b17..3f429fc 100644
--- a/org.eclipse.jdt.core.tests.builder/pom.xml
+++ b/org.eclipse.jdt.core.tests.builder/pom.xml
@@ -14,7 +14,7 @@
<parent>
<artifactId>tests-pom</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
<relativePath>../tests-pom/</relativePath>
</parent>
<groupId>org.eclipse.jdt</groupId>
diff --git a/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF b/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
index 20b94cf..10f6631 100644
--- a/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core.tests.compiler/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.core.tests.compiler;singleton:=true
-Bundle-Version: 3.12.700.qualifier
+Bundle-Version: 3.12.800.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.jdt.core.tests.compiler,
diff --git a/org.eclipse.jdt.core.tests.compiler/pom.xml b/org.eclipse.jdt.core.tests.compiler/pom.xml
index 87f9dcf..424ffdc 100644
--- a/org.eclipse.jdt.core.tests.compiler/pom.xml
+++ b/org.eclipse.jdt.core.tests.compiler/pom.xml
@@ -15,12 +15,12 @@
<parent>
<artifactId>tests-pom</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
<relativePath>../tests-pom/</relativePath>
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core.tests.compiler</artifactId>
- <version>3.12.700-SNAPSHOT</version>
+ <version>3.12.800-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
index e1b9b45..80c22dd 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java
@@ -316,1547 +316,875 @@
// problem categories - check that categories match expected ones
// see also discussion in https://bugs.eclipse.org/bugs/show_bug.cgi?id=208383
- public void test011_problem_categories() {
- try {
- Class iProblemClass;
- class ProblemAttributes {
- boolean deprecated;
- int category;
-
- ProblemAttributes(int category) {
- this.category = category;
- }
-
- ProblemAttributes(boolean deprecated) {
- this.deprecated = deprecated;
- }
+public void test011_problem_categories() {
+ try {
+ Class iProblemClass;
+ class ProblemAttributes {
+ boolean deprecated;
+ int category;
+ ProblemAttributes(int category) {
+ this.category = category;
}
- ProblemAttributes DEPRECATED = new ProblemAttributes(true);
- Map expectedProblemAttributes = new HashMap();
- expectedProblemAttributes.put("AbstractMethodCannotBeOverridden",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("AbstractMethodInAbstractClass",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("AbstractMethodInEnum", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("AbstractMethodMustBeImplemented",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("AbstractMethodMustBeImplementedOverConcreteMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("AbstractMethodsInConcreteClass",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("AbstractServiceImplementation",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("AmbiguousConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("AmbiguousConstructorInDefaultConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("AmbiguousConstructorInImplicitConstructorCall",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("AmbiguousField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("AmbiguousMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("AmbiguousType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("AnnotationCannotOverrideMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("AnnotationCircularity", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("AnnotationCircularitySelfReference",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("AnnotationFieldNeedConstantInitialization", DEPRECATED);
- expectedProblemAttributes.put("AnnotationMembersCannotHaveParameters",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("AnnotationMembersCannotHaveTypeParameters",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("AnnotationTypeDeclarationCannotHaveConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("AnnotationTypeDeclarationCannotHaveSuperclass",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("AnnotationTypeDeclarationCannotHaveSuperinterfaces",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("AnnotationTypeUsedAsSuperInterface",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("AnnotationValueMustBeAnEnumConstant",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("AnnotationValueMustBeAnnotation",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("AnnotationValueMustBeArrayInitializer",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("AnnotationValueMustBeClassLiteral",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("AnnotationValueMustBeConstant",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("AnonymousClassCannotExtendFinalClass",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ApplicableMethodOverriddenByInapplicable",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("ArgumentHidingField",
- new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
- expectedProblemAttributes.put("ArgumentHidingLocalVariable",
- new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
- expectedProblemAttributes.put("ArgumentIsNeverUsed",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("ArgumentTypeAmbiguous", DEPRECATED);
- expectedProblemAttributes.put("ArgumentTypeCannotBeVoid",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("ArgumentTypeCannotBeVoidArray", DEPRECATED);
- expectedProblemAttributes.put("ArgumentTypeInheritedNameHidesEnclosingName", DEPRECATED);
- expectedProblemAttributes.put("ArgumentTypeInternalNameProvided", DEPRECATED);
- expectedProblemAttributes.put("ArgumentTypeNotFound", DEPRECATED);
- expectedProblemAttributes.put("ArgumentTypeNotVisible", DEPRECATED);
- expectedProblemAttributes.put("ArrayConstantsOnlyInArrayInitializers",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ArrayReferencePotentialNullReference",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ArrayReferenceRequired",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("AssignmentHasNoEffect",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("AssignmentToMultiCatchParameter",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("AssignmentToResource",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("AutoManagedResourceNotBelow17",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("AutoManagedVariableResourceNotBelow9",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("BinaryLiteralNotBelow17",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("BodyForAbstractMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("BodyForNativeMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("BoundCannotBeArray", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("BoundHasConflictingArguments",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("BoundMustBeAnInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("BoxingConversion", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("BytecodeExceeds64KLimit",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("BytecodeExceeds64KLimitForClinit",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("BytecodeExceeds64KLimitForConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("CannotAllocateVoidArray",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("CannotDeclareEnumSpecialMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("CannotDefineAnnotationInLocalType",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("CannotDefineDimensionExpressionsWithInit",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("CannotDefineEnumInLocalType",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("CannotDefineInterfaceInLocalType",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("CannotDefineStaticInitializerInLocalType",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("CannotExtendEnum", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("CannotHideAnInstanceMethodWithAStaticMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("CannotImplementIncompatibleNullness",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("CannotImportPackage", new ProblemAttributes(CategorizedProblem.CAT_IMPORT));
- expectedProblemAttributes.put("CannotInferElidedTypes", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("CannotInferInvocationType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("CannotInvokeSuperConstructorInEnum",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("CannotOverrideAStaticMethodWithAnInstanceMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("CannotReadSource", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("CannotReturnInInitializer",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("CannotThrowNull", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("CannotThrowType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("CannotUseDiamondWithAnonymousClasses",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("CannotUseDiamondWithExplicitTypeArguments",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("CannotUseSuperInCodeSnippet",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("ClassExtendFinalClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("CodeCannotBeReached",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("CodeSnippetMissingClass",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("CodeSnippetMissingMethod",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("ContainerAnnotationTypeHasNonDefaultMembers",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ContainerAnnotationTypeHasShorterRetention",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ContainerAnnotationTypeHasWrongValueType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ContainerAnnotationTypeMustHaveValue",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ContradictoryNullAnnotations",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ContradictoryNullAnnotationsOnBound",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ContradictoryNullAnnotationsInferred",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ContradictoryNullAnnotationsInferredFunctionType",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ComparingIdentical",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ConflictingImport", new ProblemAttributes(CategorizedProblem.CAT_IMPORT));
- expectedProblemAttributes.put("ConflictingNullAnnotations",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ConstructedArrayIncompatible",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("ConstructionTypeMismatch",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ConflictingInheritedNullAnnotations",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ConstructorReferenceNotBelow18",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ConstructorVarargsArgumentNeedCast",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("CyclicModuleDependency",
- new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("CorruptedSignature",
- new ProblemAttributes(CategorizedProblem.CAT_BUILDPATH));
- expectedProblemAttributes.put("DanglingReference", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("DeadCode",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("DefaultMethodNotBelow18",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("DefaultMethodOverridesObjectMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("DereferencingNullableExpression",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("DiamondNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("DirectInvocationOfAbstractMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("DisallowedTargetForContainerAnnotationType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("DisallowedTargetForAnnotation",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("DisallowedExplicitThisParameter",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("DiscouragedReference",
- new ProblemAttributes(CategorizedProblem.CAT_RESTRICTION));
- expectedProblemAttributes.put("DuplicateAnnotation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("DuplicateAnnotationNotMarkedRepeatable",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("DuplicateAnnotationMember",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("DuplicateBlankFinalFieldInitialization",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("DuplicateBounds", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("DuplicateBoundInIntersectionCast",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("DuplicateCase", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("DuplicateDefaultCase",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("DuplicateExports", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("DuplicateField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("DuplicateFinalLocalInitialization",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("DuplicateImport", new ProblemAttributes(CategorizedProblem.CAT_IMPORT));
- expectedProblemAttributes.put("DuplicateInheritedMethods",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("DuplicateInheritedDefaultMethods",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("DuplicateLabel", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("DuplicateMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("DuplicateMethodErasure", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("DuplicateModifierForArgument",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("DuplicateModifierForField",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("DuplicateModifierForMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("DuplicateModifierForType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("DuplicateModifierForVariable",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("DuplicateModuleRef", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("DuplicateNestedType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("DuplicateOpens", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("DuplicateParameterizedMethods",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("DuplicateRequires", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("DuplicateResource", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("DuplicateServices", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("DuplicateSuperInterface",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("DuplicateTargetInTargetAnnotation",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("DuplicateTypeVariable",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("DuplicateTypes", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("DuplicateUses", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("EmptyControlFlowStatement",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("EnclosingInstanceInConstructorCall",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("EndOfSource", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("EnumAbstractMethodMustBeImplemented",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("EnumConstantCannotDefineAbstractMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("EnumConstantMustImplementAbstractMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("EnumConstantsCannotBeSurroundedByParenthesis",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("EnumStaticFieldInInInitializerContext",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("EnumSwitchCannotTargetField",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("ExceptionParameterIsNeverUsed",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("ExceptionTypeAmbiguous", DEPRECATED);
- expectedProblemAttributes.put("ExceptionTypeInheritedNameHidesEnclosingName", DEPRECATED);
- expectedProblemAttributes.put("ExceptionTypeInternalNameProvided", DEPRECATED);
- expectedProblemAttributes.put("ExceptionTypeNotFound", DEPRECATED);
- expectedProblemAttributes.put("ExceptionTypeNotVisible", DEPRECATED);
- expectedProblemAttributes.put("ExplicitThisParameterNotInLambda",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ExplicitThisParameterNotBelow18",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ExplicitlyClosedAutoCloseable",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("ExpressionShouldBeAVariable",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ExternalProblemFixable",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("ExternalProblemNotFixable",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("ExplicitAnnotationTargetRequired",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("FallthroughCase",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("FieldComparisonYieldsFalse",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("FieldHidingField",
- new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
- expectedProblemAttributes.put("FieldHidingLocalVariable",
- new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
- expectedProblemAttributes.put("FieldMissingDeprecatedAnnotation",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("FieldMustBeFinal", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("FieldTypeAmbiguous", DEPRECATED);
- expectedProblemAttributes.put("FieldTypeInheritedNameHidesEnclosingName", DEPRECATED);
- expectedProblemAttributes.put("FieldTypeInternalNameProvided", DEPRECATED);
- expectedProblemAttributes.put("FieldTypeNotFound", DEPRECATED);
- expectedProblemAttributes.put("FieldTypeNotVisible", DEPRECATED);
- expectedProblemAttributes.put("FinalBoundForTypeVariable",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("FinalFieldAssignment", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("FinalMethodCannotBeOverridden",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("FinalOuterLocalAssignment",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("FinallyMustCompleteNormally",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ForbiddenReference",
- new ProblemAttributes(CategorizedProblem.CAT_RESTRICTION));
- expectedProblemAttributes.put("GenericConstructorTypeArgumentMismatch",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("GenericInferenceError",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL)); // TODO should be removed via
- // https://bugs.eclipse.org/404675
- expectedProblemAttributes.put("GenericMethodTypeArgumentMismatch",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("GenericTypeCannotExtendThrowable",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("HidingEnclosingType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("HierarchyCircularity", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("HierarchyCircularitySelfReference",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("HierarchyHasProblems", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalAbstractModifierCombinationForMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalStrictfpForAbstractInterfaceMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalAccessFromTypeVariable",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalAnnotationForBaseType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalCast", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalClassLiteralForTypeVariable",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalDeclarationOfThisParameter",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("IllegalDefaultModifierSpecification",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalDefinitionToNonNullParameter",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("IllegalDimension", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("IllegalEnclosingInstanceSpecification",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalExtendedDimensions",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalExtendedDimensionsForVarArgs",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("IllegalGenericArray", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalHexaLiteral", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("IllegalInstanceofParameterizedType",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("IllegalInstanceofTypeParameter",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("IllegalBasetypeInIntersectionCast",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalModifierCombinationFinalAbstractForClass",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalModifierCombinationFinalVolatileForField",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifierCombinationForInterfaceMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifierCombinationForPrivateInterfaceMethod9",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifierForAnnotationField",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("IllegalModifierForAnnotationMemberType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalModifierForAnnotationMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifierForAnnotationType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalModifierForArgument",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifierForClass",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalModifierForConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifierForEnum", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalModifierForEnumConstant",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifierForEnumConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifierForField",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifierForInterface",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalModifierForInterfaceField",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifierForInterfaceMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifierForInterfaceMethod18",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifierForLocalClass",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalModifierForLocalEnum",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalModifierForMemberClass",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalModifierForMemberEnum",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalModifierForMemberInterface",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalModifierForMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifierForModule",
- new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("IllegalModifierForInterfaceMethod9",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifierForVariable",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalModifiersForElidedType",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("IllegalModifiers", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("IllegalParameterNullityRedefinition",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("IllegalPrimitiveOrArrayTypeForEnclosingInstance",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalQualifiedEnumConstantLabel",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalQualifiedParameterizedTypeAllocation",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalQualifierForExplicitThis",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("IllegalQualifierForExplicitThis2",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("IllegalRedefinitionOfTypeVariable",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("IllegalReturnNullityRedefinition",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("IllegalReturnNullityRedefinitionFreeTypeVariable",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("IllegalRedefinitionToNonNullParameter",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("IllegalStaticModifierForMemberType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalTypeAnnotationsInStaticMemberAccess",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("IllegalTypeArgumentsInRawConstructorReference",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalTypeForExplicitThis",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("IllegalTypeVariableSuperReference",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("IllegalUnderscorePosition",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("IllegalUsageOfQualifiedTypeReference",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("IllegalUsageOfTypeAnnotations",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("IllegalVararg", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalVarargInLambda", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForField",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForMemberType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IllegalVisibilityModifierForInterfaceMemberType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ImplicitObjectBoundNoNullDefault",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("ImportAmbiguous", DEPRECATED);
- expectedProblemAttributes.put("ImportInheritedNameHidesEnclosingName", DEPRECATED);
- expectedProblemAttributes.put("ImportInternalNameProvided", DEPRECATED);
- expectedProblemAttributes.put("ImportNotFound", new ProblemAttributes(CategorizedProblem.CAT_IMPORT));
- expectedProblemAttributes.put("ImportNotVisible", DEPRECATED);
- expectedProblemAttributes.put("IncompatibleExceptionInInheritedMethodThrowsClause",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IncompatibleExceptionInThrowsClause",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod",
- new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
- expectedProblemAttributes.put("IncompatibleLambdaParameterType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IncompatibleMethodReference",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IncompatibleReturnType",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("IncompatibleReturnTypeForNonInheritedInterfaceMethod",
- new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
- expectedProblemAttributes.put("IncompatibleTypesInConditionalOperator",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IncompatibleTypesInEqualityOperator",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IncompatibleTypesInForeach",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
-
- expectedProblemAttributes.put("IncorrectArityForParameterizedConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IncorrectArityForParameterizedMethod",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IncorrectArityForParameterizedType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IncorrectEnclosingInstanceReference",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IncorrectSwitchType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IncorrectSwitchType17", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IndirectAccessToStaticField",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("IndirectAccessToStaticMethod",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("IndirectAccessToStaticType",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("InheritedDefaultMethodConflictsWithOtherInherited",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("InheritedFieldHidesEnclosingName",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("InheritedIncompatibleReturnType",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("InheritedMethodHidesEnclosingName",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("InheritedMethodReducesVisibility",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("InheritedTypeHidesEnclosingName",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("InitializerMustCompleteNormally",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("InstanceFieldDuringConstructorInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("InstanceMethodDuringConstructorInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("InterfaceAmbiguous", DEPRECATED);
- expectedProblemAttributes.put("InterfaceCannotHaveConstructors",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InterfaceCannotHaveInitializers",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("InterfaceInheritedNameHidesEnclosingName", DEPRECATED);
- expectedProblemAttributes.put("InterfaceInternalNameProvided", DEPRECATED);
- expectedProblemAttributes.put("InterfaceNotFound", DEPRECATED);
- expectedProblemAttributes.put("InterfaceNotFunctionalInterface",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("InterfaceNotVisible", DEPRECATED);
- expectedProblemAttributes.put("InterfaceStaticMethodInvocationNotBelow18",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InterfaceSuperInvocationNotBelow18",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InternalTypeNameProvided",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IntersectionCastNotBelow18",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("InvalidAnnotationMemberType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("InvalidArrayConstructorReference",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("InvalidBinary", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidBreak", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("InvalidCatchBlockSequence",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("InvalidCharacterConstant",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidClassInstantiation",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("InvalidContinue", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("InvalidDigit", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidEncoding", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("InvalidEscape", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidExplicitConstructorCall",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidExpressionAsStatement",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidFileNameForPackageAnnotations",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidFloat", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidHexa", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidHighSurrogate", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidInput", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidLowSurrogate", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidLocationForModifiers",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidNullToSynchronized",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("InvalidOctal", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidOpensStatement",
- new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("InvalidOperator", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("InvalidParameterizedExceptionType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("InvalidParenthesizedExpression",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidServiceIntfType",
- new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("InvalidServiceImplType",
- new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("InvalidTypeExpression",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("InvalidTypeArguments", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("InvalidTypeForCollection",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("InvalidTypeForCollectionTarget14",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("InvalidTypeForStaticImport",
- new ProblemAttributes(CategorizedProblem.CAT_IMPORT));
- expectedProblemAttributes.put("InvalidTypeToSynchronized",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("InvalidTypeVariableExceptionType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("InvalidUnaryExpression",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidUnicodeEscape", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidUnionTypeReferenceSequence",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("InvalidUsageOfAnnotationDeclarations",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidUsageOfAnnotations",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidUsageOfEnumDeclarations",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidUsageOfForeachStatements",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidUsageOfStaticImports",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidUsageOfTypeAnnotations",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidUsageOfTypeArguments",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidUsageOfTypeParameters",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidUsageOfTypeParametersForAnnotationDeclaration",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidUsageOfTypeParametersForEnumDeclaration",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidUsageOfVarargs",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidUsageOfWildcard",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("InvalidVoidExpression",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("IsClassPathCorrect",
- new ProblemAttributes(CategorizedProblem.CAT_BUILDPATH));
- expectedProblemAttributes.put("JavadocAmbiguousConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocAmbiguousField",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocAmbiguousMethod",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocAmbiguousMethodReference",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocAmbiguousType",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocDuplicateParamName",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocDuplicateReturnTag",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocDuplicateTag", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocDuplicateThrowsClassName",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocEmptyReturnTag",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocGenericConstructorTypeArgumentMismatch",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocGenericMethodTypeArgumentMismatch",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocHiddenReference",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocIncorrectArityForParameterizedConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocIncorrectArityForParameterizedMethod",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInheritedFieldHidesEnclosingName",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInheritedMethodHidesEnclosingName",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInheritedNameHidesEnclosingTypeName",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInternalTypeNameProvided",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidMemberTypeQualification",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidParamName",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidParamTagName",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidParamTagTypeParameter",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidSeeArgs",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidSeeHref",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidSeeReference",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidSeeUrlReference",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidTag", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidThrowsClass",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidThrowsClassName",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidValueReference",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocMalformedSeeReference",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocMessagePrefix",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("JavadocMissing", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingHashCharacter",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingIdentifier",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingParamName",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingParamTag",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingReturnTag",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingSeeReference",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingTagDescription",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingThrowsClassName",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingThrowsTag",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocNoMessageSendOnArrayType",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocNoMessageSendOnBaseType",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocNonGenericConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocNonGenericMethod",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocNonStaticTypeFromStaticInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocNotVisibleConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocNotVisibleField",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocNotVisibleMethod",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocNotVisibleType",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocParameterMismatch",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocParameterizedConstructorArgumentTypeMismatch",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocParameterizedMethodArgumentTypeMismatch",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericMethod",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocUndefinedConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocUndefinedField",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocUndefinedMethod",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocUndefinedType",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocUnexpectedTag",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocUnexpectedText",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocUnterminatedInlineTag",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocUsingDeprecatedConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocUsingDeprecatedField",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocUsingDeprecatedMethod",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("JavadocUsingDeprecatedType",
- new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
- expectedProblemAttributes.put("LambdaDescriptorMentionsUnmentionable",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("LambdaExpressionNotBelow18",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("LambdaRedeclaresArgument",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("LambdaRedeclaresLocal",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("LambdaShapeComputationError",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("LocalVariableCanOnlyBeNull", DEPRECATED);
- expectedProblemAttributes.put("LocalVariableCannotBeNull", DEPRECATED);
- expectedProblemAttributes.put("LocalVariableHidingField",
- new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
- expectedProblemAttributes.put("LocalVariableHidingLocalVariable",
- new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
- expectedProblemAttributes.put("LocalVariableIsNeverUsed",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("LocalVariableMayBeNull", DEPRECATED);
- expectedProblemAttributes.put("MaskedCatch",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("MethodButWithConstructorName",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("MethodCanBePotentiallyStatic",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("MethodCanBeStatic",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("MethodMissingDeprecatedAnnotation",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("MethodMustOverride", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("MethodMustOverrideOrImplement",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("MethodNameClash", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("MethodNameClashHidden",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("MethodReducesVisibility",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("MethodReferenceNotBelow18",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("MethodReferenceSwingsBothWays",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("MethodRequiresBody", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("MethodReturnsVoid", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("MethodVarargsArgumentNeedCast",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("MisplacedTypeAnnotations",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("MissingArgumentsForParameterizedMemberType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("MissingDefaultCase",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("MissingEnclosingInstance",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("MissingEnclosingInstanceForConstructorCall",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("MissingEnumConstantCase",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("MissingEnumConstantCaseDespiteDefault",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("MissingEnumDefaultCase",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("MissingNonNullByDefaultAnnotationOnPackage",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("MissingNonNullByDefaultAnnotationOnType",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("MissingOverrideAnnotation",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("MissingOverrideAnnotationForInterfaceMethodImplementation",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("MissingRequiresTransitiveForTypeInAPI",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("MissingReturnType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("MissingSemiColon", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("MissingSerialVersion",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("MissingSynchronizedModifierInInheritedMethod",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("MissingTypeInConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("MissingTypeInLambda", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("MissingTypeInMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("MissingValueForAnnotationMember",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("MultiCatchNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("MultipleFunctionalInterfaces",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("StaticInterfaceMethodNotBelow18",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("MustDefineEitherDimensionExpressionsOrInitializer",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("MustSpecifyPackage", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("NativeMethodsCannotBeStrictfp",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("NeedToEmulateConstructorAccess",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("NeedToEmulateFieldReadAccess",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("NeedToEmulateFieldWriteAccess",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("NeedToEmulateMethodAccess",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("NestedServiceImpl", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("NoAdditionalBoundAfterTypeVariable",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("NoFieldOnBaseType", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("NoGenericLambda", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("NoImplicitStringConversionForCharArrayExpression",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NoMessageSendOnArrayType",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("NoMessageSendOnBaseType",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("NoSuperInInterfaceContext",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("NonBlankFinalLocalAssignment",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("NonConstantExpression",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("NonDenotableTypeArgumentForAnonymousDiamond",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("NonExternalizedStringLiteral",
- new ProblemAttributes(CategorizedProblem.CAT_NLS));
- expectedProblemAttributes.put("NonGenericConstructor", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("NonGenericMethod", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("NonGenericType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("NonNullDefaultDetailIsNotEvaluated",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("NonNullExpressionComparisonYieldsFalse",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NonNullMessageSendComparisonYieldsFalse",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NonNullSpecdFieldComparisonYieldsFalse",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NonNullLocalVariableComparisonYieldsFalse",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NonNullTypeVariableFromLegacyMethod",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NonNullMethodTypeVariableFromLegacyMethod",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NonPublicTypeInAPI",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NonStaticAccessToStaticField",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("NonStaticAccessToStaticMethod",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("NonStaticContextForEnumMemberType",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("NonStaticFieldFromStaticInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("NonStaticOrAlienTypeReceiver",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("NonStaticTypeFromStaticInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("NotAnnotationType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("NotAccessibleConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("NotAccessibleField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("NotAccessibleMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("NotAccessibleType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("NotAccessiblePackage", new ProblemAttributes(CategorizedProblem.CAT_IMPORT));
- expectedProblemAttributes.put("NotExportedTypeInAPI",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ConflictingPackageFromModules",
- new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("ConflictingPackageFromOtherModules",
- new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("NotVisibleConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("NotVisibleConstructorInDefaultConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("NotVisibleConstructorInImplicitConstructorCall",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("NotVisibleField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("NotVisibleMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("NotVisibleType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("NullableFieldReference",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NullAnnotationAtQualifyingType",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("NullAnnotationUnsupportedLocation",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("NullAnnotationUnsupportedLocationAtType",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("NullExpressionReference",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NullLocalVariableComparisonYieldsFalse",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NullLocalVariableInstanceofYieldsFalse",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NullLocalVariableReference",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NullityMismatchAgainstFreeTypeVariable",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NullityMismatchingTypeAnnotation",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NullityMismatchingTypeAnnotationSuperHint",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NullityMismatchTypeArgument",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NullityUncheckedTypeAnnotationDetail",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NullityUncheckedTypeAnnotationDetailSuperHint",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NullNotCompatibleToFreeTypeVariable",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NullSourceString", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("NullUnboxing",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("NumericValueOutOfRange",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("ObjectCannotBeGeneric",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("ObjectCannotHaveSuperTypes",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("ObjectHasNoSuperclass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ObjectMustBeClass", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("OuterLocalMustBeEffectivelyFinal",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("OuterLocalMustBeFinal",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("OverridingDeprecatedMethod",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("OverridingDeprecatedSinceVersionMethod",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("OverridingTerminallyDeprecatedMethod",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("OverridingTerminallyDeprecatedSinceVersionMethod",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("OverridingMethodWithoutSuperInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("OverridingNonVisibleMethod",
- new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
- expectedProblemAttributes.put("PackageCollidesWithType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("PackageDoesNotExistOrIsEmpty",
- new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("PackageIsNotExpectedPackage",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("ParameterAssignment",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("ParameterLackingNonNullAnnotation",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ParameterLackingNullableAnnotation",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ParameterMismatch", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("ParameterizedConstructorArgumentTypeMismatch",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ParameterizedMethodArgumentTypeMismatch",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ParsingError", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorDeleteToken",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorDeleteTokens",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorInsertToComplete",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorInsertToCompletePhrase",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorInsertToCompleteScope",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorInsertTokenAfter",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorInsertTokenBefore",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorInvalidToken",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorMergeTokens",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorMisplacedConstruct",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorNoSuggestion",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorNoSuggestionForTokens",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorOnKeyword",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorOnKeywordNoSuggestion",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorReplaceTokens",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("ParsingErrorUnexpectedEOF",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("PolymorphicMethodNotBelow17",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("PossibleAccidentalBooleanAssignment",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("PotentialHeapPollutionFromVararg",
- new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
- expectedProblemAttributes.put("PotentiallyUnclosedCloseable",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("PotentiallyUnclosedCloseableAtExit",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("PotentialNullLocalVariableReference",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("PotentialNullExpressionReference",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("PotentialNullMessageSendReference",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("PotentialNullUnboxing",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ProviderMethodOrConstructorRequiredForServiceImpl",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("PublicClassMustMatchFileName",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("RawMemberTypeCannotBeParameterized",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("RawTypeReference",
- new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
- expectedProblemAttributes.put("RecursiveConstructorInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("RedefinedArgument", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("RedefinedLocal", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("RedundantSpecificationOfTypeArguments",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("RedundantLocalVariableNullAssignment",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("RedundantNullAnnotation",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("RedundantNullCheckAgainstNonNullType",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("RedundantNullCheckOnField",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("RedundantNullCheckOnNonNullExpression",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("RedundantNullCheckOnNonNullSpecdField",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("RedundantNullCheckOnNonNullLocalVariable",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("RedundantNullCheckOnNonNullMessageSend",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("RedundantNullCheckOnNullLocalVariable",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("RedundantNullCheckOnSpecdNonNullLocalVariable",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("RedundantNullDefaultAnnotation",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("RedundantNullDefaultAnnotationModule",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("RedundantNullDefaultAnnotationPackage",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("RedundantNullDefaultAnnotationType",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("RedundantNullDefaultAnnotationMethod",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("RedundantNullDefaultAnnotationLocal",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("RedundantNullDefaultAnnotationField",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("RedundantSuperinterface",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("ReferenceExpressionParameterNullityMismatch",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ReferenceExpressionParameterNullityUnchecked",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ReferenceExpressionReturnNullRedef",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ReferenceExpressionReturnNullRedefUnchecked",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ReferenceToForwardField",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("RequiredNonNullButProvidedFreeTypeVariable",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("RequiredNonNullButProvidedNull",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("RequiredNonNullButProvidedPotentialNull",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("RequiredNonNullButProvidedSpecdNullable",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("RequiredNonNullButProvidedUnknown",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ReferenceToForwardTypeVariable",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("RepeatableAnnotationTypeIsDocumented",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("RepeatableAnnotationTypeIsInherited",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("RepeatableAnnotationTypeTargetMismatch",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("RepeatableAnnotationWithRepeatingContainerAnnotation",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("RepeatedAnnotationWithContainerAnnotation",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ResourceHasToImplementAutoCloseable",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ReturnTypeAmbiguous", DEPRECATED);
- expectedProblemAttributes.put("ReturnTypeCannotBeVoidArray", DEPRECATED);
- expectedProblemAttributes.put("ReturnTypeInheritedNameHidesEnclosingName", DEPRECATED);
- expectedProblemAttributes.put("ReturnTypeInternalNameProvided", DEPRECATED);
- expectedProblemAttributes.put("ReturnTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ReturnTypeNotFound", DEPRECATED);
- expectedProblemAttributes.put("ReturnTypeNotVisible", DEPRECATED);
- expectedProblemAttributes.put("SafeVarargsOnFixedArityMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("SafeVarargsOnNonFinalInstanceMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("ServiceImplDefaultConstructorNotPublic",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ServiceImplNotDefinedByModule",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ShouldImplementHashcode",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("ShouldReturnValue", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("ShouldReturnValueHintMissingDefault",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("SpecdNonNullLocalVariableComparisonYieldsFalse",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("StaticInheritedMethodConflicts",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("StaticMemberOfParameterizedType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("StaticMethodRequested",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("StaticMethodShouldBeAccessedStatically",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("StringConstantIsExceedingUtf8Limit",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("SuperAccessCannotBypassDirectSuper",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("SuperCallCannotBypassOverride",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("SuperInterfaceMustBeAnInterface",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("SuperInterfacesCollide", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("SuperTypeUsingWildcard", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("SuperclassAmbiguous", DEPRECATED);
- expectedProblemAttributes.put("SuperclassInheritedNameHidesEnclosingName", DEPRECATED);
- expectedProblemAttributes.put("SuperclassInternalNameProvided", DEPRECATED);
- expectedProblemAttributes.put("SuperclassMustBeAClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("SuperclassNotFound", DEPRECATED);
- expectedProblemAttributes.put("SuperclassNotVisible", DEPRECATED);
- expectedProblemAttributes.put("SuperfluousSemicolon",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("SwitchOnEnumNotBelow15", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("SwitchOnStringsNotBelow17",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("TargetTypeNotAFunctionalInterface",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("Task", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("ThisInStaticContext",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("ThisSuperDuringConstructorInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("ToleratedMisplacedTypeAnnotations",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("TooManyArgumentSlots",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("TooManyArrayDimensions",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("TooManyBytesForStringConstant",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("TooManyConstantsInConstantPool",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("TooManyFields", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("TooManyLocalVariableSlots",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("TooManyMethods", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("TooManyParametersForSyntheticMethod",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("TooManySyntheticArgumentSlots",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("TypeAnnotationAtQualifiedName",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("TypeArgumentMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("TypeArgumentsForRawGenericConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("TypeArgumentsForRawGenericMethod",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("TypeCollidesWithPackage",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("TypeHidingType",
- new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
- expectedProblemAttributes.put("TypeHidingTypeParameterFromMethod",
- new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
- expectedProblemAttributes.put("TypeHidingTypeParameterFromType",
- new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
- expectedProblemAttributes.put("TypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("TypeMissingDeprecatedAnnotation",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("TypeParameterHidingType",
- new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
- expectedProblemAttributes.put("UnboxingConversion",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("UncheckedAccessOfValueOfFreeTypeVariable",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("UnclosedCloseable",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("UnclosedCloseableAtExit",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("UndefinedAnnotationMember",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("UndefinedConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("UndefinedConstructorInDefaultConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("UndefinedConstructorInImplicitConstructorCall",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("UndefinedField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("UndefinedLabel", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("UndefinedMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("UndefinedModule", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("UndefinedName", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("UndefinedType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("UndefinedTypeVariable",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("UnderscoresInLiteralsNotBelow17",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("UndocumentedEmptyBlock",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("UnexpectedStaticModifierForField",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("UnexpectedStaticModifierForMethod",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("UnhandledException", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("UnhandledExceptionInDefaultConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("UnhandledExceptionInImplicitConstructorCall",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("UnhandledExceptionOnAutoClose",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("UnhandledWarningToken",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("UninitializedBlankFinalField",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("UninitializedBlankFinalFieldHintMissingDefault",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("UninitializedFreeTypeVariableField",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("UninitializedFreeTypeVariableFieldHintMissingDefault",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("UninitializedLocalVariable",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("UninitializedLocalVariableHintMissingDefault",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("UninitializedNonNullField",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("UninitializedNonNullFieldHintMissingDefault",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("UninternedIdentityComparison",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("UnlikelyCollectionMethodArgumentType",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("UnlikelyEqualsArgumentType",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("UnmatchedBracket", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("UnnamedPackageInNamedModule",
- new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("UnnecessaryArgumentCast", DEPRECATED);
- expectedProblemAttributes.put("UnnecessaryCast",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("UnnecessaryElse",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("UnnecessaryInstanceof",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("UnnecessaryNLSTag", new ProblemAttributes(CategorizedProblem.CAT_NLS));
- expectedProblemAttributes.put("UnqualifiedFieldAccess",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("UnreachableCatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("UnresolvedVariable", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("UnsafeElementTypeConversion",
- new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
- expectedProblemAttributes.put("UnsafeGenericArrayForVarargs",
- new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
- expectedProblemAttributes.put("UnsafeGenericCast",
- new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
- expectedProblemAttributes.put("UnsafeNullnessCast",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("UnsafeRawConstructorInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
- expectedProblemAttributes.put("UnsafeRawFieldAssignment",
- new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
- expectedProblemAttributes.put("UnsafeRawGenericConstructorInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
- expectedProblemAttributes.put("UnsafeRawGenericMethodInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
- expectedProblemAttributes.put("UnsafeRawMethodInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
- expectedProblemAttributes.put("UnsafeReturnTypeOverride",
- new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
- expectedProblemAttributes.put("UnsafeTypeConversion",
- new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
- expectedProblemAttributes.put("UnstableAutoModuleName",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("UnterminatedComment", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("UnterminatedString", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("UnusedConstructorDeclaredThrownException",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("UnusedImport",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("UnusedLabel",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("UnusedMethodDeclaredThrownException",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("UnusedObjectAllocation",
- new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
- expectedProblemAttributes.put("UnusedPrivateConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("UnusedPrivateField",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("UnusedPrivateMethod",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("UnusedPrivateType",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("UnusedTypeArgumentsForConstructorInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("UnusedTypeParameter",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("UnusedTypeArgumentsForMethodInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("UnusedWarningToken",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("UseAssertAsAnIdentifier",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("UseEnumAsAnIdentifier",
- new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
- expectedProblemAttributes.put("IllegalUseOfUnderscoreAsAnIdentifier",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("UsingDeprecatedConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedField",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedMethod",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedModule",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedPackage",
- new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("UsingDeprecatedType",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedSinceVersionConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedSinceVersionField",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedSinceVersionMethod",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedSinceVersionModule",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedSinceVersionPackage",
- new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("UsingDeprecatedSinceVersionType",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedField",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedMethod",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedModule",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedPackage",
- new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedType",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionField",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionMethod",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionModule",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionPackage",
- new ProblemAttributes(CategorizedProblem.CAT_MODULE));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionType",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionType",
- new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
- expectedProblemAttributes.put("VarCannotBeMixedWithNonVarParams",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("VarIsNotAllowedHere", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("VarIsReserved", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("VarIsReservedInFuture",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("VarLocalCannotBeArray",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("VarLocalCannotBeArrayInitalizers",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("VarLocalCannotBeLambda", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("VarLocalCannotBeMethodReference",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("VarLocalInitializedToNull",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("VarLocalInitializedToVoid",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("VarLocalMultipleDeclarators",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("VarLocalReferencesItself",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("VarLocalCannotBeArray",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("VarLocalWithoutInitizalier",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("VarargsElementTypeNotVisible",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("VarargsElementTypeNotVisibleForConstructor",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("VarargsConflict", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("VariableTypeCannotBeVoid",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("VariableTypeCannotBeVoidArray", DEPRECATED);
- expectedProblemAttributes.put("VoidMethodReturnsValue",
- new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
- expectedProblemAttributes.put("WildcardConstructorInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("WildcardFieldAssignment",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("WildcardMethodInvocation",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("illFormedParameterizationOfFunctionalInterface",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("lambdaParameterTypeMismatched",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("lambdaSignatureMismatched",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalArrayOfUnionType",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("IllegalArrayTypeInIntersectionCast",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("ProblemNotAnalysed",
- new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
- expectedProblemAttributes.put("SwitchExpressionsIncompatibleResultExpressionTypes",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("SwitchExpressionsEmptySwitchBlock",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("SwitchExpressionsNoResultExpression",
- new ProblemAttributes(CategorizedProblem.CAT_TYPE));
- expectedProblemAttributes.put("SwitchExpressionSwitchLabeledBlockCompletesNormally",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("SwitchExpressionLastStatementCompletesNormally",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("SwitchExpressionTrailingSwitchLabels",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("switchMixedCase",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("SwitchExpressionMissingDefaultCase",
- new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
- expectedProblemAttributes.put("SwitchExpressionNotBelow12",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("SwitchCaseLabelWithArrowNotBelow12",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("SwitchExpressionPreviewDisabled",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("SwitchCaseLabelWithArrowPreviewDisabled",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("PreviewFeatureDisabled",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("PreviewFeatureUsed",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- expectedProblemAttributes.put("PreviewFeatureNotSupported",
- new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
- StringBuffer failures = new StringBuffer();
- StringBuffer correctResult = new StringBuffer(70000);
- Field[] fields = (iProblemClass = IProblem.class).getFields();
- Arrays.sort(fields, new Comparator() {
- public int compare(Object o1, Object o2) {
- Field field1 = (Field) o1;
- Field field2 = (Field) o2;
- return field1.getName().compareTo(field2.getName());
+ ProblemAttributes(boolean deprecated) {
+ this.deprecated = deprecated;
+ }
+ }
+ ProblemAttributes DEPRECATED = new ProblemAttributes(true);
+ Map expectedProblemAttributes = new HashMap();
+ expectedProblemAttributes.put("AbstractMethodCannotBeOverridden", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("AbstractMethodInAbstractClass", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("AbstractMethodInEnum", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("AbstractMethodMustBeImplemented", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("AbstractMethodMustBeImplementedOverConcreteMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("AbstractMethodsInConcreteClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("AbstractServiceImplementation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("AmbiguousConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("AmbiguousConstructorInDefaultConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("AmbiguousConstructorInImplicitConstructorCall", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("AmbiguousField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("AmbiguousMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("AmbiguousType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("AnnotationCannotOverrideMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("AnnotationCircularity", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("AnnotationCircularitySelfReference", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("AnnotationFieldNeedConstantInitialization", DEPRECATED);
+ expectedProblemAttributes.put("AnnotationMembersCannotHaveParameters", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("AnnotationMembersCannotHaveTypeParameters", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("AnnotationTypeDeclarationCannotHaveConstructor", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("AnnotationTypeDeclarationCannotHaveSuperclass", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("AnnotationTypeDeclarationCannotHaveSuperinterfaces", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("AnnotationTypeUsedAsSuperInterface", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("AnnotationValueMustBeAnEnumConstant", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("AnnotationValueMustBeAnnotation", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("AnnotationValueMustBeArrayInitializer", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("AnnotationValueMustBeClassLiteral", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("AnnotationValueMustBeConstant", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("AnonymousClassCannotExtendFinalClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ApplicableMethodOverriddenByInapplicable", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("ArgumentHidingField", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
+ expectedProblemAttributes.put("ArgumentHidingLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
+ expectedProblemAttributes.put("ArgumentIsNeverUsed", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("ArgumentTypeAmbiguous", DEPRECATED);
+ expectedProblemAttributes.put("ArgumentTypeCannotBeVoid", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("ArgumentTypeCannotBeVoidArray", DEPRECATED);
+ expectedProblemAttributes.put("ArgumentTypeInheritedNameHidesEnclosingName", DEPRECATED);
+ expectedProblemAttributes.put("ArgumentTypeInternalNameProvided", DEPRECATED);
+ expectedProblemAttributes.put("ArgumentTypeNotFound", DEPRECATED);
+ expectedProblemAttributes.put("ArgumentTypeNotVisible", DEPRECATED);
+ expectedProblemAttributes.put("ArrayConstantsOnlyInArrayInitializers", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ArrayReferencePotentialNullReference", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ArrayReferenceRequired", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("AssignmentHasNoEffect", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("AssignmentToMultiCatchParameter", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("AssignmentToResource", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("AutoManagedResourceNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("AutoManagedVariableResourceNotBelow9", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("BinaryLiteralNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("BodyForAbstractMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("BodyForNativeMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("BoundCannotBeArray", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("BoundHasConflictingArguments", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("BoundMustBeAnInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("BoxingConversion", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("BytecodeExceeds64KLimit", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("BytecodeExceeds64KLimitForClinit", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("BytecodeExceeds64KLimitForConstructor", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("BytecodeExceeds64KLimitForSwitchTable", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("CannotAllocateVoidArray", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("CannotDeclareEnumSpecialMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("CannotDefineAnnotationInLocalType", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("CannotDefineDimensionExpressionsWithInit", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("CannotDefineEnumInLocalType", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("CannotDefineInterfaceInLocalType", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("CannotDefineStaticInitializerInLocalType", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("CannotExtendEnum", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("CannotHideAnInstanceMethodWithAStaticMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("CannotImplementIncompatibleNullness", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("CannotImportPackage", new ProblemAttributes(CategorizedProblem.CAT_IMPORT));
+ expectedProblemAttributes.put("CannotInferElidedTypes", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("CannotInferInvocationType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("CannotInvokeSuperConstructorInEnum", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("CannotOverrideAStaticMethodWithAnInstanceMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("CannotReadSource", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("CannotReturnInInitializer", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("CannotThrowNull", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("CannotThrowType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("CannotUseDiamondWithAnonymousClasses", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("CannotUseDiamondWithExplicitTypeArguments", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("CannotUseSuperInCodeSnippet", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("ClassExtendFinalClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("CodeCannotBeReached", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("CodeSnippetMissingClass", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("CodeSnippetMissingMethod", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("ContainerAnnotationTypeHasNonDefaultMembers", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ContainerAnnotationTypeHasShorterRetention", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ContainerAnnotationTypeHasWrongValueType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ContainerAnnotationTypeMustHaveValue", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ContradictoryNullAnnotations", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ContradictoryNullAnnotationsOnBound", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ContradictoryNullAnnotationsInferred", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ContradictoryNullAnnotationsInferredFunctionType", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ComparingIdentical", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ConflictingImport", new ProblemAttributes(CategorizedProblem.CAT_IMPORT));
+ expectedProblemAttributes.put("ConflictingNullAnnotations", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ConstructedArrayIncompatible", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("ConstructionTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ConflictingInheritedNullAnnotations", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ConstructorReferenceNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ConstructorVarargsArgumentNeedCast", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("CyclicModuleDependency", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("CorruptedSignature", new ProblemAttributes(CategorizedProblem.CAT_BUILDPATH));
+ expectedProblemAttributes.put("DanglingReference", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("DeadCode", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("DefaultMethodNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("DefaultMethodOverridesObjectMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("DereferencingNullableExpression", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("DiamondNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("DirectInvocationOfAbstractMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("DisallowedTargetForContainerAnnotationType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("DisallowedTargetForAnnotation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("DisallowedExplicitThisParameter", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("DiscouragedReference", new ProblemAttributes(CategorizedProblem.CAT_RESTRICTION));
+ expectedProblemAttributes.put("DuplicateAnnotation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("DuplicateAnnotationNotMarkedRepeatable", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("DuplicateAnnotationMember", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("DuplicateBlankFinalFieldInitialization", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("DuplicateBounds", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("DuplicateBoundInIntersectionCast", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("DuplicateCase", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("DuplicateDefaultCase", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("DuplicateExports", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("DuplicateField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("DuplicateFinalLocalInitialization", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("DuplicateImport", new ProblemAttributes(CategorizedProblem.CAT_IMPORT));
+ expectedProblemAttributes.put("DuplicateInheritedMethods", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("DuplicateInheritedDefaultMethods", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("DuplicateLabel", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("DuplicateMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("DuplicateMethodErasure", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("DuplicateModifierForArgument", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("DuplicateModifierForField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("DuplicateModifierForMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("DuplicateModifierForType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("DuplicateModifierForVariable", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("DuplicateModuleRef", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("DuplicateNestedType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("DuplicateOpens", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("DuplicateParameterizedMethods", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("DuplicateRequires", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("DuplicateResource", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("DuplicateServices", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("DuplicateSuperInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("DuplicateTargetInTargetAnnotation", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("DuplicateTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("DuplicateTypes", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("DuplicateUses", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("EmptyControlFlowStatement", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("EnclosingInstanceInConstructorCall", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("EndOfSource", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("EnumAbstractMethodMustBeImplemented", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("EnumConstantCannotDefineAbstractMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("EnumConstantMustImplementAbstractMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("EnumConstantsCannotBeSurroundedByParenthesis", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("EnumStaticFieldInInInitializerContext", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("EnumSwitchCannotTargetField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("ExceptionParameterIsNeverUsed", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("ExceptionTypeAmbiguous", DEPRECATED);
+ expectedProblemAttributes.put("ExceptionTypeInheritedNameHidesEnclosingName", DEPRECATED);
+ expectedProblemAttributes.put("ExceptionTypeInternalNameProvided", DEPRECATED);
+ expectedProblemAttributes.put("ExceptionTypeNotFound", DEPRECATED);
+ expectedProblemAttributes.put("ExceptionTypeNotVisible", DEPRECATED);
+ expectedProblemAttributes.put("ExplicitThisParameterNotInLambda", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ExplicitThisParameterNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ExplicitlyClosedAutoCloseable", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("ExpressionShouldBeAVariable", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ExternalProblemFixable", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("ExternalProblemNotFixable", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("ExplicitAnnotationTargetRequired", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("FallthroughCase", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("FieldComparisonYieldsFalse", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("FieldHidingField", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
+ expectedProblemAttributes.put("FieldHidingLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
+ expectedProblemAttributes.put("FieldMissingDeprecatedAnnotation", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("FieldMustBeFinal", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("FieldTypeAmbiguous", DEPRECATED);
+ expectedProblemAttributes.put("FieldTypeInheritedNameHidesEnclosingName", DEPRECATED);
+ expectedProblemAttributes.put("FieldTypeInternalNameProvided", DEPRECATED);
+ expectedProblemAttributes.put("FieldTypeNotFound", DEPRECATED);
+ expectedProblemAttributes.put("FieldTypeNotVisible", DEPRECATED);
+ expectedProblemAttributes.put("FinalBoundForTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("FinalFieldAssignment", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("FinalMethodCannotBeOverridden", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("FinalOuterLocalAssignment", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("FinallyMustCompleteNormally", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ForbiddenReference", new ProblemAttributes(CategorizedProblem.CAT_RESTRICTION));
+ expectedProblemAttributes.put("GenericConstructorTypeArgumentMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("GenericInferenceError", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL)); // TODO should be removed via https://bugs.eclipse.org/404675
+ expectedProblemAttributes.put("GenericMethodTypeArgumentMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("GenericTypeCannotExtendThrowable", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("HidingEnclosingType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("HierarchyCircularity", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("HierarchyCircularitySelfReference", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("HierarchyHasProblems", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalAbstractModifierCombinationForMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalStrictfpForAbstractInterfaceMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalAccessFromTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalAnnotationForBaseType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalCast", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalClassLiteralForTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalDeclarationOfThisParameter", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("IllegalDefaultModifierSpecification", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalDefinitionToNonNullParameter", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("IllegalDimension", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("IllegalEnclosingInstanceSpecification", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalExtendedDimensions", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalExtendedDimensionsForVarArgs", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("IllegalGenericArray", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalHexaLiteral", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("IllegalInstanceofParameterizedType", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("IllegalInstanceofTypeParameter", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("IllegalBasetypeInIntersectionCast", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalModifierCombinationFinalAbstractForClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalModifierCombinationFinalVolatileForField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifierCombinationForInterfaceMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifierCombinationForPrivateInterfaceMethod9", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifierForAnnotationField", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("IllegalModifierForAnnotationMemberType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalModifierForAnnotationMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifierForAnnotationType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalModifierForArgument", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifierForClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalModifierForConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifierForEnum", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalModifierForEnumConstant", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifierForEnumConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifierForField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifierForInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalModifierForInterfaceField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifierForInterfaceMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifierForInterfaceMethod18", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifierForLocalClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalModifierForLocalEnum", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalModifierForMemberClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalModifierForMemberEnum", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalModifierForMemberInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalModifierForMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifierForModule", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("IllegalModifierForInterfaceMethod9", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifierForVariable", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalModifiersForElidedType", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("IllegalModifiers", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("IllegalParameterNullityRedefinition", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("IllegalPrimitiveOrArrayTypeForEnclosingInstance", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalQualifiedEnumConstantLabel", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalQualifiedParameterizedTypeAllocation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalQualifierForExplicitThis", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("IllegalQualifierForExplicitThis2", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("IllegalRedefinitionOfTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("IllegalReturnNullityRedefinition", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("IllegalReturnNullityRedefinitionFreeTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("IllegalRedefinitionToNonNullParameter", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("IllegalStaticModifierForMemberType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalTypeAnnotationsInStaticMemberAccess", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("IllegalTypeArgumentsInRawConstructorReference", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalTypeForExplicitThis", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("IllegalTypeVariableSuperReference", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("IllegalUnderscorePosition", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("IllegalUsageOfQualifiedTypeReference", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("IllegalUsageOfTypeAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("IllegalVararg", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalVarargInLambda", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForMemberType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IllegalVisibilityModifierForInterfaceMemberType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ImplicitObjectBoundNoNullDefault", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("ImportAmbiguous", DEPRECATED);
+ expectedProblemAttributes.put("ImportInheritedNameHidesEnclosingName", DEPRECATED);
+ expectedProblemAttributes.put("ImportInternalNameProvided", DEPRECATED);
+ expectedProblemAttributes.put("ImportNotFound", new ProblemAttributes(CategorizedProblem.CAT_IMPORT));
+ expectedProblemAttributes.put("ImportNotVisible", DEPRECATED);
+ expectedProblemAttributes.put("IncompatibleExceptionInInheritedMethodThrowsClause", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IncompatibleExceptionInThrowsClause", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
+ expectedProblemAttributes.put("IncompatibleLambdaParameterType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IncompatibleMethodReference", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IncompatibleReturnType", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("IncompatibleReturnTypeForNonInheritedInterfaceMethod", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
+ expectedProblemAttributes.put("IncompatibleTypesInConditionalOperator", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IncompatibleTypesInEqualityOperator", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IncompatibleTypesInForeach", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+
+ expectedProblemAttributes.put("IncorrectArityForParameterizedConstructor", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IncorrectArityForParameterizedMethod", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IncorrectArityForParameterizedType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IncorrectEnclosingInstanceReference", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IncorrectSwitchType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IncorrectSwitchType17", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IndirectAccessToStaticField", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("IndirectAccessToStaticMethod", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("IndirectAccessToStaticType", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("InheritedDefaultMethodConflictsWithOtherInherited", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("InheritedFieldHidesEnclosingName", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("InheritedIncompatibleReturnType", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("InheritedMethodHidesEnclosingName", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("InheritedMethodReducesVisibility", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("InheritedTypeHidesEnclosingName", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("InitializerMustCompleteNormally", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("InstanceFieldDuringConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("InstanceMethodDuringConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("InterfaceAmbiguous", DEPRECATED);
+ expectedProblemAttributes.put("InterfaceCannotHaveConstructors", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InterfaceCannotHaveInitializers", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("InterfaceInheritedNameHidesEnclosingName", DEPRECATED);
+ expectedProblemAttributes.put("InterfaceInternalNameProvided", DEPRECATED);
+ expectedProblemAttributes.put("InterfaceNotFound", DEPRECATED);
+ expectedProblemAttributes.put("InterfaceNotFunctionalInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("InterfaceNotVisible", DEPRECATED);
+ expectedProblemAttributes.put("InterfaceStaticMethodInvocationNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InterfaceSuperInvocationNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InternalTypeNameProvided", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IntersectionCastNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("InvalidAnnotationMemberType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("InvalidArrayConstructorReference", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("InvalidBinary", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidBreak", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("InvalidCatchBlockSequence", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("InvalidCharacterConstant", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidClassInstantiation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("InvalidContinue", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("InvalidDigit", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidEncoding", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("InvalidEscape", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidExplicitConstructorCall", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidExpressionAsStatement", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidFileNameForPackageAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidFloat", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidHexa", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidHighSurrogate", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidInput", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidLowSurrogate", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidLocationForModifiers", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidNullToSynchronized", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("InvalidOctal", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidOpensStatement", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("InvalidOperator", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("InvalidParameterizedExceptionType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("InvalidParenthesizedExpression", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidServiceIntfType", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("InvalidServiceImplType", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("InvalidTypeExpression", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("InvalidTypeArguments", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("InvalidTypeForCollection", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("InvalidTypeForCollectionTarget14", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("InvalidTypeForStaticImport", new ProblemAttributes(CategorizedProblem.CAT_IMPORT));
+ expectedProblemAttributes.put("InvalidTypeToSynchronized", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("InvalidTypeVariableExceptionType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("InvalidUnaryExpression", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidUnicodeEscape", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidUnionTypeReferenceSequence", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("InvalidUsageOfAnnotationDeclarations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidUsageOfAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidUsageOfEnumDeclarations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidUsageOfForeachStatements", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidUsageOfStaticImports", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidUsageOfTypeAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidUsageOfTypeArguments", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidUsageOfTypeParameters", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidUsageOfTypeParametersForAnnotationDeclaration", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidUsageOfTypeParametersForEnumDeclaration", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidUsageOfVarargs", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidUsageOfWildcard", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("InvalidVoidExpression", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("IsClassPathCorrect", new ProblemAttributes(CategorizedProblem.CAT_BUILDPATH));
+ expectedProblemAttributes.put("JavadocAmbiguousConstructor", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocAmbiguousField", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocAmbiguousMethod", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocAmbiguousMethodReference", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocAmbiguousType", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocDuplicateParamName", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocDuplicateReturnTag", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocDuplicateTag", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocDuplicateThrowsClassName", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocEmptyReturnTag", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocGenericConstructorTypeArgumentMismatch", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocGenericMethodTypeArgumentMismatch", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocHiddenReference", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocIncorrectArityForParameterizedConstructor", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocIncorrectArityForParameterizedMethod", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInheritedFieldHidesEnclosingName", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInheritedMethodHidesEnclosingName", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInheritedNameHidesEnclosingTypeName", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInternalTypeNameProvided", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidMemberTypeQualification", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidParamName", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidParamTagName", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidParamTagTypeParameter", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidSeeArgs", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidSeeHref", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidSeeReference", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidSeeUrlReference", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidTag", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidThrowsClass", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidThrowsClassName", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidValueReference", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocMalformedSeeReference", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocMessagePrefix", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("JavadocMissing", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingHashCharacter", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingIdentifier", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingParamName", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingParamTag", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingReturnTag", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingSeeReference", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingTagDescription", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingThrowsClassName", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingThrowsTag", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocNoMessageSendOnArrayType", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocNoMessageSendOnBaseType", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocNonGenericConstructor", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocNonGenericMethod", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocNonStaticTypeFromStaticInvocation", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocNotVisibleConstructor", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocNotVisibleField", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocNotVisibleMethod", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocNotVisibleType", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocParameterMismatch", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocParameterizedConstructorArgumentTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocParameterizedMethodArgumentTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericConstructor", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericMethod", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocUndefinedConstructor", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocUndefinedField", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocUndefinedMethod", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocUndefinedType", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocUnexpectedTag", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocUnexpectedText", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocUnterminatedInlineTag", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocUsingDeprecatedConstructor", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocUsingDeprecatedField", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocUsingDeprecatedMethod", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("JavadocUsingDeprecatedType", new ProblemAttributes(CategorizedProblem.CAT_JAVADOC));
+ expectedProblemAttributes.put("LambdaDescriptorMentionsUnmentionable", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("LambdaExpressionNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("LambdaRedeclaresArgument", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("LambdaRedeclaresLocal", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("LambdaShapeComputationError", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("LocalVariableCanOnlyBeNull", DEPRECATED);
+ expectedProblemAttributes.put("LocalVariableCannotBeNull", DEPRECATED);
+ expectedProblemAttributes.put("LocalVariableHidingField", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
+ expectedProblemAttributes.put("LocalVariableHidingLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
+ expectedProblemAttributes.put("LocalVariableIsNeverUsed", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("LocalVariableMayBeNull", DEPRECATED);
+ expectedProblemAttributes.put("MaskedCatch", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("MethodButWithConstructorName", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("MethodCanBePotentiallyStatic", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("MethodCanBeStatic", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("MethodMissingDeprecatedAnnotation", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("MethodMustOverride", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("MethodMustOverrideOrImplement", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("MethodNameClash", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("MethodNameClashHidden", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("MethodReducesVisibility", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("MethodReferenceNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("MethodReferenceSwingsBothWays", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("MethodRequiresBody", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("MethodReturnsVoid", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("MethodVarargsArgumentNeedCast", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("MisplacedTypeAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("MissingArgumentsForParameterizedMemberType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("MissingDefaultCase", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("MissingEnclosingInstance", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("MissingEnclosingInstanceForConstructorCall", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("MissingEnumConstantCase", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("MissingEnumConstantCaseDespiteDefault", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("MissingEnumDefaultCase", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("MissingNonNullByDefaultAnnotationOnPackage", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("MissingNonNullByDefaultAnnotationOnType", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("MissingOverrideAnnotation", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("MissingOverrideAnnotationForInterfaceMethodImplementation", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("MissingRequiresTransitiveForTypeInAPI", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("MissingReturnType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("MissingSemiColon", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("MissingSerialVersion", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("MissingSynchronizedModifierInInheritedMethod", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("MissingTypeInConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("MissingTypeInLambda", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("MissingTypeInMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("MissingValueForAnnotationMember", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("MultiCatchNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("MultipleFunctionalInterfaces", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("StaticInterfaceMethodNotBelow18", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("MustDefineEitherDimensionExpressionsOrInitializer", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("MustSpecifyPackage", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("NativeMethodsCannotBeStrictfp", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("NeedToEmulateConstructorAccess", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("NeedToEmulateFieldReadAccess", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("NeedToEmulateFieldWriteAccess", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("NeedToEmulateMethodAccess", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("NestedServiceImpl", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("NoAdditionalBoundAfterTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("NoFieldOnBaseType", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("NoGenericLambda", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("NoImplicitStringConversionForCharArrayExpression", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NoMessageSendOnArrayType", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("NoMessageSendOnBaseType", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("NoSuperInInterfaceContext", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("NonBlankFinalLocalAssignment", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("NonConstantExpression", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("NonDenotableTypeArgumentForAnonymousDiamond", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("NonExternalizedStringLiteral", new ProblemAttributes(CategorizedProblem.CAT_NLS));
+ expectedProblemAttributes.put("NonGenericConstructor", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("NonGenericMethod", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("NonGenericType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("NonNullDefaultDetailIsNotEvaluated", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("NonNullExpressionComparisonYieldsFalse", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NonNullMessageSendComparisonYieldsFalse", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NonNullSpecdFieldComparisonYieldsFalse", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NonNullLocalVariableComparisonYieldsFalse", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NonNullTypeVariableFromLegacyMethod", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NonNullMethodTypeVariableFromLegacyMethod", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NonPublicTypeInAPI", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NonStaticAccessToStaticField", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("NonStaticAccessToStaticMethod", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("NonStaticContextForEnumMemberType", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("NonStaticFieldFromStaticInvocation", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("NonStaticOrAlienTypeReceiver", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("NonStaticTypeFromStaticInvocation", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("NotAnnotationType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("NotAccessibleConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("NotAccessibleField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("NotAccessibleMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("NotAccessibleType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("NotAccessiblePackage", new ProblemAttributes(CategorizedProblem.CAT_IMPORT));
+ expectedProblemAttributes.put("NotExportedTypeInAPI", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ConflictingPackageFromModules", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("ConflictingPackageFromOtherModules", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("NotVisibleConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("NotVisibleConstructorInDefaultConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("NotVisibleConstructorInImplicitConstructorCall", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("NotVisibleField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("NotVisibleMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("NotVisibleType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("NullableFieldReference", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NullAnnotationAtQualifyingType", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("NullAnnotationUnsupportedLocation", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("NullAnnotationUnsupportedLocationAtType", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("NullExpressionReference", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NullLocalVariableComparisonYieldsFalse", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NullLocalVariableInstanceofYieldsFalse", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NullLocalVariableReference", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NullityMismatchAgainstFreeTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NullityMismatchingTypeAnnotation", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NullityMismatchingTypeAnnotationSuperHint", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NullityMismatchTypeArgument", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NullityUncheckedTypeAnnotationDetail", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NullityUncheckedTypeAnnotationDetailSuperHint", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NullNotCompatibleToFreeTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NullSourceString", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("NullUnboxing", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("NumericValueOutOfRange", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("ObjectCannotBeGeneric", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("ObjectCannotHaveSuperTypes", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("ObjectHasNoSuperclass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ObjectMustBeClass", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("OuterLocalMustBeEffectivelyFinal", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("OuterLocalMustBeFinal", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("OverridingDeprecatedMethod", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("OverridingDeprecatedSinceVersionMethod", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("OverridingTerminallyDeprecatedMethod", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("OverridingTerminallyDeprecatedSinceVersionMethod", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("OverridingMethodWithoutSuperInvocation", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("OverridingNonVisibleMethod", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
+ expectedProblemAttributes.put("PackageCollidesWithType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("PackageDoesNotExistOrIsEmpty", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("PackageIsNotExpectedPackage", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("ParameterAssignment", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("ParameterLackingNonNullAnnotation", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ParameterLackingNullableAnnotation", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ParameterMismatch", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("ParameterizedConstructorArgumentTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ParameterizedMethodArgumentTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ParsingError", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorDeleteToken", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorDeleteTokens", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorInsertToComplete", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorInsertToCompletePhrase", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorInsertToCompleteScope", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorInsertTokenAfter", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorInsertTokenBefore", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorInvalidToken", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorMergeTokens", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorMisplacedConstruct", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorNoSuggestion", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorNoSuggestionForTokens", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorOnKeyword", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorOnKeywordNoSuggestion", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorReplaceTokens", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("ParsingErrorUnexpectedEOF", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("PolymorphicMethodNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("PossibleAccidentalBooleanAssignment", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("PotentialHeapPollutionFromVararg", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
+ expectedProblemAttributes.put("PotentiallyUnclosedCloseable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("PotentiallyUnclosedCloseableAtExit", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("PotentialNullLocalVariableReference", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("PotentialNullExpressionReference", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("PotentialNullMessageSendReference", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("PotentialNullUnboxing", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ProviderMethodOrConstructorRequiredForServiceImpl", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("PublicClassMustMatchFileName", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("RawMemberTypeCannotBeParameterized", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("RawTypeReference", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
+ expectedProblemAttributes.put("RecursiveConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("RedefinedArgument", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("RedefinedLocal", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("RedundantSpecificationOfTypeArguments", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("RedundantLocalVariableNullAssignment", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("RedundantNullAnnotation", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("RedundantNullCheckAgainstNonNullType", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("RedundantNullCheckOnField", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("RedundantNullCheckOnNonNullExpression", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("RedundantNullCheckOnNonNullSpecdField", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("RedundantNullCheckOnNonNullLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("RedundantNullCheckOnNonNullMessageSend", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("RedundantNullCheckOnNullLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("RedundantNullCheckOnSpecdNonNullLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("RedundantNullDefaultAnnotation", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("RedundantNullDefaultAnnotationModule", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("RedundantNullDefaultAnnotationPackage", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("RedundantNullDefaultAnnotationType", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("RedundantNullDefaultAnnotationMethod", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("RedundantNullDefaultAnnotationLocal", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("RedundantNullDefaultAnnotationField", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("RedundantSuperinterface", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("ReferenceExpressionParameterNullityMismatch", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ReferenceExpressionParameterNullityUnchecked", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ReferenceExpressionReturnNullRedef", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ReferenceExpressionReturnNullRedefUnchecked", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ReferenceToForwardField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("RequiredNonNullButProvidedFreeTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("RequiredNonNullButProvidedNull", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("RequiredNonNullButProvidedPotentialNull", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("RequiredNonNullButProvidedSpecdNullable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("RequiredNonNullButProvidedUnknown", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ReferenceToForwardTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("RepeatableAnnotationTypeIsDocumented", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("RepeatableAnnotationTypeIsInherited", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("RepeatableAnnotationTypeTargetMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("RepeatableAnnotationWithRepeatingContainerAnnotation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("RepeatedAnnotationWithContainerAnnotation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ResourceHasToImplementAutoCloseable", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ReturnTypeAmbiguous", DEPRECATED);
+ expectedProblemAttributes.put("ReturnTypeCannotBeVoidArray", DEPRECATED);
+ expectedProblemAttributes.put("ReturnTypeInheritedNameHidesEnclosingName", DEPRECATED);
+ expectedProblemAttributes.put("ReturnTypeInternalNameProvided", DEPRECATED);
+ expectedProblemAttributes.put("ReturnTypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ReturnTypeNotFound", DEPRECATED);
+ expectedProblemAttributes.put("ReturnTypeNotVisible", DEPRECATED);
+ expectedProblemAttributes.put("SafeVarargsOnFixedArityMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("SafeVarargsOnNonFinalInstanceMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("ServiceImplDefaultConstructorNotPublic", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ServiceImplNotDefinedByModule", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ShouldImplementHashcode", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("ShouldReturnValue", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("ShouldReturnValueHintMissingDefault", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("SpecdNonNullLocalVariableComparisonYieldsFalse", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("StaticInheritedMethodConflicts", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("StaticMemberOfParameterizedType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("StaticMethodRequested", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("StaticMethodShouldBeAccessedStatically", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("StringConstantIsExceedingUtf8Limit", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("SuperAccessCannotBypassDirectSuper", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("SuperCallCannotBypassOverride", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("SuperInterfaceMustBeAnInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("SuperInterfacesCollide", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("SuperTypeUsingWildcard", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("SuperclassAmbiguous", DEPRECATED);
+ expectedProblemAttributes.put("SuperclassInheritedNameHidesEnclosingName", DEPRECATED);
+ expectedProblemAttributes.put("SuperclassInternalNameProvided", DEPRECATED);
+ expectedProblemAttributes.put("SuperclassMustBeAClass", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("SuperclassNotFound", DEPRECATED);
+ expectedProblemAttributes.put("SuperclassNotVisible", DEPRECATED);
+ expectedProblemAttributes.put("SuperfluousSemicolon", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("SwitchOnEnumNotBelow15", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("SwitchOnStringsNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("TargetTypeNotAFunctionalInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("Task", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("ThisInStaticContext", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("ThisSuperDuringConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("ToleratedMisplacedTypeAnnotations", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("TooManyArgumentSlots", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("TooManyArrayDimensions", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("TooManyBytesForStringConstant", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("TooManyConstantsInConstantPool", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("TooManyFields", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("TooManyLocalVariableSlots", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("TooManyMethods", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("TooManyParametersForSyntheticMethod", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("TooManySyntheticArgumentSlots", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("TypeAnnotationAtQualifiedName", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("TypeArgumentMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("TypeArgumentsForRawGenericConstructor", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("TypeArgumentsForRawGenericMethod", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("TypeCollidesWithPackage", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("TypeHidingType", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
+ expectedProblemAttributes.put("TypeHidingTypeParameterFromMethod", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
+ expectedProblemAttributes.put("TypeHidingTypeParameterFromType", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
+ expectedProblemAttributes.put("TypeMismatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("TypeMissingDeprecatedAnnotation", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("TypeParameterHidingType", new ProblemAttributes(CategorizedProblem.CAT_NAME_SHADOWING_CONFLICT));
+ expectedProblemAttributes.put("UnboxingConversion", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("UncheckedAccessOfValueOfFreeTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("UnclosedCloseable", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("UnclosedCloseableAtExit", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("UndefinedAnnotationMember", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("UndefinedConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("UndefinedConstructorInDefaultConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("UndefinedConstructorInImplicitConstructorCall", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("UndefinedField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("UndefinedLabel", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("UndefinedMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("UndefinedModule", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("UndefinedName", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("UndefinedType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("UndefinedTypeVariable", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("UnderscoresInLiteralsNotBelow17", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("UndocumentedEmptyBlock", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("UnexpectedStaticModifierForField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("UnexpectedStaticModifierForMethod", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("UnhandledException", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("UnhandledExceptionInDefaultConstructor", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("UnhandledExceptionInImplicitConstructorCall", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("UnhandledExceptionOnAutoClose", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("UnhandledWarningToken", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("UninitializedBlankFinalField", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("UninitializedBlankFinalFieldHintMissingDefault", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("UninitializedFreeTypeVariableField", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("UninitializedFreeTypeVariableFieldHintMissingDefault", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("UninitializedLocalVariable", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("UninitializedLocalVariableHintMissingDefault", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("UninitializedNonNullField", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("UninitializedNonNullFieldHintMissingDefault", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("UninternedIdentityComparison", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("UnlikelyCollectionMethodArgumentType", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("UnlikelyEqualsArgumentType", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("UnmatchedBracket", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("UnnamedPackageInNamedModule", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("UnnecessaryArgumentCast", DEPRECATED);
+ expectedProblemAttributes.put("UnnecessaryCast", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("UnnecessaryElse", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("UnnecessaryInstanceof", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("UnnecessaryNLSTag", new ProblemAttributes(CategorizedProblem.CAT_NLS));
+ expectedProblemAttributes.put("UnqualifiedFieldAccess", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("UnreachableCatch", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("UnresolvedVariable", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("UnsafeElementTypeConversion", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
+ expectedProblemAttributes.put("UnsafeGenericArrayForVarargs", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
+ expectedProblemAttributes.put("UnsafeGenericCast", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
+ expectedProblemAttributes.put("UnsafeNullnessCast", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("UnsafeRawConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
+ expectedProblemAttributes.put("UnsafeRawFieldAssignment", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
+ expectedProblemAttributes.put("UnsafeRawGenericConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
+ expectedProblemAttributes.put("UnsafeRawGenericMethodInvocation", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
+ expectedProblemAttributes.put("UnsafeRawMethodInvocation", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
+ expectedProblemAttributes.put("UnsafeReturnTypeOverride", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
+ expectedProblemAttributes.put("UnsafeTypeConversion", new ProblemAttributes(CategorizedProblem.CAT_UNCHECKED_RAW));
+ expectedProblemAttributes.put("UnstableAutoModuleName", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("UnterminatedComment", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("UnterminatedString", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("UnusedConstructorDeclaredThrownException", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("UnusedImport", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("UnusedLabel", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("UnusedMethodDeclaredThrownException", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("UnusedObjectAllocation", new ProblemAttributes(CategorizedProblem.CAT_POTENTIAL_PROGRAMMING_PROBLEM));
+ expectedProblemAttributes.put("UnusedPrivateConstructor", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("UnusedPrivateField", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("UnusedPrivateMethod", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("UnusedPrivateType", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("UnusedTypeArgumentsForConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("UnusedTypeParameter", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("UnusedTypeArgumentsForMethodInvocation", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("UnusedWarningToken", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("UseAssertAsAnIdentifier", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("UseEnumAsAnIdentifier", new ProblemAttributes(CategorizedProblem.CAT_CODE_STYLE));
+ expectedProblemAttributes.put("IllegalUseOfUnderscoreAsAnIdentifier", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("UsingDeprecatedConstructor", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedField", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedMethod", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedModule", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedPackage", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("UsingDeprecatedType", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedSinceVersionConstructor", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedSinceVersionField", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedSinceVersionMethod", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedSinceVersionModule", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedSinceVersionPackage", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("UsingDeprecatedSinceVersionType", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedConstructor", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedField", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedMethod", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedModule", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedPackage", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedType", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionConstructor", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionField", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionMethod", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionModule", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionPackage", new ProblemAttributes(CategorizedProblem.CAT_MODULE));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionType", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionType", new ProblemAttributes(CategorizedProblem.CAT_DEPRECATION));
+ expectedProblemAttributes.put("VarCannotBeMixedWithNonVarParams", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("VarIsNotAllowedHere", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("VarIsReserved", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("VarIsReservedInFuture", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("VarLocalCannotBeArray", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("VarLocalCannotBeArrayInitalizers", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("VarLocalCannotBeLambda", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("VarLocalCannotBeMethodReference", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("VarLocalInitializedToNull", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("VarLocalInitializedToVoid", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("VarLocalMultipleDeclarators", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("VarLocalReferencesItself", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("VarLocalCannotBeArray", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("VarLocalWithoutInitizalier", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("VarargsElementTypeNotVisible", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("VarargsElementTypeNotVisibleForConstructor", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("VarargsConflict", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("VariableTypeCannotBeVoid", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("VariableTypeCannotBeVoidArray", DEPRECATED);
+ expectedProblemAttributes.put("VoidMethodReturnsValue", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
+ expectedProblemAttributes.put("WildcardConstructorInvocation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("WildcardFieldAssignment", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("WildcardMethodInvocation", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("illFormedParameterizationOfFunctionalInterface", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("lambdaParameterTypeMismatched", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("lambdaSignatureMismatched", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalArrayOfUnionType", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("IllegalArrayTypeInIntersectionCast", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("ProblemNotAnalysed", new ProblemAttributes(CategorizedProblem.CAT_UNNECESSARY_CODE));
+ expectedProblemAttributes.put("SwitchExpressionsIncompatibleResultExpressionTypes", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("SwitchExpressionsEmptySwitchBlock", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("SwitchExpressionsNoResultExpression", new ProblemAttributes(CategorizedProblem.CAT_TYPE));
+ expectedProblemAttributes.put("SwitchExpressionSwitchLabeledBlockCompletesNormally", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("SwitchExpressionLastStatementCompletesNormally", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("SwitchExpressionTrailingSwitchLabels", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("switchMixedCase", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("SwitchExpressionMissingDefaultCase", new ProblemAttributes(CategorizedProblem.CAT_INTERNAL));
+ expectedProblemAttributes.put("SwitchExpressionNotBelow12", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("SwitchCaseLabelWithArrowNotBelow12", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("SwitchExpressionPreviewDisabled", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("SwitchCaseLabelWithArrowPreviewDisabled", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("PreviewFeatureDisabled", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("PreviewFeatureUsed", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ expectedProblemAttributes.put("PreviewFeatureNotSupported", new ProblemAttributes(CategorizedProblem.CAT_SYNTAX));
+ StringBuffer failures = new StringBuffer();
+ StringBuffer correctResult = new StringBuffer(70000);
+ Field[] fields = (iProblemClass = IProblem.class).getFields();
+ Arrays.sort(fields, new Comparator() {
+ public int compare(Object o1, Object o2) {
+ Field field1 = (Field) o1;
+ Field field2 = (Field) o2;
+ return field1.getName().compareTo(field2.getName());
}
});
boolean watchInternalCategory = false, printHeader = true;
@@ -1932,1139 +1260,873 @@
// compiler problems tuning
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=218603
- public void test012_compiler_problems_tuning() {
- try {
- class ProblemAttributes {
- boolean skip;
- String option;
-
- ProblemAttributes(String option) {
- this.option = option;
- }
-
- ProblemAttributes(boolean skip) {
- this.skip = skip;
- }
+public void test012_compiler_problems_tuning() {
+ try {
+ class ProblemAttributes {
+ boolean skip;
+ String option;
+ ProblemAttributes(String option) {
+ this.option = option;
}
- ProblemAttributes SKIP = new ProblemAttributes(true);
- Map expectedProblemAttributes = new HashMap();
- expectedProblemAttributes.put("AbstractMethodCannotBeOverridden", SKIP);
- expectedProblemAttributes.put("AbstractMethodInAbstractClass", SKIP);
- expectedProblemAttributes.put("AbstractMethodInEnum", SKIP);
- expectedProblemAttributes.put("AbstractMethodMustBeImplemented", SKIP);
- expectedProblemAttributes.put("AbstractMethodMustBeImplementedOverConcreteMethod", SKIP);
- expectedProblemAttributes.put("AbstractMethodsInConcreteClass", SKIP);
- expectedProblemAttributes.put("AbstractServiceImplementation", SKIP);
- expectedProblemAttributes.put("AmbiguousConstructor", SKIP);
- expectedProblemAttributes.put("AmbiguousConstructorInDefaultConstructor", SKIP);
- expectedProblemAttributes.put("AmbiguousConstructorInImplicitConstructorCall", SKIP);
- expectedProblemAttributes.put("AmbiguousField", SKIP);
- expectedProblemAttributes.put("AmbiguousMethod", SKIP);
- expectedProblemAttributes.put("AmbiguousType", SKIP);
- expectedProblemAttributes.put("AnnotationCannotOverrideMethod", SKIP);
- expectedProblemAttributes.put("AnnotationCircularity", SKIP);
- expectedProblemAttributes.put("AnnotationCircularitySelfReference", SKIP);
- expectedProblemAttributes.put("AnnotationFieldNeedConstantInitialization", SKIP);
- expectedProblemAttributes.put("AnnotationMembersCannotHaveParameters", SKIP);
- expectedProblemAttributes.put("AnnotationMembersCannotHaveTypeParameters", SKIP);
- expectedProblemAttributes.put("AnnotationTypeDeclarationCannotHaveConstructor", SKIP);
- expectedProblemAttributes.put("AnnotationTypeDeclarationCannotHaveSuperclass", SKIP);
- expectedProblemAttributes.put("AnnotationTypeDeclarationCannotHaveSuperinterfaces", SKIP);
- expectedProblemAttributes.put("AnnotationTypeUsedAsSuperInterface",
- new ProblemAttributes(JavaCore.COMPILER_PB_ANNOTATION_SUPER_INTERFACE));
- expectedProblemAttributes.put("AnnotationValueMustBeAnEnumConstant", SKIP);
- expectedProblemAttributes.put("AnnotationValueMustBeAnnotation", SKIP);
- expectedProblemAttributes.put("AnnotationValueMustBeArrayInitializer", SKIP);
- expectedProblemAttributes.put("AnnotationValueMustBeClassLiteral", SKIP);
- expectedProblemAttributes.put("AnnotationValueMustBeConstant", SKIP);
- expectedProblemAttributes.put("AnonymousClassCannotExtendFinalClass", SKIP);
- expectedProblemAttributes.put("ApplicableMethodOverriddenByInapplicable", SKIP);
- expectedProblemAttributes.put("ArgumentHidingField",
- new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
- expectedProblemAttributes.put("ArgumentHidingLocalVariable",
- new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
- expectedProblemAttributes.put("ArgumentIsNeverUsed",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_PARAMETER));
- expectedProblemAttributes.put("ArgumentTypeAmbiguous", SKIP);
- expectedProblemAttributes.put("ArgumentTypeCannotBeVoid", SKIP);
- expectedProblemAttributes.put("ArgumentTypeCannotBeVoidArray", SKIP);
- expectedProblemAttributes.put("ArgumentTypeInheritedNameHidesEnclosingName", SKIP);
- expectedProblemAttributes.put("ArgumentTypeInternalNameProvided", SKIP);
- expectedProblemAttributes.put("ArgumentTypeNotFound", SKIP);
- expectedProblemAttributes.put("ArgumentTypeNotVisible", SKIP);
- expectedProblemAttributes.put("ArrayConstantsOnlyInArrayInitializers", SKIP);
- expectedProblemAttributes.put("ArrayReferencePotentialNullReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
- expectedProblemAttributes.put("ArrayReferenceRequired", SKIP);
- expectedProblemAttributes.put("AssignmentHasNoEffect",
- new ProblemAttributes(JavaCore.COMPILER_PB_NO_EFFECT_ASSIGNMENT));
- expectedProblemAttributes.put("AssignmentToMultiCatchParameter", SKIP);
- expectedProblemAttributes.put("AssignmentToResource", SKIP);
- expectedProblemAttributes.put("AutoManagedResourceNotBelow17", SKIP);
- expectedProblemAttributes.put("AutoManagedVariableResourceNotBelow9", SKIP);
- expectedProblemAttributes.put("BinaryLiteralNotBelow17", SKIP);
- expectedProblemAttributes.put("BodyForAbstractMethod", SKIP);
- expectedProblemAttributes.put("BodyForNativeMethod", SKIP);
- expectedProblemAttributes.put("BoundCannotBeArray", SKIP);
- expectedProblemAttributes.put("BoundHasConflictingArguments", SKIP);
- expectedProblemAttributes.put("BoundMustBeAnInterface", SKIP);
- expectedProblemAttributes.put("BoxingConversion", new ProblemAttributes(JavaCore.COMPILER_PB_AUTOBOXING));
- expectedProblemAttributes.put("BytecodeExceeds64KLimit", SKIP);
- expectedProblemAttributes.put("BytecodeExceeds64KLimitForClinit", SKIP);
- expectedProblemAttributes.put("BytecodeExceeds64KLimitForConstructor", SKIP);
- expectedProblemAttributes.put("CannotAllocateVoidArray", SKIP);
- expectedProblemAttributes.put("CannotDeclareEnumSpecialMethod", SKIP);
- expectedProblemAttributes.put("CannotDefineAnnotationInLocalType", SKIP);
- expectedProblemAttributes.put("CannotDefineDimensionExpressionsWithInit", SKIP);
- expectedProblemAttributes.put("CannotDefineEnumInLocalType", SKIP);
- expectedProblemAttributes.put("CannotDefineInterfaceInLocalType", SKIP);
- expectedProblemAttributes.put("CannotDefineStaticInitializerInLocalType", SKIP);
- expectedProblemAttributes.put("CannotExtendEnum", SKIP);
- expectedProblemAttributes.put("CannotHideAnInstanceMethodWithAStaticMethod", SKIP);
- expectedProblemAttributes.put("CannotImportPackage", SKIP);
- expectedProblemAttributes.put("CannotImplementIncompatibleNullness",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("CannotInferElidedTypes", SKIP);
- expectedProblemAttributes.put("CannotInferInvocationType", SKIP);
- expectedProblemAttributes.put("CannotInvokeSuperConstructorInEnum", SKIP);
- expectedProblemAttributes.put("CannotOverrideAStaticMethodWithAnInstanceMethod", SKIP);
- expectedProblemAttributes.put("CannotReadSource", SKIP);
- expectedProblemAttributes.put("CannotReturnInInitializer", SKIP);
- expectedProblemAttributes.put("CannotThrowNull", SKIP);
- expectedProblemAttributes.put("CannotThrowType", SKIP);
- expectedProblemAttributes.put("CannotUseDiamondWithAnonymousClasses", SKIP);
- expectedProblemAttributes.put("CannotUseDiamondWithExplicitTypeArguments", SKIP);
- expectedProblemAttributes.put("CannotUseSuperInCodeSnippet", SKIP);
- expectedProblemAttributes.put("ClassExtendFinalClass", SKIP);
- expectedProblemAttributes.put("CodeCannotBeReached", SKIP);
- expectedProblemAttributes.put("CodeSnippetMissingClass", SKIP);
- expectedProblemAttributes.put("CodeSnippetMissingMethod", SKIP);
- expectedProblemAttributes.put("ComparingIdentical",
- new ProblemAttributes(JavaCore.COMPILER_PB_COMPARING_IDENTICAL));
- expectedProblemAttributes.put("ConflictingImport", SKIP);
- expectedProblemAttributes.put("ConflictingNullAnnotations",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("ConstructedArrayIncompatible", SKIP);
- expectedProblemAttributes.put("ConstructionTypeMismatch", SKIP);
- expectedProblemAttributes.put("ConflictingInheritedNullAnnotations",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("ConstructorReferenceNotBelow18", SKIP);
- expectedProblemAttributes.put("ContainerAnnotationTypeHasNonDefaultMembers", SKIP);
- expectedProblemAttributes.put("ContainerAnnotationTypeHasShorterRetention", SKIP);
- expectedProblemAttributes.put("ContainerAnnotationTypeHasWrongValueType", SKIP);
- expectedProblemAttributes.put("ContainerAnnotationTypeMustHaveValue", SKIP);
- expectedProblemAttributes.put("ContradictoryNullAnnotations",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("ContradictoryNullAnnotationsOnBound",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("ContradictoryNullAnnotationsInferred",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("ContradictoryNullAnnotationsInferredFunctionType",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("ConstructorVarargsArgumentNeedCast",
- new ProblemAttributes(JavaCore.COMPILER_PB_VARARGS_ARGUMENT_NEED_CAST));
- expectedProblemAttributes.put("CorruptedSignature", SKIP);
- expectedProblemAttributes.put("CyclicModuleDependency", SKIP);
- expectedProblemAttributes.put("DanglingReference", SKIP);
- expectedProblemAttributes.put("DeadCode", new ProblemAttributes(JavaCore.COMPILER_PB_DEAD_CODE));
- expectedProblemAttributes.put("DefaultMethodNotBelow18", SKIP);
- expectedProblemAttributes.put("DefaultMethodOverridesObjectMethod", SKIP);
- expectedProblemAttributes.put("DereferencingNullableExpression",
- new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
- expectedProblemAttributes.put("DiamondNotBelow17", SKIP);
- expectedProblemAttributes.put("DirectInvocationOfAbstractMethod", SKIP);
- expectedProblemAttributes.put("DisallowedTargetForAnnotation", SKIP);
- expectedProblemAttributes.put("DisallowedTargetForContainerAnnotationType", SKIP);
- expectedProblemAttributes.put("DiscouragedReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_DISCOURAGED_REFERENCE));
- expectedProblemAttributes.put("DuplicateAnnotation", SKIP);
- expectedProblemAttributes.put("DuplicateAnnotationNotMarkedRepeatable", SKIP);
- expectedProblemAttributes.put("DuplicateAnnotationMember", SKIP);
- expectedProblemAttributes.put("DuplicateBlankFinalFieldInitialization", SKIP);
- expectedProblemAttributes.put("DuplicateBounds", SKIP);
- expectedProblemAttributes.put("DuplicateBoundInIntersectionCast", SKIP);
- expectedProblemAttributes.put("DuplicateCase", SKIP);
- expectedProblemAttributes.put("DuplicateDefaultCase", SKIP);
- expectedProblemAttributes.put("DuplicateExports", SKIP);
- expectedProblemAttributes.put("DuplicateField", SKIP);
- expectedProblemAttributes.put("DuplicateFinalLocalInitialization", SKIP);
- expectedProblemAttributes.put("DuplicateImport", SKIP);
- expectedProblemAttributes.put("DuplicateInheritedMethods", SKIP);
- expectedProblemAttributes.put("DuplicateInheritedDefaultMethods", SKIP);
- expectedProblemAttributes.put("DuplicateLabel", SKIP);
- expectedProblemAttributes.put("DuplicateMethod", SKIP);
- expectedProblemAttributes.put("DuplicateMethodErasure", SKIP);
- expectedProblemAttributes.put("DuplicateModifierForArgument", SKIP);
- expectedProblemAttributes.put("DuplicateModifierForField", SKIP);
- expectedProblemAttributes.put("DuplicateModifierForMethod", SKIP);
- expectedProblemAttributes.put("DuplicateModifierForType", SKIP);
- expectedProblemAttributes.put("DuplicateModifierForVariable", SKIP);
- expectedProblemAttributes.put("DuplicateModuleRef", SKIP);
- expectedProblemAttributes.put("DuplicateNestedType", SKIP);
- expectedProblemAttributes.put("DuplicateOpens", SKIP);
- expectedProblemAttributes.put("DuplicateParameterizedMethods", SKIP);
- expectedProblemAttributes.put("DuplicateRequires", SKIP);
- expectedProblemAttributes.put("DuplicateResource", SKIP);
- expectedProblemAttributes.put("DuplicateServices", SKIP);
- expectedProblemAttributes.put("DuplicateSuperInterface", SKIP);
- expectedProblemAttributes.put("DuplicateTargetInTargetAnnotation", SKIP);
- expectedProblemAttributes.put("DuplicateTypeVariable", SKIP);
- expectedProblemAttributes.put("DuplicateTypes", SKIP);
- expectedProblemAttributes.put("DuplicateUses", SKIP);
- expectedProblemAttributes.put("EmptyControlFlowStatement",
- new ProblemAttributes(JavaCore.COMPILER_PB_EMPTY_STATEMENT));
- expectedProblemAttributes.put("EnclosingInstanceInConstructorCall", SKIP);
- expectedProblemAttributes.put("EndOfSource", SKIP);
- expectedProblemAttributes.put("EnumAbstractMethodMustBeImplemented", SKIP);
- expectedProblemAttributes.put("EnumConstantCannotDefineAbstractMethod", SKIP);
- expectedProblemAttributes.put("EnumConstantMustImplementAbstractMethod", SKIP);
- expectedProblemAttributes.put("EnumConstantsCannotBeSurroundedByParenthesis", SKIP);
- expectedProblemAttributes.put("EnumStaticFieldInInInitializerContext", SKIP);
- expectedProblemAttributes.put("EnumSwitchCannotTargetField", SKIP);
- expectedProblemAttributes.put("ExceptionParameterIsNeverUsed",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_EXCEPTION_PARAMETER));
- expectedProblemAttributes.put("ExceptionTypeAmbiguous", SKIP);
- expectedProblemAttributes.put("ExceptionTypeInheritedNameHidesEnclosingName", SKIP);
- expectedProblemAttributes.put("ExceptionTypeInternalNameProvided", SKIP);
- expectedProblemAttributes.put("ExceptionTypeNotFound", SKIP);
- expectedProblemAttributes.put("ExceptionTypeNotVisible", SKIP);
- expectedProblemAttributes.put("ExplicitThisParameterNotInLambda", SKIP);
- expectedProblemAttributes.put("ExplicitThisParameterNotBelow18", SKIP);
- expectedProblemAttributes.put("ExplicitlyClosedAutoCloseable",
- new ProblemAttributes(JavaCore.COMPILER_PB_EXPLICITLY_CLOSED_AUTOCLOSEABLE));
- expectedProblemAttributes.put("ExportedPackageDoesNotExistOrIsEmpty", SKIP);
- expectedProblemAttributes.put("ExpressionShouldBeAVariable", SKIP);
- expectedProblemAttributes.put("ExternalProblemFixable", SKIP);
- expectedProblemAttributes.put("ExternalProblemNotFixable", SKIP);
- expectedProblemAttributes.put("ExplicitAnnotationTargetRequired", SKIP);
- expectedProblemAttributes.put("FallthroughCase",
- new ProblemAttributes(JavaCore.COMPILER_PB_FALLTHROUGH_CASE));
- expectedProblemAttributes.put("FieldComparisonYieldsFalse",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("FieldHidingField", new ProblemAttributes(JavaCore.COMPILER_PB_FIELD_HIDING));
- expectedProblemAttributes.put("FieldHidingLocalVariable",
- new ProblemAttributes(JavaCore.COMPILER_PB_FIELD_HIDING));
- expectedProblemAttributes.put("FieldMissingDeprecatedAnnotation",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_DEPRECATED_ANNOTATION));
- expectedProblemAttributes.put("FieldMustBeFinal", SKIP);
- expectedProblemAttributes.put("FieldTypeAmbiguous", SKIP);
- expectedProblemAttributes.put("FieldTypeInheritedNameHidesEnclosingName", SKIP);
- expectedProblemAttributes.put("FieldTypeInternalNameProvided", SKIP);
- expectedProblemAttributes.put("FieldTypeNotFound", SKIP);
- expectedProblemAttributes.put("FieldTypeNotVisible", SKIP);
- expectedProblemAttributes.put("FinalBoundForTypeVariable",
- new ProblemAttributes(JavaCore.COMPILER_PB_FINAL_PARAMETER_BOUND));
- expectedProblemAttributes.put("FinalFieldAssignment", SKIP);
- expectedProblemAttributes.put("FinalMethodCannotBeOverridden", SKIP);
- expectedProblemAttributes.put("FinalOuterLocalAssignment", SKIP);
- expectedProblemAttributes.put("FinallyMustCompleteNormally",
- new ProblemAttributes(JavaCore.COMPILER_PB_FINALLY_BLOCK_NOT_COMPLETING));
- expectedProblemAttributes.put("ForbiddenReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE));
- expectedProblemAttributes.put("GenericConstructorTypeArgumentMismatch", SKIP);
- expectedProblemAttributes.put("GenericInferenceError", SKIP); // TODO should be removed via
- // https://bugs.eclipse.org/404675
- expectedProblemAttributes.put("GenericMethodTypeArgumentMismatch", SKIP);
- expectedProblemAttributes.put("GenericTypeCannotExtendThrowable", SKIP);
- expectedProblemAttributes.put("HidingEnclosingType", SKIP);
- expectedProblemAttributes.put("HierarchyCircularity", SKIP);
- expectedProblemAttributes.put("HierarchyCircularitySelfReference", SKIP);
- expectedProblemAttributes.put("HierarchyHasProblems", SKIP);
- expectedProblemAttributes.put("IllegalAbstractModifierCombinationForMethod", SKIP);
- expectedProblemAttributes.put("IllegalStrictfpForAbstractInterfaceMethod", SKIP);
- expectedProblemAttributes.put("IllegalAccessFromTypeVariable", SKIP);
- expectedProblemAttributes.put("IllegalAnnotationForBaseType", SKIP);
- expectedProblemAttributes.put("IllegalCast", SKIP);
- expectedProblemAttributes.put("IllegalClassLiteralForTypeVariable", SKIP);
- expectedProblemAttributes.put("IllegalDeclarationOfThisParameter", SKIP);
- expectedProblemAttributes.put("IllegalDefaultModifierSpecification", SKIP);
- expectedProblemAttributes.put("IllegalDefinitionToNonNullParameter",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("IllegalDimension", SKIP);
- expectedProblemAttributes.put("IllegalEnclosingInstanceSpecification", SKIP);
- expectedProblemAttributes.put("IllegalExtendedDimensions", SKIP);
- expectedProblemAttributes.put("IllegalExtendedDimensionsForVarArgs", SKIP);
- expectedProblemAttributes.put("IllegalGenericArray", SKIP);
- expectedProblemAttributes.put("IllegalHexaLiteral", SKIP);
- expectedProblemAttributes.put("IllegalInstanceofParameterizedType", SKIP);
- expectedProblemAttributes.put("IllegalInstanceofTypeParameter", SKIP);
- expectedProblemAttributes.put("IllegalBasetypeInIntersectionCast", SKIP);
- expectedProblemAttributes.put("IllegalModifierCombinationFinalAbstractForClass", SKIP);
- expectedProblemAttributes.put("IllegalModifierCombinationFinalVolatileForField", SKIP);
- expectedProblemAttributes.put("IllegalModifierCombinationForInterfaceMethod", SKIP);
- expectedProblemAttributes.put("IllegalModifierCombinationForPrivateInterfaceMethod9", SKIP);
- expectedProblemAttributes.put("IllegalModifierForAnnotationField", SKIP);
- expectedProblemAttributes.put("IllegalModifierForAnnotationMemberType", SKIP);
- expectedProblemAttributes.put("IllegalModifierForAnnotationMethod", SKIP);
- expectedProblemAttributes.put("IllegalModifierForAnnotationType", SKIP);
- expectedProblemAttributes.put("IllegalModifierForArgument", SKIP);
- expectedProblemAttributes.put("IllegalModifierForClass", SKIP);
- expectedProblemAttributes.put("IllegalModifierForConstructor", SKIP);
- expectedProblemAttributes.put("IllegalModifierForEnum", SKIP);
- expectedProblemAttributes.put("IllegalModifierForEnumConstant", SKIP);
- expectedProblemAttributes.put("IllegalModifierForEnumConstructor", SKIP);
- expectedProblemAttributes.put("IllegalModifierForField", SKIP);
- expectedProblemAttributes.put("IllegalModifierForInterface", SKIP);
- expectedProblemAttributes.put("IllegalModifierForInterfaceField", SKIP);
- expectedProblemAttributes.put("IllegalModifierForInterfaceMethod", SKIP);
- expectedProblemAttributes.put("IllegalModifierForInterfaceMethod18", SKIP);
- expectedProblemAttributes.put("IllegalModifierForLocalClass", SKIP);
- expectedProblemAttributes.put("IllegalModifierForLocalEnum", SKIP);
- expectedProblemAttributes.put("IllegalModifierForMemberClass", SKIP);
- expectedProblemAttributes.put("IllegalModifierForMemberEnum", SKIP);
- expectedProblemAttributes.put("IllegalModifierForMemberInterface", SKIP);
- expectedProblemAttributes.put("IllegalModifierForMethod", SKIP);
- expectedProblemAttributes.put("IllegalModifierForModule", SKIP);
- expectedProblemAttributes.put("IllegalModifierForInterfaceMethod9", SKIP);
- expectedProblemAttributes.put("IllegalModifierForVariable", SKIP);
- expectedProblemAttributes.put("IllegalModifiersForElidedType", SKIP);
- expectedProblemAttributes.put("IllegalModifiers", SKIP);
- expectedProblemAttributes.put("IllegalParameterNullityRedefinition", SKIP);
- expectedProblemAttributes.put("IllegalPrimitiveOrArrayTypeForEnclosingInstance", SKIP);
- expectedProblemAttributes.put("IllegalQualifiedEnumConstantLabel", SKIP);
- expectedProblemAttributes.put("IllegalQualifiedParameterizedTypeAllocation", SKIP);
- expectedProblemAttributes.put("IllegalQualifierForExplicitThis", SKIP);
- expectedProblemAttributes.put("IllegalQualifierForExplicitThis2", SKIP);
- expectedProblemAttributes.put("IllegalRedefinitionOfTypeVariable",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("IllegalRedefinitionToNonNullParameter",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("IllegalReturnNullityRedefinition",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("IllegalReturnNullityRedefinitionFreeTypeVariable",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("IllegalStaticModifierForMemberType", SKIP);
- expectedProblemAttributes.put("IllegalTypeAnnotationsInStaticMemberAccess", SKIP);
- expectedProblemAttributes.put("IllegalTypeArgumentsInRawConstructorReference", SKIP);
- expectedProblemAttributes.put("IllegalTypeForExplicitThis", SKIP);
- expectedProblemAttributes.put("IllegalTypeVariableSuperReference", SKIP);
- expectedProblemAttributes.put("IllegalUnderscorePosition", SKIP);
- expectedProblemAttributes.put("IllegalUsageOfQualifiedTypeReference", SKIP);
- expectedProblemAttributes.put("IllegalUsageOfTypeAnnotations", SKIP);
- expectedProblemAttributes.put("IllegalVararg", SKIP);
- expectedProblemAttributes.put("IllegalVarargInLambda", SKIP);
- expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForField", SKIP);
- expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForMemberType", SKIP);
- expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForMethod", SKIP);
- expectedProblemAttributes.put("IllegalVisibilityModifierForInterfaceMemberType", SKIP);
- expectedProblemAttributes.put("ImplicitObjectBoundNoNullDefault", SKIP);
- expectedProblemAttributes.put("ImportAmbiguous", SKIP);
- expectedProblemAttributes.put("ImportInheritedNameHidesEnclosingName", SKIP);
- expectedProblemAttributes.put("ImportInternalNameProvided", SKIP);
- expectedProblemAttributes.put("ImportNotFound", SKIP);
- expectedProblemAttributes.put("ImportNotVisible", SKIP);
- expectedProblemAttributes.put("IncompatibleExceptionInInheritedMethodThrowsClause", SKIP);
- expectedProblemAttributes.put("IncompatibleExceptionInThrowsClause", SKIP);
- expectedProblemAttributes.put("IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_INCOMPATIBLE_NON_INHERITED_INTERFACE_METHOD));
- expectedProblemAttributes.put("IncompatibleReturnType", SKIP);
- expectedProblemAttributes.put("IncompatibleReturnTypeForNonInheritedInterfaceMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_INCOMPATIBLE_NON_INHERITED_INTERFACE_METHOD));
- expectedProblemAttributes.put("IncompatibleTypesInConditionalOperator", SKIP);
- expectedProblemAttributes.put("IncompatibleTypesInEqualityOperator", SKIP);
- expectedProblemAttributes.put("IncompatibleTypesInForeach", SKIP);
- expectedProblemAttributes.put("IncompatibleLambdaParameterType", SKIP);
- expectedProblemAttributes.put("IncompatibleMethodReference", SKIP);
- expectedProblemAttributes.put("IncorrectArityForParameterizedConstructor", SKIP);
- expectedProblemAttributes.put("IncorrectArityForParameterizedMethod", SKIP);
- expectedProblemAttributes.put("IncorrectArityForParameterizedType", SKIP);
- expectedProblemAttributes.put("IncorrectEnclosingInstanceReference", SKIP);
- expectedProblemAttributes.put("IncorrectSwitchType", SKIP);
- expectedProblemAttributes.put("IncorrectSwitchType17", SKIP);
- expectedProblemAttributes.put("IndirectAccessToStaticField",
- new ProblemAttributes(JavaCore.COMPILER_PB_INDIRECT_STATIC_ACCESS));
- expectedProblemAttributes.put("IndirectAccessToStaticMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_INDIRECT_STATIC_ACCESS));
- expectedProblemAttributes.put("IndirectAccessToStaticType",
- new ProblemAttributes(JavaCore.COMPILER_PB_INDIRECT_STATIC_ACCESS));
- expectedProblemAttributes.put("InheritedDefaultMethodConflictsWithOtherInherited", SKIP);
- expectedProblemAttributes.put("InheritedFieldHidesEnclosingName", SKIP);
- expectedProblemAttributes.put("InheritedIncompatibleReturnType", SKIP);
- expectedProblemAttributes.put("InheritedMethodHidesEnclosingName", SKIP);
- expectedProblemAttributes.put("InheritedMethodReducesVisibility", SKIP);
- expectedProblemAttributes.put("InheritedTypeHidesEnclosingName", SKIP);
- expectedProblemAttributes.put("InitializerMustCompleteNormally", SKIP);
- expectedProblemAttributes.put("InstanceFieldDuringConstructorInvocation", SKIP);
- expectedProblemAttributes.put("InstanceMethodDuringConstructorInvocation", SKIP);
- expectedProblemAttributes.put("InterfaceAmbiguous", SKIP);
- expectedProblemAttributes.put("InterfaceCannotHaveConstructors", SKIP);
- expectedProblemAttributes.put("InterfaceCannotHaveInitializers", SKIP);
- expectedProblemAttributes.put("InterfaceInheritedNameHidesEnclosingName", SKIP);
- expectedProblemAttributes.put("InterfaceInternalNameProvided", SKIP);
- expectedProblemAttributes.put("InterfaceNotFound", SKIP);
- expectedProblemAttributes.put("InterfaceNotFunctionalInterface", SKIP);
- expectedProblemAttributes.put("InterfaceNotVisible", SKIP);
- expectedProblemAttributes.put("InterfaceStaticMethodInvocationNotBelow18", SKIP);
- expectedProblemAttributes.put("InterfaceSuperInvocationNotBelow18", SKIP);
- expectedProblemAttributes.put("InternalTypeNameProvided", SKIP);
- expectedProblemAttributes.put("IntersectionCastNotBelow18", SKIP);
- expectedProblemAttributes.put("InvalidAnnotationMemberType", SKIP);
- expectedProblemAttributes.put("InvalidArrayConstructorReference", SKIP);
- expectedProblemAttributes.put("InvalidBinary", SKIP);
- expectedProblemAttributes.put("InvalidBreak", SKIP);
- expectedProblemAttributes.put("InvalidCatchBlockSequence", SKIP);
- expectedProblemAttributes.put("InvalidCharacterConstant", SKIP);
- expectedProblemAttributes.put("InvalidClassInstantiation", SKIP);
- expectedProblemAttributes.put("InvalidContinue", SKIP);
- expectedProblemAttributes.put("InvalidDigit", SKIP);
- expectedProblemAttributes.put("InvalidEncoding", SKIP);
- expectedProblemAttributes.put("InvalidEscape", SKIP);
- expectedProblemAttributes.put("InvalidExplicitConstructorCall", SKIP);
- expectedProblemAttributes.put("InvalidExpressionAsStatement", SKIP);
- expectedProblemAttributes.put("InvalidFileNameForPackageAnnotations", SKIP);
- expectedProblemAttributes.put("InvalidFloat", SKIP);
- expectedProblemAttributes.put("InvalidHexa", SKIP);
- expectedProblemAttributes.put("InvalidHighSurrogate", SKIP);
- expectedProblemAttributes.put("InvalidInput", SKIP);
- expectedProblemAttributes.put("InvalidLowSurrogate", SKIP);
- expectedProblemAttributes.put("InvalidLocationForModifiers", SKIP);
- expectedProblemAttributes.put("InvalidNullToSynchronized", SKIP);
- expectedProblemAttributes.put("InvalidOctal", SKIP);
- expectedProblemAttributes.put("InvalidOpensStatement", SKIP);
- expectedProblemAttributes.put("InvalidOperator", SKIP);
- expectedProblemAttributes.put("InvalidParameterizedExceptionType", SKIP);
- expectedProblemAttributes.put("InvalidParenthesizedExpression", SKIP);
- expectedProblemAttributes.put("InvalidServiceIntfType", SKIP);
- expectedProblemAttributes.put("InvalidServiceImplType", SKIP);
- expectedProblemAttributes.put("InvalidTypeArguments", SKIP);
- expectedProblemAttributes.put("InvalidTypeExpression", SKIP);
- expectedProblemAttributes.put("InvalidTypeForCollection", SKIP);
- expectedProblemAttributes.put("InvalidTypeForCollectionTarget14", SKIP);
- expectedProblemAttributes.put("InvalidTypeForStaticImport", SKIP);
- expectedProblemAttributes.put("InvalidTypeToSynchronized", SKIP);
- expectedProblemAttributes.put("InvalidTypeVariableExceptionType", SKIP);
- expectedProblemAttributes.put("InvalidUnaryExpression", SKIP);
- expectedProblemAttributes.put("InvalidUnicodeEscape", SKIP);
- expectedProblemAttributes.put("InvalidUnionTypeReferenceSequence", SKIP);
- expectedProblemAttributes.put("InvalidUsageOfAnnotationDeclarations", SKIP);
- expectedProblemAttributes.put("InvalidUsageOfAnnotations", SKIP);
- expectedProblemAttributes.put("InvalidUsageOfEnumDeclarations", SKIP);
- expectedProblemAttributes.put("InvalidUsageOfForeachStatements", SKIP);
- expectedProblemAttributes.put("InvalidUsageOfReceiverAnnotations", SKIP);
- expectedProblemAttributes.put("InvalidUsageOfStaticImports", SKIP);
- expectedProblemAttributes.put("InvalidUsageOfTypeAnnotations", SKIP);
- expectedProblemAttributes.put("InvalidUsageOfTypeArguments", SKIP);
- expectedProblemAttributes.put("InvalidUsageOfTypeParameters", SKIP);
- expectedProblemAttributes.put("InvalidUsageOfTypeParametersForAnnotationDeclaration", SKIP);
- expectedProblemAttributes.put("InvalidUsageOfTypeParametersForEnumDeclaration", SKIP);
- expectedProblemAttributes.put("InvalidUsageOfVarargs", SKIP);
- expectedProblemAttributes.put("InvalidUsageOfWildcard", SKIP);
- expectedProblemAttributes.put("InvalidVoidExpression", SKIP);
- expectedProblemAttributes.put("IsClassPathCorrect", SKIP);
- expectedProblemAttributes.put("JavadocAmbiguousConstructor",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocAmbiguousField",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocAmbiguousMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocAmbiguousMethodReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocAmbiguousType",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocDuplicateParamName",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocDuplicateReturnTag",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocDuplicateTag",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocDuplicateThrowsClassName",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocEmptyReturnTag",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocGenericConstructorTypeArgumentMismatch",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocGenericMethodTypeArgumentMismatch",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocHiddenReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocIncorrectArityForParameterizedConstructor",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocIncorrectArityForParameterizedMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInheritedFieldHidesEnclosingName",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInheritedMethodHidesEnclosingName",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInheritedNameHidesEnclosingTypeName",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInternalTypeNameProvided",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidMemberTypeQualification",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidParamName",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidParamTagName",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidParamTagTypeParameter",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidSeeArgs",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidSeeHref",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidSeeReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidSeeUrlReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidTag",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidThrowsClass",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidThrowsClassName",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocInvalidValueReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocMalformedSeeReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocMessagePrefix", SKIP);
- expectedProblemAttributes.put("JavadocMissing",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_JAVADOC_COMMENTS));
- expectedProblemAttributes.put("JavadocMissingHashCharacter",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingIdentifier",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingParamName",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingParamTag",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_JAVADOC_TAGS));
- expectedProblemAttributes.put("JavadocMissingReturnTag",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_JAVADOC_TAGS));
- expectedProblemAttributes.put("JavadocMissingSeeReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingTagDescription",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingThrowsClassName",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocMissingThrowsTag",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_JAVADOC_TAGS));
- expectedProblemAttributes.put("JavadocNoMessageSendOnArrayType",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocNoMessageSendOnBaseType",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocNonGenericConstructor",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocNonGenericMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocNonStaticTypeFromStaticInvocation",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocNotVisibleConstructor",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocNotVisibleField",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocNotVisibleMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocNotVisibleType",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocParameterMismatch",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocParameterizedConstructorArgumentTypeMismatch",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocParameterizedMethodArgumentTypeMismatch",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericConstructor",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocUndefinedConstructor",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocUndefinedField",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocUndefinedMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocUndefinedType",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocUnexpectedTag",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocUnexpectedText",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocUnterminatedInlineTag",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocUsingDeprecatedConstructor",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocUsingDeprecatedField",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocUsingDeprecatedMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("JavadocUsingDeprecatedType",
- new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
- expectedProblemAttributes.put("LambdaDescriptorMentionsUnmentionable", SKIP);
- expectedProblemAttributes.put("LambdaExpressionNotBelow18", SKIP);
- expectedProblemAttributes.put("LambdaRedeclaresArgument", SKIP);
- expectedProblemAttributes.put("LambdaRedeclaresLocal", SKIP);
- expectedProblemAttributes.put("LambdaShapeComputationError", SKIP);
- expectedProblemAttributes.put("LocalVariableCanOnlyBeNull", SKIP);
- expectedProblemAttributes.put("LocalVariableCannotBeNull", SKIP);
- expectedProblemAttributes.put("LocalVariableHidingField",
- new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
- expectedProblemAttributes.put("LocalVariableHidingLocalVariable",
- new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
- expectedProblemAttributes.put("LocalVariableIsNeverUsed",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_LOCAL));
- expectedProblemAttributes.put("LocalVariableMayBeNull", SKIP);
- expectedProblemAttributes.put("MaskedCatch",
- new ProblemAttributes(JavaCore.COMPILER_PB_HIDDEN_CATCH_BLOCK));
- expectedProblemAttributes.put("MethodButWithConstructorName",
- new ProblemAttributes(JavaCore.COMPILER_PB_METHOD_WITH_CONSTRUCTOR_NAME));
- expectedProblemAttributes.put("MethodCanBePotentiallyStatic",
- new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIALLY_MISSING_STATIC_ON_METHOD));
- expectedProblemAttributes.put("MethodCanBeStatic",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_STATIC_ON_METHOD));
- expectedProblemAttributes.put("MethodMissingDeprecatedAnnotation",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_DEPRECATED_ANNOTATION));
- expectedProblemAttributes.put("MethodMustOverride", SKIP);
- expectedProblemAttributes.put("MethodMustOverrideOrImplement", SKIP);
- expectedProblemAttributes.put("MethodNameClash", SKIP);
- expectedProblemAttributes.put("MethodNameClashHidden", SKIP);
- expectedProblemAttributes.put("MethodReducesVisibility", SKIP);
- expectedProblemAttributes.put("MethodReferenceNotBelow18", SKIP);
- expectedProblemAttributes.put("MethodReferenceSwingsBothWays", SKIP);
- expectedProblemAttributes.put("MethodRequiresBody", SKIP);
- expectedProblemAttributes.put("MethodReturnsVoid", SKIP);
- expectedProblemAttributes.put("MethodVarargsArgumentNeedCast",
- new ProblemAttributes(JavaCore.COMPILER_PB_VARARGS_ARGUMENT_NEED_CAST));
- expectedProblemAttributes.put("MisplacedTypeAnnotations", SKIP);
- expectedProblemAttributes.put("MissingArgumentsForParameterizedMemberType", SKIP);
- expectedProblemAttributes.put("MissingDefaultCase",
- new ProblemAttributes(JavaCore.COMPILER_PB_SWITCH_MISSING_DEFAULT_CASE));
- expectedProblemAttributes.put("MissingEnclosingInstance", SKIP);
- expectedProblemAttributes.put("MissingEnclosingInstanceForConstructorCall", SKIP);
- expectedProblemAttributes.put("MissingEnumConstantCase",
- new ProblemAttributes(JavaCore.COMPILER_PB_INCOMPLETE_ENUM_SWITCH));
- expectedProblemAttributes.put("MissingEnumConstantCaseDespiteDefault",
- new ProblemAttributes(JavaCore.COMPILER_PB_INCOMPLETE_ENUM_SWITCH));
- expectedProblemAttributes.put("MissingEnumDefaultCase",
- new ProblemAttributes(JavaCore.COMPILER_PB_SWITCH_MISSING_DEFAULT_CASE));
- expectedProblemAttributes.put("MissingNonNullByDefaultAnnotationOnPackage",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_NONNULL_BY_DEFAULT_ANNOTATION));
- expectedProblemAttributes.put("MissingNonNullByDefaultAnnotationOnType",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_NONNULL_BY_DEFAULT_ANNOTATION));
- expectedProblemAttributes.put("MissingOverrideAnnotation",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_OVERRIDE_ANNOTATION));
- expectedProblemAttributes.put("MissingOverrideAnnotationForInterfaceMethodImplementation",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_OVERRIDE_ANNOTATION));
- expectedProblemAttributes.put("MissingRequiresTransitiveForTypeInAPI",
- new ProblemAttributes(JavaCore.COMPILER_PB_API_LEAKS));
- expectedProblemAttributes.put("MissingReturnType", SKIP);
- expectedProblemAttributes.put("MissingSemiColon", SKIP);
- expectedProblemAttributes.put("MissingSerialVersion",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_SERIAL_VERSION));
- expectedProblemAttributes.put("MissingSynchronizedModifierInInheritedMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_SYNCHRONIZED_ON_INHERITED_METHOD));
- expectedProblemAttributes.put("MissingTypeInConstructor", SKIP);
- expectedProblemAttributes.put("MissingTypeInLambda", SKIP);
- expectedProblemAttributes.put("MissingTypeInMethod", SKIP);
- expectedProblemAttributes.put("MissingValueForAnnotationMember", SKIP);
- expectedProblemAttributes.put("MultiCatchNotBelow17", SKIP);
- expectedProblemAttributes.put("MultipleFunctionalInterfaces", SKIP);
- expectedProblemAttributes.put("StaticInterfaceMethodNotBelow18", SKIP);
- expectedProblemAttributes.put("MustDefineEitherDimensionExpressionsOrInitializer", SKIP);
- expectedProblemAttributes.put("MustSpecifyPackage", SKIP);
- expectedProblemAttributes.put("NativeMethodsCannotBeStrictfp", SKIP);
- expectedProblemAttributes.put("NeedToEmulateConstructorAccess",
- new ProblemAttributes(JavaCore.COMPILER_PB_SYNTHETIC_ACCESS_EMULATION));
- expectedProblemAttributes.put("NeedToEmulateFieldReadAccess",
- new ProblemAttributes(JavaCore.COMPILER_PB_SYNTHETIC_ACCESS_EMULATION));
- expectedProblemAttributes.put("NeedToEmulateFieldWriteAccess",
- new ProblemAttributes(JavaCore.COMPILER_PB_SYNTHETIC_ACCESS_EMULATION));
- expectedProblemAttributes.put("NeedToEmulateMethodAccess",
- new ProblemAttributes(JavaCore.COMPILER_PB_SYNTHETIC_ACCESS_EMULATION));
- expectedProblemAttributes.put("NestedServiceImpl", SKIP);
- expectedProblemAttributes.put("NoAdditionalBoundAfterTypeVariable", SKIP);
- expectedProblemAttributes.put("NoFieldOnBaseType", SKIP);
- expectedProblemAttributes.put("NoGenericLambda", SKIP);
- expectedProblemAttributes.put("NoImplicitStringConversionForCharArrayExpression",
- new ProblemAttributes(JavaCore.COMPILER_PB_CHAR_ARRAY_IN_STRING_CONCATENATION));
- expectedProblemAttributes.put("NoMessageSendOnArrayType", SKIP);
- expectedProblemAttributes.put("NoMessageSendOnBaseType", SKIP);
- expectedProblemAttributes.put("NoSuperInInterfaceContext", SKIP);
- expectedProblemAttributes.put("NonBlankFinalLocalAssignment", SKIP);
- expectedProblemAttributes.put("NonConstantExpression", SKIP);
- expectedProblemAttributes.put("NonDenotableTypeArgumentForAnonymousDiamond", SKIP);
- expectedProblemAttributes.put("NonExternalizedStringLiteral",
- new ProblemAttributes(JavaCore.COMPILER_PB_NON_NLS_STRING_LITERAL));
- expectedProblemAttributes.put("NonGenericConstructor", SKIP);
- expectedProblemAttributes.put("NonGenericMethod", SKIP);
- expectedProblemAttributes.put("NonGenericType", SKIP);
- expectedProblemAttributes.put("NonNullDefaultDetailIsNotEvaluated", SKIP);
- expectedProblemAttributes.put("NonNullExpressionComparisonYieldsFalse",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("NonNullSpecdFieldComparisonYieldsFalse",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("NonNullLocalVariableComparisonYieldsFalse",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("NonNullMessageSendComparisonYieldsFalse",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("NonNullTypeVariableFromLegacyMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_NONNULL_TYPEVAR_FROM_LEGACY_INVOCATION));
- expectedProblemAttributes.put("NonNullMethodTypeVariableFromLegacyMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_NONNULL_TYPEVAR_FROM_LEGACY_INVOCATION));
- expectedProblemAttributes.put("NonPublicTypeInAPI", new ProblemAttributes(JavaCore.COMPILER_PB_API_LEAKS));
- expectedProblemAttributes.put("NonStaticAccessToStaticField",
- new ProblemAttributes(JavaCore.COMPILER_PB_STATIC_ACCESS_RECEIVER));
- expectedProblemAttributes.put("NonStaticAccessToStaticMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_STATIC_ACCESS_RECEIVER));
- expectedProblemAttributes.put("NonStaticContextForEnumMemberType", SKIP);
- expectedProblemAttributes.put("NonStaticFieldFromStaticInvocation", SKIP);
- expectedProblemAttributes.put("NonStaticOrAlienTypeReceiver", SKIP);
- expectedProblemAttributes.put("NonStaticTypeFromStaticInvocation", SKIP);
- expectedProblemAttributes.put("NotAnnotationType", SKIP);
- expectedProblemAttributes.put("NotAccessibleConstructor", SKIP);
- expectedProblemAttributes.put("NotAccessibleField", SKIP);
- expectedProblemAttributes.put("NotAccessibleMethod", SKIP);
- expectedProblemAttributes.put("NotAccessibleType", SKIP);
- expectedProblemAttributes.put("NotAccessiblePackage", SKIP);
- expectedProblemAttributes.put("NotExportedTypeInAPI",
- new ProblemAttributes(JavaCore.COMPILER_PB_API_LEAKS));
- expectedProblemAttributes.put("ConflictingPackageFromModules", SKIP);
- expectedProblemAttributes.put("ConflictingPackageFromOtherModules", SKIP);
- expectedProblemAttributes.put("NotVisibleConstructor", SKIP);
- expectedProblemAttributes.put("NotVisibleConstructorInDefaultConstructor", SKIP);
- expectedProblemAttributes.put("NotVisibleConstructorInImplicitConstructorCall", SKIP);
- expectedProblemAttributes.put("NotVisibleField", SKIP);
- expectedProblemAttributes.put("NotVisibleMethod", SKIP);
- expectedProblemAttributes.put("NotVisibleType", SKIP);
- expectedProblemAttributes.put("NullableFieldReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
- expectedProblemAttributes.put("NullAnnotationAtQualifyingType", SKIP);
- expectedProblemAttributes.put("NullAnnotationUnsupportedLocation", SKIP);
- expectedProblemAttributes.put("NullAnnotationUnsupportedLocationAtType", SKIP);
- expectedProblemAttributes.put("NullityMismatchAgainstFreeTypeVariable",
- new ProblemAttributes(JavaCore.COMPILER_PB_PESSIMISTIC_NULL_ANALYSIS_FOR_FREE_TYPE_VARIABLES));
- expectedProblemAttributes.put("NullityMismatchingTypeAnnotation",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("NullityMismatchingTypeAnnotationSuperHint",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("NullityMismatchTypeArgument",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("NullityUncheckedTypeAnnotationDetail",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
- expectedProblemAttributes.put("NullityUncheckedTypeAnnotationDetailSuperHint",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
- expectedProblemAttributes.put("NullExpressionReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_REFERENCE));
- expectedProblemAttributes.put("NullLocalVariableComparisonYieldsFalse",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("NullLocalVariableInstanceofYieldsFalse",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("NullLocalVariableReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_REFERENCE));
- expectedProblemAttributes.put("NullNotCompatibleToFreeTypeVariable",
- new ProblemAttributes(JavaCore.COMPILER_PB_PESSIMISTIC_NULL_ANALYSIS_FOR_FREE_TYPE_VARIABLES));
- expectedProblemAttributes.put("NullSourceString", SKIP);
- expectedProblemAttributes.put("NullUnboxing", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_REFERENCE));
- expectedProblemAttributes.put("NumericValueOutOfRange", SKIP);
- expectedProblemAttributes.put("ObjectCannotBeGeneric", SKIP);
- expectedProblemAttributes.put("ObjectCannotHaveSuperTypes", SKIP);
- expectedProblemAttributes.put("ObjectHasNoSuperclass", SKIP);
- expectedProblemAttributes.put("ObjectMustBeClass", SKIP);
- expectedProblemAttributes.put("OuterLocalMustBeEffectivelyFinal", SKIP);
- expectedProblemAttributes.put("OuterLocalMustBeFinal", SKIP);
- expectedProblemAttributes.put("OverridingDeprecatedMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
- expectedProblemAttributes.put("OverridingDeprecatedSinceVersionMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
- expectedProblemAttributes.put("OverridingTerminallyDeprecatedMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
- expectedProblemAttributes.put("OverridingTerminallyDeprecatedSinceVersionMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
- expectedProblemAttributes.put("OverridingMethodWithoutSuperInvocation",
- new ProblemAttributes(JavaCore.COMPILER_PB_OVERRIDING_METHOD_WITHOUT_SUPER_INVOCATION));
- expectedProblemAttributes.put("OverridingNonVisibleMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD));
- expectedProblemAttributes.put("PackageCollidesWithType", SKIP);
- expectedProblemAttributes.put("PackageDoesNotExistOrIsEmpty", SKIP);
- expectedProblemAttributes.put("PackageIsNotExpectedPackage", SKIP);
- expectedProblemAttributes.put("ParameterAssignment",
- new ProblemAttributes(JavaCore.COMPILER_PB_PARAMETER_ASSIGNMENT));
- expectedProblemAttributes.put("ParameterLackingNonNullAnnotation",
- new ProblemAttributes(JavaCore.COMPILER_PB_NONNULL_PARAMETER_ANNOTATION_DROPPED));
- expectedProblemAttributes.put("ParameterLackingNullableAnnotation",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("ParameterMismatch", SKIP);
- expectedProblemAttributes.put("ParameterizedConstructorArgumentTypeMismatch", SKIP);
- expectedProblemAttributes.put("ParameterizedMethodArgumentTypeMismatch", SKIP);
- expectedProblemAttributes.put("ParsingError", SKIP);
- expectedProblemAttributes.put("ParsingErrorDeleteToken", SKIP);
- expectedProblemAttributes.put("ParsingErrorDeleteTokens", SKIP);
- expectedProblemAttributes.put("ParsingErrorInsertToComplete", SKIP);
- expectedProblemAttributes.put("ParsingErrorInsertToCompletePhrase", SKIP);
- expectedProblemAttributes.put("ParsingErrorInsertToCompleteScope", SKIP);
- expectedProblemAttributes.put("ParsingErrorInsertTokenAfter", SKIP);
- expectedProblemAttributes.put("ParsingErrorInsertTokenBefore", SKIP);
- expectedProblemAttributes.put("ParsingErrorInvalidToken", SKIP);
- expectedProblemAttributes.put("ParsingErrorMergeTokens", SKIP);
- expectedProblemAttributes.put("ParsingErrorMisplacedConstruct", SKIP);
- expectedProblemAttributes.put("ParsingErrorNoSuggestion", SKIP);
- expectedProblemAttributes.put("ParsingErrorNoSuggestionForTokens", SKIP);
- expectedProblemAttributes.put("ParsingErrorOnKeyword", SKIP);
- expectedProblemAttributes.put("ParsingErrorOnKeywordNoSuggestion", SKIP);
- expectedProblemAttributes.put("ParsingErrorReplaceTokens", SKIP);
- expectedProblemAttributes.put("ParsingErrorUnexpectedEOF", SKIP);
- expectedProblemAttributes.put("PolymorphicMethodNotBelow17", SKIP);
- expectedProblemAttributes.put("PossibleAccidentalBooleanAssignment",
- new ProblemAttributes(JavaCore.COMPILER_PB_POSSIBLE_ACCIDENTAL_BOOLEAN_ASSIGNMENT));
- expectedProblemAttributes.put("PotentialHeapPollutionFromVararg",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
- expectedProblemAttributes.put("PotentiallyUnclosedCloseable",
- new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIALLY_UNCLOSED_CLOSEABLE));
- expectedProblemAttributes.put("PotentiallyUnclosedCloseableAtExit",
- new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIALLY_UNCLOSED_CLOSEABLE));
- expectedProblemAttributes.put("PotentialNullExpressionReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
- expectedProblemAttributes.put("PotentialNullLocalVariableReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
- expectedProblemAttributes.put("PotentialNullUnboxing",
- new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
- expectedProblemAttributes.put("PotentialNullMessageSendReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
- expectedProblemAttributes.put("ProviderMethodOrConstructorRequiredForServiceImpl", SKIP);
- expectedProblemAttributes.put("PublicClassMustMatchFileName", SKIP);
- expectedProblemAttributes.put("RawMemberTypeCannotBeParameterized", SKIP);
- expectedProblemAttributes.put("RawTypeReference",
- new ProblemAttributes(JavaCore.COMPILER_PB_RAW_TYPE_REFERENCE));
- expectedProblemAttributes.put("RecursiveConstructorInvocation", SKIP);
- expectedProblemAttributes.put("RedefinedArgument", SKIP);
- expectedProblemAttributes.put("RedefinedLocal", SKIP);
- expectedProblemAttributes.put("RedundantSpecificationOfTypeArguments",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_TYPE_ARGUMENTS));
- expectedProblemAttributes.put("RedundantLocalVariableNullAssignment",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("RedundantNullAnnotation",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
- expectedProblemAttributes.put("RedundantNullCheckAgainstNonNullType",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("RedundantNullCheckOnField",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("RedundantNullCheckOnNonNullExpression",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("RedundantNullCheckOnNonNullSpecdField",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("RedundantNullCheckOnNonNullLocalVariable",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("RedundantNullCheckOnNonNullMessageSend",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("RedundantNullCheckOnNullLocalVariable",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("RedundantNullCheckOnSpecdNonNullLocalVariable",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("RedundantNullDefaultAnnotation",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
- expectedProblemAttributes.put("RedundantNullDefaultAnnotationModule",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
- expectedProblemAttributes.put("RedundantNullDefaultAnnotationPackage",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
- expectedProblemAttributes.put("RedundantNullDefaultAnnotationType",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
- expectedProblemAttributes.put("RedundantNullDefaultAnnotationMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
- expectedProblemAttributes.put("RedundantNullDefaultAnnotationLocal",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
- expectedProblemAttributes.put("RedundantNullDefaultAnnotationField",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
- expectedProblemAttributes.put("RedundantSuperinterface",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_SUPERINTERFACE));
- expectedProblemAttributes.put("ReferenceExpressionParameterNullityMismatch",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("ReferenceExpressionParameterNullityUnchecked",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
- expectedProblemAttributes.put("ReferenceExpressionReturnNullRedef",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("ReferenceExpressionReturnNullRedefUnchecked",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
- expectedProblemAttributes.put("ReferenceToForwardField", SKIP);
- expectedProblemAttributes.put("ReferenceToForwardTypeVariable", SKIP);
- expectedProblemAttributes.put("RepeatableAnnotationTypeIsDocumented", SKIP);
- expectedProblemAttributes.put("RepeatableAnnotationTypeIsInherited", SKIP);
- expectedProblemAttributes.put("RepeatableAnnotationTypeTargetMismatch", SKIP);
- expectedProblemAttributes.put("RepeatableAnnotationWithRepeatingContainerAnnotation", SKIP);
- expectedProblemAttributes.put("RepeatedAnnotationWithContainerAnnotation", SKIP);
- expectedProblemAttributes.put("RequiredNonNullButProvidedFreeTypeVariable",
- new ProblemAttributes(JavaCore.COMPILER_PB_PESSIMISTIC_NULL_ANALYSIS_FOR_FREE_TYPE_VARIABLES));
- expectedProblemAttributes.put("RequiredNonNullButProvidedNull",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("RequiredNonNullButProvidedPotentialNull",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_ANNOTATION_INFERENCE_CONFLICT));
- expectedProblemAttributes.put("RequiredNonNullButProvidedUnknown",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
- expectedProblemAttributes.put("RequiredNonNullButProvidedSpecdNullable",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
- expectedProblemAttributes.put("ResourceHasToImplementAutoCloseable", SKIP);
- expectedProblemAttributes.put("ReturnTypeAmbiguous", SKIP);
- expectedProblemAttributes.put("ReturnTypeCannotBeVoidArray", SKIP);
- expectedProblemAttributes.put("ReturnTypeInheritedNameHidesEnclosingName", SKIP);
- expectedProblemAttributes.put("ReturnTypeInternalNameProvided", SKIP);
- expectedProblemAttributes.put("ReturnTypeMismatch", SKIP);
- expectedProblemAttributes.put("ReturnTypeNotFound", SKIP);
- expectedProblemAttributes.put("ReturnTypeNotVisible", SKIP);
- expectedProblemAttributes.put("SafeVarargsOnFixedArityMethod", SKIP);
- expectedProblemAttributes.put("SafeVarargsOnNonFinalInstanceMethod", SKIP);
- expectedProblemAttributes.put("ServiceImplDefaultConstructorNotPublic", SKIP);
- expectedProblemAttributes.put("ServiceImplNotDefinedByModule", SKIP);
- expectedProblemAttributes.put("ShouldImplementHashcode",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_HASHCODE_METHOD));
- expectedProblemAttributes.put("ShouldReturnValue", SKIP);
- expectedProblemAttributes.put("ShouldReturnValueHintMissingDefault", SKIP);
- expectedProblemAttributes.put("SpecdNonNullLocalVariableComparisonYieldsFalse",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
- expectedProblemAttributes.put("StaticInheritedMethodConflicts", SKIP);
- expectedProblemAttributes.put("StaticMemberOfParameterizedType", SKIP);
- expectedProblemAttributes.put("StaticMethodRequested", SKIP);
- expectedProblemAttributes.put("StaticMethodShouldBeAccessedStatically", SKIP);
- expectedProblemAttributes.put("StringConstantIsExceedingUtf8Limit", SKIP);
- expectedProblemAttributes.put("SuperAccessCannotBypassDirectSuper", SKIP);
- expectedProblemAttributes.put("SuperCallCannotBypassOverride", SKIP);
- expectedProblemAttributes.put("SuperInterfaceMustBeAnInterface", SKIP);
- expectedProblemAttributes.put("SuperInterfacesCollide", SKIP);
- expectedProblemAttributes.put("SuperTypeUsingWildcard", SKIP);
- expectedProblemAttributes.put("SuperclassAmbiguous",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_HASHCODE_METHOD));
- expectedProblemAttributes.put("SuperclassInheritedNameHidesEnclosingName", SKIP);
- expectedProblemAttributes.put("SuperclassInternalNameProvided", SKIP);
- expectedProblemAttributes.put("SuperclassMustBeAClass", SKIP);
- expectedProblemAttributes.put("SuperclassNotFound", SKIP);
- expectedProblemAttributes.put("SuperclassNotVisible",
- new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_SUPERINTERFACE));
- expectedProblemAttributes.put("SuperfluousSemicolon",
- new ProblemAttributes(JavaCore.COMPILER_PB_EMPTY_STATEMENT));
- expectedProblemAttributes.put("SwitchOnEnumNotBelow15", SKIP);
- expectedProblemAttributes.put("SwitchOnStringsNotBelow17", SKIP);
- expectedProblemAttributes.put("TargetTypeNotAFunctionalInterface", SKIP);
- expectedProblemAttributes.put("Task", SKIP);
- expectedProblemAttributes.put("ThisInStaticContext", SKIP);
- expectedProblemAttributes.put("ThisSuperDuringConstructorInvocation", SKIP);
- expectedProblemAttributes.put("ToleratedMisplacedTypeAnnotations", SKIP);
- expectedProblemAttributes.put("TooManyArgumentSlots", SKIP);
- expectedProblemAttributes.put("TooManyArrayDimensions", SKIP);
- expectedProblemAttributes.put("TooManyBytesForStringConstant", SKIP);
- expectedProblemAttributes.put("TooManyConstantsInConstantPool", SKIP);
- expectedProblemAttributes.put("TooManyFields", SKIP);
- expectedProblemAttributes.put("TooManyLocalVariableSlots", SKIP);
- expectedProblemAttributes.put("TooManyMethods", SKIP);
- expectedProblemAttributes.put("TooManyParametersForSyntheticMethod", SKIP);
- expectedProblemAttributes.put("TooManySyntheticArgumentSlots", SKIP);
- expectedProblemAttributes.put("TypeAnnotationAtQualifiedName", SKIP);
- expectedProblemAttributes.put("TypeArgumentMismatch", SKIP);
- expectedProblemAttributes.put("TypeArgumentsForRawGenericConstructor", SKIP);
- expectedProblemAttributes.put("TypeArgumentsForRawGenericMethod", SKIP);
- expectedProblemAttributes.put("TypeCollidesWithPackage", SKIP);
- expectedProblemAttributes.put("TypeHidingType",
- new ProblemAttributes(JavaCore.COMPILER_PB_TYPE_PARAMETER_HIDING));
- expectedProblemAttributes.put("TypeHidingTypeParameterFromMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_TYPE_PARAMETER_HIDING));
- expectedProblemAttributes.put("TypeHidingTypeParameterFromType",
- new ProblemAttributes(JavaCore.COMPILER_PB_TYPE_PARAMETER_HIDING));
- expectedProblemAttributes.put("TypeMismatch", SKIP);
- expectedProblemAttributes.put("TypeMissingDeprecatedAnnotation",
- new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_DEPRECATED_ANNOTATION));
- expectedProblemAttributes.put("TypeParameterHidingType",
- new ProblemAttributes(JavaCore.COMPILER_PB_TYPE_PARAMETER_HIDING));
- expectedProblemAttributes.put("UnboxingConversion", new ProblemAttributes(JavaCore.COMPILER_PB_AUTOBOXING));
- expectedProblemAttributes.put("UncheckedAccessOfValueOfFreeTypeVariable",
- new ProblemAttributes(JavaCore.COMPILER_PB_PESSIMISTIC_NULL_ANALYSIS_FOR_FREE_TYPE_VARIABLES));
- expectedProblemAttributes.put("UnclosedCloseable",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNCLOSED_CLOSEABLE));
- expectedProblemAttributes.put("UnclosedCloseableAtExit",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNCLOSED_CLOSEABLE));
- expectedProblemAttributes.put("UndefinedAnnotationMember", SKIP);
- expectedProblemAttributes.put("UndefinedConstructor", SKIP);
- expectedProblemAttributes.put("UndefinedConstructorInDefaultConstructor", SKIP);
- expectedProblemAttributes.put("UndefinedConstructorInImplicitConstructorCall", SKIP);
- expectedProblemAttributes.put("UndefinedField", SKIP);
- expectedProblemAttributes.put("UndefinedLabel", SKIP);
- expectedProblemAttributes.put("UndefinedMethod", SKIP);
- expectedProblemAttributes.put("UndefinedModule", SKIP);
- expectedProblemAttributes.put("UndefinedName", SKIP);
- expectedProblemAttributes.put("UndefinedType", SKIP);
- expectedProblemAttributes.put("UndefinedTypeVariable", SKIP);
- expectedProblemAttributes.put("UnderscoresInLiteralsNotBelow17", SKIP);
- expectedProblemAttributes.put("UndocumentedEmptyBlock",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNDOCUMENTED_EMPTY_BLOCK));
- expectedProblemAttributes.put("UnexpectedStaticModifierForField", SKIP);
- expectedProblemAttributes.put("UnexpectedStaticModifierForMethod", SKIP);
- expectedProblemAttributes.put("UnhandledException", SKIP);
- expectedProblemAttributes.put("UnhandledExceptionInDefaultConstructor", SKIP);
- expectedProblemAttributes.put("UnhandledExceptionInImplicitConstructorCall", SKIP);
- expectedProblemAttributes.put("UnhandledExceptionOnAutoClose", SKIP);
- expectedProblemAttributes.put("UnhandledWarningToken",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNHANDLED_WARNING_TOKEN));
- expectedProblemAttributes.put("UninitializedBlankFinalField", SKIP);
- expectedProblemAttributes.put("UninitializedBlankFinalFieldHintMissingDefault", SKIP);
- expectedProblemAttributes.put("UninitializedFreeTypeVariableField", SKIP);
- expectedProblemAttributes.put("UninitializedFreeTypeVariableFieldHintMissingDefault", SKIP);
- expectedProblemAttributes.put("UninitializedLocalVariable", SKIP);
- expectedProblemAttributes.put("UninitializedLocalVariableHintMissingDefault", SKIP);
- expectedProblemAttributes.put("UninitializedNonNullField", SKIP);
- expectedProblemAttributes.put("UninitializedNonNullFieldHintMissingDefault", SKIP);
- expectedProblemAttributes.put("UninternedIdentityComparison", SKIP);
- expectedProblemAttributes.put("UnlikelyCollectionMethodArgumentType",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNLIKELY_COLLECTION_METHOD_ARGUMENT_TYPE));
- expectedProblemAttributes.put("UnlikelyEqualsArgumentType",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNLIKELY_EQUALS_ARGUMENT_TYPE));
- expectedProblemAttributes.put("UnmatchedBracket", SKIP);
- expectedProblemAttributes.put("UnnamedPackageInNamedModule", SKIP);
- expectedProblemAttributes.put("UnnecessaryArgumentCast", SKIP);
- expectedProblemAttributes.put("UnnecessaryCast",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNNECESSARY_TYPE_CHECK));
- expectedProblemAttributes.put("UnnecessaryElse",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNNECESSARY_ELSE));
- expectedProblemAttributes.put("UnnecessaryInstanceof",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNNECESSARY_TYPE_CHECK));
- expectedProblemAttributes.put("UnnecessaryNLSTag",
- new ProblemAttributes(JavaCore.COMPILER_PB_NON_NLS_STRING_LITERAL));
- expectedProblemAttributes.put("UnqualifiedFieldAccess",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNQUALIFIED_FIELD_ACCESS));
- expectedProblemAttributes.put("UnreachableCatch", SKIP);
- expectedProblemAttributes.put("UnresolvedVariable", SKIP);
- expectedProblemAttributes.put("UnsafeElementTypeConversion",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
- expectedProblemAttributes.put("UnsafeGenericArrayForVarargs",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
- expectedProblemAttributes.put("UnsafeGenericCast",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
- expectedProblemAttributes.put("UnsafeNullnessCast",
- new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
- expectedProblemAttributes.put("UnsafeRawConstructorInvocation",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
- expectedProblemAttributes.put("UnsafeRawFieldAssignment",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
- expectedProblemAttributes.put("UnsafeRawGenericConstructorInvocation",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
- expectedProblemAttributes.put("UnsafeRawGenericMethodInvocation",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
- expectedProblemAttributes.put("UnsafeRawMethodInvocation",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
- expectedProblemAttributes.put("UnsafeReturnTypeOverride",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
- expectedProblemAttributes.put("UnsafeTypeConversion",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
- expectedProblemAttributes.put("UnstableAutoModuleName",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNSTABLE_AUTO_MODULE_NAME));
- expectedProblemAttributes.put("UnterminatedComment", SKIP);
- expectedProblemAttributes.put("UnterminatedString", SKIP);
- expectedProblemAttributes.put("UnusedConstructorDeclaredThrownException",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION));
- expectedProblemAttributes.put("UnusedImport", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_IMPORT));
- expectedProblemAttributes.put("UnusedLabel", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_LABEL));
- expectedProblemAttributes.put("UnusedMethodDeclaredThrownException",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION));
- expectedProblemAttributes.put("UnusedObjectAllocation",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_OBJECT_ALLOCATION));
- expectedProblemAttributes.put("UnusedPrivateConstructor",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER));
- expectedProblemAttributes.put("UnusedPrivateField",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER));
- expectedProblemAttributes.put("UnusedPrivateMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER));
- expectedProblemAttributes.put("UnusedPrivateType",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER));
- expectedProblemAttributes.put("UnusedTypeArgumentsForConstructorInvocation",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_TYPE_ARGUMENTS_FOR_METHOD_INVOCATION));
- expectedProblemAttributes.put("UnusedTypeParameter",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_TYPE_PARAMETER));
- expectedProblemAttributes.put("UnusedTypeArgumentsForMethodInvocation",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_TYPE_ARGUMENTS_FOR_METHOD_INVOCATION));
- expectedProblemAttributes.put("UnusedWarningToken",
- new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_WARNING_TOKEN));
- expectedProblemAttributes.put("UseAssertAsAnIdentifier",
- new ProblemAttributes(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER));
- expectedProblemAttributes.put("UseEnumAsAnIdentifier",
- new ProblemAttributes(JavaCore.COMPILER_PB_ENUM_IDENTIFIER));
- expectedProblemAttributes.put("IllegalUseOfUnderscoreAsAnIdentifier", SKIP);
- expectedProblemAttributes.put("UsingDeprecatedConstructor",
- new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedField",
- new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedModule",
- new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedPackage", SKIP);
- expectedProblemAttributes.put("UsingDeprecatedType",
- new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedSinceVersionConstructor",
- new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedSinceVersionField",
- new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedSinceVersionMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedSinceVersionModule",
- new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
- expectedProblemAttributes.put("UsingDeprecatedSinceVersionPackage", SKIP);
- expectedProblemAttributes.put("UsingDeprecatedSinceVersionType",
- new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedConstructor",
- new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedField",
- new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedModule",
- new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedPackage", SKIP);
- expectedProblemAttributes.put("UsingTerminallyDeprecatedType",
- new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionConstructor",
- new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionField",
- new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionMethod",
- new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionModule",
- new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
- expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionPackage", SKIP);
- expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionType",
- new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
- expectedProblemAttributes.put("VarargsConflict", SKIP);
- expectedProblemAttributes.put("VarargsElementTypeNotVisible", SKIP);
- expectedProblemAttributes.put("VarargsElementTypeNotVisibleForConstructor", SKIP);
- expectedProblemAttributes.put("VariableTypeCannotBeVoid", SKIP);
- expectedProblemAttributes.put("VariableTypeCannotBeVoidArray", SKIP);
- expectedProblemAttributes.put("VoidMethodReturnsValue", SKIP);
- expectedProblemAttributes.put("WildcardConstructorInvocation", SKIP);
- expectedProblemAttributes.put("WildcardFieldAssignment", SKIP);
- expectedProblemAttributes.put("WildcardMethodInvocation", SKIP);
- expectedProblemAttributes.put("illFormedParameterizationOfFunctionalInterface", SKIP);
- expectedProblemAttributes.put("lambdaParameterTypeMismatched", SKIP);
- expectedProblemAttributes.put("lambdaSignatureMismatched", SKIP);
- expectedProblemAttributes.put("DisallowedExplicitThisParameter", SKIP);
- expectedProblemAttributes.put("IllegalArrayOfUnionType", SKIP);
- expectedProblemAttributes.put("IllegalArrayTypeInIntersectionCast", SKIP);
- expectedProblemAttributes.put("ProblemNotAnalysed", SKIP);
- expectedProblemAttributes.put("VarCannotBeMixedWithNonVarParams", SKIP);
- expectedProblemAttributes.put("VarIsNotAllowedHere", SKIP);
- expectedProblemAttributes.put("VarIsReserved", SKIP);
- expectedProblemAttributes.put("VarIsReservedInFuture", SKIP);
- expectedProblemAttributes.put("VarLocalCannotBeArray", SKIP);
- expectedProblemAttributes.put("VarLocalCannotBeArrayInitalizers", SKIP);
- expectedProblemAttributes.put("VarLocalCannotBeLambda", SKIP);
- expectedProblemAttributes.put("VarLocalCannotBeMethodReference", SKIP);
- expectedProblemAttributes.put("VarLocalInitializedToNull", SKIP);
- expectedProblemAttributes.put("VarLocalInitializedToVoid", SKIP);
- expectedProblemAttributes.put("VarLocalMultipleDeclarators", SKIP);
- expectedProblemAttributes.put("VarLocalReferencesItself", SKIP);
- expectedProblemAttributes.put("VarLocalTooManyBrackets", SKIP);
- expectedProblemAttributes.put("VarLocalWithoutInitizalier", SKIP);
- expectedProblemAttributes.put("SwitchExpressionsIncompatibleResultExpressionTypes",SKIP);
- expectedProblemAttributes.put("SwitchExpressionsEmptySwitchBlock",SKIP);
- expectedProblemAttributes.put("SwitchExpressionsNoResultExpression",SKIP);
- expectedProblemAttributes.put("SwitchExpressionSwitchLabeledBlockCompletesNormally",SKIP);
- expectedProblemAttributes.put("SwitchExpressionLastStatementCompletesNormally",SKIP);
- expectedProblemAttributes.put("SwitchExpressionTrailingSwitchLabels",SKIP);
- expectedProblemAttributes.put("switchMixedCase", SKIP);
- expectedProblemAttributes.put("SwitchExpressionMissingDefaultCase",SKIP);
- expectedProblemAttributes.put("SwitchExpressionNotBelow12", SKIP);
- expectedProblemAttributes.put("SwitchCaseLabelWithArrowNotBelow12", SKIP);
- expectedProblemAttributes.put("SwitchExpressionPreviewDisabled", SKIP);
- expectedProblemAttributes.put("SwitchCaseLabelWithArrowPreviewDisabled", SKIP);
- expectedProblemAttributes.put("PreviewFeatureDisabled", SKIP);
- expectedProblemAttributes.put("PreviewFeatureUsed", SKIP);
- expectedProblemAttributes.put("PreviewFeatureNotSupported", SKIP);
- Map constantNamesIndex = new HashMap();
- Field[] fields = JavaCore.class.getFields();
- for (int i = 0, length = fields.length; i < length; i++) {
- Field field = fields[i];
- String fieldName;
- if (field.getType() == String.class && (fieldName = field.getName()).startsWith("COMPILER_PB_")) {
- constantNamesIndex.put(field.get(null), fieldName);
+ ProblemAttributes(boolean skip) {
+ this.skip = skip;
+ }
+ }
+ ProblemAttributes SKIP = new ProblemAttributes(true);
+ Map expectedProblemAttributes = new HashMap();
+ expectedProblemAttributes.put("AbstractMethodCannotBeOverridden", SKIP);
+ expectedProblemAttributes.put("AbstractMethodInAbstractClass", SKIP);
+ expectedProblemAttributes.put("AbstractMethodInEnum", SKIP);
+ expectedProblemAttributes.put("AbstractMethodMustBeImplemented", SKIP);
+ expectedProblemAttributes.put("AbstractMethodMustBeImplementedOverConcreteMethod", SKIP);
+ expectedProblemAttributes.put("AbstractMethodsInConcreteClass", SKIP);
+ expectedProblemAttributes.put("AbstractServiceImplementation", SKIP);
+ expectedProblemAttributes.put("AmbiguousConstructor", SKIP);
+ expectedProblemAttributes.put("AmbiguousConstructorInDefaultConstructor", SKIP);
+ expectedProblemAttributes.put("AmbiguousConstructorInImplicitConstructorCall", SKIP);
+ expectedProblemAttributes.put("AmbiguousField", SKIP);
+ expectedProblemAttributes.put("AmbiguousMethod", SKIP);
+ expectedProblemAttributes.put("AmbiguousType", SKIP);
+ expectedProblemAttributes.put("AnnotationCannotOverrideMethod", SKIP);
+ expectedProblemAttributes.put("AnnotationCircularity", SKIP);
+ expectedProblemAttributes.put("AnnotationCircularitySelfReference", SKIP);
+ expectedProblemAttributes.put("AnnotationFieldNeedConstantInitialization", SKIP);
+ expectedProblemAttributes.put("AnnotationMembersCannotHaveParameters", SKIP);
+ expectedProblemAttributes.put("AnnotationMembersCannotHaveTypeParameters", SKIP);
+ expectedProblemAttributes.put("AnnotationTypeDeclarationCannotHaveConstructor", SKIP);
+ expectedProblemAttributes.put("AnnotationTypeDeclarationCannotHaveSuperclass", SKIP);
+ expectedProblemAttributes.put("AnnotationTypeDeclarationCannotHaveSuperinterfaces", SKIP);
+ expectedProblemAttributes.put("AnnotationTypeUsedAsSuperInterface", new ProblemAttributes(JavaCore.COMPILER_PB_ANNOTATION_SUPER_INTERFACE));
+ expectedProblemAttributes.put("AnnotationValueMustBeAnEnumConstant", SKIP);
+ expectedProblemAttributes.put("AnnotationValueMustBeAnnotation", SKIP);
+ expectedProblemAttributes.put("AnnotationValueMustBeArrayInitializer", SKIP);
+ expectedProblemAttributes.put("AnnotationValueMustBeClassLiteral", SKIP);
+ expectedProblemAttributes.put("AnnotationValueMustBeConstant", SKIP);
+ expectedProblemAttributes.put("AnonymousClassCannotExtendFinalClass", SKIP);
+ expectedProblemAttributes.put("ApplicableMethodOverriddenByInapplicable", SKIP);
+ expectedProblemAttributes.put("ArgumentHidingField", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
+ expectedProblemAttributes.put("ArgumentHidingLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
+ expectedProblemAttributes.put("ArgumentIsNeverUsed", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_PARAMETER));
+ expectedProblemAttributes.put("ArgumentTypeAmbiguous", SKIP);
+ expectedProblemAttributes.put("ArgumentTypeCannotBeVoid", SKIP);
+ expectedProblemAttributes.put("ArgumentTypeCannotBeVoidArray", SKIP);
+ expectedProblemAttributes.put("ArgumentTypeInheritedNameHidesEnclosingName", SKIP);
+ expectedProblemAttributes.put("ArgumentTypeInternalNameProvided", SKIP);
+ expectedProblemAttributes.put("ArgumentTypeNotFound", SKIP);
+ expectedProblemAttributes.put("ArgumentTypeNotVisible", SKIP);
+ expectedProblemAttributes.put("ArrayConstantsOnlyInArrayInitializers", SKIP);
+ expectedProblemAttributes.put("ArrayReferencePotentialNullReference", new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
+ expectedProblemAttributes.put("ArrayReferenceRequired", SKIP);
+ expectedProblemAttributes.put("AssignmentHasNoEffect", new ProblemAttributes(JavaCore.COMPILER_PB_NO_EFFECT_ASSIGNMENT));
+ expectedProblemAttributes.put("AssignmentToMultiCatchParameter", SKIP);
+ expectedProblemAttributes.put("AssignmentToResource", SKIP);
+ expectedProblemAttributes.put("AutoManagedResourceNotBelow17", SKIP);
+ expectedProblemAttributes.put("AutoManagedVariableResourceNotBelow9", SKIP);
+ expectedProblemAttributes.put("BinaryLiteralNotBelow17", SKIP);
+ expectedProblemAttributes.put("BodyForAbstractMethod", SKIP);
+ expectedProblemAttributes.put("BodyForNativeMethod", SKIP);
+ expectedProblemAttributes.put("BoundCannotBeArray", SKIP);
+ expectedProblemAttributes.put("BoundHasConflictingArguments", SKIP);
+ expectedProblemAttributes.put("BoundMustBeAnInterface", SKIP);
+ expectedProblemAttributes.put("BoxingConversion", new ProblemAttributes(JavaCore.COMPILER_PB_AUTOBOXING));
+ expectedProblemAttributes.put("BytecodeExceeds64KLimit", SKIP);
+ expectedProblemAttributes.put("BytecodeExceeds64KLimitForClinit", SKIP);
+ expectedProblemAttributes.put("BytecodeExceeds64KLimitForConstructor", SKIP);
+ expectedProblemAttributes.put("BytecodeExceeds64KLimitForSwitchTable", SKIP);
+ expectedProblemAttributes.put("CannotAllocateVoidArray", SKIP);
+ expectedProblemAttributes.put("CannotDeclareEnumSpecialMethod", SKIP);
+ expectedProblemAttributes.put("CannotDefineAnnotationInLocalType", SKIP);
+ expectedProblemAttributes.put("CannotDefineDimensionExpressionsWithInit", SKIP);
+ expectedProblemAttributes.put("CannotDefineEnumInLocalType", SKIP);
+ expectedProblemAttributes.put("CannotDefineInterfaceInLocalType", SKIP);
+ expectedProblemAttributes.put("CannotDefineStaticInitializerInLocalType", SKIP);
+ expectedProblemAttributes.put("CannotExtendEnum", SKIP);
+ expectedProblemAttributes.put("CannotHideAnInstanceMethodWithAStaticMethod", SKIP);
+ expectedProblemAttributes.put("CannotImportPackage", SKIP);
+ expectedProblemAttributes.put("CannotImplementIncompatibleNullness", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("CannotInferElidedTypes", SKIP);
+ expectedProblemAttributes.put("CannotInferInvocationType", SKIP);
+ expectedProblemAttributes.put("CannotInvokeSuperConstructorInEnum", SKIP);
+ expectedProblemAttributes.put("CannotOverrideAStaticMethodWithAnInstanceMethod", SKIP);
+ expectedProblemAttributes.put("CannotReadSource", SKIP);
+ expectedProblemAttributes.put("CannotReturnInInitializer", SKIP);
+ expectedProblemAttributes.put("CannotThrowNull", SKIP);
+ expectedProblemAttributes.put("CannotThrowType", SKIP);
+ expectedProblemAttributes.put("CannotUseDiamondWithAnonymousClasses", SKIP);
+ expectedProblemAttributes.put("CannotUseDiamondWithExplicitTypeArguments", SKIP);
+ expectedProblemAttributes.put("CannotUseSuperInCodeSnippet", SKIP);
+ expectedProblemAttributes.put("ClassExtendFinalClass", SKIP);
+ expectedProblemAttributes.put("CodeCannotBeReached", SKIP);
+ expectedProblemAttributes.put("CodeSnippetMissingClass", SKIP);
+ expectedProblemAttributes.put("CodeSnippetMissingMethod", SKIP);
+ expectedProblemAttributes.put("ComparingIdentical", new ProblemAttributes(JavaCore.COMPILER_PB_COMPARING_IDENTICAL));
+ expectedProblemAttributes.put("ConflictingImport", SKIP);
+ expectedProblemAttributes.put("ConflictingNullAnnotations", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("ConstructedArrayIncompatible", SKIP);
+ expectedProblemAttributes.put("ConstructionTypeMismatch", SKIP);
+ expectedProblemAttributes.put("ConflictingInheritedNullAnnotations", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("ConstructorReferenceNotBelow18", SKIP);
+ expectedProblemAttributes.put("ContainerAnnotationTypeHasNonDefaultMembers", SKIP);
+ expectedProblemAttributes.put("ContainerAnnotationTypeHasShorterRetention", SKIP);
+ expectedProblemAttributes.put("ContainerAnnotationTypeHasWrongValueType", SKIP);
+ expectedProblemAttributes.put("ContainerAnnotationTypeMustHaveValue", SKIP);
+ expectedProblemAttributes.put("ContradictoryNullAnnotations", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("ContradictoryNullAnnotationsOnBound", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("ContradictoryNullAnnotationsInferred", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("ContradictoryNullAnnotationsInferredFunctionType", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("ConstructorVarargsArgumentNeedCast", new ProblemAttributes(JavaCore.COMPILER_PB_VARARGS_ARGUMENT_NEED_CAST));
+ expectedProblemAttributes.put("CorruptedSignature", SKIP);
+ expectedProblemAttributes.put("CyclicModuleDependency", SKIP);
+ expectedProblemAttributes.put("DanglingReference", SKIP);
+ expectedProblemAttributes.put("DeadCode", new ProblemAttributes(JavaCore.COMPILER_PB_DEAD_CODE));
+ expectedProblemAttributes.put("DefaultMethodNotBelow18", SKIP);
+ expectedProblemAttributes.put("DefaultMethodOverridesObjectMethod", SKIP);
+ expectedProblemAttributes.put("DereferencingNullableExpression", new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
+ expectedProblemAttributes.put("DiamondNotBelow17", SKIP);
+ expectedProblemAttributes.put("DirectInvocationOfAbstractMethod", SKIP);
+ expectedProblemAttributes.put("DisallowedTargetForAnnotation", SKIP);
+ expectedProblemAttributes.put("DisallowedTargetForContainerAnnotationType", SKIP);
+ expectedProblemAttributes.put("DiscouragedReference", new ProblemAttributes(JavaCore.COMPILER_PB_DISCOURAGED_REFERENCE));
+ expectedProblemAttributes.put("DuplicateAnnotation", SKIP);
+ expectedProblemAttributes.put("DuplicateAnnotationNotMarkedRepeatable", SKIP);
+ expectedProblemAttributes.put("DuplicateAnnotationMember", SKIP);
+ expectedProblemAttributes.put("DuplicateBlankFinalFieldInitialization", SKIP);
+ expectedProblemAttributes.put("DuplicateBounds", SKIP);
+ expectedProblemAttributes.put("DuplicateBoundInIntersectionCast", SKIP);
+ expectedProblemAttributes.put("DuplicateCase", SKIP);
+ expectedProblemAttributes.put("DuplicateDefaultCase", SKIP);
+ expectedProblemAttributes.put("DuplicateExports", SKIP);
+ expectedProblemAttributes.put("DuplicateField", SKIP);
+ expectedProblemAttributes.put("DuplicateFinalLocalInitialization", SKIP);
+ expectedProblemAttributes.put("DuplicateImport", SKIP);
+ expectedProblemAttributes.put("DuplicateInheritedMethods", SKIP);
+ expectedProblemAttributes.put("DuplicateInheritedDefaultMethods", SKIP);
+ expectedProblemAttributes.put("DuplicateLabel", SKIP);
+ expectedProblemAttributes.put("DuplicateMethod", SKIP);
+ expectedProblemAttributes.put("DuplicateMethodErasure", SKIP);
+ expectedProblemAttributes.put("DuplicateModifierForArgument", SKIP);
+ expectedProblemAttributes.put("DuplicateModifierForField", SKIP);
+ expectedProblemAttributes.put("DuplicateModifierForMethod", SKIP);
+ expectedProblemAttributes.put("DuplicateModifierForType", SKIP);
+ expectedProblemAttributes.put("DuplicateModifierForVariable", SKIP);
+ expectedProblemAttributes.put("DuplicateModuleRef", SKIP);
+ expectedProblemAttributes.put("DuplicateNestedType", SKIP);
+ expectedProblemAttributes.put("DuplicateOpens", SKIP);
+ expectedProblemAttributes.put("DuplicateParameterizedMethods", SKIP);
+ expectedProblemAttributes.put("DuplicateRequires", SKIP);
+ expectedProblemAttributes.put("DuplicateResource", SKIP);
+ expectedProblemAttributes.put("DuplicateServices", SKIP);
+ expectedProblemAttributes.put("DuplicateSuperInterface", SKIP);
+ expectedProblemAttributes.put("DuplicateTargetInTargetAnnotation", SKIP);
+ expectedProblemAttributes.put("DuplicateTypeVariable", SKIP);
+ expectedProblemAttributes.put("DuplicateTypes", SKIP);
+ expectedProblemAttributes.put("DuplicateUses", SKIP);
+ expectedProblemAttributes.put("EmptyControlFlowStatement", new ProblemAttributes(JavaCore.COMPILER_PB_EMPTY_STATEMENT));
+ expectedProblemAttributes.put("EnclosingInstanceInConstructorCall", SKIP);
+ expectedProblemAttributes.put("EndOfSource", SKIP);
+ expectedProblemAttributes.put("EnumAbstractMethodMustBeImplemented", SKIP);
+ expectedProblemAttributes.put("EnumConstantCannotDefineAbstractMethod", SKIP);
+ expectedProblemAttributes.put("EnumConstantMustImplementAbstractMethod", SKIP);
+ expectedProblemAttributes.put("EnumConstantsCannotBeSurroundedByParenthesis", SKIP);
+ expectedProblemAttributes.put("EnumStaticFieldInInInitializerContext", SKIP);
+ expectedProblemAttributes.put("EnumSwitchCannotTargetField", SKIP);
+ expectedProblemAttributes.put("ExceptionParameterIsNeverUsed", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_EXCEPTION_PARAMETER));
+ expectedProblemAttributes.put("ExceptionTypeAmbiguous", SKIP);
+ expectedProblemAttributes.put("ExceptionTypeInheritedNameHidesEnclosingName", SKIP);
+ expectedProblemAttributes.put("ExceptionTypeInternalNameProvided", SKIP);
+ expectedProblemAttributes.put("ExceptionTypeNotFound", SKIP);
+ expectedProblemAttributes.put("ExceptionTypeNotVisible", SKIP);
+ expectedProblemAttributes.put("ExplicitThisParameterNotInLambda", SKIP);
+ expectedProblemAttributes.put("ExplicitThisParameterNotBelow18", SKIP);
+ expectedProblemAttributes.put("ExplicitlyClosedAutoCloseable", new ProblemAttributes(JavaCore.COMPILER_PB_EXPLICITLY_CLOSED_AUTOCLOSEABLE));
+ expectedProblemAttributes.put("ExportedPackageDoesNotExistOrIsEmpty", SKIP);
+ expectedProblemAttributes.put("ExpressionShouldBeAVariable", SKIP);
+ expectedProblemAttributes.put("ExternalProblemFixable", SKIP);
+ expectedProblemAttributes.put("ExternalProblemNotFixable", SKIP);
+ expectedProblemAttributes.put("ExplicitAnnotationTargetRequired", SKIP);
+ expectedProblemAttributes.put("FallthroughCase", new ProblemAttributes(JavaCore.COMPILER_PB_FALLTHROUGH_CASE));
+ expectedProblemAttributes.put("FieldComparisonYieldsFalse", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("FieldHidingField", new ProblemAttributes(JavaCore.COMPILER_PB_FIELD_HIDING));
+ expectedProblemAttributes.put("FieldHidingLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_FIELD_HIDING));
+ expectedProblemAttributes.put("FieldMissingDeprecatedAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_DEPRECATED_ANNOTATION));
+ expectedProblemAttributes.put("FieldMustBeFinal", SKIP);
+ expectedProblemAttributes.put("FieldTypeAmbiguous", SKIP);
+ expectedProblemAttributes.put("FieldTypeInheritedNameHidesEnclosingName", SKIP);
+ expectedProblemAttributes.put("FieldTypeInternalNameProvided", SKIP);
+ expectedProblemAttributes.put("FieldTypeNotFound", SKIP);
+ expectedProblemAttributes.put("FieldTypeNotVisible", SKIP);
+ expectedProblemAttributes.put("FinalBoundForTypeVariable", new ProblemAttributes(JavaCore.COMPILER_PB_FINAL_PARAMETER_BOUND));
+ expectedProblemAttributes.put("FinalFieldAssignment", SKIP);
+ expectedProblemAttributes.put("FinalMethodCannotBeOverridden", SKIP);
+ expectedProblemAttributes.put("FinalOuterLocalAssignment", SKIP);
+ expectedProblemAttributes.put("FinallyMustCompleteNormally", new ProblemAttributes(JavaCore.COMPILER_PB_FINALLY_BLOCK_NOT_COMPLETING));
+ expectedProblemAttributes.put("ForbiddenReference", new ProblemAttributes(JavaCore.COMPILER_PB_FORBIDDEN_REFERENCE));
+ expectedProblemAttributes.put("GenericConstructorTypeArgumentMismatch", SKIP);
+ expectedProblemAttributes.put("GenericInferenceError", SKIP); // TODO should be removed via https://bugs.eclipse.org/404675
+ expectedProblemAttributes.put("GenericMethodTypeArgumentMismatch", SKIP);
+ expectedProblemAttributes.put("GenericTypeCannotExtendThrowable", SKIP);
+ expectedProblemAttributes.put("HidingEnclosingType", SKIP);
+ expectedProblemAttributes.put("HierarchyCircularity", SKIP);
+ expectedProblemAttributes.put("HierarchyCircularitySelfReference", SKIP);
+ expectedProblemAttributes.put("HierarchyHasProblems", SKIP);
+ expectedProblemAttributes.put("IllegalAbstractModifierCombinationForMethod", SKIP);
+ expectedProblemAttributes.put("IllegalStrictfpForAbstractInterfaceMethod", SKIP);
+ expectedProblemAttributes.put("IllegalAccessFromTypeVariable", SKIP);
+ expectedProblemAttributes.put("IllegalAnnotationForBaseType", SKIP);
+ expectedProblemAttributes.put("IllegalCast", SKIP);
+ expectedProblemAttributes.put("IllegalClassLiteralForTypeVariable", SKIP);
+ expectedProblemAttributes.put("IllegalDeclarationOfThisParameter", SKIP);
+ expectedProblemAttributes.put("IllegalDefaultModifierSpecification", SKIP);
+ expectedProblemAttributes.put("IllegalDefinitionToNonNullParameter", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("IllegalDimension", SKIP);
+ expectedProblemAttributes.put("IllegalEnclosingInstanceSpecification", SKIP);
+ expectedProblemAttributes.put("IllegalExtendedDimensions", SKIP);
+ expectedProblemAttributes.put("IllegalExtendedDimensionsForVarArgs", SKIP);
+ expectedProblemAttributes.put("IllegalGenericArray", SKIP);
+ expectedProblemAttributes.put("IllegalHexaLiteral", SKIP);
+ expectedProblemAttributes.put("IllegalInstanceofParameterizedType", SKIP);
+ expectedProblemAttributes.put("IllegalInstanceofTypeParameter", SKIP);
+ expectedProblemAttributes.put("IllegalBasetypeInIntersectionCast", SKIP);
+ expectedProblemAttributes.put("IllegalModifierCombinationFinalAbstractForClass", SKIP);
+ expectedProblemAttributes.put("IllegalModifierCombinationFinalVolatileForField", SKIP);
+ expectedProblemAttributes.put("IllegalModifierCombinationForInterfaceMethod", SKIP);
+ expectedProblemAttributes.put("IllegalModifierCombinationForPrivateInterfaceMethod9", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForAnnotationField", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForAnnotationMemberType", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForAnnotationMethod", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForAnnotationType", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForArgument", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForClass", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForConstructor", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForEnum", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForEnumConstant", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForEnumConstructor", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForField", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForInterface", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForInterfaceField", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForInterfaceMethod", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForInterfaceMethod18", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForLocalClass", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForLocalEnum", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForMemberClass", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForMemberEnum", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForMemberInterface", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForMethod", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForModule", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForInterfaceMethod9", SKIP);
+ expectedProblemAttributes.put("IllegalModifierForVariable", SKIP);
+ expectedProblemAttributes.put("IllegalModifiersForElidedType", SKIP);
+ expectedProblemAttributes.put("IllegalModifiers", SKIP);
+ expectedProblemAttributes.put("IllegalParameterNullityRedefinition", SKIP);
+ expectedProblemAttributes.put("IllegalPrimitiveOrArrayTypeForEnclosingInstance", SKIP);
+ expectedProblemAttributes.put("IllegalQualifiedEnumConstantLabel", SKIP);
+ expectedProblemAttributes.put("IllegalQualifiedParameterizedTypeAllocation", SKIP);
+ expectedProblemAttributes.put("IllegalQualifierForExplicitThis", SKIP);
+ expectedProblemAttributes.put("IllegalQualifierForExplicitThis2", SKIP);
+ expectedProblemAttributes.put("IllegalRedefinitionOfTypeVariable", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("IllegalRedefinitionToNonNullParameter", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("IllegalReturnNullityRedefinition", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("IllegalReturnNullityRedefinitionFreeTypeVariable", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("IllegalStaticModifierForMemberType", SKIP);
+ expectedProblemAttributes.put("IllegalTypeAnnotationsInStaticMemberAccess", SKIP);
+ expectedProblemAttributes.put("IllegalTypeArgumentsInRawConstructorReference", SKIP);
+ expectedProblemAttributes.put("IllegalTypeForExplicitThis", SKIP);
+ expectedProblemAttributes.put("IllegalTypeVariableSuperReference", SKIP);
+ expectedProblemAttributes.put("IllegalUnderscorePosition", SKIP);
+ expectedProblemAttributes.put("IllegalUsageOfQualifiedTypeReference", SKIP);
+ expectedProblemAttributes.put("IllegalUsageOfTypeAnnotations", SKIP);
+ expectedProblemAttributes.put("IllegalVararg", SKIP);
+ expectedProblemAttributes.put("IllegalVarargInLambda", SKIP);
+ expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForField", SKIP);
+ expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForMemberType", SKIP);
+ expectedProblemAttributes.put("IllegalVisibilityModifierCombinationForMethod", SKIP);
+ expectedProblemAttributes.put("IllegalVisibilityModifierForInterfaceMemberType", SKIP);
+ expectedProblemAttributes.put("ImplicitObjectBoundNoNullDefault", SKIP);
+ expectedProblemAttributes.put("ImportAmbiguous", SKIP);
+ expectedProblemAttributes.put("ImportInheritedNameHidesEnclosingName", SKIP);
+ expectedProblemAttributes.put("ImportInternalNameProvided", SKIP);
+ expectedProblemAttributes.put("ImportNotFound", SKIP);
+ expectedProblemAttributes.put("ImportNotVisible", SKIP);
+ expectedProblemAttributes.put("IncompatibleExceptionInInheritedMethodThrowsClause", SKIP);
+ expectedProblemAttributes.put("IncompatibleExceptionInThrowsClause", SKIP);
+ expectedProblemAttributes.put("IncompatibleExceptionInThrowsClauseForNonInheritedInterfaceMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INCOMPATIBLE_NON_INHERITED_INTERFACE_METHOD));
+ expectedProblemAttributes.put("IncompatibleReturnType", SKIP);
+ expectedProblemAttributes.put("IncompatibleReturnTypeForNonInheritedInterfaceMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INCOMPATIBLE_NON_INHERITED_INTERFACE_METHOD));
+ expectedProblemAttributes.put("IncompatibleTypesInConditionalOperator", SKIP);
+ expectedProblemAttributes.put("IncompatibleTypesInEqualityOperator", SKIP);
+ expectedProblemAttributes.put("IncompatibleTypesInForeach", SKIP);
+ expectedProblemAttributes.put("IncompatibleLambdaParameterType", SKIP);
+ expectedProblemAttributes.put("IncompatibleMethodReference", SKIP);
+ expectedProblemAttributes.put("IncorrectArityForParameterizedConstructor", SKIP);
+ expectedProblemAttributes.put("IncorrectArityForParameterizedMethod", SKIP);
+ expectedProblemAttributes.put("IncorrectArityForParameterizedType", SKIP);
+ expectedProblemAttributes.put("IncorrectEnclosingInstanceReference", SKIP);
+ expectedProblemAttributes.put("IncorrectSwitchType", SKIP);
+ expectedProblemAttributes.put("IncorrectSwitchType17", SKIP);
+ expectedProblemAttributes.put("IndirectAccessToStaticField", new ProblemAttributes(JavaCore.COMPILER_PB_INDIRECT_STATIC_ACCESS));
+ expectedProblemAttributes.put("IndirectAccessToStaticMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INDIRECT_STATIC_ACCESS));
+ expectedProblemAttributes.put("IndirectAccessToStaticType", new ProblemAttributes(JavaCore.COMPILER_PB_INDIRECT_STATIC_ACCESS));
+ expectedProblemAttributes.put("InheritedDefaultMethodConflictsWithOtherInherited", SKIP);
+ expectedProblemAttributes.put("InheritedFieldHidesEnclosingName", SKIP);
+ expectedProblemAttributes.put("InheritedIncompatibleReturnType", SKIP);
+ expectedProblemAttributes.put("InheritedMethodHidesEnclosingName", SKIP);
+ expectedProblemAttributes.put("InheritedMethodReducesVisibility", SKIP);
+ expectedProblemAttributes.put("InheritedTypeHidesEnclosingName", SKIP);
+ expectedProblemAttributes.put("InitializerMustCompleteNormally", SKIP);
+ expectedProblemAttributes.put("InstanceFieldDuringConstructorInvocation", SKIP);
+ expectedProblemAttributes.put("InstanceMethodDuringConstructorInvocation", SKIP);
+ expectedProblemAttributes.put("InterfaceAmbiguous", SKIP);
+ expectedProblemAttributes.put("InterfaceCannotHaveConstructors", SKIP);
+ expectedProblemAttributes.put("InterfaceCannotHaveInitializers", SKIP);
+ expectedProblemAttributes.put("InterfaceInheritedNameHidesEnclosingName", SKIP);
+ expectedProblemAttributes.put("InterfaceInternalNameProvided", SKIP);
+ expectedProblemAttributes.put("InterfaceNotFound", SKIP);
+ expectedProblemAttributes.put("InterfaceNotFunctionalInterface", SKIP);
+ expectedProblemAttributes.put("InterfaceNotVisible", SKIP);
+ expectedProblemAttributes.put("InterfaceStaticMethodInvocationNotBelow18", SKIP);
+ expectedProblemAttributes.put("InterfaceSuperInvocationNotBelow18", SKIP);
+ expectedProblemAttributes.put("InternalTypeNameProvided", SKIP);
+ expectedProblemAttributes.put("IntersectionCastNotBelow18", SKIP);
+ expectedProblemAttributes.put("InvalidAnnotationMemberType", SKIP);
+ expectedProblemAttributes.put("InvalidArrayConstructorReference", SKIP);
+ expectedProblemAttributes.put("InvalidBinary", SKIP);
+ expectedProblemAttributes.put("InvalidBreak", SKIP);
+ expectedProblemAttributes.put("InvalidCatchBlockSequence", SKIP);
+ expectedProblemAttributes.put("InvalidCharacterConstant", SKIP);
+ expectedProblemAttributes.put("InvalidClassInstantiation", SKIP);
+ expectedProblemAttributes.put("InvalidContinue", SKIP);
+ expectedProblemAttributes.put("InvalidDigit", SKIP);
+ expectedProblemAttributes.put("InvalidEncoding", SKIP);
+ expectedProblemAttributes.put("InvalidEscape", SKIP);
+ expectedProblemAttributes.put("InvalidExplicitConstructorCall", SKIP);
+ expectedProblemAttributes.put("InvalidExpressionAsStatement", SKIP);
+ expectedProblemAttributes.put("InvalidFileNameForPackageAnnotations", SKIP);
+ expectedProblemAttributes.put("InvalidFloat", SKIP);
+ expectedProblemAttributes.put("InvalidHexa", SKIP);
+ expectedProblemAttributes.put("InvalidHighSurrogate", SKIP);
+ expectedProblemAttributes.put("InvalidInput", SKIP);
+ expectedProblemAttributes.put("InvalidLowSurrogate", SKIP);
+ expectedProblemAttributes.put("InvalidLocationForModifiers", SKIP);
+ expectedProblemAttributes.put("InvalidNullToSynchronized", SKIP);
+ expectedProblemAttributes.put("InvalidOctal", SKIP);
+ expectedProblemAttributes.put("InvalidOpensStatement", SKIP);
+ expectedProblemAttributes.put("InvalidOperator", SKIP);
+ expectedProblemAttributes.put("InvalidParameterizedExceptionType", SKIP);
+ expectedProblemAttributes.put("InvalidParenthesizedExpression", SKIP);
+ expectedProblemAttributes.put("InvalidServiceIntfType", SKIP);
+ expectedProblemAttributes.put("InvalidServiceImplType", SKIP);
+ expectedProblemAttributes.put("InvalidTypeArguments", SKIP);
+ expectedProblemAttributes.put("InvalidTypeExpression", SKIP);
+ expectedProblemAttributes.put("InvalidTypeForCollection", SKIP);
+ expectedProblemAttributes.put("InvalidTypeForCollectionTarget14", SKIP);
+ expectedProblemAttributes.put("InvalidTypeForStaticImport", SKIP);
+ expectedProblemAttributes.put("InvalidTypeToSynchronized", SKIP);
+ expectedProblemAttributes.put("InvalidTypeVariableExceptionType", SKIP);
+ expectedProblemAttributes.put("InvalidUnaryExpression", SKIP);
+ expectedProblemAttributes.put("InvalidUnicodeEscape", SKIP);
+ expectedProblemAttributes.put("InvalidUnionTypeReferenceSequence", SKIP);
+ expectedProblemAttributes.put("InvalidUsageOfAnnotationDeclarations", SKIP);
+ expectedProblemAttributes.put("InvalidUsageOfAnnotations", SKIP);
+ expectedProblemAttributes.put("InvalidUsageOfEnumDeclarations", SKIP);
+ expectedProblemAttributes.put("InvalidUsageOfForeachStatements", SKIP);
+ expectedProblemAttributes.put("InvalidUsageOfReceiverAnnotations", SKIP);
+ expectedProblemAttributes.put("InvalidUsageOfStaticImports", SKIP);
+ expectedProblemAttributes.put("InvalidUsageOfTypeAnnotations", SKIP);
+ expectedProblemAttributes.put("InvalidUsageOfTypeArguments", SKIP);
+ expectedProblemAttributes.put("InvalidUsageOfTypeParameters", SKIP);
+ expectedProblemAttributes.put("InvalidUsageOfTypeParametersForAnnotationDeclaration", SKIP);
+ expectedProblemAttributes.put("InvalidUsageOfTypeParametersForEnumDeclaration", SKIP);
+ expectedProblemAttributes.put("InvalidUsageOfVarargs", SKIP);
+ expectedProblemAttributes.put("InvalidUsageOfWildcard", SKIP);
+ expectedProblemAttributes.put("InvalidVoidExpression", SKIP);
+ expectedProblemAttributes.put("IsClassPathCorrect", SKIP);
+ expectedProblemAttributes.put("JavadocAmbiguousConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocAmbiguousField", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocAmbiguousMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocAmbiguousMethodReference", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocAmbiguousType", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocDuplicateParamName", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocDuplicateReturnTag", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocDuplicateTag", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocDuplicateThrowsClassName", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocEmptyReturnTag", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocGenericConstructorTypeArgumentMismatch", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocGenericMethodTypeArgumentMismatch", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocHiddenReference", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocIncorrectArityForParameterizedConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocIncorrectArityForParameterizedMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInheritedFieldHidesEnclosingName", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInheritedMethodHidesEnclosingName", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInheritedNameHidesEnclosingTypeName", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInternalTypeNameProvided", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidMemberTypeQualification", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidParamName", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidParamTagName", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidParamTagTypeParameter", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidSeeArgs", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidSeeHref", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidSeeReference", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidSeeUrlReference", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidTag", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidThrowsClass", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidThrowsClassName", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocInvalidValueReference", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocMalformedSeeReference", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocMessagePrefix", SKIP);
+ expectedProblemAttributes.put("JavadocMissing", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_JAVADOC_COMMENTS));
+ expectedProblemAttributes.put("JavadocMissingHashCharacter", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingIdentifier", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingParamName", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingParamTag", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_JAVADOC_TAGS));
+ expectedProblemAttributes.put("JavadocMissingReturnTag", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_JAVADOC_TAGS));
+ expectedProblemAttributes.put("JavadocMissingSeeReference", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingTagDescription", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingThrowsClassName", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocMissingThrowsTag", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_JAVADOC_TAGS));
+ expectedProblemAttributes.put("JavadocNoMessageSendOnArrayType", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocNoMessageSendOnBaseType", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocNonGenericConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocNonGenericMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocNonStaticTypeFromStaticInvocation", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocNotVisibleConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocNotVisibleField", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocNotVisibleMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocNotVisibleType", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocParameterMismatch", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocParameterizedConstructorArgumentTypeMismatch", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocParameterizedMethodArgumentTypeMismatch", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocTypeArgumentsForRawGenericMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocUndefinedConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocUndefinedField", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocUndefinedMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocUndefinedType", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocUnexpectedTag", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocUnexpectedText", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocUnterminatedInlineTag", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocUsingDeprecatedConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocUsingDeprecatedField", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocUsingDeprecatedMethod", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("JavadocUsingDeprecatedType", new ProblemAttributes(JavaCore.COMPILER_PB_INVALID_JAVADOC));
+ expectedProblemAttributes.put("LambdaDescriptorMentionsUnmentionable", SKIP);
+ expectedProblemAttributes.put("LambdaExpressionNotBelow18", SKIP);
+ expectedProblemAttributes.put("LambdaRedeclaresArgument", SKIP);
+ expectedProblemAttributes.put("LambdaRedeclaresLocal", SKIP);
+ expectedProblemAttributes.put("LambdaShapeComputationError", SKIP);
+ expectedProblemAttributes.put("LocalVariableCanOnlyBeNull", SKIP);
+ expectedProblemAttributes.put("LocalVariableCannotBeNull", SKIP);
+ expectedProblemAttributes.put("LocalVariableHidingField", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
+ expectedProblemAttributes.put("LocalVariableHidingLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_LOCAL_VARIABLE_HIDING));
+ expectedProblemAttributes.put("LocalVariableIsNeverUsed", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_LOCAL));
+ expectedProblemAttributes.put("LocalVariableMayBeNull", SKIP);
+ expectedProblemAttributes.put("MaskedCatch", new ProblemAttributes(JavaCore.COMPILER_PB_HIDDEN_CATCH_BLOCK));
+ expectedProblemAttributes.put("MethodButWithConstructorName", new ProblemAttributes(JavaCore.COMPILER_PB_METHOD_WITH_CONSTRUCTOR_NAME));
+ expectedProblemAttributes.put("MethodCanBePotentiallyStatic", new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIALLY_MISSING_STATIC_ON_METHOD));
+ expectedProblemAttributes.put("MethodCanBeStatic", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_STATIC_ON_METHOD));
+ expectedProblemAttributes.put("MethodMissingDeprecatedAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_DEPRECATED_ANNOTATION));
+ expectedProblemAttributes.put("MethodMustOverride", SKIP);
+ expectedProblemAttributes.put("MethodMustOverrideOrImplement", SKIP);
+ expectedProblemAttributes.put("MethodNameClash", SKIP);
+ expectedProblemAttributes.put("MethodNameClashHidden", SKIP);
+ expectedProblemAttributes.put("MethodReducesVisibility", SKIP);
+ expectedProblemAttributes.put("MethodReferenceNotBelow18", SKIP);
+ expectedProblemAttributes.put("MethodReferenceSwingsBothWays", SKIP);
+ expectedProblemAttributes.put("MethodRequiresBody", SKIP);
+ expectedProblemAttributes.put("MethodReturnsVoid", SKIP);
+ expectedProblemAttributes.put("MethodVarargsArgumentNeedCast", new ProblemAttributes(JavaCore.COMPILER_PB_VARARGS_ARGUMENT_NEED_CAST));
+ expectedProblemAttributes.put("MisplacedTypeAnnotations", SKIP);
+ expectedProblemAttributes.put("MissingArgumentsForParameterizedMemberType", SKIP);
+ expectedProblemAttributes.put("MissingDefaultCase", new ProblemAttributes(JavaCore.COMPILER_PB_SWITCH_MISSING_DEFAULT_CASE));
+ expectedProblemAttributes.put("MissingEnclosingInstance", SKIP);
+ expectedProblemAttributes.put("MissingEnclosingInstanceForConstructorCall", SKIP);
+ expectedProblemAttributes.put("MissingEnumConstantCase", new ProblemAttributes(JavaCore.COMPILER_PB_INCOMPLETE_ENUM_SWITCH));
+ expectedProblemAttributes.put("MissingEnumConstantCaseDespiteDefault", new ProblemAttributes(JavaCore.COMPILER_PB_INCOMPLETE_ENUM_SWITCH));
+ expectedProblemAttributes.put("MissingEnumDefaultCase", new ProblemAttributes(JavaCore.COMPILER_PB_SWITCH_MISSING_DEFAULT_CASE));
+ expectedProblemAttributes.put("MissingNonNullByDefaultAnnotationOnPackage", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_NONNULL_BY_DEFAULT_ANNOTATION));
+ expectedProblemAttributes.put("MissingNonNullByDefaultAnnotationOnType", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_NONNULL_BY_DEFAULT_ANNOTATION));
+ expectedProblemAttributes.put("MissingOverrideAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_OVERRIDE_ANNOTATION));
+ expectedProblemAttributes.put("MissingOverrideAnnotationForInterfaceMethodImplementation", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_OVERRIDE_ANNOTATION));
+ expectedProblemAttributes.put("MissingRequiresTransitiveForTypeInAPI", new ProblemAttributes(JavaCore.COMPILER_PB_API_LEAKS));
+ expectedProblemAttributes.put("MissingReturnType", SKIP);
+ expectedProblemAttributes.put("MissingSemiColon", SKIP);
+ expectedProblemAttributes.put("MissingSerialVersion", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_SERIAL_VERSION));
+ expectedProblemAttributes.put("MissingSynchronizedModifierInInheritedMethod", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_SYNCHRONIZED_ON_INHERITED_METHOD));
+ expectedProblemAttributes.put("MissingTypeInConstructor", SKIP);
+ expectedProblemAttributes.put("MissingTypeInLambda", SKIP);
+ expectedProblemAttributes.put("MissingTypeInMethod", SKIP);
+ expectedProblemAttributes.put("MissingValueForAnnotationMember", SKIP);
+ expectedProblemAttributes.put("MultiCatchNotBelow17", SKIP);
+ expectedProblemAttributes.put("MultipleFunctionalInterfaces", SKIP);
+ expectedProblemAttributes.put("StaticInterfaceMethodNotBelow18", SKIP);
+ expectedProblemAttributes.put("MustDefineEitherDimensionExpressionsOrInitializer", SKIP);
+ expectedProblemAttributes.put("MustSpecifyPackage", SKIP);
+ expectedProblemAttributes.put("NativeMethodsCannotBeStrictfp", SKIP);
+ expectedProblemAttributes.put("NeedToEmulateConstructorAccess", new ProblemAttributes(JavaCore.COMPILER_PB_SYNTHETIC_ACCESS_EMULATION));
+ expectedProblemAttributes.put("NeedToEmulateFieldReadAccess", new ProblemAttributes(JavaCore.COMPILER_PB_SYNTHETIC_ACCESS_EMULATION));
+ expectedProblemAttributes.put("NeedToEmulateFieldWriteAccess", new ProblemAttributes(JavaCore.COMPILER_PB_SYNTHETIC_ACCESS_EMULATION));
+ expectedProblemAttributes.put("NeedToEmulateMethodAccess", new ProblemAttributes(JavaCore.COMPILER_PB_SYNTHETIC_ACCESS_EMULATION));
+ expectedProblemAttributes.put("NestedServiceImpl", SKIP);
+ expectedProblemAttributes.put("NoAdditionalBoundAfterTypeVariable", SKIP);
+ expectedProblemAttributes.put("NoFieldOnBaseType", SKIP);
+ expectedProblemAttributes.put("NoGenericLambda", SKIP);
+ expectedProblemAttributes.put("NoImplicitStringConversionForCharArrayExpression", new ProblemAttributes(JavaCore.COMPILER_PB_CHAR_ARRAY_IN_STRING_CONCATENATION));
+ expectedProblemAttributes.put("NoMessageSendOnArrayType", SKIP);
+ expectedProblemAttributes.put("NoMessageSendOnBaseType", SKIP);
+ expectedProblemAttributes.put("NoSuperInInterfaceContext", SKIP);
+ expectedProblemAttributes.put("NonBlankFinalLocalAssignment", SKIP);
+ expectedProblemAttributes.put("NonConstantExpression", SKIP);
+ expectedProblemAttributes.put("NonDenotableTypeArgumentForAnonymousDiamond", SKIP);
+ expectedProblemAttributes.put("NonExternalizedStringLiteral", new ProblemAttributes(JavaCore.COMPILER_PB_NON_NLS_STRING_LITERAL));
+ expectedProblemAttributes.put("NonGenericConstructor", SKIP);
+ expectedProblemAttributes.put("NonGenericMethod", SKIP);
+ expectedProblemAttributes.put("NonGenericType", SKIP);
+ expectedProblemAttributes.put("NonNullDefaultDetailIsNotEvaluated", SKIP);
+ expectedProblemAttributes.put("NonNullExpressionComparisonYieldsFalse", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("NonNullSpecdFieldComparisonYieldsFalse", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("NonNullLocalVariableComparisonYieldsFalse", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("NonNullMessageSendComparisonYieldsFalse", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("NonNullTypeVariableFromLegacyMethod", new ProblemAttributes(JavaCore.COMPILER_PB_NONNULL_TYPEVAR_FROM_LEGACY_INVOCATION));
+ expectedProblemAttributes.put("NonNullMethodTypeVariableFromLegacyMethod", new ProblemAttributes(JavaCore.COMPILER_PB_NONNULL_TYPEVAR_FROM_LEGACY_INVOCATION));
+ expectedProblemAttributes.put("NonPublicTypeInAPI", new ProblemAttributes(JavaCore.COMPILER_PB_API_LEAKS));
+ expectedProblemAttributes.put("NonStaticAccessToStaticField", new ProblemAttributes(JavaCore.COMPILER_PB_STATIC_ACCESS_RECEIVER));
+ expectedProblemAttributes.put("NonStaticAccessToStaticMethod", new ProblemAttributes(JavaCore.COMPILER_PB_STATIC_ACCESS_RECEIVER));
+ expectedProblemAttributes.put("NonStaticContextForEnumMemberType", SKIP);
+ expectedProblemAttributes.put("NonStaticFieldFromStaticInvocation", SKIP);
+ expectedProblemAttributes.put("NonStaticOrAlienTypeReceiver", SKIP);
+ expectedProblemAttributes.put("NonStaticTypeFromStaticInvocation", SKIP);
+ expectedProblemAttributes.put("NotAnnotationType", SKIP);
+ expectedProblemAttributes.put("NotAccessibleConstructor", SKIP);
+ expectedProblemAttributes.put("NotAccessibleField", SKIP);
+ expectedProblemAttributes.put("NotAccessibleMethod", SKIP);
+ expectedProblemAttributes.put("NotAccessibleType", SKIP);
+ expectedProblemAttributes.put("NotAccessiblePackage", SKIP);
+ expectedProblemAttributes.put("NotExportedTypeInAPI", new ProblemAttributes(JavaCore.COMPILER_PB_API_LEAKS));
+ expectedProblemAttributes.put("ConflictingPackageFromModules", SKIP);
+ expectedProblemAttributes.put("ConflictingPackageFromOtherModules", SKIP);
+ expectedProblemAttributes.put("NotVisibleConstructor", SKIP);
+ expectedProblemAttributes.put("NotVisibleConstructorInDefaultConstructor", SKIP);
+ expectedProblemAttributes.put("NotVisibleConstructorInImplicitConstructorCall", SKIP);
+ expectedProblemAttributes.put("NotVisibleField", SKIP);
+ expectedProblemAttributes.put("NotVisibleMethod", SKIP);
+ expectedProblemAttributes.put("NotVisibleType", SKIP);
+ expectedProblemAttributes.put("NullableFieldReference", new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
+ expectedProblemAttributes.put("NullAnnotationAtQualifyingType", SKIP);
+ expectedProblemAttributes.put("NullAnnotationUnsupportedLocation", SKIP);
+ expectedProblemAttributes.put("NullAnnotationUnsupportedLocationAtType", SKIP);
+ expectedProblemAttributes.put("NullityMismatchAgainstFreeTypeVariable", new ProblemAttributes(JavaCore.COMPILER_PB_PESSIMISTIC_NULL_ANALYSIS_FOR_FREE_TYPE_VARIABLES));
+ expectedProblemAttributes.put("NullityMismatchingTypeAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("NullityMismatchingTypeAnnotationSuperHint", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("NullityMismatchTypeArgument", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("NullityUncheckedTypeAnnotationDetail", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
+ expectedProblemAttributes.put("NullityUncheckedTypeAnnotationDetailSuperHint", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
+ expectedProblemAttributes.put("NullExpressionReference", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_REFERENCE));
+ expectedProblemAttributes.put("NullLocalVariableComparisonYieldsFalse", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("NullLocalVariableInstanceofYieldsFalse", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("NullLocalVariableReference", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_REFERENCE));
+ expectedProblemAttributes.put("NullNotCompatibleToFreeTypeVariable", new ProblemAttributes(JavaCore.COMPILER_PB_PESSIMISTIC_NULL_ANALYSIS_FOR_FREE_TYPE_VARIABLES));
+ expectedProblemAttributes.put("NullSourceString", SKIP);
+ expectedProblemAttributes.put("NullUnboxing", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_REFERENCE));
+ expectedProblemAttributes.put("NumericValueOutOfRange", SKIP);
+ expectedProblemAttributes.put("ObjectCannotBeGeneric", SKIP);
+ expectedProblemAttributes.put("ObjectCannotHaveSuperTypes", SKIP);
+ expectedProblemAttributes.put("ObjectHasNoSuperclass", SKIP);
+ expectedProblemAttributes.put("ObjectMustBeClass", SKIP);
+ expectedProblemAttributes.put("OuterLocalMustBeEffectivelyFinal", SKIP);
+ expectedProblemAttributes.put("OuterLocalMustBeFinal", SKIP);
+ expectedProblemAttributes.put("OverridingDeprecatedMethod", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
+ expectedProblemAttributes.put("OverridingDeprecatedSinceVersionMethod", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
+ expectedProblemAttributes.put("OverridingTerminallyDeprecatedMethod", new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
+ expectedProblemAttributes.put("OverridingTerminallyDeprecatedSinceVersionMethod", new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
+ expectedProblemAttributes.put("OverridingMethodWithoutSuperInvocation", new ProblemAttributes(JavaCore.COMPILER_PB_OVERRIDING_METHOD_WITHOUT_SUPER_INVOCATION));
+ expectedProblemAttributes.put("OverridingNonVisibleMethod", new ProblemAttributes(JavaCore.COMPILER_PB_OVERRIDING_PACKAGE_DEFAULT_METHOD));
+ expectedProblemAttributes.put("PackageCollidesWithType", SKIP);
+ expectedProblemAttributes.put("PackageDoesNotExistOrIsEmpty", SKIP);
+ expectedProblemAttributes.put("PackageIsNotExpectedPackage", SKIP);
+ expectedProblemAttributes.put("ParameterAssignment", new ProblemAttributes(JavaCore.COMPILER_PB_PARAMETER_ASSIGNMENT));
+ expectedProblemAttributes.put("ParameterLackingNonNullAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_NONNULL_PARAMETER_ANNOTATION_DROPPED));
+ expectedProblemAttributes.put("ParameterLackingNullableAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("ParameterMismatch", SKIP);
+ expectedProblemAttributes.put("ParameterizedConstructorArgumentTypeMismatch", SKIP);
+ expectedProblemAttributes.put("ParameterizedMethodArgumentTypeMismatch", SKIP);
+ expectedProblemAttributes.put("ParsingError", SKIP);
+ expectedProblemAttributes.put("ParsingErrorDeleteToken", SKIP);
+ expectedProblemAttributes.put("ParsingErrorDeleteTokens", SKIP);
+ expectedProblemAttributes.put("ParsingErrorInsertToComplete", SKIP);
+ expectedProblemAttributes.put("ParsingErrorInsertToCompletePhrase", SKIP);
+ expectedProblemAttributes.put("ParsingErrorInsertToCompleteScope", SKIP);
+ expectedProblemAttributes.put("ParsingErrorInsertTokenAfter", SKIP);
+ expectedProblemAttributes.put("ParsingErrorInsertTokenBefore", SKIP);
+ expectedProblemAttributes.put("ParsingErrorInvalidToken", SKIP);
+ expectedProblemAttributes.put("ParsingErrorMergeTokens", SKIP);
+ expectedProblemAttributes.put("ParsingErrorMisplacedConstruct", SKIP);
+ expectedProblemAttributes.put("ParsingErrorNoSuggestion", SKIP);
+ expectedProblemAttributes.put("ParsingErrorNoSuggestionForTokens", SKIP);
+ expectedProblemAttributes.put("ParsingErrorOnKeyword", SKIP);
+ expectedProblemAttributes.put("ParsingErrorOnKeywordNoSuggestion", SKIP);
+ expectedProblemAttributes.put("ParsingErrorReplaceTokens", SKIP);
+ expectedProblemAttributes.put("ParsingErrorUnexpectedEOF", SKIP);
+ expectedProblemAttributes.put("PolymorphicMethodNotBelow17", SKIP);
+ expectedProblemAttributes.put("PossibleAccidentalBooleanAssignment", new ProblemAttributes(JavaCore.COMPILER_PB_POSSIBLE_ACCIDENTAL_BOOLEAN_ASSIGNMENT));
+ expectedProblemAttributes.put("PotentialHeapPollutionFromVararg", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
+ expectedProblemAttributes.put("PotentiallyUnclosedCloseable", new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIALLY_UNCLOSED_CLOSEABLE));
+ expectedProblemAttributes.put("PotentiallyUnclosedCloseableAtExit", new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIALLY_UNCLOSED_CLOSEABLE));
+ expectedProblemAttributes.put("PotentialNullExpressionReference", new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
+ expectedProblemAttributes.put("PotentialNullLocalVariableReference", new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
+ expectedProblemAttributes.put("PotentialNullUnboxing", new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
+ expectedProblemAttributes.put("PotentialNullMessageSendReference", new ProblemAttributes(JavaCore.COMPILER_PB_POTENTIAL_NULL_REFERENCE));
+ expectedProblemAttributes.put("ProviderMethodOrConstructorRequiredForServiceImpl", SKIP);
+ expectedProblemAttributes.put("PublicClassMustMatchFileName", SKIP);
+ expectedProblemAttributes.put("RawMemberTypeCannotBeParameterized", SKIP);
+ expectedProblemAttributes.put("RawTypeReference", new ProblemAttributes(JavaCore.COMPILER_PB_RAW_TYPE_REFERENCE));
+ expectedProblemAttributes.put("RecursiveConstructorInvocation", SKIP);
+ expectedProblemAttributes.put("RedefinedArgument", SKIP);
+ expectedProblemAttributes.put("RedefinedLocal", SKIP);
+ expectedProblemAttributes.put("RedundantSpecificationOfTypeArguments", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_TYPE_ARGUMENTS));
+ expectedProblemAttributes.put("RedundantLocalVariableNullAssignment", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("RedundantNullAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
+ expectedProblemAttributes.put("RedundantNullCheckAgainstNonNullType", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("RedundantNullCheckOnField", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("RedundantNullCheckOnNonNullExpression", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("RedundantNullCheckOnNonNullSpecdField", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("RedundantNullCheckOnNonNullLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("RedundantNullCheckOnNonNullMessageSend", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("RedundantNullCheckOnNullLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("RedundantNullCheckOnSpecdNonNullLocalVariable", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("RedundantNullDefaultAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
+ expectedProblemAttributes.put("RedundantNullDefaultAnnotationModule", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
+ expectedProblemAttributes.put("RedundantNullDefaultAnnotationPackage", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
+ expectedProblemAttributes.put("RedundantNullDefaultAnnotationType", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
+ expectedProblemAttributes.put("RedundantNullDefaultAnnotationMethod", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
+ expectedProblemAttributes.put("RedundantNullDefaultAnnotationLocal", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
+ expectedProblemAttributes.put("RedundantNullDefaultAnnotationField", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_ANNOTATION));
+ expectedProblemAttributes.put("RedundantSuperinterface", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_SUPERINTERFACE));
+ expectedProblemAttributes.put("ReferenceExpressionParameterNullityMismatch", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("ReferenceExpressionParameterNullityUnchecked", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
+ expectedProblemAttributes.put("ReferenceExpressionReturnNullRedef", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("ReferenceExpressionReturnNullRedefUnchecked", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
+ expectedProblemAttributes.put("ReferenceToForwardField", SKIP);
+ expectedProblemAttributes.put("ReferenceToForwardTypeVariable", SKIP);
+ expectedProblemAttributes.put("RepeatableAnnotationTypeIsDocumented", SKIP);
+ expectedProblemAttributes.put("RepeatableAnnotationTypeIsInherited", SKIP);
+ expectedProblemAttributes.put("RepeatableAnnotationTypeTargetMismatch", SKIP);
+ expectedProblemAttributes.put("RepeatableAnnotationWithRepeatingContainerAnnotation", SKIP);
+ expectedProblemAttributes.put("RepeatedAnnotationWithContainerAnnotation", SKIP);
+ expectedProblemAttributes.put("RequiredNonNullButProvidedFreeTypeVariable", new ProblemAttributes(JavaCore.COMPILER_PB_PESSIMISTIC_NULL_ANALYSIS_FOR_FREE_TYPE_VARIABLES));
+ expectedProblemAttributes.put("RequiredNonNullButProvidedNull", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("RequiredNonNullButProvidedPotentialNull", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_ANNOTATION_INFERENCE_CONFLICT));
+ expectedProblemAttributes.put("RequiredNonNullButProvidedUnknown", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
+ expectedProblemAttributes.put("RequiredNonNullButProvidedSpecdNullable", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_SPECIFICATION_VIOLATION));
+ expectedProblemAttributes.put("ResourceHasToImplementAutoCloseable", SKIP);
+ expectedProblemAttributes.put("ReturnTypeAmbiguous", SKIP);
+ expectedProblemAttributes.put("ReturnTypeCannotBeVoidArray", SKIP);
+ expectedProblemAttributes.put("ReturnTypeInheritedNameHidesEnclosingName", SKIP);
+ expectedProblemAttributes.put("ReturnTypeInternalNameProvided", SKIP);
+ expectedProblemAttributes.put("ReturnTypeMismatch", SKIP);
+ expectedProblemAttributes.put("ReturnTypeNotFound", SKIP);
+ expectedProblemAttributes.put("ReturnTypeNotVisible", SKIP);
+ expectedProblemAttributes.put("SafeVarargsOnFixedArityMethod", SKIP);
+ expectedProblemAttributes.put("SafeVarargsOnNonFinalInstanceMethod", SKIP);
+ expectedProblemAttributes.put("ServiceImplDefaultConstructorNotPublic", SKIP);
+ expectedProblemAttributes.put("ServiceImplNotDefinedByModule", SKIP);
+ expectedProblemAttributes.put("ShouldImplementHashcode", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_HASHCODE_METHOD));
+ expectedProblemAttributes.put("ShouldReturnValue", SKIP);
+ expectedProblemAttributes.put("ShouldReturnValueHintMissingDefault", SKIP);
+ expectedProblemAttributes.put("SpecdNonNullLocalVariableComparisonYieldsFalse", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_NULL_CHECK));
+ expectedProblemAttributes.put("StaticInheritedMethodConflicts", SKIP);
+ expectedProblemAttributes.put("StaticMemberOfParameterizedType", SKIP);
+ expectedProblemAttributes.put("StaticMethodRequested", SKIP);
+ expectedProblemAttributes.put("StaticMethodShouldBeAccessedStatically", SKIP);
+ expectedProblemAttributes.put("StringConstantIsExceedingUtf8Limit", SKIP);
+ expectedProblemAttributes.put("SuperAccessCannotBypassDirectSuper", SKIP);
+ expectedProblemAttributes.put("SuperCallCannotBypassOverride", SKIP);
+ expectedProblemAttributes.put("SuperInterfaceMustBeAnInterface", SKIP);
+ expectedProblemAttributes.put("SuperInterfacesCollide", SKIP);
+ expectedProblemAttributes.put("SuperTypeUsingWildcard", SKIP);
+ expectedProblemAttributes.put("SuperclassAmbiguous", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_HASHCODE_METHOD));
+ expectedProblemAttributes.put("SuperclassInheritedNameHidesEnclosingName", SKIP);
+ expectedProblemAttributes.put("SuperclassInternalNameProvided", SKIP);
+ expectedProblemAttributes.put("SuperclassMustBeAClass", SKIP);
+ expectedProblemAttributes.put("SuperclassNotFound", SKIP);
+ expectedProblemAttributes.put("SuperclassNotVisible", new ProblemAttributes(JavaCore.COMPILER_PB_REDUNDANT_SUPERINTERFACE));
+ expectedProblemAttributes.put("SuperfluousSemicolon", new ProblemAttributes(JavaCore.COMPILER_PB_EMPTY_STATEMENT));
+ expectedProblemAttributes.put("SwitchOnEnumNotBelow15", SKIP);
+ expectedProblemAttributes.put("SwitchOnStringsNotBelow17", SKIP);
+ expectedProblemAttributes.put("TargetTypeNotAFunctionalInterface", SKIP);
+ expectedProblemAttributes.put("Task", SKIP);
+ expectedProblemAttributes.put("ThisInStaticContext", SKIP);
+ expectedProblemAttributes.put("ThisSuperDuringConstructorInvocation", SKIP);
+ expectedProblemAttributes.put("ToleratedMisplacedTypeAnnotations", SKIP);
+ expectedProblemAttributes.put("TooManyArgumentSlots", SKIP);
+ expectedProblemAttributes.put("TooManyArrayDimensions", SKIP);
+ expectedProblemAttributes.put("TooManyBytesForStringConstant", SKIP);
+ expectedProblemAttributes.put("TooManyConstantsInConstantPool", SKIP);
+ expectedProblemAttributes.put("TooManyFields", SKIP);
+ expectedProblemAttributes.put("TooManyLocalVariableSlots", SKIP);
+ expectedProblemAttributes.put("TooManyMethods", SKIP);
+ expectedProblemAttributes.put("TooManyParametersForSyntheticMethod", SKIP);
+ expectedProblemAttributes.put("TooManySyntheticArgumentSlots", SKIP);
+ expectedProblemAttributes.put("TypeAnnotationAtQualifiedName", SKIP);
+ expectedProblemAttributes.put("TypeArgumentMismatch", SKIP);
+ expectedProblemAttributes.put("TypeArgumentsForRawGenericConstructor", SKIP);
+ expectedProblemAttributes.put("TypeArgumentsForRawGenericMethod", SKIP);
+ expectedProblemAttributes.put("TypeCollidesWithPackage", SKIP);
+ expectedProblemAttributes.put("TypeHidingType", new ProblemAttributes(JavaCore.COMPILER_PB_TYPE_PARAMETER_HIDING));
+ expectedProblemAttributes.put("TypeHidingTypeParameterFromMethod", new ProblemAttributes(JavaCore.COMPILER_PB_TYPE_PARAMETER_HIDING));
+ expectedProblemAttributes.put("TypeHidingTypeParameterFromType", new ProblemAttributes(JavaCore.COMPILER_PB_TYPE_PARAMETER_HIDING));
+ expectedProblemAttributes.put("TypeMismatch", SKIP);
+ expectedProblemAttributes.put("TypeMissingDeprecatedAnnotation", new ProblemAttributes(JavaCore.COMPILER_PB_MISSING_DEPRECATED_ANNOTATION));
+ expectedProblemAttributes.put("TypeParameterHidingType", new ProblemAttributes(JavaCore.COMPILER_PB_TYPE_PARAMETER_HIDING));
+ expectedProblemAttributes.put("UnboxingConversion", new ProblemAttributes(JavaCore.COMPILER_PB_AUTOBOXING));
+ expectedProblemAttributes.put("UncheckedAccessOfValueOfFreeTypeVariable", new ProblemAttributes(JavaCore.COMPILER_PB_PESSIMISTIC_NULL_ANALYSIS_FOR_FREE_TYPE_VARIABLES));
+ expectedProblemAttributes.put("UnclosedCloseable", new ProblemAttributes(JavaCore.COMPILER_PB_UNCLOSED_CLOSEABLE));
+ expectedProblemAttributes.put("UnclosedCloseableAtExit", new ProblemAttributes(JavaCore.COMPILER_PB_UNCLOSED_CLOSEABLE));
+ expectedProblemAttributes.put("UndefinedAnnotationMember", SKIP);
+ expectedProblemAttributes.put("UndefinedConstructor", SKIP);
+ expectedProblemAttributes.put("UndefinedConstructorInDefaultConstructor", SKIP);
+ expectedProblemAttributes.put("UndefinedConstructorInImplicitConstructorCall", SKIP);
+ expectedProblemAttributes.put("UndefinedField", SKIP);
+ expectedProblemAttributes.put("UndefinedLabel", SKIP);
+ expectedProblemAttributes.put("UndefinedMethod", SKIP);
+ expectedProblemAttributes.put("UndefinedModule", SKIP);
+ expectedProblemAttributes.put("UndefinedName", SKIP);
+ expectedProblemAttributes.put("UndefinedType", SKIP);
+ expectedProblemAttributes.put("UndefinedTypeVariable", SKIP);
+ expectedProblemAttributes.put("UnderscoresInLiteralsNotBelow17", SKIP);
+ expectedProblemAttributes.put("UndocumentedEmptyBlock", new ProblemAttributes(JavaCore.COMPILER_PB_UNDOCUMENTED_EMPTY_BLOCK));
+ expectedProblemAttributes.put("UnexpectedStaticModifierForField", SKIP);
+ expectedProblemAttributes.put("UnexpectedStaticModifierForMethod", SKIP);
+ expectedProblemAttributes.put("UnhandledException", SKIP);
+ expectedProblemAttributes.put("UnhandledExceptionInDefaultConstructor", SKIP);
+ expectedProblemAttributes.put("UnhandledExceptionInImplicitConstructorCall", SKIP);
+ expectedProblemAttributes.put("UnhandledExceptionOnAutoClose", SKIP);
+ expectedProblemAttributes.put("UnhandledWarningToken", new ProblemAttributes(JavaCore.COMPILER_PB_UNHANDLED_WARNING_TOKEN));
+ expectedProblemAttributes.put("UninitializedBlankFinalField", SKIP);
+ expectedProblemAttributes.put("UninitializedBlankFinalFieldHintMissingDefault", SKIP);
+ expectedProblemAttributes.put("UninitializedFreeTypeVariableField", SKIP);
+ expectedProblemAttributes.put("UninitializedFreeTypeVariableFieldHintMissingDefault", SKIP);
+ expectedProblemAttributes.put("UninitializedLocalVariable", SKIP);
+ expectedProblemAttributes.put("UninitializedLocalVariableHintMissingDefault", SKIP);
+ expectedProblemAttributes.put("UninitializedNonNullField", SKIP);
+ expectedProblemAttributes.put("UninitializedNonNullFieldHintMissingDefault", SKIP);
+ expectedProblemAttributes.put("UninternedIdentityComparison", SKIP);
+ expectedProblemAttributes.put("UnlikelyCollectionMethodArgumentType", new ProblemAttributes(JavaCore.COMPILER_PB_UNLIKELY_COLLECTION_METHOD_ARGUMENT_TYPE));
+ expectedProblemAttributes.put("UnlikelyEqualsArgumentType", new ProblemAttributes(JavaCore.COMPILER_PB_UNLIKELY_EQUALS_ARGUMENT_TYPE));
+ expectedProblemAttributes.put("UnmatchedBracket", SKIP);
+ expectedProblemAttributes.put("UnnamedPackageInNamedModule", SKIP);
+ expectedProblemAttributes.put("UnnecessaryArgumentCast", SKIP);
+ expectedProblemAttributes.put("UnnecessaryCast", new ProblemAttributes(JavaCore.COMPILER_PB_UNNECESSARY_TYPE_CHECK));
+ expectedProblemAttributes.put("UnnecessaryElse", new ProblemAttributes(JavaCore.COMPILER_PB_UNNECESSARY_ELSE));
+ expectedProblemAttributes.put("UnnecessaryInstanceof", new ProblemAttributes(JavaCore.COMPILER_PB_UNNECESSARY_TYPE_CHECK));
+ expectedProblemAttributes.put("UnnecessaryNLSTag", new ProblemAttributes(JavaCore.COMPILER_PB_NON_NLS_STRING_LITERAL));
+ expectedProblemAttributes.put("UnqualifiedFieldAccess", new ProblemAttributes(JavaCore.COMPILER_PB_UNQUALIFIED_FIELD_ACCESS));
+ expectedProblemAttributes.put("UnreachableCatch", SKIP);
+ expectedProblemAttributes.put("UnresolvedVariable", SKIP);
+ expectedProblemAttributes.put("UnsafeElementTypeConversion", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
+ expectedProblemAttributes.put("UnsafeGenericArrayForVarargs", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
+ expectedProblemAttributes.put("UnsafeGenericCast", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
+ expectedProblemAttributes.put("UnsafeNullnessCast", new ProblemAttributes(JavaCore.COMPILER_PB_NULL_UNCHECKED_CONVERSION));
+ expectedProblemAttributes.put("UnsafeRawConstructorInvocation", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
+ expectedProblemAttributes.put("UnsafeRawFieldAssignment", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
+ expectedProblemAttributes.put("UnsafeRawGenericConstructorInvocation", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
+ expectedProblemAttributes.put("UnsafeRawGenericMethodInvocation", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
+ expectedProblemAttributes.put("UnsafeRawMethodInvocation", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
+ expectedProblemAttributes.put("UnsafeReturnTypeOverride", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
+ expectedProblemAttributes.put("UnsafeTypeConversion", new ProblemAttributes(JavaCore.COMPILER_PB_UNCHECKED_TYPE_OPERATION));
+ expectedProblemAttributes.put("UnstableAutoModuleName", new ProblemAttributes(JavaCore.COMPILER_PB_UNSTABLE_AUTO_MODULE_NAME));
+ expectedProblemAttributes.put("UnterminatedComment", SKIP);
+ expectedProblemAttributes.put("UnterminatedString", SKIP);
+ expectedProblemAttributes.put("UnusedConstructorDeclaredThrownException", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION));
+ expectedProblemAttributes.put("UnusedImport", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_IMPORT));
+ expectedProblemAttributes.put("UnusedLabel", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_LABEL));
+ expectedProblemAttributes.put("UnusedMethodDeclaredThrownException", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION));
+ expectedProblemAttributes.put("UnusedObjectAllocation", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_OBJECT_ALLOCATION));
+ expectedProblemAttributes.put("UnusedPrivateConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER));
+ expectedProblemAttributes.put("UnusedPrivateField", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER));
+ expectedProblemAttributes.put("UnusedPrivateMethod", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER));
+ expectedProblemAttributes.put("UnusedPrivateType", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER));
+ expectedProblemAttributes.put("UnusedTypeArgumentsForConstructorInvocation", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_TYPE_ARGUMENTS_FOR_METHOD_INVOCATION));
+ expectedProblemAttributes.put("UnusedTypeParameter", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_TYPE_PARAMETER));
+ expectedProblemAttributes.put("UnusedTypeArgumentsForMethodInvocation", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_TYPE_ARGUMENTS_FOR_METHOD_INVOCATION));
+ expectedProblemAttributes.put("UnusedWarningToken", new ProblemAttributes(JavaCore.COMPILER_PB_UNUSED_WARNING_TOKEN));
+ expectedProblemAttributes.put("UseAssertAsAnIdentifier", new ProblemAttributes(JavaCore.COMPILER_PB_ASSERT_IDENTIFIER));
+ expectedProblemAttributes.put("UseEnumAsAnIdentifier", new ProblemAttributes(JavaCore.COMPILER_PB_ENUM_IDENTIFIER));
+ expectedProblemAttributes.put("IllegalUseOfUnderscoreAsAnIdentifier", SKIP);
+ expectedProblemAttributes.put("UsingDeprecatedConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedField", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedMethod", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedModule", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedPackage", SKIP);
+ expectedProblemAttributes.put("UsingDeprecatedType", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedSinceVersionConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedSinceVersionField", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedSinceVersionMethod", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedSinceVersionModule", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
+ expectedProblemAttributes.put("UsingDeprecatedSinceVersionPackage", SKIP);
+ expectedProblemAttributes.put("UsingDeprecatedSinceVersionType", new ProblemAttributes(JavaCore.COMPILER_PB_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedField", new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedMethod", new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedModule", new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedPackage", SKIP);
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedType", new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionConstructor", new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionField", new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionMethod", new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionModule", new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionPackage", SKIP);
+ expectedProblemAttributes.put("UsingTerminallyDeprecatedSinceVersionType", new ProblemAttributes(JavaCore.COMPILER_PB_TERMINAL_DEPRECATION));
+ expectedProblemAttributes.put("VarargsConflict", SKIP);
+ expectedProblemAttributes.put("VarargsElementTypeNotVisible", SKIP);
+ expectedProblemAttributes.put("VarargsElementTypeNotVisibleForConstructor", SKIP);
+ expectedProblemAttributes.put("VariableTypeCannotBeVoid", SKIP);
+ expectedProblemAttributes.put("VariableTypeCannotBeVoidArray", SKIP);
+ expectedProblemAttributes.put("VoidMethodReturnsValue", SKIP);
+ expectedProblemAttributes.put("WildcardConstructorInvocation", SKIP);
+ expectedProblemAttributes.put("WildcardFieldAssignment", SKIP);
+ expectedProblemAttributes.put("WildcardMethodInvocation", SKIP);
+ expectedProblemAttributes.put("illFormedParameterizationOfFunctionalInterface", SKIP);
+ expectedProblemAttributes.put("lambdaParameterTypeMismatched", SKIP);
+ expectedProblemAttributes.put("lambdaSignatureMismatched", SKIP);
+ expectedProblemAttributes.put("DisallowedExplicitThisParameter", SKIP);
+ expectedProblemAttributes.put("IllegalArrayOfUnionType", SKIP);
+ expectedProblemAttributes.put("IllegalArrayTypeInIntersectionCast", SKIP);
+ expectedProblemAttributes.put("ProblemNotAnalysed", SKIP);
+ expectedProblemAttributes.put("VarCannotBeMixedWithNonVarParams", SKIP);
+ expectedProblemAttributes.put("VarIsNotAllowedHere", SKIP);
+ expectedProblemAttributes.put("VarIsReserved", SKIP);
+ expectedProblemAttributes.put("VarIsReservedInFuture", SKIP);
+ expectedProblemAttributes.put("VarLocalCannotBeArray", SKIP);
+ expectedProblemAttributes.put("VarLocalCannotBeArrayInitalizers", SKIP);
+ expectedProblemAttributes.put("VarLocalCannotBeLambda", SKIP);
+ expectedProblemAttributes.put("VarLocalCannotBeMethodReference", SKIP);
+ expectedProblemAttributes.put("VarLocalInitializedToNull", SKIP);
+ expectedProblemAttributes.put("VarLocalInitializedToVoid", SKIP);
+ expectedProblemAttributes.put("VarLocalMultipleDeclarators", SKIP);
+ expectedProblemAttributes.put("VarLocalReferencesItself", SKIP);
+ expectedProblemAttributes.put("VarLocalTooManyBrackets", SKIP);
+ expectedProblemAttributes.put("VarLocalWithoutInitizalier", SKIP);
+ expectedProblemAttributes.put("SwitchExpressionsIncompatibleResultExpressionTypes",SKIP);
+ expectedProblemAttributes.put("SwitchExpressionsEmptySwitchBlock",SKIP);
+ expectedProblemAttributes.put("SwitchExpressionsNoResultExpression",SKIP);
+ expectedProblemAttributes.put("SwitchExpressionSwitchLabeledBlockCompletesNormally",SKIP);
+ expectedProblemAttributes.put("SwitchExpressionLastStatementCompletesNormally",SKIP);
+ expectedProblemAttributes.put("SwitchExpressionTrailingSwitchLabels",SKIP);
+ expectedProblemAttributes.put("switchMixedCase", SKIP);
+ expectedProblemAttributes.put("SwitchExpressionMissingDefaultCase",SKIP);
+ expectedProblemAttributes.put("SwitchExpressionNotBelow12", SKIP);
+ expectedProblemAttributes.put("SwitchCaseLabelWithArrowNotBelow12", SKIP);
+ expectedProblemAttributes.put("SwitchExpressionPreviewDisabled", SKIP);
+ expectedProblemAttributes.put("SwitchCaseLabelWithArrowPreviewDisabled", SKIP);
+ expectedProblemAttributes.put("PreviewFeatureDisabled", SKIP);
+ expectedProblemAttributes.put("PreviewFeatureUsed", SKIP);
+ expectedProblemAttributes.put("PreviewFeatureNotSupported", SKIP);
+ Map constantNamesIndex = new HashMap();
+ Field[] fields = JavaCore.class.getFields();
+ for (int i = 0, length = fields.length; i < length; i++) {
+ Field field = fields[i];
+ String fieldName;
+ if (field.getType() == String.class && (fieldName = field.getName()).startsWith("COMPILER_PB_")) {
+ constantNamesIndex.put(field.get(null), fieldName);
}
}
fields = IProblem.class.getFields();
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java
index 120b628..8e40010 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_1_8.java
@@ -9455,4 +9455,21 @@
};
runner.runConformTest();
}
+ public void testBug543128() {
+ Runner runner = new Runner();
+ runner.testFiles = new String[] {
+ "Bug543128.java",
+ "public class Bug543128 {\n" +
+ " static class A {}\n" +
+ " static class B<F, S extends A> extends A {}\n" +
+ " static class C<G extends A> {}\n" +
+ " \n" +
+ " public static <H extends A, T> void test(C<? super B<? super T, ? super H>> test)\n" +
+ " {\n" +
+ " test(test); // fails compilation (incorrect)\n" +
+ " }\n" +
+ "}\n"
+ };
+ runner.runConformTest();
+ }
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PackageBindingTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PackageBindingTest.java
index ce83b15..b8e7a88 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PackageBindingTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/PackageBindingTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2016, 2017 Sven Strohschein and others.
+ * Copyright (c) 2016, 2019 Sven Strohschein and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -37,7 +37,7 @@
NameEnvironmentDummy nameEnv = new NameEnvironmentDummy(true);
PackageBinding packageBinding = new PackageBinding(new LookupEnvironment(null, new CompilerOptions(), null, nameEnv));
- Binding resultBinding = packageBinding.getTypeOrPackage("java.lang".toCharArray(), null);
+ Binding resultBinding = packageBinding.getTypeOrPackage("java.lang".toCharArray(), null, false);
assertNotNull(resultBinding);
assertTrue(nameEnv.isPackageSearchExecuted);
@@ -54,7 +54,7 @@
LookupEnvironment environment = new LookupEnvironment(null, new CompilerOptions(), null, nameEnv);
PackageBinding packageBinding = new PackageBinding(environment);
- Binding resultBinding = packageBinding.getTypeOrPackage("java.lang.String".toCharArray(), environment.module);
+ Binding resultBinding = packageBinding.getTypeOrPackage("java.lang.String".toCharArray(), environment.module, false);
assertNull(resultBinding); // (not implemented)
assertTrue(nameEnv.isPackageSearchExecuted);
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java
index bbceb78..5e58441 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java
@@ -8704,4 +8704,88 @@
JavacTestOptions.Excuse.EclipseWarningConfiguredAsError;
runner.runNegativeTest();
}
+public void testBug542829() {
+ if (this.complianceLevel < ClassFileConstants.JDK1_7) return;
+
+ // m.Issing is a type that comes and goes:
+ String nameMissing = "m/Issing.java";
+ String contentMissing =
+ "package m;\n" +
+ "public class Issing {\n" +
+ " g.Ood getGood() { return new g.Ood(); }\n" +
+ "}\n";
+
+ Runner runner = new Runner();
+ runner.generateOutput = true;
+ runner.testFiles = new String[] {
+ "g/Ood.java",
+ "package g;\n" +
+ "public class Ood {\n" +
+ " @Override public String toString() {\n" +
+ " return \"good\";\n" +
+ " }\n" +
+ "}\n",
+ "g/Ontainer.java",
+ "package g;\n" +
+ "import java.util.*;\n" +
+ "import m.Issing;\n" +
+ "public class Ontainer {\n" +
+ " public List<Issing> getElements() { return new ArrayList<>(); }\n" + // <= reference to m.Issing here (OK)
+ "}\n",
+ nameMissing,
+ contentMissing
+ };
+ runner.expectedCompilerLog = null;
+ runner.runConformTest();
+
+ // now we break it:
+ Util.delete(new File(OUTPUT_DIR + File.separator + "m" + File.separator + "Issing.class"));
+ runner.shouldFlushOutputDirectory = false;
+
+ // in this class file a MissingTypes attribute ("m/Issing") is generated:
+ runner.testFiles = new String[] {
+ "b/Roken.java",
+ "package b;\n" +
+ "import g.Ood;" +
+ "public class Roken {\n" +
+ " Ood getGood(m.Issing provider) {\n" + // <= argument type is missing (we still have the qualified name, though)
+ " return provider.getGood();\n" +
+ " }\n\n" +
+ "}\n"
+ };
+ runner.expectedCompilerLog =
+ "----------\n" +
+ "1. ERROR in b\\Roken.java (at line 3)\n" +
+ " Ood getGood(m.Issing provider) {\n" +
+ " ^^^^^^^^\n" +
+ "m.Issing cannot be resolved to a type\n" +
+ "----------\n";
+ runner.runNegativeTest();
+
+ // restore the class as binary:
+ runner.testFiles = new String[] {
+ nameMissing,
+ contentMissing
+ };
+ runner.expectedCompilerLog = null;
+ runner.runConformTest();
+
+ // next compilation has two references to m.Issing:
+ runner.testFiles = new String[] {
+ "t/Rigger.java",
+ "package t;\n" +
+ "import b.Roken;\n" + // <= Here we pull in the MissingTypes("m/Issing") attribute into an UnresolvedReferenceBinding
+ "public class Rigger {}\n",
+ "t/Est.java",
+ "package t;\n" +
+ "public class Est {\n" +
+ " void foo(g.Ontainer container) {\n" +
+ " for (m.Issing miss: container.getElements()) {\n" + // <= Here we resolve a qualified name from g/Ontainer.class but don't trust it!
+ " System.out.print(miss);\n" +
+ " }\n" +
+ " }\n" +
+ "}\n"
+ };
+ runner.runConformTest();
+}
}
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java
index 807d6ad..39df046 100644
--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TestAll.java
@@ -116,6 +116,7 @@
since_1_5.add(AssignmentTest_1_5.class);
since_1_5.add(InnerClass15Test.class);
since_1_5.add(NullAnnotationTest.class);
+ since_1_5.add(XLargeTest2.class);
// Tests to run when compliance is greater than 1.5
ArrayList since_1_6 = new ArrayList();
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/XLargeTest2.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/XLargeTest2.java
new file mode 100644
index 0000000..6c16e49
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/XLargeTest2.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2018 Andrey Loskutov and others.
+ *
+ * This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License 2.0
+ * which accompanies this distribution, and is available at
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Andrey Loskutov - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.core.tests.compiler.regression;
+
+import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
+
+import junit.framework.Test;
+
+public class XLargeTest2 extends AbstractRegressionTest {
+
+ public XLargeTest2(String name) {
+ super(name);
+ }
+
+ public static Test suite() {
+ return buildMinimalComplianceTestSuite(testClass(), F_1_5);
+ }
+
+ public static Class<?> testClass() {
+ return XLargeTest2.class;
+ }
+
+ /**
+ * Check if we hit the 64Kb limit on generated table switch method code in
+ * class files. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=542084
+ */
+ public void testBug542084_error() {
+
+ int enumsCount = getEnumsCountForError();
+ StringBuilder lotOfEnums = new StringBuilder(enumsCount * 7);
+ for (int i = 0; i < enumsCount; i++) {
+ lotOfEnums.append("A").append(i).append(", ");
+ }
+
+ String expectedCompilerLog;
+ if (this.complianceLevel > ClassFileConstants.JDK1_8) {
+ expectedCompilerLog =
+ "1. ERROR in X.java (at line 2)\n" +
+ " enum Y {\n" +
+ " ^\n" +
+ "The code for the static initializer is exceeding the 65535 bytes limit\n";
+ } else {
+ expectedCompilerLog =
+ "1. ERROR in X.java (at line 6)\n" +
+ " switch(y){\n" +
+ " case A0:\n" +
+ " System.out.println(\"a\");\n" +
+ " break;\n" +
+ " default:\n" +
+ " System.out.println(\"default\");\n" +
+ " break;\n" +
+ " }\n" +
+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
+ "The code for the switch table on enum X.Y is exceeding the 65535 bytes limit\n";
+ }
+ runNegativeTest(
+ new String[] {
+ "X.java",
+ "public class X {\n" +
+ " enum Y {\n" +
+ lotOfEnums.toString() +
+ " }\n" +
+ " public static void main(String[] args) {\n" +
+ " X.Y y = X.Y.A0;\n" +
+ " switch(y){\n" + // Reported error should be here
+ " case A0:\n" +
+ " System.out.println(\"a\");\n" +
+ " break;\n" +
+ " default:\n" +
+ " System.out.println(\"default\");\n" +
+ " break;\n" +
+ " }\n" +
+ " }\n" +
+ " public void z2(Y y) {\n" + // Should not report error on second switch
+ " switch(y){\n" +
+ " case A0:\n" +
+ " System.out.println(\"a\");\n" +
+ " break;\n" +
+ " default:\n" +
+ " System.out.println(\"default\");\n" +
+ " break;\n" +
+ " }\n" +
+ " }\n" +
+ "}"
+ },
+ "----------\n" +
+ expectedCompilerLog +
+ "----------\n");
+ }
+
+ /**
+ * Check if we don't hit the 64Kb limit on generated table switch method code in
+ * class files. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=542084
+ */
+ public void testBug542084_no_error() {
+ int enumsCount = getEnumsCountForSuccess();
+ StringBuilder lotOfEnums = new StringBuilder(enumsCount * 7);
+ for (int i = 0; i < enumsCount; i++) {
+ lotOfEnums.append("A").append(i).append(", ");
+ }
+
+ // Javac can't compile such big enums
+ runConformTest(
+ true,
+ JavacTestOptions.SKIP,
+ new String[] {
+ "X.java",
+ "public class X {\n" +
+ " enum Y {\n" +
+ lotOfEnums.toString() +
+ " }\n" +
+ " public static void main(String[] args) {\n" +
+ " X.Y y = X.Y.A0;\n" +
+ " switch(y){\n" +
+ " case A0:\n" +
+ " System.out.println(\"SUCCESS\");\n" +
+ " break;\n" +
+ " default:\n" +
+ " System.out.println(\"default\");\n" +
+ " break;\n" +
+ " }\n" +
+ " }\n" +
+ "}"
+ },
+ "SUCCESS");
+ }
+
+ /**
+ * @return Generated code for enums that exceeds the limit
+ */
+ private int getEnumsCountForError() {
+ if(this.complianceLevel > ClassFileConstants.JDK1_8) {
+ return 2800;
+ }
+ return 4500;
+ }
+
+ /**
+ * @return Generated code for enums that does not exceeds the limit
+ */
+ private int getEnumsCountForSuccess() {
+ if(this.complianceLevel > ClassFileConstants.JDK1_8) {
+ return 2300;
+ }
+ return 4300;
+ }
+
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/pom.xml b/org.eclipse.jdt.core.tests.model/pom.xml
index a2dc829..535cfb6 100644
--- a/org.eclipse.jdt.core.tests.model/pom.xml
+++ b/org.eclipse.jdt.core.tests.model/pom.xml
@@ -15,7 +15,7 @@
<parent>
<artifactId>tests-pom</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
<relativePath>../tests-pom/</relativePath>
</parent>
<groupId>org.eclipse.jdt</groupId>
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java
index 6523f0e..7372b2b 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterBugsTests.java
@@ -7532,8 +7532,8 @@
" * a <code>String</coe> value that will be the text of\n" +
" \n" +
" * the paragraph.\n" +
- " * @return a <code>Paragraph</code> containing the the text passed as the\n" +
- " * reportHeader parameter.\n" +
+ " * @return a <code>Paragraph</code> containing the the text passed as\n" +
+ " * the reportHeader parameter.\n" +
" */\n" +
"\n" +
" public static String createReportHeader(String reportHeader) {\n" +
@@ -11216,7 +11216,7 @@
* https://bugs.eclipse.org/474629 - [save actions][clean up] Exceptions thrown
*/
public void testBug474629() {
- this.formatterPrefs.alignment_for_binary_expression |= Alignment.M_INDENT_ON_COLUMN;
+ this.formatterPrefs.alignment_for_additive_operator |= Alignment.M_INDENT_ON_COLUMN;
String source = "aaaaa + bbbb";
formatSource(source, source, CodeFormatter.K_EXPRESSION, 0, true);
}
@@ -12921,4 +12921,21 @@
"}";
formatSource(source);
}
+/**
+ * https://bugs.eclipse.org/542625 - Formatter fails with OOM when parentheses for if statements are preserving positions
+ */
+public void testBug542625() {
+ this.formatterPrefs.parenthesis_positions_in_if_while_statement = DefaultCodeFormatterConstants.PRESERVE_POSITIONS;
+ String source =
+ "class C {\n" +
+ " void m() {\n" +
+ " //\n" +
+ " //\n" +
+ " if (\n" +
+ " true)\n" +
+ " ;\n" +
+ " }\n" +
+ "}";
+ formatSource(source);
+}
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java
index f027f9b..704a97c 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/formatter/FormatterRegressionTests.java
@@ -4706,7 +4706,7 @@
public void test356() {
Map options = DefaultCodeFormatterConstants.getEclipse21Settings();
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
- options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION, DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_COMPACT, DefaultCodeFormatterConstants.INDENT_DEFAULT));
+ options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_MULTIPLICATIVE_OPERATOR, DefaultCodeFormatterConstants.createAlignmentValue(false, DefaultCodeFormatterConstants.WRAP_COMPACT, DefaultCodeFormatterConstants.INDENT_DEFAULT));
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
runTest(codeFormatter, "test356", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
@@ -5561,31 +5561,6 @@
}
/**
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=49162
- */
- public void _test419() {
- Map options = DefaultCodeFormatterConstants.getEclipse21Settings();
- options.put(
- DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION,
- DefaultCodeFormatterConstants.createAlignmentValue(true, DefaultCodeFormatterConstants.WRAP_ONE_PER_LINE, DefaultCodeFormatterConstants.INDENT_DEFAULT));
- DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
- preferences.tab_char = DefaultCodeFormatterOptions.TAB;
- DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test419", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=49623
- */
- public void _test420() {
- DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(DefaultCodeFormatterConstants.getEclipse21Settings());
- preferences.tab_char = DefaultCodeFormatterOptions.TAB;
- preferences.align_type_members_on_columns = true;
- DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
- runTest(codeFormatter, "test420", "A.java", CodeFormatter.K_COMPILATION_UNIT);//$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=49298
*/
public void test421() {
@@ -6106,7 +6081,7 @@
DefaultCodeFormatterConstants.INDENT_BY_ONE
));
options.put(
- DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION,
+ DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION,
DefaultCodeFormatterConstants.createAlignmentValue(
false,
DefaultCodeFormatterConstants.WRAP_ONE_PER_LINE,
@@ -6123,7 +6098,7 @@
public void test460() {
Map options = DefaultCodeFormatterConstants.getEclipse21Settings();
options.put(
- DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION,
+ DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ADDITIVE_OPERATOR,
DefaultCodeFormatterConstants.createAlignmentValue(
false,
DefaultCodeFormatterConstants.WRAP_COMPACT,
@@ -8809,8 +8784,10 @@
// Binary expression
public void test601() {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
- options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION,
- DefaultCodeFormatterConstants.createAlignmentValue(true, DefaultCodeFormatterConstants.WRAP_ONE_PER_LINE, DefaultCodeFormatterConstants.INDENT_DEFAULT));
+ String alignment = DefaultCodeFormatterConstants.createAlignmentValue(true, DefaultCodeFormatterConstants.WRAP_ONE_PER_LINE, DefaultCodeFormatterConstants.INDENT_DEFAULT);
+ options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ADDITIVE_OPERATOR, alignment);
+ options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_MULTIPLICATIVE_OPERATOR, alignment);
+ options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_LOGICAL_OPERATOR, alignment);
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_CHAR, JavaCore.TAB);
options.put(DefaultCodeFormatterConstants.FORMATTER_USE_TABS_ONLY_FOR_LEADING_INDENTATIONS, DefaultCodeFormatterConstants.TRUE);
options.put(DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT, "60");
@@ -9032,7 +9009,7 @@
String resourcePath = getResource("test617", "formatter.xml");
Map options = DecodeCodeFormatterPreferences.decodeCodeFormatterOptions(resourcePath, "JRK");
assertNotNull("No preferences", options);
- options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION,
+ options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION,
DefaultCodeFormatterConstants.createAlignmentValue(
true,
DefaultCodeFormatterConstants.WRAP_ONE_PER_LINE,
@@ -9171,7 +9148,7 @@
public void test625() {
Map options = DefaultCodeFormatterConstants.getEclipseDefaultSettings();
options.put(
- DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION,
+ DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION,
DefaultCodeFormatterConstants.createAlignmentValue(
true,
DefaultCodeFormatterConstants.WRAP_ONE_PER_LINE,
@@ -9591,13 +9568,13 @@
DefaultCodeFormatterConstants.INDENT_BY_ONE
));
options.put(
- DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION,
+ DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION,
DefaultCodeFormatterConstants.createAlignmentValue(
false,
DefaultCodeFormatterConstants.WRAP_ONE_PER_LINE,
DefaultCodeFormatterConstants.INDENT_BY_ONE
));
- options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR, DefaultCodeFormatterConstants.FALSE);
+ options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_STRING_CONCATENATION, DefaultCodeFormatterConstants.FALSE);
DefaultCodeFormatterOptions preferences = new DefaultCodeFormatterOptions(options);
DefaultCodeFormatter codeFormatter = new DefaultCodeFormatter(preferences);
runTest(codeFormatter, "test664", "A.java", CodeFormatter.K_STATEMENTS);//$NON-NLS-1$ //$NON-NLS-2$
@@ -14557,4 +14534,178 @@
String input = getCompilationUnit("Formatter", "", "test205973", "J_in.java").getSource();
formatSource(input, getCompilationUnit("Formatter", "", "test205973", "J_out.java").getSource());
}
+
+/**
+ * https://bugs.eclipse.org/541133 - [formatter] javadoc: no indent of @return description
+ */
+public void testBug541133a() {
+ this.formatterPrefs.comment_align_tags_descriptions_grouped = false;
+ this.formatterPrefs.comment_indent_parameter_description = false;
+ this.formatterPrefs.comment_indent_tag_description = true;
+ String source =
+ "class C {\n" +
+ " /**\n" +
+ " * @param bar param description should NOT get additional indentation when it's wrapped\n" +
+ " * @return return description should get additional indentation when it's wrapped\n" +
+ " */\n" +
+ " String foo(String bar) {\n" +
+ " }\n" +
+ "}";
+ formatSource(source,
+ "class C {\n" +
+ " /**\n" +
+ " * @param bar param description should NOT get additional indentation when it's\n" +
+ " * wrapped\n" +
+ " * @return return description should get additional indentation when it's\n" +
+ " * wrapped\n" +
+ " */\n" +
+ " String foo(String bar) {\n" +
+ " }\n" +
+ "}");
+}
+/**
+ * https://bugs.eclipse.org/541133 - [formatter] javadoc: no indent of @return description
+ */
+public void testBug541133b() {
+ this.formatterPrefs.comment_indent_root_tags = true;
+ this.formatterPrefs.comment_indent_parameter_description = false;
+ this.formatterPrefs.comment_indent_tag_description = true;
+ String source =
+ "class C {\n" +
+ " /**\n" +
+ " * @deprecated Do not use this class, it's only to test formatting on. One two three four five six seven eight nine ten\n" +
+ " */\n" +
+ " void foo() {\n" +
+ " }\n" +
+ "}";
+ formatSource(source,
+ "class C {\n" +
+ " /**\n" +
+ " * @deprecated Do not use this class, it's only to test formatting on. One two\n" +
+ " * three four five six seven eight nine ten\n" +
+ " */\n" +
+ " void foo() {\n" +
+ " }\n" +
+ "}");
+}
+/**
+ * https://bugs.eclipse.org/541133 - [formatter] javadoc: no indent of @return description
+ */
+public void testBug541133c() {
+ this.formatterPrefs.comment_indent_tag_description = true;
+ String source =
+ "/**\n" +
+ " * Mensagens SMTP tem o seguinte formato:\n" +
+ " * \n" +
+ " * <pre>\n" +
+ " * resposta de uma linha só:\n" +
+ " * </pre>\n" +
+ " * \n" +
+ " * {@link java.lang.String </code>a simple string<code>}.\n" +
+ " * \n" +
+ " * @deprecated Mensagens SMTP tem o seguinte formato:\n" +
+ " * \n" +
+ " * <pre>\n" +
+ " * resposta de uma linha só:\n" +
+ " * </pre>\n" +
+ " */";
+ formatSource(source);
+}
+/**
+ * https://bugs.eclipse.org/541133 - [formatter] javadoc: no indent of @return description
+ */
+public void testBug541133d() {
+ String source =
+ "/**\n" +
+ " * @return something <pre>\n" +
+ " * class Runnable {\n" +
+ " * // Hello really bad Ganymede formatter !!!\n" +
+ " * // Shit happens when somebody tries to change a running system\n" +
+ " * }</pre> something\n" +
+ " */";
+ formatSource(source,
+ "/**\n" +
+ " * @return something\n" +
+ " * \n" +
+ " * <pre>\n" +
+ " * class Runnable {\n" +
+ " * // Hello really bad Ganymede formatter !!!\n" +
+ " * // Shit happens when somebody tries to change a running system\n" +
+ " * }\n" +
+ " * </pre>\n" +
+ " * \n" +
+ " * something\n" +
+ " */");
+}
+
+/**
+ * https://bugs.eclipse.org/543079 - [formatter] wrapping binary expressions: separate options for operator types
+ */
+public void testBug543079a() throws JavaModelException {
+ this.formatterPrefs.page_width = 80;
+ this.formatterPrefs.alignment_for_multiplicative_operator = Alignment.M_ONE_PER_LINE_SPLIT + Alignment.M_FORCE + Alignment.M_INDENT_ON_COLUMN;
+ this.formatterPrefs.wrap_before_multiplicative_operator = false;
+ String input = getCompilationUnit("Formatter", "", "test543079", "in.java").getSource();
+ formatSource(input, getCompilationUnit("Formatter", "", "test543079", "A_out.java").getSource());
+}
+/**
+ * https://bugs.eclipse.org/543079 - [formatter] wrapping binary expressions: separate options for operator types
+ */
+public void testBug543079b() throws JavaModelException {
+ this.formatterPrefs.page_width = 80;
+ this.formatterPrefs.alignment_for_additive_operator = Alignment.M_ONE_PER_LINE_SPLIT + Alignment.M_FORCE + Alignment.M_INDENT_ON_COLUMN;
+ this.formatterPrefs.wrap_before_additive_operator = false;
+ String input = getCompilationUnit("Formatter", "", "test543079", "in.java").getSource();
+ formatSource(input, getCompilationUnit("Formatter", "", "test543079", "B_out.java").getSource());
+}
+/**
+ * https://bugs.eclipse.org/543079 - [formatter] wrapping binary expressions: separate options for operator types
+ */
+public void testBug543079c() throws JavaModelException {
+ this.formatterPrefs.page_width = 80;
+ this.formatterPrefs.alignment_for_string_concatenation = Alignment.M_ONE_PER_LINE_SPLIT + Alignment.M_FORCE + Alignment.M_INDENT_ON_COLUMN;
+ this.formatterPrefs.wrap_before_string_concatenation = false;
+ String input = getCompilationUnit("Formatter", "", "test543079", "in.java").getSource();
+ formatSource(input, getCompilationUnit("Formatter", "", "test543079", "C_out.java").getSource());
+}
+/**
+ * https://bugs.eclipse.org/543079 - [formatter] wrapping binary expressions: separate options for operator types
+ */
+public void testBug543079d() throws JavaModelException {
+ this.formatterPrefs.page_width = 80;
+ this.formatterPrefs.alignment_for_shift_operator = Alignment.M_ONE_PER_LINE_SPLIT + Alignment.M_FORCE + Alignment.M_INDENT_ON_COLUMN;
+ this.formatterPrefs.wrap_before_shift_operator = false;
+ String input = getCompilationUnit("Formatter", "", "test543079", "in.java").getSource();
+ formatSource(input, getCompilationUnit("Formatter", "", "test543079", "D_out.java").getSource());
+}
+/**
+ * https://bugs.eclipse.org/543079 - [formatter] wrapping binary expressions: separate options for operator types
+ */
+public void testBug543079e() throws JavaModelException {
+ this.formatterPrefs.page_width = 80;
+ this.formatterPrefs.alignment_for_relational_operator = Alignment.M_ONE_PER_LINE_SPLIT + Alignment.M_FORCE + Alignment.M_INDENT_ON_COLUMN;
+ this.formatterPrefs.wrap_before_relational_operator = false;
+ String input = getCompilationUnit("Formatter", "", "test543079", "in.java").getSource();
+ formatSource(input, getCompilationUnit("Formatter", "", "test543079", "E_out.java").getSource());
+}
+/**
+ * https://bugs.eclipse.org/543079 - [formatter] wrapping binary expressions: separate options for operator types
+ */
+public void testBug543079f() throws JavaModelException {
+ this.formatterPrefs.page_width = 80;
+ this.formatterPrefs.alignment_for_bitwise_operator = Alignment.M_ONE_PER_LINE_SPLIT + Alignment.M_FORCE + Alignment.M_INDENT_ON_COLUMN;
+ this.formatterPrefs.wrap_before_bitwise_operator = false;
+ String input = getCompilationUnit("Formatter", "", "test543079", "in.java").getSource();
+ formatSource(input, getCompilationUnit("Formatter", "", "test543079", "F_out.java").getSource());
+}
+/**
+ * https://bugs.eclipse.org/543079 - [formatter] wrapping binary expressions: separate options for operator types
+ */
+public void testBug543079g() throws JavaModelException {
+ this.formatterPrefs.page_width = 80;
+ this.formatterPrefs.alignment_for_logical_operator = Alignment.M_ONE_PER_LINE_SPLIT + Alignment.M_FORCE + Alignment.M_INDENT_ON_COLUMN;
+ this.formatterPrefs.wrap_before_logical_operator = false;
+ String input = getCompilationUnit("Formatter", "", "test543079", "in.java").getSource();
+ formatSource(input, getCompilationUnit("Formatter", "", "test543079", "G_out.java").getSource());
+}
}
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java
index 1ad40ca..e41cb5b 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java
@@ -471,6 +471,15 @@
entries[length] = entry;
project.setRawClasspath(entries, null);
}
+ protected void addClasspathEntry(IJavaProject project, IClasspathEntry entry, int position) throws JavaModelException{
+ IClasspathEntry[] entries = project.getRawClasspath();
+ int length = entries.length;
+ IClasspathEntry[] newEntries = new IClasspathEntry[length + 1];
+ for (int srcIdx = 0, tgtIdx = 0; tgtIdx < length+1; tgtIdx++) {
+ newEntries[tgtIdx] = (tgtIdx == position) ? entry : entries[srcIdx++];
+ }
+ project.setRawClasspath(newEntries, null);
+ }
protected void addClassFolder(IJavaProject javaProject, String folderRelativePath, String[] pathAndContents, String compliance) throws CoreException, IOException {
IProject project = javaProject.getProject();
String projectLocation = project.getLocation().toOSString();
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests2.java
index a4fe9ca..770f241 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests2.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests2.java
Binary files differ
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModuleBuilderTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModuleBuilderTests.java
index 2c92682..1cff4ee 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModuleBuilderTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ModuleBuilderTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2016, 2018 IBM Corporation and others.
+ * Copyright (c) 2016, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -61,13 +61,21 @@
}
static {
-// TESTS_NAMES = new String[] { "testBug527569c" };
+// TESTS_NAMES = new String[] { "testBug522330" };
}
private String sourceWorkspacePath = null;
protected ProblemRequestor problemRequestor;
public static Test suite() {
+ if (!isJRE9) {
+ // almost empty suite, since we need JRE9+
+ Suite suite = new Suite(ModuleBuilderTests.class.getName());
+ suite.addTest(new ModuleBuilderTests("thisSuiteRunsOnJRE9plus"));
+ return suite;
+ }
return buildModelTestSuite(ModuleBuilderTests.class, BYTECODE_DECLARATION_ORDER);
}
+ public void thisSuiteRunsOnJRE9plus() {}
+
public String getSourceWorkspacePath() {
return this.sourceWorkspacePath == null ? super.getSourceWorkspacePath() : this.sourceWorkspacePath;
}
@@ -107,7 +115,6 @@
// Test that the java.base found as a module package fragment root in the project
public void test001() throws CoreException {
- if (!isJRE9) return;
try {
IJavaProject project = createJava9Project("Test01", new String[]{"src"});
this.createFile("Test01/src/module-info.java", "");
@@ -133,7 +140,6 @@
}
// Test the project compiles without errors with a simple module-info.java
public void test002() throws CoreException {
- if (!isJRE9) return;
try {
this.editFile("P1/src/module-info.java",
"module M1 {\n" +
@@ -149,7 +155,6 @@
// Test that types from java.base module are seen by the compiler
// even without an explicit 'requires java.base' declaration.
public void test003() throws CoreException {
- if (!isJRE9) return;
try {
this.editFile("P1/src/module-info.java",
"module M1 {\n" +
@@ -171,7 +176,6 @@
// Test that a type that is present in the JDK, but not observable to the source module,
// is reported as a compilation error.
public void test004() throws CoreException {
- if (!isJRE9) return;
try {
this.editFile("P1/src/module-info.java",
"module M1 {\n" +
@@ -197,7 +201,6 @@
// Test that a type that is outside java.base module is available to the compiler
// when the module is specified as 'requires'.
public void test005() throws CoreException {
- if (!isJRE9) return;
try {
this.editFile("P1/src/module-info.java",
"module M1 {\n" +
@@ -218,7 +221,6 @@
// Test that a module that doesn't exist but specified as requires in module-info
// doesn't affect rest of the compilation.
public void _test006() throws CoreException {
- if (!isJRE9) return;
try {
this.editFile("P1/src/module-info.java",
"module M1 {\n" +
@@ -282,7 +284,6 @@
*
*/
public void test007() throws Exception {
- if (!isJRE9) return;
try {
IJavaProject project = setupP2();
this.editFile("P1/src/module-info.java",
@@ -314,7 +315,6 @@
*
*/
public void test008() throws Exception {
- if (!isJRE9) return;
try {
IJavaProject project = setupP2();
this.editFile("P1/src/module-info.java",
@@ -344,7 +344,6 @@
* are exported by M1. No errors expected.
*/
public void test009() throws Exception {
- if (!isJRE9) return;
try {
IJavaProject project = setupP2();
this.editFile("P1/src/module-info.java",
@@ -371,7 +370,6 @@
* Usage of types from M1 in M2 should be reported.
*/
public void _test010() throws Exception {
- if (!isJRE9) return;
try {
IJavaProject project = setupP2();
this.editFile("P1/src/module-info.java",
@@ -428,7 +426,6 @@
* M1 in M3 should be reported as errors.
*/
public void test011() throws Exception {
- if (!isJRE9) return;
try {
this.editFile("P1/src/module-info.java",
"module M1 {\n" +
@@ -455,7 +452,6 @@
* M1 in M3 should not be allowed.
*/
public void test012() throws Exception {
- if (!isJRE9) return;
try {
this.editFile("P1/src/module-info.java",
"module M1 {\n" +
@@ -489,7 +485,6 @@
* M1 in M3 should be allowed.
*/
public void test013() throws Exception {
- if (!isJRE9) return;
try {
IJavaProject p2 = setupP2();
IJavaProject p3 = setupP3();
@@ -513,7 +508,6 @@
* M1 in M3 should be allowed. And no errors reported on M2.
*/
public void test014() throws Exception {
- if (!isJRE9) return;
try {
this.editFile("P1/src/module-info.java",
"module M1 {\n" +
@@ -538,7 +532,6 @@
}
}
public void test015() throws CoreException, IOException {
- if (!isJRE9) return;
try {
this.editFile("P1/src/module-info.java",
"module M1 {\n" +
@@ -579,7 +572,6 @@
* report expected errors.
*/
public void test016() throws CoreException, IOException {
- if (!isJRE9) return;
try {
IJavaProject p2 = setupP2();
this.editFile("P2/src/module-info.java",
@@ -612,7 +604,6 @@
* report expected errors.
*/
public void test017() throws CoreException, IOException {
- if (!isJRE9) return;
try {
IJavaProject p2 = setupP2();
this.editFile("P2/src/module-info.java",
@@ -650,7 +641,6 @@
* report expected errors.
*/
public void test018() throws CoreException, IOException {
- if (!isJRE9) return;
try {
String wkspEncoding = System.getProperty("file.encoding");
final String encoding = "UTF-8".equals(wkspEncoding) ? "Cp1252" : "UTF-8";
@@ -685,7 +675,6 @@
* re-compilation of module.
*/
public void _test019() throws CoreException, IOException {
- if (!isJRE9) return;
try {
this.editFile("P1/src/module-info.java",
"module M1 {\n" +
@@ -716,7 +705,6 @@
}
}
public void testConvertToModule() throws CoreException, IOException {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
try {
IJavaProject project = setUpJavaProject("ConvertToModule", "9");
@@ -739,7 +727,6 @@
}
}
public void test_services_abstractImpl() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -780,7 +767,6 @@
}
}
public void test_services_invalidImpl() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -820,7 +806,6 @@
}
}
public void test_services_NoDefaultConstructor() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -866,7 +851,6 @@
}
}
public void test_services_DefaultConstructorNotVisible() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -912,7 +896,6 @@
}
}
public void test_services_DuplicateEntries() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -958,7 +941,6 @@
}
}
public void test_services_NestedClass() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1004,7 +986,6 @@
}
}
public void test_services_NonStatic_NestedClass() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1051,7 +1032,6 @@
}
}
public void test_services_ImplDefinedInAnotherModule() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1091,7 +1071,6 @@
}
}
public void test_services_ProviderMethod() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1143,7 +1122,6 @@
}
}
public void test_services_ProviderMethod_ReturnTypeFromAnotherModule() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1201,7 +1179,6 @@
}
}
public void test_services_ProviderMethod_ReturnTypeInvisible() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1258,7 +1235,6 @@
}
}
public void test_services_ProviderMethod_InvalidReturnType() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1309,7 +1285,6 @@
}
}
public void test_services_DuplicateImplEntries() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1354,7 +1329,6 @@
}
}
public void test_services_InvalidIntfType() throws CoreException {
- if (!isJRE9) return;
try {
String[] src = new String[] {
"src/module-info.java",
@@ -1378,7 +1352,6 @@
}
}
public void test_services_InvalidImplType() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1418,7 +1391,6 @@
}
}
public void test_services_nonPublicImpl() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1463,7 +1435,6 @@
}
}
public void test_Exports_Error() throws CoreException {
- if (!isJRE9) return;
try {
String[] src = new String[] {
"src/module-info.java",
@@ -1481,7 +1452,6 @@
}
}
public void test_DuplicateExports() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1505,7 +1475,6 @@
}
}
public void test_TargetedExports_Duplicates() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1548,7 +1517,6 @@
// Types from source module should be resolved in target module
// when package is exported specifically to the target module
public void test_TargetedExports() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1594,7 +1562,6 @@
// source module exports packages to a specific module which is not
// the same as the target module
public void test_TargetedExports_Error() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1649,7 +1616,6 @@
// It is permitted for the to clause of an exports or opens statement to
// specify a module which is not observable
public void test_TargetedExports_Unresolved() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1673,7 +1639,6 @@
// Target module of an exports statement should be resolved without having an explicit
// dependency to the project that defines the module
public void test_TargetedExports_Resolution() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1704,7 +1669,6 @@
// Make sure modules in the workspace are resolved via the module source path container
// without needing to add a dependency to the project explicitly
public void test_ModuleSourcePathContainer() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1745,7 +1709,6 @@
}
// Make sure module path container picks up changes to module-info
public void _test_ModuleSourcePath_update() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1800,7 +1763,6 @@
// Implicit module dependencies via the 'requires transitive' directive should be
// resolved via the module path container
public void test_ModuleSourcePath_implicitdeps() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1850,7 +1812,6 @@
}
// Changes to implicit dependencies should be reflected // FIXME: container JavaCore.MODULE_PATH_CONTAINER_ID is unreliable
public void _test_ModuleSourcePath_implicitdeps2() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1908,7 +1869,6 @@
// Changes to implicit dependencies should be reflected
//TODO enable once we know how to update project cache
public void _test_ModuleSourcePath_implicitdeps3() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -1961,7 +1921,6 @@
}
}
public void test_Cycle_In_Module_Dependency() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2007,7 +1966,6 @@
}
}
public void test_Cycle_In_Implicit_Module_Dependency() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2052,7 +2010,6 @@
}
}
public void test_bug506479() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2082,7 +2039,6 @@
}
}
public void test_Multiple_SourceFolders() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2138,7 +2094,6 @@
}
}
public void test_Multiple_SourceFolders_WithModuleInfo() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2202,7 +2157,6 @@
}
}
public void test_Multiple_SourceFolders_addModuleInfo() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2240,7 +2194,6 @@
}
}
public void test_Multiple_SourceFolders_removeModuleInfo() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2277,7 +2230,6 @@
}
}
public void test_services_multipleImpl() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2331,7 +2283,6 @@
}
}
public void test_imports_in_moduleinfo() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2377,7 +2328,6 @@
}
public void test_Opens_Nonexistent_Package() throws CoreException {
- if (!isJRE9) return;
try {
String[] src = new String[] {
"src/module-info.java",
@@ -2393,7 +2343,6 @@
}
}
public void test_Opens_Alien_Package() throws CoreException {
- if (!isJRE9) return;
try {
String[] src = new String[] {
"src/module-info.java",
@@ -2432,7 +2381,6 @@
}
}
public void test_DuplicateOpens() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2456,7 +2404,6 @@
}
}
public void test_TargetedOpens_Duplicates() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2499,7 +2446,6 @@
// It is permitted for the to clause of an exports or opens statement to
// specify a module which is not observable
public void test_TargetedOpens_Unresolved() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2522,7 +2468,6 @@
}
// It is a compile-time error if an opens statement appears in the declaration of an open module.
public void test_OpensStatment_in_OpenModule() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2545,7 +2490,6 @@
}
}
public void test_uses_DuplicateEntries() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2570,7 +2514,6 @@
}
}
public void test_uses_InvalidIntfType() throws CoreException {
- if (!isJRE9) return;
try {
String[] src = new String[] {
"src/module-info.java",
@@ -2593,7 +2536,6 @@
}
}
public void test_ReconcilerModuleLookup1() throws CoreException {
- if (!isJRE9) return;
try {
String[] src = new String[] {
"src/module-info.java",
@@ -2615,7 +2557,6 @@
}
}
public void test_ReconcilerModuleLookup2() throws CoreException {
- if (!isJRE9) return;
try {
String[] src = new String[] {
"src/module-info.java",
@@ -2641,7 +2582,6 @@
}
}
public void testSystemLibAsJMod() throws CoreException {
- if (!isJRE9) return;
try {
IJavaProject project = createJava9Project("Test01", new String[]{"src"});
IClasspathEntry[] rawClasspath = project.getRawClasspath();
@@ -2676,7 +2616,6 @@
}
}
public void testSystemLibAsJMod_2() throws CoreException {
- if (!isJRE9) return;
try {
IJavaProject project = createJava9Project("Test01", new String[]{"src"});
IClasspathEntry[] rawClasspath = project.getRawClasspath();
@@ -2729,7 +2668,6 @@
}
}
public void testBug510617() throws CoreException {
- if (!isJRE9) return;
try {
String[] src = new String[] {
"src/module-info.java",
@@ -2795,7 +2733,6 @@
}
}
public void test_annotations_in_moduleinfo() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2845,7 +2782,6 @@
}
}
public void test_unresolved_annotations() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2896,7 +2832,6 @@
}
}
public void test_illegal_modifiers() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -2947,7 +2882,6 @@
}
}
public void test_annotations_with_target() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -3000,7 +2934,6 @@
}
}
public void test_annotations_with_wrong_target() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -3054,7 +2987,6 @@
}
}
public void testBug518334() throws CoreException, IOException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -3079,7 +3011,6 @@
}
}
public void testBug518334a() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -3120,7 +3051,6 @@
}
public void test_api_leak_1() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources1 = {
"src/module-info.java",
@@ -3182,7 +3112,6 @@
* Still a sub class of the inaccessible class can be accessed and used for a method argument.
*/
public void test_api_leak_2() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources1 = {
"src/module-info.java",
@@ -3250,7 +3179,6 @@
}
public void testNonPublic1() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources1 = {
"src/module-info.java",
@@ -3328,7 +3256,6 @@
// test that two packages with the same name result in conflict if they are both
// accessible to a module
public void test_conflicting_packages() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -3378,7 +3305,8 @@
// reported against both 'requires' directives & against the import:
"The package org.astro is accessible from more than one module: org.astro, some.mod\n" +
"The package org.astro is accessible from more than one module: org.astro, some.mod\n" +
- "The package org.astro is accessible from more than one module: org.astro, some.mod",
+ "The package org.astro is accessible from more than one module: org.astro, some.mod\n" +
+ "World cannot be resolved to a type",
markers);
} finally {
deleteProject("org.astro");
@@ -3389,7 +3317,6 @@
// test that a package declared in a module conflicts with an accessible package
// of the same name declared in another required module
public void test_conflicting_packages_declaredvsaccessible() throws CoreException {
- if (!isJRE9) return;
try {
IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
String[] sources = new String[] {
@@ -3428,8 +3355,11 @@
IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep });
p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+ sortMarkers(markers);
assertMarkers("Unexpected markers",
- "The package org.astro conflicts with a package accessible from another module: org.astro", markers);
+ "The package org.astro conflicts with a package accessible from another module: org.astro\n" +
+ "The package org.astro is accessible from more than one module: com.greetings, org.astro",
+ markers);
} finally {
deleteProject("org.astro");
deleteProject("com.greetings");
@@ -3440,7 +3370,6 @@
// Type bundle.org.astro.World should not be resolved, because type
// bundle.org.astro trumps package bundle.org.astro
public void test_conflict_packagevstype() throws CoreException {
- if (!isJRE9) return;
try {
IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
String[] sources = new String[] {
@@ -3497,7 +3426,6 @@
// cannot be seen
// TODO - to be confirmed with spec
public void test_noconflict_concealedtype_accessiblepackage() throws CoreException {
- if (!isJRE9) return;
try {
IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
String[] sources = new String[] {
@@ -3549,7 +3477,6 @@
// test that two packages of the same name exported by two named modules result in
// a conflict in the context of a non-modular project
public void test_conflicting_packages_unnamed() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -3596,7 +3523,8 @@
IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
sortMarkers(markers);
assertMarkers("Unexpected markers",
- "The package org.astro is accessible from more than one module: org.astro, some.mod",
+ "The package org.astro is accessible from more than one module: org.astro, some.mod\n" +
+ "World cannot be resolved to a type",
markers);
} finally {
deleteProject("org.astro");
@@ -3607,7 +3535,6 @@
// test that a package declared in a non-modular project conflicts with a package with the same name
// exported by a named module on it's build path
public void test_conflict_unnamed_declaredvsexported() throws CoreException {
- if (!isJRE9) return;
try {
IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
String[] sources = new String[] {
@@ -3645,8 +3572,10 @@
IJavaProject p2 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep1 });
p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+ sortMarkers(markers);
assertMarkers("Unexpected markers",
- "The package org.astro conflicts with a package accessible from another module: org.astro",
+ "The package org.astro conflicts with a package accessible from another module: org.astro\n" +
+ "The package org.astro is accessible from more than one module: <unnamed>, org.astro",
markers);
} finally {
deleteProject("org.astro");
@@ -3656,7 +3585,6 @@
// test that a type in an accessible package trumps an accessible package with the same name
// in the context of a non-modular project
public void test_conflict_packagevstype_unnamed() throws CoreException {
- if (!isJRE9) return;
try {
IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
String[] sources = new String[] {
@@ -3711,7 +3639,6 @@
// test that a conflicting package does not cause an error when resolving a sub package name
// when the sub package is accessible in the context of a non-modular project
public void test_noconflict_subpkg_unnamed() throws CoreException {
- if (!isJRE9) return;
try {
IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
String[] sources = new String[] {
@@ -3758,9 +3685,10 @@
IJavaProject p3 = setupModuleProject("com.greetings", src, new IClasspathEntry[] { dep1, dep2 });
getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
IMarker[] markers = p3.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+ sortMarkers(markers);
assertMarkers("Unexpected markers",
"The package bundle.org conflicts with a package accessible from another module: other.mod\n" +
- "bundle.org.astro.World cannot be resolved to a type",
+ "The package bundle.org is accessible from more than one module: <unnamed>, other.mod",
markers);
} finally {
deleteProject("org.astro");
@@ -3771,7 +3699,6 @@
// test that a type in a non-accessible package does not conflict with an accessible package
// in the context of a non-modular project
public void test_noconflict_concealedtype_accessiblepackage_unnamed() throws CoreException {
- if (!isJRE9) return;
try {
IClasspathEntry dep = JavaCore.newContainerEntry(new Path(JavaCore.MODULE_PATH_CONTAINER_ID));
String[] sources = new String[] {
@@ -3822,7 +3749,6 @@
}
}
public void testBug512053() throws CoreException, IOException {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
this.sourceWorkspacePath = super.getSourceWorkspacePath() + java.io.File.separator + "bug512053";
try {
@@ -3846,7 +3772,6 @@
}
// basic test for automatic modules - external jars
public void testBug518280() throws CoreException, IOException {
- if (!isJRE9) return;
try {
String libPath = "externalLib/test.jar";
Util.createJar(
@@ -3893,7 +3818,6 @@
}
// basic test for automatic modules - workspace jars
public void testBug518282() throws CoreException, IOException {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
try {
setUpJavaProject("test_automodules", "9");
@@ -3908,7 +3832,6 @@
// Only the project using a jar as an automatic module should be able to
// resolve one as such
public void testBug518282a() throws CoreException, IOException {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
try {
IJavaProject p1 = setUpJavaProject("test_automodules", "9");
@@ -3948,7 +3871,6 @@
// A modular jar on the module path of a project should behave as a regular module and not
// as an automatic module
public void testBug518282b() throws CoreException, IOException {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
String libPath = "externalLib/test.jar";
try {
@@ -4002,7 +3924,6 @@
// A modular jar on the class path of a module project - shouldn't be
// treated as a module and shouldn't be readable
public void testBug518282c() throws CoreException, IOException {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
String libPath = "externalLib/test.jar";
try {
@@ -4055,7 +3976,6 @@
}
// An automatic module grants implied readability to all other automatic modules
public void testBug518282d() throws CoreException, IOException {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
String libPath = "externalLib/test.jar";
try {
@@ -4122,7 +4042,6 @@
// Automatic module should not allow access to other explicit modules without
// requires
public void testBug518282e() throws CoreException, IOException {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
String libPath = "externalLib/test.jar";
try {
@@ -4196,7 +4115,6 @@
}
// An automatic module shouldn't allow access to classpath
public void testBug518282f() throws CoreException, IOException {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
String libPath = "externalLib/test.jar";
try {
@@ -4265,7 +4183,6 @@
}
public void testUnnamedModule_bug519674() throws CoreException {
- if (!isJRE9) return;
try {
IJavaProject p1 = createJava9Project("Project1");
createFolder("/Project1/src/pack1");
@@ -4296,7 +4213,6 @@
}
public void testBug520246() throws CoreException {
- if (!isJRE9) return;
try {
String[] src = new String[] {
"src/module-info.java",
@@ -4320,7 +4236,6 @@
}
public void testBug520147() throws CoreException, IOException {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
try {
String[] src = new String[] {
@@ -4387,7 +4302,6 @@
}
}
public void testBug520147a() throws CoreException, IOException {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
try {
String[] src = new String[] {
@@ -4454,7 +4368,6 @@
}
}
public void testBug520147b() throws CoreException, IOException {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
try {
String[] src = new String[] {
@@ -4522,7 +4435,6 @@
}
}
public void testSourceFolders_Bug519673() throws CoreException {
- if (!isJRE9) return;
try {
// Setup project PSources1:
String[] src = new String[] {
@@ -4598,7 +4510,6 @@
}
}
public void testPrivateMethod_Bug515985() throws CoreException {
- if (!isJRE9) return;
try {
String[] src = new String[] {
"src/module-info.java",
@@ -4645,7 +4556,6 @@
}
}
public void testAddExports() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -4689,7 +4599,6 @@
}
}
public void testAddExports2() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -4739,7 +4648,6 @@
}
}
public void testAddReads() throws CoreException, IOException {
- if (!isJRE9) return;
try {
// org.astro defines the "real" org.astro.World:
String[] sources = new String[] {
@@ -4835,7 +4743,6 @@
}
}
public void testBug520147c() throws CoreException, IOException {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
try {
String[] src = new String[] {
@@ -4897,7 +4804,6 @@
}
@Deprecated
public void testBug519935() throws CoreException, IOException {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
try {
String[] src = new String[] {
@@ -4966,7 +4872,6 @@
}
@Deprecated
public void testBug520310() throws CoreException, IOException {
- if (!isJRE9) return;
try {
String[] src = new String[] {
"src/module-info.java",
@@ -5036,7 +4941,6 @@
}
}
public void testBug521346() throws CoreException, IOException {
- if (!isJRE9) return;
IJavaProject javaProject = null;
try {
String src =
@@ -5063,7 +4967,6 @@
}
}
public void testAutoModule1() throws Exception {
- if (!isJRE9) return;
IJavaProject javaProject = null;
try {
String[] sources = {
@@ -5120,7 +5023,6 @@
}
}
public void testAutoModule2() throws Exception {
- if (!isJRE9) return;
IJavaProject javaProject = null;
try {
String[] sources = {
@@ -5178,7 +5080,6 @@
}
}
public void testAutoModule3() throws Exception {
- if (!isJRE9) return;
IJavaProject javaProject = null, auto = null;
try {
auto = createJava9Project("auto", new String[] {"src"});
@@ -5235,7 +5136,6 @@
}
public void testAutoModule4() throws Exception {
- if (!isJRE9) return;
IJavaProject javaProject = null;
IJavaProject javaProject2 = null;
try {
@@ -5330,7 +5230,6 @@
}
// like testAutoModule3 without name derived from project, not manifest - warning suppressed
public void testAutoModule5() throws Exception {
- if (!isJRE9) return;
IJavaProject javaProject = null, auto = null;
try {
auto = createJava9Project("auto", new String[] {"src"});
@@ -5384,7 +5283,6 @@
}
// like testAutoModule5, warning configured as ERROR
public void testAutoModule6() throws Exception {
- if (!isJRE9) return;
IJavaProject javaProject = null, auto = null;
try {
auto = createJava9Project("auto", new String[] {"src"});
@@ -5426,7 +5324,6 @@
// patch can see unexported type from host (and package accessible method), but not vice versa
public void testPatch1() throws CoreException, IOException {
- if (!isJRE9) return;
try {
IJavaProject mainProject = createJava9Project("org.astro");
String[] sources = {
@@ -5502,7 +5399,6 @@
// patch can see unexported type from host - JRE patched from two source folders
public void testPatch2() throws CoreException, IOException {
- if (!isJRE9) return;
try {
IClasspathAttribute[] attributes = {
JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true"),
@@ -5545,7 +5441,6 @@
// patch can share a package with its host - jar
public void testPatch3() throws CoreException, IOException {
- if (!isJRE9) return;
try {
String[] sources = {
"p/a/X.java",
@@ -5592,7 +5487,6 @@
}
}
public void testLimitModules1() throws CoreException, IOException {
- if (!isJRE9) return;
try {
IClasspathAttribute[] attributes = {
JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true"),
@@ -5661,7 +5555,6 @@
}
}
public void testLimitModules2() throws CoreException, IOException {
- if (!isJRE9) return;
try {
IClasspathAttribute[] attributes = {
JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true"),
@@ -5728,7 +5621,6 @@
}
}
public void testDefaultRootModules() throws CoreException, IOException {
- if (!isJRE9) return;
try {
IJavaProject project = createJava9Project("org.astro", new String[]{"src"});
@@ -5770,7 +5662,6 @@
}
}
public void testBug522398() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
@@ -5817,7 +5708,6 @@
}
}
public void testBug522330() throws CoreException, IOException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/javax/net/ServerSocketFactory1.java",
@@ -5847,7 +5737,12 @@
};
IJavaProject p2 = setupModuleProject("nonmodular2", src, new IClasspathEntry[] { dep });
p2.getProject().getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
- assertNoErrors();
+ IMarker[] markers = p2.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+ sortMarkers(markers);
+ assertMarkers("unexpected markers",
+ "The package javax.net is accessible from more than one module: <unnamed>, java.base\n" +
+ "ServerSocketFactory cannot be resolved",
+ markers);
} finally {
deleteProject("nonmodular1");
deleteProject("nonmodular2");
@@ -5855,7 +5750,6 @@
}
public void testBug522503() throws Exception {
- if (!isJRE9) return;
try {
IJavaProject p1 = setupModuleProject("mod.one",
new String[] {
@@ -5899,7 +5793,6 @@
}
}
public void testBug522671() throws Exception {
- if (!isJRE9) return;
try {
IJavaProject p1 = setupModuleProject("util",
new String[] {
@@ -5990,7 +5883,6 @@
}
}
public void testBug522671b() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/nonmodular1/HasConstructorWithProperties.java",
@@ -6073,7 +5965,6 @@
}
public void testBug525522() throws Exception {
- if (!isJRE9) return;
try {
// non-modular substitute for java.jnlp:
IClasspathAttribute[] jreAttribs = { JavaCore.newClasspathAttribute(IClasspathAttribute.LIMIT_MODULES, "java.base,java.desktop,java.rmi,java.sql") };
@@ -6130,7 +6021,6 @@
}
public void testBug525603() throws Exception {
- if (!isJRE9) return;
IJavaProject javaProject = null;
try {
String[] sources = {
@@ -6188,7 +6078,6 @@
}
public void testBug522670() throws Exception {
- if (!isJRE9) return;
Hashtable<String, String> javaCoreOptions = JavaCore.getOptions();
try {
Hashtable<String, String> newOptions=new Hashtable<>(javaCoreOptions);
@@ -6337,7 +6226,6 @@
}
public void testBug526054b() throws Exception {
- if (!isJRE9) return;
ClasspathJrt.resetCaches();
try {
// one project can see jdk.rmic/sun.rmi.rmic
@@ -6423,7 +6311,6 @@
}
public void testBug525918() throws CoreException {
- if (!isJRE9) return;
try {
String[] sources = new String[] {
"src/module-info.java",
@@ -6473,7 +6360,6 @@
}
public void testBug527576() throws Exception {
- if (!isJRE9) return;
IJavaProject javaProject = null;
try {
@@ -6539,7 +6425,6 @@
}
}
public void testBug528467a() throws CoreException {
- if (!isJRE9) return;
IJavaProject p1 = createJava9Project("mod.one");
try {
IClasspathEntry[] rawClasspath = p1.getRawClasspath();
@@ -6586,7 +6471,6 @@
}
}
public void testBug528467b() throws CoreException {
- if (!isJRE9) return;
IJavaProject p1 = createJava9Project("mod.one");
try {
IClasspathEntry[] rawClasspath = p1.getRawClasspath();
@@ -6639,7 +6523,6 @@
}
}
public void testBug528467c() throws CoreException {
- if (!isJRE9) return;
IJavaProject p1 = createJava9Project("unnamed");
try {
IClasspathEntry[] rawClasspath = p1.getRawClasspath();
@@ -6682,7 +6565,6 @@
}
// Bug 520713: allow test code to access code on the classpath
public void testWithTestAttributeAndTestDependencyOnClassPath() throws CoreException, IOException {
- if (!isJRE9) return;
String outputDirectory = Util.getOutputDirectory();
String jarPath = outputDirectory + File.separator + "mytestlib.jar";
@@ -6822,7 +6704,6 @@
}
public void testBug531579() throws Exception {
- if (!isJRE9) return;
String outputDirectory = Util.getOutputDirectory();
String jarPath = outputDirectory + File.separator + "jaxb-api.jar";
@@ -6877,7 +6758,6 @@
}
}
public void testBug527569a() throws CoreException {
- if (!isJRE9) return;
IJavaProject p1 = createJava9Project("Bug527569", "9");
try {
createFolder("/Bug527569/src/p1");
@@ -6899,7 +6779,6 @@
}
}
public void testBug527569b() throws CoreException {
- if (!isJRE9) return;
IJavaProject p1 = createJava9Project("Bug527569", "1.7");
try {
createFolder("/Bug527569/src/p1");
@@ -6950,7 +6829,6 @@
}
}
public void testBug527569d() throws CoreException {
- if (!isJRE9) return;
IJavaProject p1 = createJava9Project("Bug527569", "9");
try {
createFolder("/Bug527569/src/p1");
@@ -7001,7 +6879,6 @@
}
}
public void testBug522601() throws CoreException {
- if (!isJRE9) return;
IJavaProject p1 = createJava9Project("Bug522601", "9");
try {
IFile file = createFile("/Bug522601/test.txt", "not a jar");
@@ -7019,7 +6896,6 @@
}
// automatic modules export all their packages
public void testBug532724() throws CoreException, IOException {
- if (!isJRE9) return;
try {
String libPath = "externalLib/test.jar";
Util.createJar(
@@ -7066,7 +6942,6 @@
}
}
public void testBug534624a() throws CoreException, IOException {
- if (!isJRE9) return;
IJavaProject project = null;
Hashtable<String, String> options = JavaCore.getOptions();
try {
@@ -7091,7 +6966,6 @@
}
}
public void testBug534624b() throws CoreException, IOException {
- if (!isJRE9) return;
IJavaProject project = null;
Hashtable<String, String> options = JavaCore.getOptions();
try {
@@ -7124,7 +6998,6 @@
}
// missing linked jar must not cause NPE
public void testBug540904() throws CoreException, IOException {
- if (!isJRE9) return;
try {
String[] src = new String[] {
"src/test/Test.java",
@@ -7144,7 +7017,6 @@
}
}
public void testBug540788() throws Exception {
- if (!isJRE9) return;
try {
// project common:
IJavaProject common = createJava9Project("Bug540788.common", new String[] { "src/main/java" });
@@ -7282,7 +7154,7 @@
IMarker[] markers = unnamed.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
sortMarkers(markers);
assertMarkers("Unexpected markers",
- "The import org.p1.T1 cannot be resolved\n" +
+ "The package org.p1 is accessible from more than one module: m1, m2, m3\n" +
"T1 cannot be resolved to a type",
markers);
@@ -7294,8 +7166,8 @@
"----------\n" +
"1. ERROR in /unnamed/src/test/Test.java (at line 2)\n" +
" import org.p1.T1;\n" +
- " ^^^^^^^^^\n" +
- "The import org.p1.T1 cannot be resolved\n" +
+ " ^^^^^^\n" +
+ "The package org.p1 is accessible from more than one module: m1, m2, m3\n" +
"----------\n" +
"2. ERROR in /unnamed/src/test/Test.java (at line 4)\n" +
" T1 t1;\n" +
@@ -7310,6 +7182,337 @@
deleteProject("unnamed");
}
}
+ public void testBug536928_comment22() throws CoreException, IOException {
+ try {
+ IJavaProject project = createJava9Project("ztest", new String[] { "src" });
+ createFolder("/ztest/lib");
+ Util.createJar(new String[] {
+ "javax/xml/transform/Transformer.java",
+ "package javax.xml.transform;\n" +
+ "public class Transformer {}\n",
+ "javax/xml/transform/Result.java",
+ "package javax.xml.transform;\n" +
+ "public class Result {}\n"
+ },
+ project.getProject().getLocation().toString() + "/lib/xml-apis.jar",
+ "1.8");
+ project.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+ IClasspathEntry libraryEntry = JavaCore.newLibraryEntry(new Path("/ztest/lib/xml-apis.jar"), null, null);
+ addClasspathEntry(project, libraryEntry, 1); // right after src and before jrt-fs.jar
+
+ String testSource =
+ "package com.ztest;\n" +
+ "import javax.xml.transform.Transformer;\n" +
+ "\n" +
+ "public class TestApp {\n" +
+ " Transformer ts;\n" +
+ " javax.xml.transform.Result result;\n" +
+ "}\n";
+ createFolder("/ztest/src/com/ztest");
+ createFile("/ztest/src/com/ztest/TestApp.java", testSource);
+ String test2Source =
+ "package com.ztest;\n" +
+ "import javax.xml.transform.*;\n" +
+ "public class Test2 {\n" +
+ " Transformer ts;\n" +
+ "}\n";
+ createFile("/ztest/src/com/ztest/Test2.java", test2Source);
+ getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+ IMarker[] markers = project.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+ sortMarkers(markers);
+ assertMarkers("Unexpected Markers",
+ "The package javax.xml.transform is accessible from more than one module: <unnamed>, java.xml\n" +
+ "The package javax.xml.transform is accessible from more than one module: <unnamed>, java.xml\n" +
+ "Transformer cannot be resolved to a type\n" +
+ "Transformer cannot be resolved to a type\n" +
+ "The package javax.xml.transform is accessible from more than one module: <unnamed>, java.xml",
+ markers);
+
+ char[] sourceChars = testSource.toCharArray();
+ this.problemRequestor.initialize(sourceChars);
+ getCompilationUnit("/ztest/src/com/ztest/TestApp.java").getWorkingCopy(this.wcOwner, null);
+ assertProblems(
+ "Unexpected problems",
+ "----------\n" +
+ "1. ERROR in /ztest/src/com/ztest/TestApp.java (at line 2)\n" +
+ " import javax.xml.transform.Transformer;\n" +
+ " ^^^^^^^^^^^^^^^^^^^\n" +
+ "The package javax.xml.transform is accessible from more than one module: <unnamed>, java.xml\n" +
+ "----------\n" +
+ "2. ERROR in /ztest/src/com/ztest/TestApp.java (at line 5)\n" +
+ " Transformer ts;\n" +
+ " ^^^^^^^^^^^\n" +
+ "Transformer cannot be resolved to a type\n" +
+ "----------\n" +
+ "3. ERROR in /ztest/src/com/ztest/TestApp.java (at line 6)\n" +
+ " javax.xml.transform.Result result;\n" +
+ " ^^^^^^^^^^^^^^^^^^^\n" +
+ "The package javax.xml.transform is accessible from more than one module: <unnamed>, java.xml\n" +
+ "----------\n",
+ this.problemRequestor);
+
+ sourceChars = test2Source.toCharArray();
+ this.problemRequestor.initialize(sourceChars);
+ getCompilationUnit("/ztest/src/com/ztest/Test2.java").getWorkingCopy(this.wcOwner, null);
+ assertProblems(
+ "Unexpected problems",
+ "----------\n" +
+ "1. ERROR in /ztest/src/com/ztest/Test2.java (at line 2)\n" +
+ " import javax.xml.transform.*;\n" +
+ " ^^^^^^^^^^^^^^^^^^^\n" +
+ "The package javax.xml.transform is accessible from more than one module: <unnamed>, java.xml\n" +
+ "----------\n" +
+ "2. ERROR in /ztest/src/com/ztest/Test2.java (at line 4)\n" +
+ " Transformer ts;\n" +
+ " ^^^^^^^^^^^\n" +
+ "Transformer cannot be resolved to a type\n" +
+ "----------\n",
+ this.problemRequestor);
+ } finally {
+ deleteProject("ztest");
+ }
+ }
+ public void testBug536928_comment22b() throws CoreException, IOException {
+ try {
+ IJavaProject project = createJava9Project("ztest", new String[] { "src" });
+ createFolder("/ztest/lib");
+ Util.createJar(new String[] {
+ "javax/xml/transform/Transformer.java",
+ "package javax.xml.transform;\n" +
+ "public class Transformer {}\n",
+ "javax/xml/transform/Result.java",
+ "package javax.xml.transform;\n" +
+ "public class Result {}\n"
+ },
+ project.getProject().getLocation().toString() + "/lib/xml-apis.jar",
+ "1.8");
+ project.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+ IClasspathEntry libraryEntry = JavaCore.newLibraryEntry(new Path("/ztest/lib/xml-apis.jar"), null, null);
+ addClasspathEntry(project, libraryEntry, 2); // DIFFERENCE HERE: place xml-apis.jar AFTER jrt-fs.jar
+
+ String testSource =
+ "package com.ztest;\n" +
+ "import javax.xml.transform.Transformer;\n" +
+ "\n" +
+ "public class TestApp {\n" +
+ " Transformer ts;\n" +
+ " javax.xml.transform.Result result;\n" +
+ "}\n";
+ createFolder("/ztest/src/com/ztest");
+ createFile("/ztest/src/com/ztest/TestApp.java", testSource);
+ String test2Source =
+ "package com.ztest;\n" +
+ "import javax.xml.transform.*;\n" +
+ "public class Test2 {\n" +
+ " Transformer ts;\n" +
+ "}\n";
+ createFile("/ztest/src/com/ztest/Test2.java", test2Source);
+ getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+ IMarker[] markers = project.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+ sortMarkers(markers);
+ assertMarkers("Unexpected Markers",
+ "The package javax.xml.transform is accessible from more than one module: <unnamed>, java.xml\n" +
+ "The package javax.xml.transform is accessible from more than one module: <unnamed>, java.xml\n" +
+ "Transformer cannot be resolved to a type\n" +
+ "Transformer cannot be resolved to a type\n" +
+ "The package javax.xml.transform is accessible from more than one module: <unnamed>, java.xml",
+ markers);
+
+ char[] sourceChars = testSource.toCharArray();
+ this.problemRequestor.initialize(sourceChars);
+ getCompilationUnit("/ztest/src/com/ztest/TestApp.java").getWorkingCopy(this.wcOwner, null);
+ assertProblems(
+ "Unexpected problems",
+ "----------\n" +
+ "1. ERROR in /ztest/src/com/ztest/TestApp.java (at line 2)\n" +
+ " import javax.xml.transform.Transformer;\n" +
+ " ^^^^^^^^^^^^^^^^^^^\n" +
+ "The package javax.xml.transform is accessible from more than one module: <unnamed>, java.xml\n" +
+ "----------\n" +
+ "2. ERROR in /ztest/src/com/ztest/TestApp.java (at line 5)\n" +
+ " Transformer ts;\n" +
+ " ^^^^^^^^^^^\n" +
+ "Transformer cannot be resolved to a type\n" +
+ "----------\n" +
+ "3. ERROR in /ztest/src/com/ztest/TestApp.java (at line 6)\n" +
+ " javax.xml.transform.Result result;\n" +
+ " ^^^^^^^^^^^^^^^^^^^\n" +
+ "The package javax.xml.transform is accessible from more than one module: <unnamed>, java.xml\n" +
+ "----------\n",
+ this.problemRequestor);
+
+ sourceChars = test2Source.toCharArray();
+ this.problemRequestor.initialize(sourceChars);
+ getCompilationUnit("/ztest/src/com/ztest/Test2.java").getWorkingCopy(this.wcOwner, null);
+ assertProblems(
+ "Unexpected problems",
+ "----------\n" +
+ "1. ERROR in /ztest/src/com/ztest/Test2.java (at line 2)\n" +
+ " import javax.xml.transform.*;\n" +
+ " ^^^^^^^^^^^^^^^^^^^\n" +
+ "The package javax.xml.transform is accessible from more than one module: <unnamed>, java.xml\n" +
+ "----------\n" +
+ "2. ERROR in /ztest/src/com/ztest/Test2.java (at line 4)\n" +
+ " Transformer ts;\n" +
+ " ^^^^^^^^^^^\n" +
+ "Transformer cannot be resolved to a type\n" +
+ "----------\n",
+ this.problemRequestor);
+ } finally {
+ deleteProject("ztest");
+ }
+ }
+ public void testBug536928_comment22_limited() throws CoreException, IOException {
+ try {
+ IClasspathAttribute[] limitModules = {
+ JavaCore.newClasspathAttribute(IClasspathAttribute.LIMIT_MODULES, "java.base")
+ };
+ IJavaProject project = createJava9ProjectWithJREAttributes("ztest", new String[] { "src" }, limitModules);
+ createFolder("/ztest/lib");
+ Util.createJar(new String[] {
+ "javax/xml/transform/Transformer.java",
+ "package javax.xml.transform;\n" +
+ "public class Transformer {}\n",
+ "javax/xml/transform/Result.java",
+ "package javax.xml.transform;\n" +
+ "public class Result {}\n"
+ },
+ project.getProject().getLocation().toString() + "/lib/xml-apis.jar",
+ "1.8");
+ project.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+ IClasspathEntry libraryEntry = JavaCore.newLibraryEntry(new Path("/ztest/lib/xml-apis.jar"), null, null);
+ addClasspathEntry(project, libraryEntry, 1); // right after src and before jrt-fs.jar
+
+ String testSource =
+ "package com.ztest;\n" +
+ "import javax.xml.transform.Transformer;\n" +
+ "\n" +
+ "public class TestApp {\n" +
+ " Transformer ts;\n" +
+ " javax.xml.transform.Result result;\n" +
+ "}\n";
+ createFolder("/ztest/src/com/ztest");
+ createFile("/ztest/src/com/ztest/TestApp.java", testSource);
+ String test2Source =
+ "package com.ztest;\n" +
+ "import javax.xml.transform.*;\n" +
+ "public class Test2 {\n" +
+ " Transformer ts;\n" +
+ "}\n";
+ createFile("/ztest/src/com/ztest/Test2.java", test2Source);
+ getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+ assertNoErrors();
+
+ char[] sourceChars = testSource.toCharArray();
+ this.problemRequestor.initialize(sourceChars);
+ getCompilationUnit("/ztest/src/com/ztest/TestApp.java").getWorkingCopy(this.wcOwner, null);
+ assertProblems(
+ "Unexpected problems",
+ "----------\n" +
+ "----------\n",
+ this.problemRequestor);
+ sourceChars = test2Source.toCharArray();
+ this.problemRequestor.initialize(sourceChars);
+ getCompilationUnit("/ztest/src/com/ztest/Test2.java").getWorkingCopy(this.wcOwner, null);
+ assertProblems(
+ "Unexpected problems",
+ "----------\n" +
+ "----------\n",
+ this.problemRequestor);
+ } finally {
+ deleteProject("ztest");
+ }
+ }
+ public void testBug542896() throws CoreException {
+ IJavaProject java10Project = createJava10Project("bug", new String[] { "src" });
+ try {
+ createFolder("/bug/src/test/platform");
+ createFile("/bug/src/test/platform/Context.java",
+ "package test.platform;\n" +
+ "\n" +
+ "import java.net.URI;\n" +
+ "\n" +
+ "public interface Context {\n" +
+ " public URI getURI();\n" +
+ "}\n");
+ createFile("/bug/src/test/platform/AbstractContext.java",
+ "package test.platform;\n" +
+ "\n" +
+ "import java.net.URI;\n" +
+ "import java.util.*;\n" +
+ "import test.*;\n" +
+ "\n" +
+ "public abstract class AbstractContext implements Context {\n" +
+ " Iterable<URI> uris = new ArrayList<URI>();\n" +
+ " Application application;\n" +
+ "}\n");
+ String testSource =
+ "package test;\n" +
+ "\n" +
+ "import java.io.*;\n" +
+ "import java.net.*;\n" +
+ "import java.util.*;\n" +
+ "\n" +
+ "import test.platform.*;\n" +
+ "\n" +
+ "public interface Application // extends Foo\n" +
+ "{\n" +
+ "}\n";
+ String testPath = "/bug/src/test/Application.java";
+ createFile(testPath, testSource);
+ // first compile: no error:
+ getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, null);
+ assertNoErrors();
+ char[] sourceChars = testSource.toCharArray();
+ this.problemRequestor.initialize(sourceChars);
+ getCompilationUnit(testPath).getWorkingCopy(this.wcOwner, null);
+ assertProblems(
+ "Unexpected problems",
+ "----------\n" +
+ "1. WARNING in /bug/src/test/Application.java (at line 3)\n" +
+ " import java.io.*;\n" +
+ " ^^^^^^^\n" +
+ "The import java.io is never used\n" +
+ "----------\n" +
+ "2. WARNING in /bug/src/test/Application.java (at line 4)\n" +
+ " import java.net.*;\n" +
+ " ^^^^^^^^\n" +
+ "The import java.net is never used\n" +
+ "----------\n" +
+ "3. WARNING in /bug/src/test/Application.java (at line 5)\n" +
+ " import java.util.*;\n" +
+ " ^^^^^^^^^\n" +
+ "The import java.util is never used\n" +
+ "----------\n" +
+ "4. WARNING in /bug/src/test/Application.java (at line 7)\n" +
+ " import test.platform.*;\n" +
+ " ^^^^^^^^^^^^^\n" +
+ "The import test.platform is never used\n" +
+ "----------\n",
+ this.problemRequestor);
+ // introduce error:
+ String testSourceEdited =
+ "package test;\n" +
+ "\n" +
+ "import java.io.*;\n" +
+ "import java.net.*;\n" +
+ "import java.util.*;\n" +
+ "\n" +
+ "import test.platform.*;\n" +
+ "\n" +
+ "public interface Application extends Foo\n" +
+ "{\n" +
+ "}\n";
+ editFile(testPath, testSourceEdited);
+ java10Project.getProject().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
+ IMarker[] markers = java10Project.getProject().findMarkers(null, true, IResource.DEPTH_INFINITE);
+ assertMarkers("Unexpected markers", "Foo cannot be resolved to a type", markers);
+ } finally {
+ if (java10Project != null)
+ deleteProject(java10Project);
+ }
+ }
+
protected void assertNoErrors() throws CoreException {
for (IProject p : getWorkspace().getRoot().getProjects()) {
int maxSeverity = p.findMaxProblemSeverity(null, true, IResource.DEPTH_INFINITE);
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests9.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests9.java
index 1af2c2f..2252632 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests9.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ResolveTests9.java
@@ -404,7 +404,11 @@
test.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
IMarker[] markers = test.getProject().findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
sortMarkers(markers);
- assertMarkers("Unexpected markers", "The package p1.p2 conflicts with a package accessible from another module: mod", markers);
+ assertMarkers("Unexpected markers",
+ "The package p1.p2 conflicts with a package accessible from another module: mod\n" +
+ "The package p1.p2 is accessible from more than one module: <unnamed>, mod\n" +
+ "The package p1.p2 is accessible from more than one module: <unnamed>, mod",
+ markers);
ICompilationUnit unit = getCompilationUnit("Test/src/q/Main.java");
diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java
index e0d0955..4a8587c 100644
--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java
+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/TypeHierarchyTests.java
@@ -3076,4 +3076,190 @@
if (javaProject2 != null) deleteProject(javaProject2);
}
}
+
+public void testBug541217() throws CoreException {
+ if (!isJRE9) return;
+ IJavaProject javaProject1 = null;
+ try {
+ javaProject1 = createJava9Project("mod1");
+ String packA = "/mod1/src/a/";
+ createFolder(packA);
+ createFile(packA + "A.java",
+ "package a;\n" +
+ "public interface A extends java.sql.Driver{\n"+
+ "}\n");
+ createFile("/mod1/src/module-info.java",
+ "module mod1 {\n" +
+ " requires java.sql;\n"+
+ " exports a;\n"+
+ "}\n");
+
+ waitUntilIndexesReady();
+
+ IType focus = javaProject1.findType("java.sql.Driver");
+ ITypeHierarchy hierarchy = focus.newTypeHierarchy(null);
+ IType[] allSubTypes = hierarchy.getAllSubtypes(focus);
+ assertTypesEqual("Incorrect sub hierarchy",
+ "a.A\n",
+ allSubTypes,
+ true);
+ } finally{
+ if (javaProject1 != null) deleteProject(javaProject1);
+ }
+}
+public void testBug425111() throws Exception {
+ IJavaProject javaProject1 = null;
+ try {
+ javaProject1 = createJavaProject("P1", new String[] {"src"}, new String[] {"JCL18_FULL", "/P1/lib.jar"},"bin", "1.8");
+
+ createLibrary(javaProject1, "lib.jar", "lib-src.zip",
+ new String[] {
+ "javax/tools/JavaFileManager.java",
+ "package javax.tools;\n" +
+ "public interface JavaFileManager extends AutoCloseable {}\n",
+ "javax/tools/ForwardingJavaFileManager.java",
+ "package javax.tools;\n" +
+ "public class ForwardingJavaFileManager<M extends JavaFileManager> implements JavaFileManager {\n" +
+ " public void close() {}\n" +
+ "}\n"
+ },
+ null,
+ "1.8");
+ createFolder("/P1/src/p1");
+ createFile("/P1/src/p1/T.java",
+ "package p1;\n" +
+ "import javax.tools.*;\n" +
+ "public class T {\n" +
+ " Object test() {\n" +
+ " return new ForwardingJavaFileManager<JavaFileManager>(null) {\n" +
+ " }\n" +
+ " }\n" +
+ "}\n");
+ waitUntilIndexesReady();
+ IType focus = javaProject1.findType("java.lang.AutoCloseable");
+ ITypeHierarchy hierarchy = focus.newTypeHierarchy(null);
+ IType[] allSubTypes = hierarchy.getAllSubtypes(focus);
+ assertTypesEqual("Incorrect sub hierarchy",
+ "java.io.BufferedInputStream\n" +
+ "java.io.BufferedOutputStream\n" +
+ "java.io.BufferedReader\n" +
+ "java.io.BufferedWriter\n" +
+ "java.io.ByteArrayInputStream\n" +
+ "java.io.ByteArrayOutputStream\n" +
+ "java.io.CharArrayReader\n" +
+ "java.io.CharArrayWriter\n" +
+ "java.io.Closeable\n" +
+ "java.io.DataInputStream\n" +
+ "java.io.DataOutputStream\n" +
+ "java.io.FileInputStream\n" +
+ "java.io.FileOutputStream\n" +
+ "java.io.FileReader\n" +
+ "java.io.FileWriter\n" +
+ "java.io.FilterInputStream\n" +
+ "java.io.FilterOutputStream\n" +
+ "java.io.FilterReader\n" +
+ "java.io.FilterWriter\n" +
+ "java.io.InputStream\n" +
+ "java.io.InputStreamReader\n" +
+ "java.io.LineNumberInputStream\n" +
+ "java.io.LineNumberReader\n" +
+ "java.io.ObjectInput\n" +
+ "java.io.ObjectInputStream\n" +
+ "java.io.ObjectOutput\n" +
+ "java.io.ObjectOutputStream\n" +
+ "java.io.OutputStream\n" +
+ "java.io.OutputStreamWriter\n" +
+ "java.io.PipedInputStream\n" +
+ "java.io.PipedOutputStream\n" +
+ "java.io.PipedReader\n" +
+ "java.io.PipedWriter\n" +
+ "java.io.PrintStream\n" +
+ "java.io.PrintWriter\n" +
+ "java.io.PushbackInputStream\n" +
+ "java.io.PushbackReader\n" +
+ "java.io.RandomAccessFile\n" +
+ "java.io.Reader\n" +
+ "java.io.SequenceInputStream\n" +
+ "java.io.StringBufferInputStream\n" +
+ "java.io.StringReader\n" +
+ "java.io.StringWriter\n" +
+ "java.io.Writer\n" +
+ "java.net.DatagramSocket\n" +
+ "java.net.FactoryURLClassLoader\n" +
+ "java.net.MulticastSocket\n" +
+ "java.net.ServerSocket\n" +
+ "java.net.Socket\n" +
+ "java.net.SocketInputStream\n" +
+ "java.net.SocketOutputStream\n" +
+ "java.net.URLClassLoader\n" +
+ "java.nio.channels.AsynchronousByteChannel\n" +
+ "java.nio.channels.AsynchronousChannel\n" +
+ "java.nio.channels.AsynchronousFileChannel\n" +
+ "java.nio.channels.AsynchronousServerSocketChannel\n" +
+ "java.nio.channels.AsynchronousSocketChannel\n" +
+ "java.nio.channels.ByteChannel\n" +
+ "java.nio.channels.Channel\n" +
+ "java.nio.channels.DatagramChannel\n" +
+ "java.nio.channels.FileChannel\n" +
+ "java.nio.channels.FileLock\n" +
+ "java.nio.channels.GatheringByteChannel\n" +
+ "java.nio.channels.InterruptibleChannel\n" +
+ "java.nio.channels.MulticastChannel\n" +
+ "java.nio.channels.NetworkChannel\n" +
+ "java.nio.channels.Pipe$SinkChannel\n" +
+ "java.nio.channels.Pipe$SourceChannel\n" +
+ "java.nio.channels.ReadableByteChannel\n" +
+ "java.nio.channels.ScatteringByteChannel\n" +
+ "java.nio.channels.SeekableByteChannel\n" +
+ "java.nio.channels.SelectableChannel\n" +
+ "java.nio.channels.Selector\n" +
+ "java.nio.channels.ServerSocketChannel\n" +
+ "java.nio.channels.SocketChannel\n" +
+ "java.nio.channels.WritableByteChannel\n" +
+ "java.nio.channels.spi.AbstractInterruptibleChannel\n" +
+ "java.nio.channels.spi.AbstractSelectableChannel\n" +
+ "java.nio.channels.spi.AbstractSelector\n" +
+ "java.nio.file.WatchService\n" +
+ "java.security.DigestInputStream\n" +
+ "java.security.DigestOutputStream\n" +
+ "java.sql.CallableStatement\n" +
+ "java.sql.Connection\n" +
+ "java.sql.PreparedStatement\n" +
+ "java.sql.ResultSet\n" +
+ "java.sql.Statement\n" +
+ "java.util.Formatter\n" +
+ "java.util.Scanner\n" +
+ "java.util.jar.JarFile\n" +
+ "java.util.jar.JarInputStream\n" +
+ "java.util.jar.JarOutputStream\n" +
+ "java.util.stream.AbstractPipeline\n" +
+ "java.util.stream.BaseStream\n" +
+ "java.util.stream.DoublePipeline\n" +
+ "java.util.stream.DoubleStream\n" +
+ "java.util.stream.IntPipeline\n" +
+ "java.util.stream.IntStream\n" +
+ "java.util.stream.LongPipeline\n" +
+ "java.util.stream.LongStream\n" +
+ "java.util.stream.ReferencePipeline\n" +
+ "java.util.stream.Stream\n" +
+ "java.util.zip.CheckedInputStream\n" +
+ "java.util.zip.CheckedOutputStream\n" +
+ "java.util.zip.DeflaterInputStream\n" +
+ "java.util.zip.DeflaterOutputStream\n" +
+ "java.util.zip.GZIPInputStream\n" +
+ "java.util.zip.GZIPOutputStream\n" +
+ "java.util.zip.InflaterInputStream\n" +
+ "java.util.zip.InflaterOutputStream\n" +
+ "java.util.zip.ZipFile\n" +
+ "java.util.zip.ZipInputStream\n" +
+ "java.util.zip.ZipOutputStream\n" +
+ "javax.tools.ForwardingJavaFileManager\n" +
+ "javax.tools.JavaFileManager\n" +
+ "p1.T$1\n",
+ allSubTypes,
+ true);
+ } finally {
+ if (javaProject1 != null) deleteProject(javaProject1);
+ }
+}
}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test419/A_in.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test419/A_in.java
deleted file mode 100644
index 046da35..0000000
--- a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test419/A_in.java
+++ /dev/null
@@ -1,11 +0,0 @@
-public class A {
- private static final String EMPID_TEMPLATE =
- "<?xml version =\"1.0\"?>\r\n" +
- "<Request name=\"IAT.GetEmployee\">\r\n" +
- " <Input>\r\n" +
- " <DEMOREC1>\r\n" +
- " <EMPID>0</EMPID>\r\n" +
- " </DEMOREC1>\r\n" +
- " </Input>\r\n" +
- "</Request>";
-}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test419/A_out.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test419/A_out.java
deleted file mode 100644
index 50f5adc..0000000
--- a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test419/A_out.java
+++ /dev/null
@@ -1,11 +0,0 @@
-public class A {
- private static final String EMPID_TEMPLATE =
- "<?xml version =\"1.0\"?>\r\n"
- + "<Request name=\"IAT.GetEmployee\">\r\n"
- + " <Input>\r\n"
- + " <DEMOREC1>\r\n"
- + " <EMPID>0</EMPID>\r\n"
- + " </DEMOREC1>\r\n"
- + " </Input>\r\n"
- + "</Request>";
-}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test420/A_in.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test420/A_in.java
deleted file mode 100644
index bfd640d..0000000
--- a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test420/A_in.java
+++ /dev/null
@@ -1,5 +0,0 @@
-public class A
-{
- private static final UnsupportedOperationException exception = new UnsupportedOperationException();
- protected Object m_snapshotDate = null; //null indicates that its not snapshot view
-}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test420/A_out.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test420/A_out.java
deleted file mode 100644
index ab33eca..0000000
--- a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test420/A_out.java
+++ /dev/null
@@ -1,4 +0,0 @@
-public class A {
- private static final UnsupportedOperationException exception = new UnsupportedOperationException();
- protected Object m_snapshotDate = null; //null indicates that its not snapshot view
-}
\ No newline at end of file
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/A_out.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/A_out.java
new file mode 100644
index 0000000..e0f117b
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/A_out.java
@@ -0,0 +1,22 @@
+class C {
+
+ boolean firstIsGreater = 11111111 + 22222222 + 33333333 + 44444444
+ + 55555555 + 66666666 > 1.11111111 *
+ 2.22222222 *
+ 3.33333333 *
+ 4.44444444 *
+ 5.55555555 *
+ 6.66666666;
+
+ String concatenatedString = "one two three four " + "five six seven eight "
+ + "nine ten eleven twelve";
+
+ int shiftedInteger = 0xCAFEFACE >>> 0x00000001 >>> 0x00000002 << 0x00000003 >>> 0x00000004;
+
+ int bitAritmetic = 0xCAFEFACE
+ | 0x01010101 & 0x02020202 ^ 0x03030303 ^ 0x04040404 | 0x05050505;
+
+ boolean multipleConditions = conditionOne && conditionTwo
+ || conditionThree && conditionFour || conditionFive;
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/B_out.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/B_out.java
new file mode 100644
index 0000000..f0d4897
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/B_out.java
@@ -0,0 +1,22 @@
+class C {
+
+ boolean firstIsGreater = 11111111 +
+ 22222222 +
+ 33333333 +
+ 44444444 +
+ 55555555 +
+ 66666666 > 1.11111111 * 2.22222222 * 3.33333333
+ * 4.44444444 * 5.55555555 * 6.66666666;
+
+ String concatenatedString = "one two three four " + "five six seven eight "
+ + "nine ten eleven twelve";
+
+ int shiftedInteger = 0xCAFEFACE >>> 0x00000001 >>> 0x00000002 << 0x00000003 >>> 0x00000004;
+
+ int bitAritmetic = 0xCAFEFACE
+ | 0x01010101 & 0x02020202 ^ 0x03030303 ^ 0x04040404 | 0x05050505;
+
+ boolean multipleConditions = conditionOne && conditionTwo
+ || conditionThree && conditionFour || conditionFive;
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/C_out.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/C_out.java
new file mode 100644
index 0000000..c58f223
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/C_out.java
@@ -0,0 +1,19 @@
+class C {
+
+ boolean firstIsGreater = 11111111 + 22222222 + 33333333 + 44444444
+ + 55555555 + 66666666 > 1.11111111 * 2.22222222 * 3.33333333
+ * 4.44444444 * 5.55555555 * 6.66666666;
+
+ String concatenatedString = "one two three four " +
+ "five six seven eight " +
+ "nine ten eleven twelve";
+
+ int shiftedInteger = 0xCAFEFACE >>> 0x00000001 >>> 0x00000002 << 0x00000003 >>> 0x00000004;
+
+ int bitAritmetic = 0xCAFEFACE
+ | 0x01010101 & 0x02020202 ^ 0x03030303 ^ 0x04040404 | 0x05050505;
+
+ boolean multipleConditions = conditionOne && conditionTwo
+ || conditionThree && conditionFour || conditionFive;
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/D_out.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/D_out.java
new file mode 100644
index 0000000..8f192d7
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/D_out.java
@@ -0,0 +1,22 @@
+class C {
+
+ boolean firstIsGreater = 11111111 + 22222222 + 33333333 + 44444444
+ + 55555555 + 66666666 > 1.11111111 * 2.22222222 * 3.33333333
+ * 4.44444444 * 5.55555555 * 6.66666666;
+
+ String concatenatedString = "one two three four " + "five six seven eight "
+ + "nine ten eleven twelve";
+
+ int shiftedInteger = 0xCAFEFACE >>>
+ 0x00000001 >>>
+ 0x00000002 <<
+ 0x00000003 >>>
+ 0x00000004;
+
+ int bitAritmetic = 0xCAFEFACE
+ | 0x01010101 & 0x02020202 ^ 0x03030303 ^ 0x04040404 | 0x05050505;
+
+ boolean multipleConditions = conditionOne && conditionTwo
+ || conditionThree && conditionFour || conditionFive;
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/E_out.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/E_out.java
new file mode 100644
index 0000000..26cc8d1
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/E_out.java
@@ -0,0 +1,19 @@
+class C {
+
+ boolean firstIsGreater = 11111111 + 22222222 + 33333333 + 44444444
+ + 55555555 + 66666666 >
+ 1.11111111 * 2.22222222 * 3.33333333
+ * 4.44444444 * 5.55555555 * 6.66666666;
+
+ String concatenatedString = "one two three four " + "five six seven eight "
+ + "nine ten eleven twelve";
+
+ int shiftedInteger = 0xCAFEFACE >>> 0x00000001 >>> 0x00000002 << 0x00000003 >>> 0x00000004;
+
+ int bitAritmetic = 0xCAFEFACE
+ | 0x01010101 & 0x02020202 ^ 0x03030303 ^ 0x04040404 | 0x05050505;
+
+ boolean multipleConditions = conditionOne && conditionTwo
+ || conditionThree && conditionFour || conditionFive;
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/F_out.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/F_out.java
new file mode 100644
index 0000000..f07ec12
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/F_out.java
@@ -0,0 +1,22 @@
+class C {
+
+ boolean firstIsGreater = 11111111 + 22222222 + 33333333 + 44444444
+ + 55555555 + 66666666 > 1.11111111 * 2.22222222 * 3.33333333
+ * 4.44444444 * 5.55555555 * 6.66666666;
+
+ String concatenatedString = "one two three four " + "five six seven eight "
+ + "nine ten eleven twelve";
+
+ int shiftedInteger = 0xCAFEFACE >>> 0x00000001 >>> 0x00000002 << 0x00000003 >>> 0x00000004;
+
+ int bitAritmetic = 0xCAFEFACE |
+ 0x01010101 &
+ 0x02020202 ^
+ 0x03030303 ^
+ 0x04040404 |
+ 0x05050505;
+
+ boolean multipleConditions = conditionOne && conditionTwo
+ || conditionThree && conditionFour || conditionFive;
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/G_out.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/G_out.java
new file mode 100644
index 0000000..7bdd701
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/G_out.java
@@ -0,0 +1,21 @@
+class C {
+
+ boolean firstIsGreater = 11111111 + 22222222 + 33333333 + 44444444
+ + 55555555 + 66666666 > 1.11111111 * 2.22222222 * 3.33333333
+ * 4.44444444 * 5.55555555 * 6.66666666;
+
+ String concatenatedString = "one two three four " + "five six seven eight "
+ + "nine ten eleven twelve";
+
+ int shiftedInteger = 0xCAFEFACE >>> 0x00000001 >>> 0x00000002 << 0x00000003 >>> 0x00000004;
+
+ int bitAritmetic = 0xCAFEFACE
+ | 0x01010101 & 0x02020202 ^ 0x03030303 ^ 0x04040404 | 0x05050505;
+
+ boolean multipleConditions = conditionOne &&
+ conditionTwo ||
+ conditionThree &&
+ conditionFour ||
+ conditionFive;
+
+}
diff --git a/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/in.java b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/in.java
new file mode 100644
index 0000000..0de7ba9
--- /dev/null
+++ b/org.eclipse.jdt.core.tests.model/workspace/Formatter/test543079/in.java
@@ -0,0 +1,17 @@
+class C {
+
+boolean firstIsGreater = 11111111 + 22222222 +
+33333333 + 44444444 + 55555555 + 66666666
+>
+1.11111111 * 2.22222222 * 3.33333333
+* 4.44444444 * 5.55555555 * 6.66666666;
+
+String concatenatedString = "one two three four " + "five six seven eight " + "nine ten eleven twelve";
+
+int shiftedInteger = 0xCAFEFACE >>> 0x00000001 >>> 0x00000002 << 0x00000003 >>> 0x00000004;
+
+int bitAritmetic = 0xCAFEFACE | 0x01010101 & 0x02020202 ^ 0x03030303 ^ 0x04040404 | 0x05050505;
+
+boolean multipleConditions = conditionOne && conditionTwo || conditionThree && conditionFour || conditionFive;
+
+}
diff --git a/org.eclipse.jdt.core.tests.performance/pom.xml b/org.eclipse.jdt.core.tests.performance/pom.xml
index 6c65176..d982596 100644
--- a/org.eclipse.jdt.core.tests.performance/pom.xml
+++ b/org.eclipse.jdt.core.tests.performance/pom.xml
@@ -15,7 +15,7 @@
<parent>
<artifactId>tests-pom</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
<relativePath>../tests-pom/</relativePath>
</parent>
<groupId>org.eclipse.jdt</groupId>
diff --git a/org.eclipse.jdt.core/META-INF/MANIFEST.MF b/org.eclipse.jdt.core/META-INF/MANIFEST.MF
index da4229a..2ee2f7d 100644
--- a/org.eclipse.jdt.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.core/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.core; singleton:=true
-Bundle-Version: 3.16.0.qualifier
+Bundle-Version: 3.17.0.qualifier
Bundle-Activator: org.eclipse.jdt.core.JavaCore
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
index 2facfe9..efaeccd 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java
@@ -500,6 +500,8 @@
/** @since 3.11 */
int ExceptionParameterIsNeverUsed = Internal + 85;
+ /** @since 3.17 */
+ int BytecodeExceeds64KLimitForSwitchTable = Internal + 86;
// variable hiding
/** @since 3.0 */
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
index 3641ca2..b15d81a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
@@ -71,6 +71,7 @@
import org.eclipse.jdt.internal.compiler.ast.RequiresStatement;
import org.eclipse.jdt.internal.compiler.ast.SingleMemberAnnotation;
import org.eclipse.jdt.internal.compiler.ast.SingleNameReference;
+import org.eclipse.jdt.internal.compiler.ast.SwitchStatement;
import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
import org.eclipse.jdt.internal.compiler.ast.TypeParameter;
import org.eclipse.jdt.internal.compiler.ast.TypeReference;
@@ -1355,6 +1356,13 @@
generateCodeAttributeHeader();
this.codeStream.init(this);
this.codeStream.generateSyntheticBodyForSwitchTable(methodBinding);
+ int code_length = this.codeStream.position;
+ if (code_length > 65535) {
+ SwitchStatement switchStatement = methodBinding.switchStatement;
+ if (switchStatement != null) {
+ switchStatement.scope.problemReporter().bytecodeExceeds64KLimit(switchStatement);
+ }
+ }
completeCodeAttributeForSyntheticMethod(
true,
methodBinding,
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
index 5f10496..7d70b9a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -120,7 +120,7 @@
int typeStart = packageBinding == null ? 0 : packageBinding.compoundName.length;
if (packageBinding != null) {
- PackageBinding uniquePackage = packageBinding.getVisibleFor(scope.module());
+ PackageBinding uniquePackage = packageBinding.getVisibleFor(scope.module(), false);
if (uniquePackage instanceof SplitPackageBinding) {
SplitPackageBinding splitPackage = (SplitPackageBinding) uniquePackage;
scope.problemReporter().conflictingPackagesFromModules(splitPackage, this.sourceStart, (int)this.sourcePositions[typeStart-1]);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
index 2e80089..c3e40ca 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
@@ -148,7 +148,7 @@
final TypeBinding resolvedTypeBinding = this.expression.resolvedType;
if (resolvedTypeBinding.isEnum()) {
final SourceTypeBinding sourceTypeBinding = currentScope.classScope().referenceContext.binding;
- this.synthetic = sourceTypeBinding.addSyntheticMethodForSwitchEnum(resolvedTypeBinding);
+ this.synthetic = sourceTypeBinding.addSyntheticMethodForSwitchEnum(resolvedTypeBinding, this);
}
// if no default case, then record it may jump over the block directly to the end
if (this.defaultCase == null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
index a8e5bd2..3c24b42 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -502,7 +502,7 @@
PackageBinding packageBinding = (PackageBinding) binding;
while (currentIndex < length) {
unitScope.recordReference(packageBinding.compoundName, compoundName[currentIndex]);
- binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++], module());
+ binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++], module(), currentIndex<length);
invocationSite.setFieldIndex(currentIndex);
if (binding == null) {
if (currentIndex == length) {
@@ -648,7 +648,7 @@
foundType : if (binding instanceof PackageBinding) {
while (currentIndex < length) {
PackageBinding packageBinding = (PackageBinding) binding;
- binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++], module());
+ binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++], module(), currentIndex<length);
if (binding == null) {
if (currentIndex == length) {
// must be a type if its the last name, otherwise we have no idea if its a package or type
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
index ea2b900..aee95e6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -424,7 +424,7 @@
continue nextImport;
}
if (importBinding instanceof PackageBinding) {
- PackageBinding uniquePackage = ((PackageBinding)importBinding).getVisibleFor(module());
+ PackageBinding uniquePackage = ((PackageBinding)importBinding).getVisibleFor(module(), false);
if (uniquePackage instanceof SplitPackageBinding) {
SplitPackageBinding splitPackage = (SplitPackageBinding) uniquePackage;
problemReporter().conflictingPackagesFromModules(splitPackage, importReference.sourceStart, importReference.sourceEnd);
@@ -438,6 +438,12 @@
recordImportBinding(new ImportBinding(compoundName, true, importBinding, importReference));
} else {
Binding importBinding = findSingleImport(compoundName, Binding.TYPE | Binding.FIELD | Binding.METHOD, importReference.isStatic());
+ if (importBinding instanceof SplitPackageBinding) {
+ SplitPackageBinding splitPackage = (SplitPackageBinding) importBinding;
+ int sourceEnd = (int)(importReference.sourcePositions[splitPackage.compoundName.length-1] & 0xFFFF);
+ problemReporter().conflictingPackagesFromModules((SplitPackageBinding) importBinding, importReference.sourceStart, sourceEnd);
+ continue nextImport;
+ }
if (!importBinding.isValidBinding()) {
if (importBinding.problemId() == ProblemReasons.Ambiguous) {
// keep it unless a duplicate can be found below
@@ -462,7 +468,7 @@
// re-get to find a possible split package:
importedPackage = (PackageBinding) findImport(importedPackage.compoundName, false, true);
if (importedPackage != null)
- importedPackage = importedPackage.getVisibleFor(module());
+ importedPackage = importedPackage.getVisibleFor(module(), true);
if (importedPackage instanceof SplitPackageBinding) {
SplitPackageBinding splitPackage = (SplitPackageBinding) importedPackage;
int sourceEnd = (int) importReference.sourcePositions[splitPackage.compoundName.length-1];
@@ -530,16 +536,24 @@
foundNothingOrType: if (binding != null) {
PackageBinding packageBinding = (PackageBinding) binding;
while (i < length) {
- binding = packageBinding.getTypeOrPackage(compoundName[i++], module);
+ binding = packageBinding.getTypeOrPackage(compoundName[i++], module, i<length);
if (binding instanceof ReferenceBinding && binding.problemId() == ProblemReasons.NotAccessible) {
return this.environment.convertToRawType((TypeBinding) binding, false /*do not force conversion of enclosing types*/);
}
- if (binding == null || !binding.isValidBinding()) {
+ if (binding == null) {
+ break foundNothingOrType;
+ } else if (!binding.isValidBinding()) {
+ if (binding.problemId() == ProblemReasons.Ambiguous && packageBinding instanceof SplitPackageBinding)
+ return packageBinding; // pass the split package to the caller so they can report conflictingPackagesFromModules()
binding = null;
break foundNothingOrType;
}
- if (!(binding instanceof PackageBinding))
+ if (!(binding instanceof PackageBinding)) {
+ PackageBinding visibleFor = packageBinding.getVisibleFor(module, false); // filter out empty parent-packages
+ if (visibleFor instanceof SplitPackageBinding)
+ return visibleFor;
break foundNothingOrType;
+ }
packageBinding = (PackageBinding) binding;
}
@@ -597,7 +611,7 @@
char[] name = compoundName[compoundName.length - 1];
if (binding instanceof PackageBinding) {
- Binding temp = ((PackageBinding) binding).getTypeOrPackage(name, module());
+ Binding temp = ((PackageBinding) binding).getTypeOrPackage(name, module(), false);
if (temp != null && temp instanceof ReferenceBinding) // must resolve to a member type or field, not a top level type
return new ProblemReferenceBinding(compoundName, (ReferenceBinding) temp, ProblemReasons.InvalidTypeForStaticImport);
return binding; // cannot be a package, error is caught in sender
@@ -653,7 +667,7 @@
Binding importBinding = this.environment.getTopLevelPackage(TypeConstants.JAVA);
if (importBinding != null)
- importBinding = ((PackageBinding) importBinding).getTypeOrPackage(TypeConstants.JAVA_LANG[1], module());
+ importBinding = ((PackageBinding) importBinding).getTypeOrPackage(TypeConstants.JAVA_LANG[1], module(), false);
if (importBinding == null || !importBinding.isValidBinding()) {
// create a proxy for the missing BinaryType
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintTypeFormula.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintTypeFormula.java
index 63cfb33..830ca76 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintTypeFormula.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ConstraintTypeFormula.java
@@ -335,7 +335,7 @@
}
if (superCandidate instanceof CaptureBinding) {
CaptureBinding capture = (CaptureBinding) superCandidate;
- if (capture.lowerBound != null && (capture.firstBound == null || capture.firstBound.id == TypeIds.T_JavaLangObject))
+ if (capture.lowerBound != null)
return ConstraintTypeFormula.create(subCandidate, capture.lowerBound, SUBTYPE, this.isSoft);
}
return FALSE;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
index 7c37358..e06463c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java
@@ -1441,6 +1441,21 @@
* assuming C is a type in both cases. In the a.b.C.D.E case, null is the answer.
*/
public ReferenceBinding getCachedType(char[][] compoundName) {
+ ReferenceBinding result = getCachedType0(compoundName);
+ if (result == null && this.useModuleSystem) {
+ ModuleBinding[] modulesToSearch = this.module.isUnnamed() || this.module.isAuto
+ ? this.root.knownModules.valueTable
+ : this.module.getAllRequiredModules();
+ for (ModuleBinding someModule : modulesToSearch) {
+ if (someModule == null) continue;
+ result = someModule.environment.getCachedType0(compoundName);
+ if (result != null && result.isValidBinding())
+ break;
+ }
+ }
+ return result;
+}
+public ReferenceBinding getCachedType0(char[][] compoundName) {
if (compoundName.length == 1) {
return this.defaultPackage.getType0(compoundName[0]);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java
index 1b3011c..d7d4555 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/PackageBinding.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -233,7 +233,7 @@
* THIS SHOULD ONLY BE USED BY SOURCE TYPES/SCOPES.
*/
-public Binding getTypeOrPackage(char[] name, ModuleBinding mod) {
+public Binding getTypeOrPackage(char[] name, ModuleBinding mod, boolean splitPackageAllowed) {
ReferenceBinding problemBinding = null;
ReferenceBinding referenceBinding = getType0(name);
lookForType0:
@@ -255,6 +255,9 @@
PackageBinding packageBinding = getPackage0(name);
if (packageBinding != null && packageBinding != LookupEnvironment.TheNotFoundPackage) {
+ if (!splitPackageAllowed && packageBinding instanceof SplitPackageBinding) {
+ return ((SplitPackageBinding) packageBinding).getVisibleFor(mod, false);
+ }
return packageBinding;
}
lookForType:
@@ -278,6 +281,9 @@
if (packageBinding == null) { // have not looked for it before
if ((packageBinding = findPackage(name, mod)) != null) {
+ if (!splitPackageAllowed && packageBinding instanceof SplitPackageBinding) {
+ return ((SplitPackageBinding) packageBinding).getVisibleFor(mod, false);
+ }
return packageBinding;
}
if (referenceBinding != null && referenceBinding != LookupEnvironment.TheNotFoundType) {
@@ -430,7 +436,7 @@
* In case of multiple accessible foreign packages a SplitPackageBinding is returned
* to indicate a conflict.
*/
-public PackageBinding getVisibleFor(ModuleBinding module) {
+public PackageBinding getVisibleFor(ModuleBinding module, boolean preferLocal) {
return this;
}
public boolean hasCompilationUnit(boolean checkCUs) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
index c4b6a82..438ab5a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java
@@ -1208,10 +1208,15 @@
this.tagBits |= resolvedType.tagBits & TagBits.ContainsNestedTypeReferences;
if (this.arguments != null) {
int argLength = this.arguments.length;
+ if ((this.type.tagBits & TagBits.HasMissingType) == 0) {
+ this.tagBits &= ~TagBits.HasMissingType; // start from fresh and collect information anew
+ if (this.enclosingType != null)
+ this.tagBits |= this.enclosingType.tagBits & TagBits.HasMissingType;
+ }
for (int i = 0; i < argLength; i++) {
TypeBinding resolveType = BinaryTypeBinding.resolveType(this.arguments[i], this.environment, true /* raw conversion */);
this.arguments[i] = resolveType;
- this.tagBits |= resolvedType.tagBits & TagBits.ContainsNestedTypeReferences;
+ this.tagBits |= resolvedType.tagBits & (TagBits.ContainsNestedTypeReferences | TagBits.HasMissingType);
}
/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=186565, Removed generic check
and arity check since we are dealing with binary types here and the fact that
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
index 28ef21f..3734dd5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -2977,7 +2977,7 @@
int currentIndex = 1, length = compoundName.length;
PackageBinding packageBinding = (PackageBinding) binding;
while (currentIndex < length) {
- binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++], module());
+ binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++], module(), currentIndex<length);
if (binding == null) {
return new ProblemReferenceBinding(CharOperation.subarray(compoundName, 0, currentIndex), null /* no closest match since search for pkg*/, ProblemReasons.NotFound);
}
@@ -3048,7 +3048,7 @@
if (packageBinding == null)
return getType(name);
- Binding binding = packageBinding.getTypeOrPackage(name, module());
+ Binding binding = packageBinding.getTypeOrPackage(name, module(), false);
if (binding == null) {
return new ProblemReferenceBinding(
CharOperation.arrayConcat(packageBinding.compoundName, name),
@@ -3104,7 +3104,7 @@
if (binding instanceof PackageBinding) {
PackageBinding packageBinding = (PackageBinding) binding;
while (currentIndex < typeNameLength) {
- binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++], module()); // does not check visibility
+ binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++], module(), currentIndex<typeNameLength); // does not check visibility
if (binding == null) {
char[][] qName = CharOperation.subarray(compoundName, 0, currentIndex);
return new ProblemReferenceBinding(
@@ -3325,7 +3325,7 @@
// check if the name is in the current package, skip it if its a sub-package
PackageBinding currentPackage = unitScope.fPackage;
unitScope.recordReference(currentPackage.compoundName, name);
- Binding binding = currentPackage.getTypeOrPackage(name, module());
+ Binding binding = currentPackage.getTypeOrPackage(name, module(), false);
if (binding instanceof ReferenceBinding) {
ReferenceBinding referenceType = (ReferenceBinding) binding;
if ((referenceType.tagBits & TagBits.HasMissingType) == 0) {
@@ -3441,7 +3441,7 @@
PackageBinding packageBinding = (PackageBinding) binding;
while (currentIndex < nameLength) {
- binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++], module());
+ binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++], module(), currentIndex<nameLength);
if (binding == null)
return new ProblemReferenceBinding(
CharOperation.subarray(compoundName, 0, currentIndex),
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
index e280b33..79ad44f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
@@ -69,6 +69,7 @@
import org.eclipse.jdt.internal.compiler.ast.LambdaExpression;
import org.eclipse.jdt.internal.compiler.ast.MethodDeclaration;
import org.eclipse.jdt.internal.compiler.ast.ReferenceExpression;
+import org.eclipse.jdt.internal.compiler.ast.SwitchStatement;
import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
import org.eclipse.jdt.internal.compiler.ast.TypeParameter;
import org.eclipse.jdt.internal.compiler.ast.TypeReference;
@@ -568,7 +569,7 @@
/* Add a new synthetic method the enum type. Selector can either be 'values' or 'valueOf'.
* char[] constants from TypeConstants must be used: TypeConstants.VALUES/VALUEOF
*/
-public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding) {
+public SyntheticMethodBinding addSyntheticMethodForSwitchEnum(TypeBinding enumBinding, SwitchStatement switchStatement) {
if (!isPrototype()) throw new IllegalStateException();
if (this.synthetics == null)
this.synthetics = new HashMap[MAX_SYNTHETICS];
@@ -584,13 +585,13 @@
if (accessors == null) {
// then create the synthetic method
final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key);
- accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector);
+ accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector, switchStatement);
this.synthetics[SourceTypeBinding.METHOD_EMUL].put(key, accessors = new SyntheticMethodBinding[2]);
accessors[0] = accessMethod;
} else {
if ((accessMethod = accessors[0]) == null) {
final SyntheticFieldBinding fieldBinding = addSyntheticFieldForSwitchEnum(selector, key);
- accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector);
+ accessMethod = new SyntheticMethodBinding(fieldBinding, this, enumBinding, selector, switchStatement);
accessors[0] = accessMethod;
}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SplitPackageBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SplitPackageBinding.java
index ee2f191..47221fe 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SplitPackageBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SplitPackageBinding.java
@@ -213,14 +213,14 @@
@Override
ReferenceBinding getType0(char[] name) {
ReferenceBinding knownType = super.getType0(name);
- if (knownType != null)
+ if (knownType != null && !(knownType instanceof UnresolvedReferenceBinding))
return knownType;
ReferenceBinding candidate = null;
for (PackageBinding incarnation : this.incarnations) {
ReferenceBinding next = incarnation.getType0(name);
if (next != null) {
- if (next.isValidBinding()) {
+ if (next.isValidBinding() && !(knownType instanceof UnresolvedReferenceBinding)) {
if (candidate != null)
return null; // unable to disambiguate without a module context
candidate = next;
@@ -268,13 +268,13 @@
}
@Override
- public PackageBinding getVisibleFor(ModuleBinding clientModule) {
+ public PackageBinding getVisibleFor(ModuleBinding clientModule, boolean preferLocal) {
int visibleCount = 0;
PackageBinding unique = null;
for (PackageBinding incarnation : this.incarnations) {
if (incarnation.hasCompilationUnit(false)) {
- if (incarnation.enclosingModule == clientModule) {
- return incarnation; // prefer local package over foreign
+ if (preferLocal && incarnation.enclosingModule == clientModule) {
+ return incarnation;
} else {
if (clientModule.canAccess(incarnation)) {
if (++visibleCount > 1)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java
index e695cda..fd03c25 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SyntheticMethodBinding.java
@@ -26,6 +26,7 @@
import org.eclipse.jdt.internal.compiler.ast.FieldDeclaration;
import org.eclipse.jdt.internal.compiler.ast.LambdaExpression;
import org.eclipse.jdt.internal.compiler.ast.ReferenceExpression;
+import org.eclipse.jdt.internal.compiler.ast.SwitchStatement;
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
public class SyntheticMethodBinding extends MethodBinding {
@@ -35,6 +36,9 @@
public MethodBinding targetMethod; // method or constructor
public TypeBinding targetEnumType; // enum type
public LambdaExpression lambda;
+
+ /** Switch (one from many) linked to the switch table */
+ public SwitchStatement switchStatement;
/**
* Method reference expression whose target FI is Serializable. Should be set when
* purpose is {@link #SerializableMethodReference}
@@ -178,7 +182,7 @@
this.sourceStart = declaringSourceType.scope.referenceContext.sourceStart; // use the target declaring class name position instead
}
- public SyntheticMethodBinding(FieldBinding targetField, ReferenceBinding declaringClass, TypeBinding enumBinding, char[] selector) {
+ public SyntheticMethodBinding(FieldBinding targetField, ReferenceBinding declaringClass, TypeBinding enumBinding, char[] selector, SwitchStatement switchStatement) {
this.modifiers = (declaringClass.isInterface() ? ClassFileConstants.AccPublic : ClassFileConstants.AccDefault) | ClassFileConstants.AccStatic | ClassFileConstants.AccSynthetic;
this.tagBits |= (TagBits.AnnotationResolved | TagBits.DeprecatedAnnotationResolved);
SourceTypeBinding declaringSourceType = (SourceTypeBinding) declaringClass;
@@ -193,7 +197,7 @@
this.purpose = SyntheticMethodBinding.SwitchTable;
this.thrownExceptions = Binding.NO_EXCEPTIONS;
this.declaringClass = declaringSourceType;
-
+ this.switchStatement = switchStatement;
if (declaringSourceType.isStrictfp()) {
this.modifiers |= ClassFileConstants.AccStrictfp;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java
index 80d1ef0..58eb392 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeSystem.java
@@ -114,7 +114,7 @@
return this.type == that.type && this.enclosingType == that.enclosingType && Util.effectivelyEqual(this.arguments, that.arguments); //$IDENTITY-COMPARISON$
}
final int hash(TypeBinding b) {
- if(b instanceof WildcardBinding || b instanceof TypeVariableBinding) {
+ if(b instanceof WildcardBinding || b instanceof TypeVariableBinding || b.getClass() == ParameterizedTypeBinding.class) {
return System.identityHashCode(b);
}
return b.hashCode();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
index 291bde5..20cc62b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java
@@ -1211,6 +1211,16 @@
location.sourceStart,
location.sourceEnd);
}
+public void bytecodeExceeds64KLimit(SwitchStatement switchStatement) {
+ TypeBinding enumType = switchStatement.expression.resolvedType;
+ this.handle(
+ IProblem.BytecodeExceeds64KLimitForSwitchTable,
+ new String[] {new String(enumType.readableName())},
+ new String[] {new String(enumType.shortReadableName())},
+ ProblemSeverities.Error | ProblemSeverities.Abort | ProblemSeverities.Fatal,
+ switchStatement.sourceStart(),
+ switchStatement.sourceEnd());
+}
public void bytecodeExceeds64KLimit(MethodBinding method, int start, int end) {
this.handle(
IProblem.BytecodeExceeds64KLimit,
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
index c0c262f..f22a49d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties
@@ -123,6 +123,7 @@
83 = {0} cannot be resolved to a variable
84 = This static method of interface {0} can only be accessed as {0}.{1}
85 = The value of the exception parameter {0} is not used
+86 = The code for the switch table on enum {0} is exceeding the 65535 bytes limit
90 = The local variable {0} is hiding another local variable defined in an enclosing scope
91 = The local variable {0} is hiding a field from type {1}
diff --git a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetScope.java b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetScope.java
index d067d4b..d829d09 100644
--- a/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetScope.java
+++ b/org.eclipse.jdt.core/eval/org/eclipse/jdt/internal/eval/CodeSnippetScope.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -455,7 +455,7 @@
PackageBinding packageBinding = (PackageBinding) binding;
while (currentIndex < length) {
- binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++], null);
+ binding = packageBinding.getTypeOrPackage(compoundName[currentIndex++], null, currentIndex<length);
invocationSite.setFieldIndex(currentIndex);
if (binding == null) {
if (currentIndex == length) // must be a type if its the last name, otherwise we have no idea if its a package or type
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java
index e663811..60fb2e7 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/core/formatter/DefaultCodeFormatterConstants.java
@@ -192,7 +192,7 @@
public static final String FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_QUALIFIED_ALLOCATION_EXPRESSION = JavaCore.PLUGIN_ID + ".formatter.alignment_for_arguments_in_qualified_allocation_expression"; //$NON-NLS-1$
/**
* <pre>
- * FORMATTER / Option for alignment of assignment
+ * FORMATTER / Option for alignment of assignment (=, +=, -=, *=, /=, %=, &=, ^=, |=, <<=, >>=, >>>=)
* - option id: "org.eclipse.jdt.core.formatter.alignment_for_assignment"
* - possible values: values returned by <code>createAlignmentValue(boolean, int, int)</code> call
* - default: createAlignmentValue(false, WRAP_NO_SPLIT, INDENT_DEFAULT)
@@ -203,13 +203,94 @@
public static final String FORMATTER_ALIGNMENT_FOR_ASSIGNMENT = JavaCore.PLUGIN_ID + ".formatter.alignment_for_assignment"; //$NON-NLS-1$
/**
* <pre>
+ * FORMATTER / Option for alignment of expressions with multiplicative operators (*, /, %)
+ * - option id: "org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator"
+ * - possible values: values returned by <code>createAlignmentValue(boolean, int, int)</code> call
+ * - default: createAlignmentValue(false, WRAP_COMPACT, INDENT_DEFAULT)
+ * </pre>
+ * @see #createAlignmentValue(boolean, int, int)
+ * @since 3.17
+ */
+ public static final String FORMATTER_ALIGNMENT_FOR_MULTIPLICATIVE_OPERATOR = JavaCore.PLUGIN_ID + ".formatter.alignment_for_multiplicative_operator"; //$NON-NLS-1$
+ /**
+ * <pre>
+ * FORMATTER / Option for alignment of expressions with additive operators (+, -)
+ * - option id: "org.eclipse.jdt.core.formatter.alignment_for_additive_operator"
+ * - possible values: values returned by <code>createAlignmentValue(boolean, int, int)</code> call
+ * - default: createAlignmentValue(false, WRAP_COMPACT, INDENT_DEFAULT)
+ * </pre>
+ * @see #createAlignmentValue(boolean, int, int)
+ * @since 3.17
+ */
+ public static final String FORMATTER_ALIGNMENT_FOR_ADDITIVE_OPERATOR = JavaCore.PLUGIN_ID + ".formatter.alignment_for_additive_operator"; //$NON-NLS-1$
+ /**
+ * <pre>
+ * FORMATTER / Option for alignment of string concatenation expressions
+ * - option id: "org.eclipse.jdt.core.formatter.alignment_for_string_concatenation"
+ * - possible values: values returned by <code>createAlignmentValue(boolean, int, int)</code> call
+ * - default: createAlignmentValue(false, WRAP_COMPACT, INDENT_DEFAULT)
+ * </pre>
+ * @see #createAlignmentValue(boolean, int, int)
+ * @since 3.17
+ */
+ public static final String FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION = JavaCore.PLUGIN_ID + ".formatter.alignment_for_string_concatenation"; //$NON-NLS-1$
+ /**
+ * <pre>
+ * FORMATTER / Option for alignment of expressions with shift operators (<<, >>, >>>)
+ * - option id: "org.eclipse.jdt.core.formatter.alignment_for_shift_operator"
+ * - possible values: values returned by <code>createAlignmentValue(boolean, int, int)</code> call
+ * - default: createAlignmentValue(false, WRAP_COMPACT, INDENT_DEFAULT)
+ * </pre>
+ * @see #createAlignmentValue(boolean, int, int)
+ * @since 3.17
+ */
+ public static final String FORMATTER_ALIGNMENT_FOR_SHIFT_OPERATOR = JavaCore.PLUGIN_ID + ".formatter.alignment_for_shift_operator"; //$NON-NLS-1$
+ /**
+ * <pre>
+ * FORMATTER / Option for alignment of expressions with relational operators (<, >, <=, >=, ==, !=)
+ * - option id: "org.eclipse.jdt.core.formatter.alignment_for_relational_operator"
+ * - possible values: values returned by <code>createAlignmentValue(boolean, int, int)</code> call
+ * - default: createAlignmentValue(false, WRAP_COMPACT, INDENT_DEFAULT)
+ * </pre>
+ * @see #createAlignmentValue(boolean, int, int)
+ * @since 3.17
+ */
+ public static final String FORMATTER_ALIGNMENT_FOR_RELATIONAL_OPERATOR = JavaCore.PLUGIN_ID + ".formatter.alignment_for_relational_operator"; //$NON-NLS-1$
+ /**
+ * <pre>
+ * FORMATTER / Option for alignment of expressions with bitwise operators (&, ^, |)
+ * - option id: "org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator"
+ * - possible values: values returned by <code>createAlignmentValue(boolean, int, int)</code> call
+ * - default: createAlignmentValue(false, WRAP_COMPACT, INDENT_DEFAULT)
+ * </pre>
+ * @see #createAlignmentValue(boolean, int, int)
+ * @since 3.17
+ */
+ public static final String FORMATTER_ALIGNMENT_FOR_BITWISE_OPERATOR = JavaCore.PLUGIN_ID + ".formatter.alignment_for_bitwise_operator"; //$NON-NLS-1$
+ /**
+ * <pre>
+ * FORMATTER / Option for alignment of expressions with logical operators (&&, ||)
+ * - option id: "org.eclipse.jdt.core.formatter.alignment_for_logical_operator"
+ * - possible values: values returned by <code>createAlignmentValue(boolean, int, int)</code> call
+ * - default: createAlignmentValue(false, WRAP_COMPACT, INDENT_DEFAULT)
+ * </pre>
+ * @see #createAlignmentValue(boolean, int, int)
+ * @since 3.17
+ */
+ public static final String FORMATTER_ALIGNMENT_FOR_LOGICAL_OPERATOR = JavaCore.PLUGIN_ID + ".formatter.alignment_for_logical_operator"; //$NON-NLS-1$
+ /**
+ * <pre>
* FORMATTER / Option for alignment of binary expression
* - option id: "org.eclipse.jdt.core.formatter.alignment_for_binary_expression"
* - possible values: values returned by <code>createAlignmentValue(boolean, int, int)</code> call
* - default: createAlignmentValue(false, WRAP_COMPACT, INDENT_DEFAULT)
* </pre>
+ *
* @see #createAlignmentValue(boolean, int, int)
* @since 3.0
+ * @deprecated Use new settings instead: {@link #FORMATTER_ALIGNMENT_FOR_MULTIPLICATIVE_OPERATOR},
+ * {@link #FORMATTER_ALIGNMENT_FOR_ADDITIVE_OPERATOR}, {@link #FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION},
+ * {@link #FORMATTER_ALIGNMENT_FOR_BITWISE_OPERATOR}, {@link #FORMATTER_ALIGNMENT_FOR_LOGICAL_OPERATOR}
*/
public static final String FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION = JavaCore.PLUGIN_ID + ".formatter.alignment_for_binary_expression"; //$NON-NLS-1$
/**
@@ -1080,9 +1161,24 @@
* </pre>
* @see #TRUE
* @see #FALSE
+ * @see #FORMATTER_COMMENT_INDENT_TAG_DESCRIPTION
* @since 3.1
*/
- public final static String FORMATTER_COMMENT_INDENT_PARAMETER_DESCRIPTION = "org.eclipse.jdt.core.formatter.comment.indent_parameter_description"; //$NON-NLS-1$
+ public static final String FORMATTER_COMMENT_INDENT_PARAMETER_DESCRIPTION = "org.eclipse.jdt.core.formatter.comment.indent_parameter_description"; //$NON-NLS-1$
+ /**
+ * <pre>
+ * FORMATTER / Option to control whether Javadoc tag descriptions are indented when wrapped,
+ * excluding tags controlled by #FORMATTER_COMMENT_INDENT_PARAMETER_DESCRIPTION
+ * - option id: "org.eclipse.jdt.core.formatter.comment.indent_return_description"
+ * - possible values: { TRUE, FALSE }
+ * - default: TRUE
+ * </pre>
+ * @see #TRUE
+ * @see #FALSE
+ * @see #FORMATTER_COMMENT_INDENT_PARAMETER_DESCRIPTION
+ * @since 3.17
+ */
+ public static final String FORMATTER_COMMENT_INDENT_TAG_DESCRIPTION = "org.eclipse.jdt.core.formatter.comment.indent_tag_description"; //$NON-NLS-1$
/**
* <pre>
@@ -4365,6 +4461,98 @@
* @since 3.1
*/
public static final String FORMATTER_USE_TABS_ONLY_FOR_LEADING_INDENTATIONS = JavaCore.PLUGIN_ID + ".formatter.use_tabs_only_for_leading_indentations"; //$NON-NLS-1$
+
+ /**
+ * <pre>
+ * FORMATTER / Option to wrap before the multiplicative operator (*, /, %)
+ * - option id: "org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator"
+ * - possible values: { TRUE, FALSE }
+ * - default: TRUE
+ * </pre>
+ * This option is used only if the option {@link #FORMATTER_ALIGNMENT_FOR_MULTIPLE_FIELDS} is set.
+ * @see #TRUE
+ * @see #FALSE
+ * @since 3.17
+ */
+ public static final String FORMATTER_WRAP_BEFORE_MULTIPLICATIVE_OPERATOR = JavaCore.PLUGIN_ID + ".formatter.wrap_before_multiplicative_operator"; //$NON-NLS-1$
+ /**
+ * <pre>
+ * FORMATTER / Option to wrap before the additive operator (+, -)
+ * - option id: "org.eclipse.jdt.core.formatter.wrap_before_additive_operator"
+ * - possible values: { TRUE, FALSE }
+ * - default: TRUE
+ * </pre>
+ * This option is used only if the option {@link #FORMATTER_ALIGNMENT_FOR_ADDITIVE_OPERATOR} is set.
+ * @see #TRUE
+ * @see #FALSE
+ * @since 3.17
+ */
+ public static final String FORMATTER_WRAP_BEFORE_ADDITIVE_OPERATOR = JavaCore.PLUGIN_ID + ".formatter.wrap_before_additive_operator"; //$NON-NLS-1$
+ /**
+ * <pre>
+ * FORMATTER / Option to wrap before the string concatenation operator
+ * - option id: "org.eclipse.jdt.core.formatter.wrap_before_string_concatenation"
+ * - possible values: { TRUE, FALSE }
+ * - default: TRUE
+ * </pre>
+ * This option is used only if the option {@link #FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION} is set.
+ * @see #TRUE
+ * @see #FALSE
+ * @since 3.17
+ */
+ public static final String FORMATTER_WRAP_BEFORE_STRING_CONCATENATION = JavaCore.PLUGIN_ID + ".formatter.wrap_before_string_concatenation"; //$NON-NLS-1$
+ /**
+ * <pre>
+ * FORMATTER / Option to wrap before the shift operator (<<, >>, >>>)
+ * - option id: "org.eclipse.jdt.core.formatter.wrap_before_shift_operator"
+ * - possible values: { TRUE, FALSE }
+ * - default: TRUE
+ * </pre>
+ * This option is used only if the option {@link #FORMATTER_ALIGNMENT_FOR_SHIFT_OPERATOR} is set.
+ * @see #TRUE
+ * @see #FALSE
+ * @since 3.17
+ */
+ public static final String FORMATTER_WRAP_BEFORE_SHIFT_OPERATOR = JavaCore.PLUGIN_ID + ".formatter.wrap_before_shift_operator"; //$NON-NLS-1$
+ /**
+ * <pre>
+ * FORMATTER / Option to wrap before the relational operator (<, >, <=, >=, ==, !=)
+ * - option id: "org.eclipse.jdt.core.formatter.wrap_before_"
+ * - possible values: { TRUE, FALSE }
+ * - default: TRUE
+ * </pre>
+ * This option is used only if the option {@link #FORMATTER_ALIGNMENT_FOR_RELATIONAL_OPERATOR} is set.
+ * @see #TRUE
+ * @see #FALSE
+ * @since 3.17
+ */
+ public static final String FORMATTER_WRAP_BEFORE_RELATIONAL_OPERATOR = JavaCore.PLUGIN_ID + ".formatter.wrap_before_relational_operator"; //$NON-NLS-1$
+ /**
+ * <pre>
+ * FORMATTER / Option to wrap before the bitwise operator (&, ^, |)
+ * - option id: "org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator"
+ * - possible values: { TRUE, FALSE }
+ * - default: TRUE
+ * </pre>
+ * This option is used only if the option {@link #FORMATTER_ALIGNMENT_FOR_BITWISE_OPERATOR} is set.
+ * @see #TRUE
+ * @see #FALSE
+ * @since 3.17
+ */
+ public static final String FORMATTER_WRAP_BEFORE_BITWISE_OPERATOR = JavaCore.PLUGIN_ID + ".formatter.wrap_before_bitwise_operator"; //$NON-NLS-1$
+ /**
+ * <pre>
+ * FORMATTER / Option to wrap before the logical operator (&&, ||)
+ * - option id: "org.eclipse.jdt.core.formatter.wrap_before_logical_operator"
+ * - possible values: { TRUE, FALSE }
+ * - default: TRUE
+ * </pre>
+ * This option is used only if the option {@link #FORMATTER_ALIGNMENT_FOR_LOGICAL_OPERATOR} is set.
+ * @see #TRUE
+ * @see #FALSE
+ * @since 3.17
+ */
+ public static final String FORMATTER_WRAP_BEFORE_LOGICAL_OPERATOR = JavaCore.PLUGIN_ID + ".formatter.wrap_before_logical_operator"; //$NON-NLS-1$
/**
* <pre>
* FORMATTER / Option to wrap before the binary operator
@@ -4376,6 +4564,9 @@
* @see #TRUE
* @see #FALSE
* @since 3.3
+ * @deprecated Use the new options instead: {@link #FORMATTER_WRAP_BEFORE_MULTIPLICATIVE_OPERATOR},
+ * {@link #FORMATTER_WRAP_BEFORE_ADDITIVE_OPERATOR}, {@link #FORMATTER_WRAP_BEFORE_STRING_CONCATENATION},
+ * {@link #FORMATTER_WRAP_BEFORE_BITWISE_OPERATOR}, {@link #FORMATTER_WRAP_BEFORE_LOGICAL_OPERATOR}
*/
public static final String FORMATTER_WRAP_BEFORE_BINARY_OPERATOR = JavaCore.PLUGIN_ID + ".formatter.wrap_before_binary_operator"; //$NON-NLS-1$
/**
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CommentsPreparator.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CommentsPreparator.java
index dd24191..0a7c06d 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CommentsPreparator.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/CommentsPreparator.java
@@ -42,7 +42,6 @@
import org.eclipse.jdt.core.dom.MemberRef;
import org.eclipse.jdt.core.dom.MethodRef;
import org.eclipse.jdt.core.dom.QualifiedName;
-import org.eclipse.jdt.core.dom.SimpleName;
import org.eclipse.jdt.core.dom.TagElement;
import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
@@ -587,18 +586,6 @@
if (node.getParent() instanceof Javadoc) {
assert this.ctm.toString(startIndex).startsWith(tagName);
- boolean isParamTag = PARAM_TAGS.contains(tagName);
- if (isParamTag && this.options.comment_insert_new_line_for_parameter && startIndex < endIndex) {
- Token token = this.ctm.get(startIndex + 2);
- token.breakBefore();
- }
- if (isParamTag && this.options.comment_indent_parameter_description) {
- for (int i = startIndex + 2; i <= endIndex; i++) {
- Token token = this.ctm.get(i);
- token.setIndent(token.getIndent() + this.options.indentation_size);
- }
- }
-
Token startTokeen = this.ctm.get(startIndex);
if (startIndex > 1)
startTokeen.breakBefore();
@@ -611,7 +598,7 @@
}
if (node.isNested() && IMMUTABLE_TAGS.contains(tagName) && startIndex < endIndex) {
- disableFormatting(startIndex, endIndex);
+ disableFormatting(startIndex, endIndex, false);
}
return true;
}
@@ -619,34 +606,16 @@
@Override
public void endVisit(TagElement node) {
String tagName = node.getTagName();
- if (tagName == null || tagName.length() <= 1)
+ if (tagName == null || tagName.length() <= 1) {
handleHtml(node);
-
- if (TagElement.TAG_SEE.equals(tagName))
+ } else if (TagElement.TAG_SEE.equals(tagName)) {
handleStringLiterals(this.tm.toString(node), node.getStartPosition());
-
- if (PARAM_TAGS.contains(tagName) && this.options.comment_indent_parameter_description) {
- // tokens in the first line should not be indented
- int startIndex = this.ctm.findIndex(node.getStartPosition(), -1, false);
- if (this.ctm.get(startIndex).tokenType != TokenNameNotAToken) {
- int endIndex = this.ctm.lastIndexIn(node, -1);
- int range = this.options.indentation_size;
- for (int i = startIndex + 2; i <= endIndex && range > 0; i++) {
- Token token = this.ctm.get(i);
- if (token.getLineBreaksBefore() > 0)
- break;
- assert token.getIndent() >= this.options.indentation_size;
- token.setIndent(token.getIndent() - this.options.indentation_size);
- if (token.getLineBreaksAfter() > 0)
- break;
- range -= this.ctm.getLength(token, 0) + (token.isSpaceBefore() ? 1 : 0);
- }
- }
}
}
private void handleJavadocTagAlignment(Javadoc node) {
- // Lists of tag tokens: index 0 for tag name, index 1 for param name (may be null), the rest for description
+ // Lists of tag tokens: index 0 for tag name, index 1 for param name (or throws etc) (may be null),
+ // the rest for description
List<List<Token>> javadocRootTags = new ArrayList<>();
List<TagElement> tagElements = node.tags();
for (TagElement tagElement : tagElements) {
@@ -661,8 +630,7 @@
List<Token> tagTokens = new ArrayList<>();
tagTokens.add(this.ctm.get(startIndex));
- if (!PARAM_TAGS.contains(tagName) || tagElement.fragments().isEmpty()
- || !(tagElement.fragments().get(0) instanceof SimpleName)) {
+ if (!PARAM_TAGS.contains(tagName)) {
tagTokens.add(null);
}
for (int i = startIndex + 1; i <= endIndex; i++) {
@@ -671,8 +639,6 @@
javadocRootTags.add(tagTokens);
}
- // indent is used temporarily, tokens that are actually first in line
- // will have this changed to align (indent is reserved for code inside <pre> tags)
if (this.options.comment_align_tags_names_descriptions) {
int maxTagNameLength = 0;
int maxParamNameLength = 0;
@@ -688,10 +654,7 @@
if (maxParamNameLength > 0)
descriptionAlign += maxParamNameLength + 1;
for (List<Token> tagTokens : javadocRootTags) {
- if (tagTokens.get(1) != null)
- tagTokens.get(1).setIndent(paramNameAlign);
- for (int i = 2; i < tagTokens.size(); i++)
- tagTokens.get(i).setIndent(descriptionAlign);
+ alignJavadocTag(tagTokens, paramNameAlign, descriptionAlign);
}
} else if (this.options.comment_align_tags_descriptions_grouped) {
int groupStart = 0;
@@ -702,9 +665,7 @@
String tagName = this.ctm.toString(tagTokens.get(0));
if (!tagName.equals(groupTagName)) {
for (int j = groupStart; j < i; j++) {
- List<Token> tokens = javadocRootTags.get(j);
- for (int k = 2; k < tokens.size(); k++)
- tokens.get(k).setIndent(descriptionAlign);
+ alignJavadocTag(javadocRootTags.get(j), 0, descriptionAlign);
}
groupStart = i;
groupTagName = tagName;
@@ -716,20 +677,35 @@
descriptionAlign = Math.max(descriptionAlign, indent);
}
for (int j = groupStart; j < javadocRootTags.size(); j++) {
- List<Token> tokens = javadocRootTags.get(j);
- for (int k = 2; k < tokens.size(); k++)
- tokens.get(k).setIndent(descriptionAlign);
+ alignJavadocTag(javadocRootTags.get(j), 0, descriptionAlign);
}
- } else if (this.options.comment_indent_root_tags) {
+ } else {
for (List<Token> tagTokens : javadocRootTags) {
- Token tagName = tagTokens.get(0);
- int indent = this.ctm.getLength(tagName, 0) + 1;
- for (int i = 2; i < tagTokens.size(); i++)
- tagTokens.get(i).setIndent(indent);
+ int tagNameLength = this.ctm.getLength(tagTokens.get(0), 0);
+ int align = this.options.comment_indent_root_tags ? tagNameLength + 1 : 0;
+ alignJavadocTag(tagTokens, 0, align);
}
}
}
+ private void alignJavadocTag(List<Token> tagTokens, int paramNameAlign, int descriptionAlign) {
+ Token paramName = tagTokens.get(1);
+ if (paramName != null) {
+ paramName.setAlign(paramNameAlign);
+ if (this.options.comment_insert_new_line_for_parameter && tagTokens.size() > 2) {
+ tagTokens.get(2).breakBefore();
+ }
+ }
+
+ boolean extraIndent = (paramName != null && this.options.comment_indent_parameter_description)
+ || (paramName == null && this.options.comment_indent_tag_description);
+ for (int i = 2; i < tagTokens.size(); i++) {
+ Token token = tagTokens.get(i);
+ token.setAlign(descriptionAlign);
+ token.setIndent(extraIndent ? this.options.indentation_size : 0);
+ }
+ }
+
private void handleHtml(TagElement node) {
if (!this.options.comment_format_html && !this.options.comment_format_source)
return;
@@ -831,7 +807,7 @@
if (startIndex != endIndex) {
startIndex = tokenStartingAt(startPosition);
endIndex = tokenEndingAt(endPosition);
- disableFormatting(startIndex, endIndex);
+ disableFormatting(startIndex, endIndex, false);
}
noSubstituteWrapping(startPosition, endPosition);
}
@@ -876,10 +852,8 @@
int openingTagIndex = tokenStartingAt(this.noFormatTagOpenStart);
int closingTagIndex = tokenEndingAt(end);
if (openingTagIndex < closingTagIndex) {
- disableFormatting(openingTagIndex, closingTagIndex);
- closingTagIndex = tokenEndingAt(end);
+ disableFormatting(openingTagIndex, closingTagIndex, true);
}
- cleanupHTMLElement(openingTagIndex, closingTagIndex, false);
this.noFormatTagOpenStart = -1;
}
}
@@ -910,49 +884,38 @@
}
}
- private void cleanupHTMLElement(int openingTagIndex, int closingTagIndex, boolean formattedCode) {
- Token previous = this.ctm.get(openingTagIndex);
- int indent = previous.getIndent();
- for (int i = openingTagIndex + 1; i < closingTagIndex; i++) {
+ private void fixJavadocTagAlign(Token baseToken, int fixFirstIndex) {
+ for (int i = fixFirstIndex; i < this.ctm.size() - 1; i++) {
Token token = this.ctm.get(i);
- token.setToEscape(true);
- if (formattedCode && (token.getLineBreaksBefore() > 0 || previous.getLineBreaksAfter() > 0))
- token.setAlign(indent);
- previous = token;
- }
- for (int i = closingTagIndex; i < this.ctm.size(); i++) {
- Token token = this.ctm.get(i);
- if (token.getIndent() == 0)
+ if (token.getAlign() == 0 && token.getIndent() == 0)
break;
- token.setIndent(indent);
- previous = token;
+ token.setAlign(baseToken.getAlign());
+ token.setIndent(baseToken.getIndent());
}
}
- private void disableFormatting(int startIndex, int endIndex) {
+ private void disableFormatting(int startIndex, int endIndex, boolean isHtml) {
Token startToken = this.ctm.get(startIndex), endToken = this.ctm.get(endIndex);
- Token noFormatToken = new Token(startToken.originalStart, endToken.originalEnd, TokenNameCOMMENT_JAVADOC);
- List<Token> tokensToReplace = this.commentStructure.subList(startIndex, endIndex + 1);
- if (this.ctm.countLineBreaksBetween(startToken, endToken) == 0) {
- tokensToReplace.clear();
- tokensToReplace.add(noFormatToken);
- } else {
- int commentStart = findCommentLineIndent(startIndex);
- tokensToReplace.clear();
- tokensToReplace.addAll(commentToLines(noFormatToken, commentStart));
- }
- Token first = tokensToReplace.get(0), last = tokensToReplace.get(tokensToReplace.size() - 1);
+ Token noFormatToken = new Token(startToken.originalStart, endToken.originalEnd, TokenNameCOMMENT_JAVADOC);
+ List<Token> lines = commentToLines(noFormatToken, findCommentLineIndent(startIndex));
+ for (Token line : lines)
+ line.setToEscape(isHtml);
+ Token first = lines.get(0);
if (startToken.isSpaceBefore())
first.spaceBefore();
+ first.setAlign(startToken.getAlign());
+ first.setIndent(startToken.getIndent());
first.putLineBreaksBefore(startToken.getLineBreaksBefore());
first.setWrapPolicy(startToken.getWrapPolicy());
- if (endToken.isSpaceAfter())
- last.spaceAfter();
+ Token last = lines.get(lines.size() - 1);
last.putLineBreaksAfter(endToken.getLineBreaksAfter());
- for (Token token : tokensToReplace)
- if (token.tokenType == TokenNameCOMMENT_JAVADOC)
- token.setIndent(startToken.getIndent());
+
+ fixJavadocTagAlign(startToken, endIndex + 1);
+
+ List<Token> tokensToReplace = this.commentStructure.subList(startIndex, endIndex + 1);
+ tokensToReplace.clear();
+ tokensToReplace.addAll(lines);
}
private void disableFormattingExclusively(int openingTagIndex, int closingTagIndex) {
@@ -961,8 +924,10 @@
int noFormatEnd = this.ctm.get(closingTagIndex - 1).originalEnd;
if (noFormatStart <= noFormatEnd) {
Token noFormatToken = new Token(noFormatStart, noFormatEnd, TokenNameCOMMENT_JAVADOC);
- int commentStart = findCommentLineIndent(openingTagIndex);
- List<Token> lines = commentToLines(noFormatToken, commentStart);
+ List<Token> lines = commentToLines(noFormatToken, findCommentLineIndent(openingTagIndex));
+ for (Token line : lines)
+ line.setToEscape(true);
+ fixJavadocTagAlign(openingTag, closingTagIndex);
List<Token> tokensToReplace = this.commentStructure.subList(openingTagIndex + 1, closingTagIndex);
tokensToReplace.clear();
tokensToReplace.addAll(lines);
@@ -1021,11 +986,11 @@
if (token.isSpaceBefore())
part1.spaceBefore();
part1.putLineBreaksBefore(token.getLineBreaksBefore());
- if (token.isSpaceAfter())
- part2.spaceAfter();
part2.putLineBreaksAfter(token.getLineBreaksAfter());
part1.setIndent(token.getIndent());
part2.setIndent(token.getIndent());
+ part1.setAlign(token.getAlign());
+ part2.setAlign(token.getAlign());
part1.setWrapPolicy(token.getWrapPolicy());
this.commentStructure.set(tokenIndex, part1);
this.commentStructure.add(tokenIndex + 1, part2);
@@ -1173,12 +1138,16 @@
if (formattedTokens == null) {
disableFormattingExclusively(openingTagLastIndex, closingTagFirstIndex);
- closingTagFirstIndex = tokenStartingAt(javadocNoFormatCloseStart);
- cleanupHTMLElement(openingTagLastIndex, closingTagFirstIndex, false);
return;
}
formattedTokens = translateFormattedTokens(codeStartPosition, formattedTokens, positionMapping, null);
+
+ Token openingToken = this.ctm.get(openingTagLastIndex);
+ for (Token token : formattedTokens)
+ token.setAlign(token.getAlign() + openingToken.getAlign() + openingToken.getIndent());
+ fixJavadocTagAlign(openingToken, closingTagFirstIndex);
+
// there are too few linebreaks at the start and end
Token start = formattedTokens.get(0);
start.putLineBreaksBefore(start.getLineBreaksBefore() + 1);
@@ -1190,7 +1159,6 @@
List<Token> tokensToReplace = this.commentStructure.subList(openingTagLastIndex + 1, closingTagFirstIndex);
tokensToReplace.clear();
tokensToReplace.addAll(formattedTokens);
- cleanupHTMLElement(openingTagLastIndex, openingTagLastIndex + formattedTokens.size() + 1, true);
}
private DefaultCodeFormatter getCommentCodeFormatter() {
@@ -1336,6 +1304,7 @@
translationMap));
}
translated.putLineBreaksBefore(lineBreaks);
+ translated.setToEscape(true);
result.add(translated);
previousLineBreaks = token.getLineBreaksAfter();
}
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java
index c222422..0336bb2 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatter.java
@@ -126,13 +126,13 @@
this.workingOptions = new DefaultCodeFormatterOptions(options);
this.oldCommentFormatOption = getOldCommentFormatOption(options);
String compilerSource = options.get(CompilerOptions.OPTION_Source);
- this.sourceLevel = compilerSource != null ? compilerSource : CompilerOptions.VERSION_1_8;
+ this.sourceLevel = compilerSource != null ? compilerSource : CompilerOptions.VERSION_11;
} else {
Map<String, String> settings = DefaultCodeFormatterConstants.getJavaConventionsSettings();
this.originalOptions = new DefaultCodeFormatterOptions(settings);
this.workingOptions = new DefaultCodeFormatterOptions(settings);
this.oldCommentFormatOption = DefaultCodeFormatterConstants.TRUE;
- this.sourceLevel = CompilerOptions.VERSION_1_8;
+ this.sourceLevel = CompilerOptions.VERSION_11;
}
if (defaultCodeFormatterOptions != null) {
this.originalOptions.set(defaultCodeFormatterOptions.getMap());
@@ -332,8 +332,7 @@
}
private ASTParser createParser(int kind) {
- @SuppressWarnings("deprecation")
- ASTParser parser = ASTParser.newParser(AST.JLS9);
+ ASTParser parser = ASTParser.newParser(AST.JLS11);
if (kind == K_MODULE_INFO) {
parser.setSource(createDummyModuleInfoCompilationUnit());
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java
index 4f8fce8..a5ff4c5 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/DefaultCodeFormatterOptions.java
@@ -24,6 +24,7 @@
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
+import java.util.function.IntConsumer;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
@@ -123,7 +124,13 @@
public int alignment_for_arguments_in_method_invocation;
public int alignment_for_arguments_in_qualified_allocation_expression;
public int alignment_for_assignment;
- public int alignment_for_binary_expression;
+ public int alignment_for_multiplicative_operator;
+ public int alignment_for_additive_operator;
+ public int alignment_for_string_concatenation;
+ public int alignment_for_shift_operator;
+ public int alignment_for_relational_operator;
+ public int alignment_for_bitwise_operator;
+ public int alignment_for_logical_operator;
public int alignment_for_compact_if;
public int alignment_for_compact_loop;
public int alignment_for_conditional_expression;
@@ -206,6 +213,7 @@
public boolean comment_format_html;
public boolean comment_format_source;
public boolean comment_indent_parameter_description;
+ public boolean comment_indent_tag_description;
public boolean comment_indent_root_tags;
public boolean comment_align_tags_names_descriptions;
public boolean comment_align_tags_descriptions_grouped;
@@ -443,7 +451,13 @@
public int page_width;
public int tab_char;
public boolean use_tabs_only_for_leading_indentations;
- public boolean wrap_before_binary_operator;
+ public boolean wrap_before_multiplicative_operator;
+ public boolean wrap_before_additive_operator;
+ public boolean wrap_before_string_concatenation;
+ public boolean wrap_before_shift_operator;
+ public boolean wrap_before_relational_operator;
+ public boolean wrap_before_bitwise_operator;
+ public boolean wrap_before_logical_operator;
public boolean wrap_before_or_operator_multicatch;
public boolean wrap_before_conditional_operator;
public boolean wrap_before_assignment_operator;
@@ -482,7 +496,13 @@
options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_METHOD_INVOCATION, getAlignment(this.alignment_for_arguments_in_method_invocation));
options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ARGUMENTS_IN_QUALIFIED_ALLOCATION_EXPRESSION, getAlignment(this.alignment_for_arguments_in_qualified_allocation_expression));
options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ASSIGNMENT, getAlignment(this.alignment_for_assignment));
- options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION, getAlignment(this.alignment_for_binary_expression));
+ options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_MULTIPLICATIVE_OPERATOR ,getAlignment(this.alignment_for_multiplicative_operator));
+ options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ADDITIVE_OPERATOR ,getAlignment(this.alignment_for_additive_operator));
+ options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION ,getAlignment(this.alignment_for_string_concatenation));
+ options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_SHIFT_OPERATOR ,getAlignment(this.alignment_for_shift_operator));
+ options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_RELATIONAL_OPERATOR ,getAlignment(this.alignment_for_relational_operator));
+ options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BITWISE_OPERATOR ,getAlignment(this.alignment_for_bitwise_operator));
+ options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_LOGICAL_OPERATOR ,getAlignment(this.alignment_for_logical_operator));
options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_COMPACT_IF, getAlignment(this.alignment_for_compact_if));
options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_COMPACT_LOOP, getAlignment(this.alignment_for_compact_loop));
options.put(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_CONDITIONAL_EXPRESSION, getAlignment(this.alignment_for_conditional_expression));
@@ -544,6 +564,7 @@
options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_LINE_COMMENT_STARTING_ON_FIRST_COLUMN, this.comment_format_line_comment_starting_on_first_column ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_FORMAT_SOURCE, this.comment_format_source ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_INDENT_PARAMETER_DESCRIPTION, this.comment_indent_parameter_description ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+ options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_INDENT_TAG_DESCRIPTION, this.comment_indent_tag_description ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_INDENT_ROOT_TAGS, this.comment_indent_root_tags ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_ALIGN_TAGS_NAMES_DESCRIPTIONS, this.comment_align_tags_names_descriptions ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
options.put(DefaultCodeFormatterConstants.FORMATTER_COMMENT_ALIGN_TAGS_DESCREIPTIONS_GROUPED, this.comment_align_tags_descriptions_grouped ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
@@ -794,7 +815,13 @@
}
options.put(DefaultCodeFormatterConstants.FORMATTER_TAB_SIZE, Integer.toString(this.tab_char == SPACE ? this.indentation_size : this.tab_size)); // reverse values swapping performed by IndentationTabPage
options.put(DefaultCodeFormatterConstants.FORMATTER_USE_TABS_ONLY_FOR_LEADING_INDENTATIONS, this.use_tabs_only_for_leading_indentations ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
- options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR, this.wrap_before_binary_operator ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+ options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_MULTIPLICATIVE_OPERATOR, this.wrap_before_multiplicative_operator ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+ options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_ADDITIVE_OPERATOR, this.wrap_before_additive_operator ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+ options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_STRING_CONCATENATION, this.wrap_before_string_concatenation ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+ options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_SHIFT_OPERATOR, this.wrap_before_shift_operator ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+ options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_RELATIONAL_OPERATOR, this.wrap_before_relational_operator ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+ options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BITWISE_OPERATOR, this.wrap_before_bitwise_operator ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
+ options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_LOGICAL_OPERATOR, this.wrap_before_logical_operator ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_OR_OPERATOR_MULTICATCH, this.wrap_before_or_operator_multicatch ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_CONDITIONAL_OPERATOR, this.wrap_before_conditional_operator ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
options.put(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_ASSIGNMENT_OPERATOR, this.wrap_before_assignment_operator ? DefaultCodeFormatterConstants.TRUE : DefaultCodeFormatterConstants.FALSE);
@@ -876,16 +903,20 @@
this.alignment_for_assignment = Alignment.M_ONE_PER_LINE_SPLIT;
}
}
- final Object alignmentForBinaryExpressionOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION);
- if (alignmentForBinaryExpressionOption != null) {
- try {
- this.alignment_for_binary_expression = Integer.parseInt((String) alignmentForBinaryExpressionOption);
- } catch (NumberFormatException e) {
- this.alignment_for_binary_expression = Alignment.M_COMPACT_SPLIT;
- } catch (ClassCastException e) {
- this.alignment_for_binary_expression = Alignment.M_COMPACT_SPLIT;
- }
- }
+ setInt(settings, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_MULTIPLICATIVE_OPERATOR,
+ v-> this.alignment_for_multiplicative_operator = v);
+ setInt(settings, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ADDITIVE_OPERATOR,
+ v -> this.alignment_for_additive_operator = v);
+ setInt(settings, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION,
+ v -> this.alignment_for_string_concatenation = v);
+ setInt(settings, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_SHIFT_OPERATOR,
+ v -> this.alignment_for_shift_operator = v);
+ setInt(settings, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_RELATIONAL_OPERATOR,
+ v -> this.alignment_for_relational_operator = v);
+ setInt(settings, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BITWISE_OPERATOR,
+ v -> this.alignment_for_bitwise_operator = v);
+ setInt(settings, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_LOGICAL_OPERATOR,
+ v -> this.alignment_for_logical_operator = v);
final Object alignmentForCompactIfOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_COMPACT_IF);
if (alignmentForCompactIfOption != null) {
try {
@@ -1411,6 +1442,8 @@
if (commentIndentParameterDescriptionOption != null) {
this.comment_indent_parameter_description = DefaultCodeFormatterConstants.TRUE.equals(commentIndentParameterDescriptionOption);
}
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_COMMENT_INDENT_TAG_DESCRIPTION, DefaultCodeFormatterConstants.TRUE,
+ v -> this.comment_indent_tag_description = v);
final Object commentIndentRootTagsOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_COMMENT_INDENT_ROOT_TAGS);
if (commentIndentRootTagsOption != null) {
this.comment_indent_root_tags = DefaultCodeFormatterConstants.TRUE.equals(commentIndentRootTagsOption);
@@ -2320,10 +2353,27 @@
this.tab_char = MIXED;
}
}
- final Object wrapBeforeBinaryOperatorOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR);
- if (wrapBeforeBinaryOperatorOption != null) {
- this.wrap_before_binary_operator = DefaultCodeFormatterConstants.TRUE.equals(wrapBeforeBinaryOperatorOption);
- }
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_MULTIPLICATIVE_OPERATOR, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_multiplicative_operator = v);
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_ADDITIVE_OPERATOR, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_additive_operator = v);
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_STRING_CONCATENATION, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_string_concatenation = v);
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_SHIFT_OPERATOR, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_shift_operator = v);
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_RELATIONAL_OPERATOR, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_relational_operator = v);
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BITWISE_OPERATOR, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_bitwise_operator = v);
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_LOGICAL_OPERATOR, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_logical_operator = v);
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_OR_OPERATOR_MULTICATCH, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_or_operator_multicatch = v);
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_CONDITIONAL_OPERATOR, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_conditional_operator = v);
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_ASSIGNMENT_OPERATOR, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_assignment_operator = v);
+
final Object wrapBeforeOrOperatorMulticatchOption = settings.get(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_OR_OPERATOR_MULTICATCH);
if (wrapBeforeOrOperatorMulticatchOption != null) {
this.wrap_before_or_operator_multicatch = DefaultCodeFormatterConstants.TRUE.equals(wrapBeforeOrOperatorMulticatchOption);
@@ -2397,6 +2447,17 @@
return defaultValue;
}
+ private void setInt(Map<String, String> settings, String key, IntConsumer setter) {
+ String value = settings.get(key);
+ if (value != null) {
+ try {
+ setter.accept(Integer.parseInt(value));
+ } catch (NumberFormatException e) {
+ throw new IllegalArgumentException("Expected integer for setting " + key + ", got: " + value); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ }
+
private void setString(Map<String, String> settings, String key, List<String> allowedValues, Consumer<String> setter) {
Object value = settings.get(key);
if (value != null) {
@@ -2553,6 +2614,48 @@
setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_INSERT_NEW_LINE_IN_EMPTY_TYPE_DECLARATION, JavaCore.INSERT,
v -> this.keep_type_declaration_on_one_line = insertToOneLine.get(v));
}
+
+ // alignment for binary expressions -> more granular settings
+ if (settings.get(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_MULTIPLICATIVE_OPERATOR) == null) {
+ setInt(settings, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION,
+ v-> this.alignment_for_multiplicative_operator = v);
+ }
+ if (settings.get(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_ADDITIVE_OPERATOR) == null) {
+ setInt(settings, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION,
+ v -> this.alignment_for_additive_operator = v);
+ }
+ if (settings.get(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_STRING_CONCATENATION) == null) {
+ setInt(settings, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION,
+ v -> this.alignment_for_string_concatenation = v);
+ }
+ if (settings.get(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BITWISE_OPERATOR) == null) {
+ setInt(settings, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION,
+ v -> this.alignment_for_bitwise_operator = v);
+ }
+ if (settings.get(DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_LOGICAL_OPERATOR) == null) {
+ setInt(settings, DefaultCodeFormatterConstants.FORMATTER_ALIGNMENT_FOR_BINARY_EXPRESSION,
+ v -> this.alignment_for_logical_operator = v);
+ }
+ if (settings.get(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_MULTIPLICATIVE_OPERATOR) == null) {
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_multiplicative_operator = v);
+ }
+ if (settings.get(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_ADDITIVE_OPERATOR) == null) {
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_additive_operator = v);
+ }
+ if (settings.get(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_STRING_CONCATENATION) == null) {
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_string_concatenation = v);
+ }
+ if (settings.get(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BITWISE_OPERATOR) == null) {
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_bitwise_operator = v);
+ }
+ if (settings.get(DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_LOGICAL_OPERATOR) == null) {
+ setBoolean(settings, DefaultCodeFormatterConstants.FORMATTER_WRAP_BEFORE_BINARY_OPERATOR, DefaultCodeFormatterConstants.TRUE,
+ v -> this.wrap_before_logical_operator = v);
+ }
}
public void setDefaultSettings() {
@@ -2563,7 +2666,13 @@
this.alignment_for_arguments_in_method_invocation = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_qualified_allocation_expression = Alignment.M_COMPACT_SPLIT;
this.alignment_for_assignment = Alignment.M_NO_ALIGNMENT;
- this.alignment_for_binary_expression = Alignment.M_COMPACT_SPLIT;
+ this.alignment_for_multiplicative_operator = Alignment.M_COMPACT_SPLIT;
+ this.alignment_for_additive_operator = Alignment.M_COMPACT_SPLIT;
+ this.alignment_for_string_concatenation = Alignment.M_COMPACT_SPLIT;
+ this.alignment_for_shift_operator = Alignment.M_NO_ALIGNMENT;
+ this.alignment_for_relational_operator = Alignment.M_NO_ALIGNMENT;
+ this.alignment_for_bitwise_operator = Alignment.M_COMPACT_SPLIT;
+ this.alignment_for_logical_operator = Alignment.M_COMPACT_SPLIT;
this.alignment_for_compact_if = Alignment.M_ONE_PER_LINE_SPLIT | Alignment.M_INDENT_BY_ONE;
this.alignment_for_compact_loop = Alignment.M_ONE_PER_LINE_SPLIT | Alignment.M_INDENT_BY_ONE;
this.alignment_for_conditional_expression = Alignment.M_ONE_PER_LINE_SPLIT;
@@ -2623,6 +2732,7 @@
this.comment_format_html = true;
this.comment_format_source = true;
this.comment_indent_parameter_description = true;
+ this.comment_indent_tag_description = false;
this.comment_indent_root_tags = true;
this.comment_align_tags_names_descriptions = false;
this.comment_align_tags_descriptions_grouped = false;
@@ -2863,7 +2973,13 @@
this.page_width = 120;
this.tab_char = TAB; // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=49081
this.use_tabs_only_for_leading_indentations = false;
- this.wrap_before_binary_operator = true;
+ this.wrap_before_multiplicative_operator = true;
+ this.wrap_before_additive_operator = true;
+ this.wrap_before_string_concatenation = true;
+ this.wrap_before_shift_operator = true;
+ this.wrap_before_relational_operator = true;
+ this.wrap_before_bitwise_operator = true;
+ this.wrap_before_logical_operator = true;
this.wrap_before_or_operator_multicatch = true;
this.wrap_before_conditional_operator = true;
this.wrap_before_assignment_operator = false;
@@ -2887,7 +3003,13 @@
this.alignment_for_arguments_in_method_invocation = Alignment.M_COMPACT_SPLIT;
this.alignment_for_arguments_in_qualified_allocation_expression = Alignment.M_COMPACT_SPLIT;
this.alignment_for_assignment = Alignment.M_NO_ALIGNMENT;
- this.alignment_for_binary_expression = Alignment.M_COMPACT_SPLIT;
+ this.alignment_for_multiplicative_operator = Alignment.M_COMPACT_SPLIT;
+ this.alignment_for_additive_operator = Alignment.M_COMPACT_SPLIT;
+ this.alignment_for_string_concatenation = Alignment.M_COMPACT_SPLIT;
+ this.alignment_for_shift_operator = Alignment.M_NO_ALIGNMENT;
+ this.alignment_for_relational_operator = Alignment.M_NO_ALIGNMENT;
+ this.alignment_for_bitwise_operator = Alignment.M_COMPACT_SPLIT;
+ this.alignment_for_logical_operator = Alignment.M_COMPACT_SPLIT;
this.alignment_for_compact_if = Alignment.M_COMPACT_SPLIT;
this.alignment_for_compact_loop = Alignment.M_COMPACT_SPLIT;
this.alignment_for_conditional_expression = Alignment.M_NEXT_PER_LINE_SPLIT;
@@ -2947,6 +3069,7 @@
this.comment_format_html = true;
this.comment_format_source = true;
this.comment_indent_parameter_description = false;
+ this.comment_indent_tag_description = false;
this.comment_indent_root_tags = false;
this.comment_align_tags_names_descriptions = false;
this.comment_align_tags_descriptions_grouped = true;
@@ -3186,7 +3309,13 @@
this.page_width = 120;
this.tab_char = MIXED;
this.use_tabs_only_for_leading_indentations = false;
- this.wrap_before_binary_operator = true;
+ this.wrap_before_multiplicative_operator = true;
+ this.wrap_before_additive_operator = true;
+ this.wrap_before_string_concatenation = true;
+ this.wrap_before_shift_operator = true;
+ this.wrap_before_relational_operator = true;
+ this.wrap_before_bitwise_operator = true;
+ this.wrap_before_logical_operator = true;
this.wrap_before_or_operator_multicatch = true;
this.wrap_before_conditional_operator = true;
this.wrap_before_assignment_operator = false;
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/LineBreaksPreparator.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/LineBreaksPreparator.java
index 9dc434e..ae864aa 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/LineBreaksPreparator.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/LineBreaksPreparator.java
@@ -20,9 +20,7 @@
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameCOMMA;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameCOMMENT_JAVADOC;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameLBRACE;
-import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameLPAREN;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameRBRACE;
-import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameRPAREN;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameSEMICOLON;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameelse;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNamefinally;
@@ -43,9 +41,7 @@
import org.eclipse.jdt.core.dom.BodyDeclaration;
import org.eclipse.jdt.core.dom.BreakStatement;
import org.eclipse.jdt.core.dom.CatchClause;
-import org.eclipse.jdt.core.dom.ClassInstanceCreation;
import org.eclipse.jdt.core.dom.CompilationUnit;
-import org.eclipse.jdt.core.dom.ConstructorInvocation;
import org.eclipse.jdt.core.dom.ContinueStatement;
import org.eclipse.jdt.core.dom.DoStatement;
import org.eclipse.jdt.core.dom.EmptyStatement;
@@ -61,7 +57,6 @@
import org.eclipse.jdt.core.dom.LambdaExpression;
import org.eclipse.jdt.core.dom.MarkerAnnotation;
import org.eclipse.jdt.core.dom.MethodDeclaration;
-import org.eclipse.jdt.core.dom.MethodInvocation;
import org.eclipse.jdt.core.dom.Modifier;
import org.eclipse.jdt.core.dom.ModuleDeclaration;
import org.eclipse.jdt.core.dom.ModuleDirective;
@@ -71,8 +66,6 @@
import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
import org.eclipse.jdt.core.dom.Statement;
-import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
-import org.eclipse.jdt.core.dom.SuperMethodInvocation;
import org.eclipse.jdt.core.dom.SwitchCase;
import org.eclipse.jdt.core.dom.SwitchStatement;
import org.eclipse.jdt.core.dom.TryStatement;
@@ -81,8 +74,6 @@
import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
import org.eclipse.jdt.core.dom.WhileStatement;
import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
-import org.eclipse.jdt.internal.formatter.Token.WrapMode;
-import org.eclipse.jdt.internal.formatter.Token.WrapPolicy;
public class LineBreaksPreparator extends ASTVisitor {
final private TokenManager tm;
@@ -260,12 +251,6 @@
@Override
public boolean visit(MethodDeclaration node) {
this.declarationModifierVisited = false;
-
- int lParen = this.tm.firstIndexAfter(node.getName(), TokenNameLPAREN);
- int rParen = node.getBody() == null ? this.tm.lastIndexIn(node, TokenNameRPAREN)
- : this.tm.firstIndexBefore(node.getBody(), TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_declaration);
-
if (node.getBody() == null)
return true;
@@ -350,10 +335,6 @@
breakLineBefore(statement);
}
- int lParen = this.tm.firstIndexIn(node, TokenNameLPAREN);
- int rParen = this.tm.firstIndexAfter(node.getExpression(), TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_switch_statement);
-
return true;
}
@@ -368,10 +349,6 @@
Token whileToken = this.tm.firstTokenBefore(node.getExpression(), TokenNamewhile);
whileToken.breakBefore();
}
-
- int lParen = this.tm.firstIndexBefore(node.getExpression(), TokenNameLPAREN);
- int rParen = this.tm.firstIndexAfter(node.getExpression(), TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_if_while_statement);
return true;
}
@@ -471,15 +448,6 @@
@Override
public boolean visit(EnumConstantDeclaration node) {
this.declarationModifierVisited = false;
-
- int lParen = this.tm.firstIndexAfter(node.getName(), -1);
- while (this.tm.get(lParen).isComment())
- lParen++;
- if (this.tm.get(lParen).tokenType == TokenNameLPAREN) {
- int rParen = node.getAnonymousClassDeclaration() == null ? this.tm.lastIndexIn(node, TokenNameRPAREN)
- : this.tm.firstIndexBefore(node.getAnonymousClassDeclaration(), TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_enum_constant_declaration);
- }
return true;
}
@@ -518,22 +486,12 @@
}
if (breakAfter)
this.tm.lastTokenIn(node, -1).breakAfter();
-
- if (!(node instanceof MarkerAnnotation)) {
- int lParen = this.tm.firstIndexAfter(node.getTypeName(), TokenNameLPAREN);
- int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_annotation);
- }
}
@Override
public boolean visit(WhileStatement node) {
if (!this.options.keep_simple_while_body_on_same_line)
handleLoopBody(node.getBody());
-
- int lParen = this.tm.firstIndexIn(node, TokenNameLPAREN);
- int rParen = this.tm.firstIndexAfter(node.getExpression(), TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_if_while_statement);
return true;
}
@@ -541,10 +499,6 @@
public boolean visit(ForStatement node) {
if (!this.options.keep_simple_for_body_on_same_line)
handleLoopBody(node.getBody());
-
- int lParen = this.tm.firstIndexIn(node, TokenNameLPAREN);
- int rParen = this.tm.firstIndexBefore(node.getBody(), TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_for_statement);
return true;
}
@@ -552,10 +506,6 @@
public boolean visit(EnhancedForStatement node) {
if (!this.options.keep_simple_for_body_on_same_line)
handleLoopBody(node.getBody());
-
- int lParen = this.tm.firstIndexIn(node, TokenNameLPAREN);
- int rParen = this.tm.firstIndexBefore(node.getBody(), TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_for_statement);
return true;
}
@@ -589,10 +539,6 @@
if (!keepThenOnSameLine)
handleLoopBody(thenNode);
- int lParen = this.tm.firstIndexIn(node, TokenNameLPAREN);
- int rParen = this.tm.firstIndexAfter(node.getExpression(), TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_if_while_statement);
-
return true;
}
@@ -601,11 +547,6 @@
if (node.getFinally() != null && this.options.insert_new_line_before_finally_in_try_statement) {
this.tm.firstTokenBefore(node.getFinally(), TokenNamefinally).breakBefore();
}
- if (!node.resources().isEmpty()) {
- int lParen = this.tm.firstIndexIn(node, TokenNameLPAREN);
- int rParen = this.tm.firstIndexBefore(node.getBody(), TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_try_clause);
- }
return true;
}
@@ -613,63 +554,6 @@
public boolean visit(CatchClause node) {
if (this.options.insert_new_line_before_catch_in_try_statement)
breakLineBefore(node);
-
- int lParen = this.tm.firstIndexIn(node, TokenNameLPAREN);
- int rParen = this.tm.firstIndexBefore(node.getBody(), TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_catch_clause);
- return true;
- }
-
- @Override
- public boolean visit(LambdaExpression node) {
- int lParen = this.tm.firstIndexIn(node, -1);
- if (this.tm.get(lParen).tokenType == TokenNameLPAREN) {
- int rParen = this.tm.firstIndexBefore(node.getBody(), TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_lambda_declaration);
- }
- return true;
- }
-
- @Override
- public boolean visit(MethodInvocation node) {
- int lParen = this.tm.firstIndexAfter(node.getName(), TokenNameLPAREN);
- int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_invocation);
- return true;
- }
-
- @Override
- public boolean visit(SuperMethodInvocation node) {
- int lParen = this.tm.firstIndexAfter(node.getName(), TokenNameLPAREN);
- int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_invocation);
- return true;
- }
-
- @Override
- public boolean visit(ClassInstanceCreation node) {
- int lParen = this.tm.firstIndexAfter(node.getType(), TokenNameLPAREN);
- int rParen = node.getAnonymousClassDeclaration() == null ? this.tm.lastIndexIn(node, TokenNameRPAREN)
- : this.tm.firstIndexBefore(node.getAnonymousClassDeclaration(), TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_invocation);
- return true;
- }
-
- @Override
- public boolean visit(ConstructorInvocation node) {
- int lParen = node.arguments().isEmpty() ? this.tm.lastIndexIn(node, TokenNameLPAREN)
- : this.tm.firstIndexBefore((ASTNode) node.arguments().get(0), TokenNameLPAREN);
- int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_invocation);
- return true;
- }
-
- @Override
- public boolean visit(SuperConstructorInvocation node) {
- int lParen = node.arguments().isEmpty() ? this.tm.lastIndexIn(node, TokenNameLPAREN)
- : this.tm.firstIndexBefore((ASTNode) node.arguments().get(0), TokenNameLPAREN);
- int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN);
- handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_invocation);
return true;
}
@@ -751,44 +635,6 @@
this.tm.get(lastIndex + 1).unindent();
}
- private void handleParenthesesPositions(int openingParenIndex, int closingParenIndex, String positionsSetting) {
- boolean isEmpty = openingParenIndex + 1 == closingParenIndex;
- switch (positionsSetting) {
- case DefaultCodeFormatterConstants.COMMON_LINES:
- // nothing to do
- break;
- case DefaultCodeFormatterConstants.SEPARATE_LINES_IF_WRAPPED:
- if (isEmpty)
- break;
- this.tm.get(openingParenIndex + 1).setWrapPolicy(new WrapPolicy(WrapMode.TOP_PRIORITY,
- openingParenIndex, closingParenIndex, this.options.indentation_size, 1, 1, true, false));
- this.tm.get(closingParenIndex).setWrapPolicy(new WrapPolicy(WrapMode.TOP_PRIORITY,
- openingParenIndex, closingParenIndex, 0, 1, 1, false, false));
- break;
- case DefaultCodeFormatterConstants.SEPARATE_LINES_IF_NOT_EMPTY:
- if (isEmpty)
- break;
- //$FALL-THROUGH$
- case DefaultCodeFormatterConstants.SEPARATE_LINES:
- case DefaultCodeFormatterConstants.PRESERVE_POSITIONS:
- boolean always = !positionsSetting.equals(DefaultCodeFormatterConstants.PRESERVE_POSITIONS);
- Token afterOpening = this.tm.get(openingParenIndex + 1);
- if (always || this.tm.countLineBreaksBetween(this.tm.get(openingParenIndex), afterOpening) > 0) {
- afterOpening.setWrapPolicy(
- new WrapPolicy(WrapMode.WHERE_NECESSARY, openingParenIndex, this.options.indentation_size));
- afterOpening.breakBefore();
- }
- Token closingParen = this.tm.get(closingParenIndex);
- if (always || this.tm.countLineBreaksBetween(this.tm.get(closingParenIndex - 1), closingParen) > 0) {
- closingParen.setWrapPolicy(new WrapPolicy(WrapMode.WHERE_NECESSARY, openingParenIndex, 0));
- closingParen.breakBefore();
- }
- break;
- default:
- throw new IllegalArgumentException("Unrecognized parentheses positions setting: " + positionsSetting); //$NON-NLS-1$
- }
- }
-
public void finishUp() {
// the visits only noted where indents increase and decrease,
// now prepare actual indent values
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/TextEditsBuilder.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/TextEditsBuilder.java
index e015c3f..ef25771 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/TextEditsBuilder.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/TextEditsBuilder.java
@@ -487,6 +487,8 @@
if (fragment.getLineBreaksBefore() > 0) {
bufferLineSeparator(fragment, false);
+ if (this.parent != null)
+ bufferAlign(lineComment, index);
bufferIndent(fragment, index);
} else if (fragment.isSpaceBefore() && i > 0) {
this.buffer.append(' ');
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/CommentWrapExecutor.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/CommentWrapExecutor.java
index 6cf1e46..b00c8cf 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/CommentWrapExecutor.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/CommentWrapExecutor.java
@@ -84,6 +84,8 @@
return position;
traverse(structure, 0);
+ cleanupIndent(structure);
+
if (this.newLinesAtBoundries)
return this.lineStartPosition + 1 + this.tm.getLength(structure.get(structure.size() - 1), 0);
return this.counter;
@@ -119,8 +121,8 @@
return -1;
}
- private int getStartingPosition(Token token) {
- int position = this.lineStartPosition + token.getAlign() + token.getIndent();
+ private int getStartingPosition(Token token, boolean isNewLine) {
+ int position = this.lineStartPosition + token.getAlign() + (isNewLine ? token.getIndent() : 0);
if (token.tokenType != TokenNameNotAToken)
position += COMMENT_LINE_SEPARATOR_LENGTH;
return position;
@@ -128,7 +130,7 @@
@Override
protected boolean token(Token token, int index) {
- final int positionIfNewLine = getStartingPosition(token);
+ final int positionIfNewLine = getStartingPosition(token, true);
int lineBreaksBefore = getLineBreaksBefore();
if ((index == 1 || getNext() == null) && this.newLinesAtBoundries && lineBreaksBefore == 0) {
@@ -143,14 +145,6 @@
this.potentialWrapToken = this.potentialWrapTokenSubstitute = null;
this.lineLimit = getLineLimit(this.lineStartPosition);
- boolean isFormattedCode = token.getWrapPolicy() != null
- && token.getWrapPolicy() != WrapPolicy.SUBSTITUTE_ONLY;
- if (!isFormattedCode && token.getAlign() == 0 && !this.simulation) {
- // Indents are reserved for code inside <pre>.
- // Indentation of javadoc tags can be achieved with align
- token.setAlign(token.getIndent());
- token.setIndent(0);
- }
}
boolean canWrap = getNext() != null && lineBreaksBefore == 0 && index > 1 && positionIfNewLine < this.counter;
@@ -165,7 +159,7 @@
}
if (index > 1 && getNext() != null && (token.getAlign() + token.getIndent()) > 0)
- this.counter = Math.max(this.counter, getStartingPosition(token));
+ this.counter = Math.max(this.counter, getStartingPosition(token, getLineBreaksBefore() > 0));
this.counter += this.tm.getLength(token, this.counter);
this.counterIfWrapped += this.tm.getLength(token, this.counterIfWrapped);
this.counterIfWrappedSubstitute += this.tm.getLength(token, this.counterIfWrappedSubstitute);
@@ -177,10 +171,6 @@
}
if (!this.simulation) {
this.potentialWrapToken.breakBefore();
- // Indents are reserved for code inside <pre>.
- // Indentation of javadoc tags can be achieved with align
- this.potentialWrapToken.setAlign(this.potentialWrapToken.getIndent());
- this.potentialWrapToken.setIndent(0);
}
this.counter = this.counterIfWrapped;
this.lineCounter++;
@@ -216,6 +206,22 @@
return true;
}
+ private void cleanupIndent(List<Token> structure) {
+ if (this.simulation)
+ return;
+ new TokenTraverser() {
+ @Override
+ protected boolean token(Token token, int index) {
+ if (token.tokenType == TokenNameCOMMENT_JAVADOC && token.getInternalStructure() == null) {
+ if (getLineBreaksBefore() > 0)
+ token.setAlign(token.getAlign() + token.getIndent());
+ token.setIndent(0);
+ }
+ return true;
+ }
+ }.traverse(structure, 0);
+ }
+
public void wrapLineComment(Token commentToken, int startPosition) {
List<Token> structure = commentToken.getInternalStructure();
if (structure == null || structure.isEmpty())
diff --git a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/WrapPreparator.java b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/WrapPreparator.java
index cf7ba63..c413043 100644
--- a/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/WrapPreparator.java
+++ b/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/linewrap/WrapPreparator.java
@@ -21,6 +21,7 @@
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameCOMMENT_LINE;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameDOT;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameEQUAL;
+import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameIdentifier;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameLBRACE;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameLESS;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameLPAREN;
@@ -33,7 +34,6 @@
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameenum;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameextends;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameimplements;
-import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNameIdentifier;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNamenew;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNamesuper;
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNamethis;
@@ -43,10 +43,13 @@
import static org.eclipse.jdt.internal.compiler.parser.TerminalTokens.TokenNamewith;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.function.Predicate;
+import java.util.function.ToIntFunction;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.ASTVisitor;
@@ -55,6 +58,7 @@
import org.eclipse.jdt.core.dom.ArrayInitializer;
import org.eclipse.jdt.core.dom.Assignment;
import org.eclipse.jdt.core.dom.Block;
+import org.eclipse.jdt.core.dom.CatchClause;
import org.eclipse.jdt.core.dom.ClassInstanceCreation;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jdt.core.dom.ConditionalExpression;
@@ -83,12 +87,15 @@
import org.eclipse.jdt.core.dom.ParameterizedType;
import org.eclipse.jdt.core.dom.ProvidesDirective;
import org.eclipse.jdt.core.dom.QualifiedName;
+import org.eclipse.jdt.core.dom.SingleMemberAnnotation;
import org.eclipse.jdt.core.dom.SingleVariableDeclaration;
import org.eclipse.jdt.core.dom.Statement;
+import org.eclipse.jdt.core.dom.StringLiteral;
import org.eclipse.jdt.core.dom.SuperConstructorInvocation;
import org.eclipse.jdt.core.dom.SuperFieldAccess;
import org.eclipse.jdt.core.dom.SuperMethodInvocation;
import org.eclipse.jdt.core.dom.SuperMethodReference;
+import org.eclipse.jdt.core.dom.SwitchStatement;
import org.eclipse.jdt.core.dom.ThisExpression;
import org.eclipse.jdt.core.dom.TryStatement;
import org.eclipse.jdt.core.dom.Type;
@@ -101,6 +108,7 @@
import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
import org.eclipse.jdt.core.dom.WhileStatement;
import org.eclipse.jdt.core.formatter.CodeFormatter;
+import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
import org.eclipse.jdt.internal.formatter.DefaultCodeFormatterOptions;
import org.eclipse.jdt.internal.formatter.DefaultCodeFormatterOptions.Alignment;
import org.eclipse.jdt.internal.formatter.Token;
@@ -152,23 +160,60 @@
}
}
- private final static Map<Operator, Integer> OPERATOR_PRECEDENCE;
+ private static final Map<Operator, Integer> OPERATOR_PRECEDENCE;
+ private static final Map<Operator, ToIntFunction<DefaultCodeFormatterOptions>> OPERATOR_WRAPPING_OPTION;
+ private static final Map<Operator, Predicate<DefaultCodeFormatterOptions>> OPERATOR_WRAP_BEFORE_OPTION;
static {
- HashMap<Operator, Integer> precedence = new HashMap<Operator, Integer>();
- precedence.put(Operator.TIMES, 1);
- precedence.put(Operator.DIVIDE, 1);
- precedence.put(Operator.REMAINDER, 1);
- precedence.put(Operator.PLUS, 2);
- precedence.put(Operator.MINUS, 2);
- // shift and comparison operators left out intentionally for compatibility with
- // the legacy formatter, which did not wrap these operators
+ HashMap<Operator, Integer> precedence = new HashMap<>();
+ HashMap<Operator, ToIntFunction<DefaultCodeFormatterOptions>> wrappingOption = new HashMap<>();
+ HashMap<Operator, Predicate<DefaultCodeFormatterOptions>> wrapBeforeOption = new HashMap<>();
+ for (Operator op : Arrays.asList(Operator.TIMES, Operator.DIVIDE, Operator.REMAINDER)) {
+ precedence.put(op, 1);
+ wrappingOption.put(op, o -> o.alignment_for_multiplicative_operator);
+ wrapBeforeOption.put(op, o -> o.wrap_before_multiplicative_operator);
+ }
+ for (Operator op : Arrays.asList(Operator.PLUS, Operator.MINUS)) {
+ precedence.put(op, 2);
+ wrappingOption.put(op, o -> o.alignment_for_additive_operator);
+ wrapBeforeOption.put(op, o -> o.wrap_before_additive_operator);
+ }
+ for (Operator op : Arrays.asList(Operator.LEFT_SHIFT, Operator.RIGHT_SHIFT_SIGNED,
+ Operator.RIGHT_SHIFT_UNSIGNED)) {
+ precedence.put(op, 3);
+ wrappingOption.put(op, o -> o.alignment_for_shift_operator);
+ wrapBeforeOption.put(op, o -> o.wrap_before_shift_operator);
+ }
+ for (Operator op : Arrays.asList(Operator.LESS, Operator.GREATER, Operator.LESS_EQUALS,
+ Operator.GREATER_EQUALS)) {
+ precedence.put(op, 4);
+ wrappingOption.put(op, o -> o.alignment_for_relational_operator);
+ wrapBeforeOption.put(op, o -> o.wrap_before_relational_operator);
+ }
+ for (Operator op : Arrays.asList(Operator.EQUALS, Operator.NOT_EQUALS)) {
+ precedence.put(op, 5);
+ wrappingOption.put(op, o -> o.alignment_for_relational_operator);
+ wrapBeforeOption.put(op, o -> o.wrap_before_relational_operator);
+ }
+
precedence.put(Operator.AND, 6);
precedence.put(Operator.XOR, 7);
precedence.put(Operator.OR, 8);
+ for (Operator op : Arrays.asList(Operator.AND, Operator.XOR, Operator.OR)) {
+ wrappingOption.put(op, o -> o.alignment_for_bitwise_operator);
+ wrapBeforeOption.put(op, o -> o.wrap_before_bitwise_operator);
+ }
+
precedence.put(Operator.CONDITIONAL_AND, 9);
precedence.put(Operator.CONDITIONAL_OR, 10);
+ for (Operator op : Arrays.asList(Operator.CONDITIONAL_AND, Operator.CONDITIONAL_OR)) {
+ wrappingOption.put(op, o -> o.alignment_for_logical_operator);
+ wrapBeforeOption.put(op, o -> o.wrap_before_logical_operator);
+ }
// ternary and assignment operators not relevant to infix expressions
+
OPERATOR_PRECEDENCE = Collections.unmodifiableMap(precedence);
+ OPERATOR_WRAPPING_OPTION = Collections.unmodifiableMap(wrappingOption);
+ OPERATOR_WRAP_BEFORE_OPTION = Collections.unmodifiableMap(wrapBeforeOption);
}
/** Penalty multiplier for wraps that are preferred */
@@ -234,11 +279,23 @@
@Override
public boolean visit(NormalAnnotation node) {
+ int lParen = this.tm.firstIndexAfter(node.getTypeName(), TokenNameLPAREN);
+ int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_annotation);
+
handleArguments(node.values(), this.options.alignment_for_arguments_in_annotation);
return true;
}
@Override
+ public boolean visit(SingleMemberAnnotation node) {
+ int lParen = this.tm.firstIndexAfter(node.getTypeName(), TokenNameLPAREN);
+ int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_annotation);
+ return true;
+ }
+
+ @Override
public boolean visit(TypeDeclaration node) {
Type superclassType = node.getSuperclassType();
if (superclassType != null) {
@@ -280,6 +337,11 @@
@Override
public boolean visit(MethodDeclaration node) {
+ int lParen = this.tm.firstIndexAfter(node.getName(), TokenNameLPAREN);
+ int rParen = node.getBody() == null ? this.tm.lastIndexIn(node, TokenNameRPAREN)
+ : this.tm.firstIndexBefore(node.getBody(), TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_declaration);
+
List<SingleVariableDeclaration> parameters = node.parameters();
Type receiverType = node.getReceiverType();
if (!parameters.isEmpty() || receiverType != null) {
@@ -298,7 +360,7 @@
? this.options.alignment_for_throws_clause_in_constructor_declaration
: this.options.alignment_for_throws_clause_in_method_declaration;
if ((wrappingOption & Alignment.M_INDENT_ON_COLUMN) == 0)
- this.wrapParentIndex = this.tm.firstIndexAfter(node.getName(), TokenNameLPAREN);
+ this.wrapParentIndex = lParen;
prepareElementsList(exceptionTypes, TokenNameCOMMA, TokenNameRPAREN);
// instead of the first exception type, wrap the "throws" token
this.wrapIndexes.set(0, this.tm.firstIndexBefore(exceptionTypes.get(0), TokenNamethrows));
@@ -377,6 +439,15 @@
@Override
public boolean visit(EnumConstantDeclaration node) {
+ int lParen = this.tm.firstIndexAfter(node.getName(), -1);
+ while (this.tm.get(lParen).isComment())
+ lParen++;
+ if (this.tm.get(lParen).tokenType == TokenNameLPAREN) {
+ int rParen = node.getAnonymousClassDeclaration() == null ? this.tm.lastIndexIn(node, TokenNameRPAREN)
+ : this.tm.firstIndexBefore(node.getAnonymousClassDeclaration(), TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_enum_constant_declaration);
+ }
+
handleArguments(node.arguments(), this.options.alignment_for_arguments_in_enum_constant);
AnonymousClassDeclaration anonymousClass = node.getAnonymousClassDeclaration();
if (anonymousClass != null) {
@@ -393,6 +464,10 @@
@Override
public boolean visit(MethodInvocation node) {
+ int lParen = this.tm.firstIndexAfter(node.getName(), TokenNameLPAREN);
+ int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_invocation);
+
handleArguments(node.arguments(), this.options.alignment_for_arguments_in_method_invocation);
handleTypeArguments(node.typeArguments());
@@ -420,6 +495,10 @@
@Override
public boolean visit(SuperMethodInvocation node) {
+ int lParen = this.tm.firstIndexAfter(node.getName(), TokenNameLPAREN);
+ int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_invocation);
+
handleArguments(node.arguments(), this.options.alignment_for_arguments_in_method_invocation);
handleTypeArguments(node.typeArguments());
return true;
@@ -427,6 +506,11 @@
@Override
public boolean visit(ClassInstanceCreation node) {
+ int lParen = this.tm.firstIndexAfter(node.getType(), TokenNameLPAREN);
+ int rParen = node.getAnonymousClassDeclaration() == null ? this.tm.lastIndexIn(node, TokenNameRPAREN)
+ : this.tm.firstIndexBefore(node.getAnonymousClassDeclaration(), TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_invocation);
+
AnonymousClassDeclaration anonymousClass = node.getAnonymousClassDeclaration();
if (anonymousClass != null) {
forceContinuousWrapping(anonymousClass, this.tm.firstIndexIn(node, TokenNamenew));
@@ -443,6 +527,11 @@
@Override
public boolean visit(ConstructorInvocation node) {
+ int lParen = node.arguments().isEmpty() ? this.tm.lastIndexIn(node, TokenNameLPAREN)
+ : this.tm.firstIndexBefore((ASTNode) node.arguments().get(0), TokenNameLPAREN);
+ int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_invocation);
+
handleArguments(node.arguments(), this.options.alignment_for_arguments_in_explicit_constructor_call);
handleTypeArguments(node.typeArguments());
return true;
@@ -450,6 +539,11 @@
@Override
public boolean visit(SuperConstructorInvocation node) {
+ int lParen = node.arguments().isEmpty() ? this.tm.lastIndexIn(node, TokenNameLPAREN)
+ : this.tm.firstIndexBefore((ASTNode) node.arguments().get(0), TokenNameLPAREN);
+ int rParen = this.tm.lastIndexIn(node, TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_method_invocation);
+
handleArguments(node.arguments(), this.options.alignment_for_arguments_in_explicit_constructor_call);
handleTypeArguments(node.typeArguments());
return true;
@@ -520,11 +614,17 @@
if ((parent instanceof InfixExpression) && samePrecedence(node, (InfixExpression) parent))
return true; // this node has been handled higher in the AST
- findTokensToWrap(node, 0);
+ int wrappingOption = OPERATOR_WRAPPING_OPTION.get(node.getOperator()).applyAsInt(this.options);
+ boolean wrapBeforeOperator = OPERATOR_WRAP_BEFORE_OPTION.get(node.getOperator()).test(this.options);
+ if (isStringConcatenation(node)) {
+ wrappingOption = this.options.alignment_for_string_concatenation;
+ wrapBeforeOperator = this.options.wrap_before_string_concatenation;
+ }
+
+ findTokensToWrap(node, wrapBeforeOperator, 0);
this.wrapParentIndex = this.wrapIndexes.remove(0);
this.wrapGroupEnd = this.tm.lastIndexIn(node, -1);
- if ((this.options.alignment_for_binary_expression & Alignment.M_INDENT_ON_COLUMN) != 0
- && this.wrapParentIndex > 0)
+ if ((wrappingOption & Alignment.M_INDENT_ON_COLUMN) != 0 && this.wrapParentIndex > 0)
this.wrapParentIndex--;
for (int i = this.wrapParentIndex; i >= 0; i--) {
if (!this.tm.get(i).isComment()) {
@@ -532,16 +632,16 @@
break;
}
}
- handleWrap(this.options.alignment_for_binary_expression, node);
+ handleWrap(wrappingOption, !wrapBeforeOperator, node);
return true;
}
- private void findTokensToWrap(InfixExpression node, int depth) {
+ private void findTokensToWrap(InfixExpression node, boolean wrapBeforeOperator, int depth) {
Expression left = node.getLeftOperand();
if (left instanceof InfixExpression && samePrecedence(node, (InfixExpression) left)) {
- findTokensToWrap((InfixExpression) left, depth + 1);
+ findTokensToWrap((InfixExpression) left, wrapBeforeOperator, depth + 1);
} else if (this.wrapIndexes.isEmpty() // always add first operand, it will be taken as wrap parent
- || !this.options.wrap_before_binary_operator) {
+ || !wrapBeforeOperator) {
this.wrapIndexes.add(this.tm.firstIndexIn(left, -1));
}
@@ -550,19 +650,19 @@
for (int i = -1; i < extended.size(); i++) {
Expression operand = (i == -1) ? right : extended.get(i);
if (operand instanceof InfixExpression && samePrecedence(node, (InfixExpression) operand)) {
- findTokensToWrap((InfixExpression) operand, depth + 1);
+ findTokensToWrap((InfixExpression) operand, wrapBeforeOperator, depth + 1);
}
int indexBefore = this.tm.firstIndexBefore(operand, -1);
while (this.tm.get(indexBefore).isComment())
indexBefore--;
assert node.getOperator().toString().equals(this.tm.toString(indexBefore));
int indexAfter = this.tm.firstIndexIn(operand, -1);
- this.wrapIndexes.add(this.options.wrap_before_binary_operator ? indexBefore : indexAfter);
- this.secondaryWrapIndexes.add(this.options.wrap_before_binary_operator ? indexAfter : indexBefore);
+ this.wrapIndexes.add(wrapBeforeOperator ? indexBefore : indexAfter);
+ this.secondaryWrapIndexes.add(wrapBeforeOperator ? indexAfter : indexBefore);
if (!this.options.join_wrapped_lines) {
// TODO there should be an option for never joining wraps on opposite side of the operator
- if (this.options.wrap_before_binary_operator) {
+ if (wrapBeforeOperator) {
if (this.tm.countLineBreaksBetween(this.tm.get(indexAfter - 1), this.tm.get(indexAfter)) > 0)
this.wrapIndexes.add(indexAfter);
} else {
@@ -573,6 +673,21 @@
}
}
+ private boolean isStringConcatenation(InfixExpression node) {
+ if (!node.getOperator().equals(Operator.PLUS))
+ return false;
+ List<Expression> operands = new ArrayList<Expression>(node.extendedOperands());
+ operands.add(node.getLeftOperand());
+ operands.add(node.getRightOperand());
+ for (Expression o : operands) {
+ if (o instanceof StringLiteral)
+ return true;
+ if ((o instanceof InfixExpression) && isStringConcatenation((InfixExpression) o))
+ return true;
+ }
+ return false;
+ }
+
private boolean samePrecedence(InfixExpression expression1, InfixExpression expression2) {
Integer precedence1 = OPERATOR_PRECEDENCE.get(expression1.getOperator());
Integer precedence2 = OPERATOR_PRECEDENCE.get(expression2.getOperator());
@@ -660,6 +775,10 @@
@Override
public boolean visit(IfStatement node) {
+ int lParen = this.tm.firstIndexIn(node, TokenNameLPAREN);
+ int rParen = this.tm.firstIndexAfter(node.getExpression(), TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_if_while_statement);
+
boolean keepThenOnSameLine = this.options.keep_then_statement_on_same_line
|| (this.options.keep_simple_if_on_one_line && node.getElseStatement() == null);
if (keepThenOnSameLine)
@@ -669,6 +788,10 @@
@Override
public boolean visit(ForStatement node) {
+ int lParen = this.tm.firstIndexIn(node, TokenNameLPAREN);
+ int rParen = this.tm.firstIndexBefore(node.getBody(), TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_for_statement);
+
List<Expression> initializers = node.initializers();
if (!initializers.isEmpty())
this.wrapIndexes.add(this.tm.firstIndexIn(initializers.get(0), -1));
@@ -678,8 +801,8 @@
if (!updaters.isEmpty())
this.wrapIndexes.add(this.tm.firstIndexIn(updaters.get(0), -1));
if (!this.wrapIndexes.isEmpty()) {
- this.wrapParentIndex = this.tm.firstIndexIn(node, TokenNameLPAREN);
- this.wrapGroupEnd = this.tm.firstIndexBefore(node.getBody(), TokenNameRPAREN);
+ this.wrapParentIndex = lParen;
+ this.wrapGroupEnd = rParen;
handleWrap(this.options.alignment_for_expressions_in_for_loop_header);
}
if (this.options.keep_simple_for_body_on_same_line)
@@ -689,6 +812,10 @@
@Override
public boolean visit(EnhancedForStatement node) {
+ int lParen = this.tm.firstIndexIn(node, TokenNameLPAREN);
+ int rParen = this.tm.firstIndexBefore(node.getBody(), TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_for_statement);
+
if (this.options.keep_simple_for_body_on_same_line)
handleSimpleLoop(node.getBody(), this.options.alignment_for_compact_loop);
return true;
@@ -696,6 +823,10 @@
@Override
public boolean visit(WhileStatement node) {
+ int lParen = this.tm.firstIndexIn(node, TokenNameLPAREN);
+ int rParen = this.tm.firstIndexAfter(node.getExpression(), TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_if_while_statement);
+
if (this.options.keep_simple_while_body_on_same_line)
handleSimpleLoop(node.getBody(), this.options.alignment_for_compact_loop);
return true;
@@ -738,6 +869,11 @@
@Override
public boolean visit(TryStatement node) {
+ if (!node.resources().isEmpty()) {
+ int lParen = this.tm.firstIndexIn(node, TokenNameLPAREN);
+ int rParen = this.tm.firstIndexBefore(node.getBody(), TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_try_clause);
+ }
prepareElementsList(node.resources(), TokenNameSEMICOLON, TokenNameLPAREN);
handleWrap(this.options.alignment_for_resources_in_try);
return true;
@@ -771,6 +907,11 @@
@Override
public boolean visit(LambdaExpression node) {
+ int lParen = this.tm.firstIndexIn(node, -1);
+ if (this.tm.get(lParen).tokenType == TokenNameLPAREN) {
+ int rParen = this.tm.firstIndexBefore(node.getBody(), TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_lambda_declaration);
+ }
if (node.getBody() instanceof Block) {
forceContinuousWrapping(node.getBody(), this.tm.firstIndexIn(node, -1));
@@ -879,6 +1020,30 @@
handleWrap(this.options.alignment_for_module_statements, PREFERRED);
}
+ @Override
+ public boolean visit(CatchClause node) {
+ int lParen = this.tm.firstIndexIn(node, TokenNameLPAREN);
+ int rParen = this.tm.firstIndexBefore(node.getBody(), TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_catch_clause);
+ return true;
+ }
+
+ @Override
+ public boolean visit(SwitchStatement node) {
+ int lParen = this.tm.firstIndexIn(node, TokenNameLPAREN);
+ int rParen = this.tm.firstIndexAfter(node.getExpression(), TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_switch_statement);
+ return true;
+ }
+
+ @Override
+ public boolean visit(DoStatement node) {
+ int lParen = this.tm.firstIndexBefore(node.getExpression(), TokenNameLPAREN);
+ int rParen = this.tm.firstIndexAfter(node.getExpression(), TokenNameRPAREN);
+ handleParenthesesPositions(lParen, rParen, this.options.parenthesis_positions_in_if_while_statement);
+ return true;
+ }
+
/**
* Makes sure all new lines within given node will have wrap policy so that
* wrap executor will fix their indentation if necessary.
@@ -952,14 +1117,18 @@
}
private void handleWrap(int wrappingOption, ASTNode parentNode) {
- doHandleWrap(wrappingOption, parentNode);
+ handleWrap(wrappingOption, true, parentNode);
+ }
+
+ private void handleWrap(int wrappingOption, boolean wrapPreceedingComments, ASTNode parentNode) {
+ doHandleWrap(wrappingOption, wrapPreceedingComments, parentNode);
this.wrapIndexes.clear();
this.secondaryWrapIndexes.clear();
this.wrapPenalties.clear();
this.wrapParentIndex = this.wrapGroupEnd = -1;
}
- private void doHandleWrap(int wrappingOption, ASTNode parentNode) {
+ private void doHandleWrap(int wrappingOption, boolean wrapPreceedingComments, ASTNode parentNode) {
if (this.wrapIndexes.isEmpty())
return;
assert this.wrapParentIndex >= 0 && this.wrapParentIndex < this.wrapIndexes.get(0);
@@ -982,8 +1151,6 @@
setTokenWrapPolicy(0, policy, true);
- boolean wrapPreceedingComments = !(parentNode instanceof InfixExpression)
- || !this.options.wrap_before_binary_operator;
for (int i = 1; i < this.wrapIndexes.size(); i++) {
penalty = this.wrapPenalties.size() > i ? this.wrapPenalties.get(i) : 1;
if (penalty != policy.penaltyMultiplier || i == 1)
@@ -1223,4 +1390,42 @@
});
}
}
+
+ private void handleParenthesesPositions(int openingParenIndex, int closingParenIndex, String positionsSetting) {
+ boolean isEmpty = openingParenIndex + 1 == closingParenIndex;
+ switch (positionsSetting) {
+ case DefaultCodeFormatterConstants.COMMON_LINES:
+ // nothing to do
+ break;
+ case DefaultCodeFormatterConstants.SEPARATE_LINES_IF_WRAPPED:
+ if (isEmpty)
+ break;
+ this.tm.get(openingParenIndex + 1).setWrapPolicy(new WrapPolicy(WrapMode.TOP_PRIORITY,
+ openingParenIndex, closingParenIndex, this.options.indentation_size, 1, 1, true, false));
+ this.tm.get(closingParenIndex).setWrapPolicy(new WrapPolicy(WrapMode.TOP_PRIORITY,
+ openingParenIndex, closingParenIndex, 0, 1, 1, false, false));
+ break;
+ case DefaultCodeFormatterConstants.SEPARATE_LINES_IF_NOT_EMPTY:
+ if (isEmpty)
+ break;
+ //$FALL-THROUGH$
+ case DefaultCodeFormatterConstants.SEPARATE_LINES:
+ case DefaultCodeFormatterConstants.PRESERVE_POSITIONS:
+ boolean always = !positionsSetting.equals(DefaultCodeFormatterConstants.PRESERVE_POSITIONS);
+ Token afterOpening = this.tm.get(openingParenIndex + 1);
+ if (always || this.tm.countLineBreaksBetween(this.tm.get(openingParenIndex), afterOpening) > 0) {
+ afterOpening.setWrapPolicy(
+ new WrapPolicy(WrapMode.WHERE_NECESSARY, openingParenIndex, this.options.indentation_size));
+ afterOpening.breakBefore();
+ }
+ Token closingParen = this.tm.get(closingParenIndex);
+ if (always || this.tm.countLineBreaksBetween(this.tm.get(closingParenIndex - 1), closingParen) > 0) {
+ closingParen.setWrapPolicy(new WrapPolicy(WrapMode.WHERE_NECESSARY, openingParenIndex, 0));
+ closingParen.breakBefore();
+ }
+ break;
+ default:
+ throw new IllegalArgumentException("Unrecognized parentheses positions setting: " + positionsSetting); //$NON-NLS-1$
+ }
+ }
}
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyBuilder.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyBuilder.java
index 0c7c04c..b492fa1 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyBuilder.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyBuilder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -276,9 +276,9 @@
/**
* Create an ICompilationUnit info from the given compilation unit on disk.
*/
- protected ICompilationUnit createCompilationUnitFromPath(Openable handle, IFile file) {
+ protected ICompilationUnit createCompilationUnitFromPath(Openable handle, IFile file, char[] moduleName) {
final char[] elementName = handle.getElementName().toCharArray();
- return new ResourceCompilationUnit(file, null) {
+ return new ResourceCompilationUnit(file, moduleName) {
@Override
public char[] getFileName() {
return elementName;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java
index a0d72dc..b3545ec 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/HierarchyResolver.java
@@ -37,6 +37,8 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.jdt.core.IModuleDescription;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
@@ -116,6 +118,7 @@
if (progressMonitor != null && progressMonitor.isCanceled())
throw new OperationCanceledException();
+ sanitizeBinaryType(binaryType);
BinaryTypeBinding typeBinding = this.lookupEnvironment.createBinaryTypeFrom(binaryType, packageBinding, accessRestriction);
try {
this.remember(binaryType, typeBinding);
@@ -124,6 +127,14 @@
}
}
+private void sanitizeBinaryType(IGenericType binaryType) {
+ if (binaryType instanceof HierarchyBinaryType) {
+ HierarchyBinaryType hierarchyBinaryType = (HierarchyBinaryType) binaryType;
+ if (hierarchyBinaryType.getSuperclassName() == null)
+ hierarchyBinaryType.recordSuperclass(CharOperation.concatWith(TypeConstants.JAVA_LANG_OBJECT, '/'));
+ }
+}
+
/**
* Add an additional compilation unit.
* @param sourceUnit
@@ -624,6 +635,7 @@
public void resolve(IGenericType suppliedType) {
try {
if (suppliedType.isBinaryType()) {
+ sanitizeBinaryType(suppliedType);
BinaryTypeBinding binaryTypeBinding = this.lookupEnvironment.cacheBinaryType((IBinaryType) suppliedType, false/*don't need field and method (bug 125067)*/, null /*no access restriction*/);
remember(suppliedType, binaryTypeBinding);
// We still need to add superclasses and superinterfaces bindings (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=53095)
@@ -753,7 +765,7 @@
} else {
// create parsed unit from file
IFile file = (IFile) cu.getResource();
- ICompilationUnit sourceUnit = this.builder.createCompilationUnitFromPath(openable, file);
+ ICompilationUnit sourceUnit = this.builder.createCompilationUnitFromPath(openable, file, findAssociatedModuleName(openable));
CompilationResult unitResult = new CompilationResult(sourceUnit, i, openablesLength, this.options.maxProblemsPerUnit);
parsedUnit = parser.dietParse(sourceUnit, unitResult);
}
@@ -786,6 +798,7 @@
}
if (binaryType != null) {
try {
+ sanitizeBinaryType(binaryType);
BinaryTypeBinding binaryTypeBinding = this.lookupEnvironment.cacheBinaryType(binaryType, false/*don't need field and method (bug 125067)*/, null /*no access restriction*/);
remember(binaryType, binaryTypeBinding);
if (openable.equals(focusOpenable)) {
@@ -891,6 +904,23 @@
reset();
}
}
+
+private char[] findAssociatedModuleName(Openable openable) {
+ IModuleDescription module = null;
+ IPackageFragmentRoot root = openable.getPackageFragmentRoot();
+ try {
+ if (root.getKind() == IPackageFragmentRoot.K_SOURCE)
+ module = root.getJavaProject().getModuleDescription(); // from any root in this project
+ else
+ module = root.getModuleDescription();
+ } catch (JavaModelException jme) {
+ // ignore, cannot associate to any module
+ }
+ if (module != null)
+ return module.getElementName().toCharArray();
+ return null;
+}
+
private void setEnvironment(LookupEnvironment lookupEnvironment, HierarchyBuilder builder) {
this.lookupEnvironment = lookupEnvironment;
this.builder = builder;
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/IndexBasedHierarchyBuilder.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/IndexBasedHierarchyBuilder.java
index 216d1e1..3ff7bca 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/IndexBasedHierarchyBuilder.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/hierarchy/IndexBasedHierarchyBuilder.java
@@ -404,8 +404,8 @@
}
}
@Override
-protected ICompilationUnit createCompilationUnitFromPath(Openable handle, IFile file) {
- ICompilationUnit unit = super.createCompilationUnitFromPath(handle, file);
+protected ICompilationUnit createCompilationUnitFromPath(Openable handle, IFile file, char[] moduleName) {
+ ICompilationUnit unit = super.createCompilationUnitFromPath(handle, file, moduleName);
this.cuToHandle.put(unit, handle);
return unit;
}
diff --git a/org.eclipse.jdt.core/pom.xml b/org.eclipse.jdt.core/pom.xml
index db26c67..b7fc9c7 100644
--- a/org.eclipse.jdt.core/pom.xml
+++ b/org.eclipse.jdt.core/pom.xml
@@ -5,7 +5,7 @@
are made available under the terms of the Eclipse Distribution License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/org/documents/edl-v10.php
-
+
Contributors:
Igor Fedorenko - initial implementation
-->
@@ -14,11 +14,11 @@
<parent>
<artifactId>eclipse.jdt.core</artifactId>
<groupId>eclipse.jdt.core</groupId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.core</artifactId>
- <version>3.16.0-SNAPSHOT</version>
+ <version>3.17.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>
diff --git a/pom.xml b/pom.xml
index ed399ef..2100986 100644
--- a/pom.xml
+++ b/pom.xml
@@ -15,13 +15,13 @@
<parent>
<groupId>org.eclipse</groupId>
<artifactId>eclipse-platform-parent</artifactId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
<relativePath>../eclipse-platform-parent</relativePath>
</parent>
<groupId>eclipse.jdt.core</groupId>
<artifactId>eclipse.jdt.core</artifactId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
diff --git a/tests-pom/pom.xml b/tests-pom/pom.xml
index 7635fc9..40f522d 100644
--- a/tests-pom/pom.xml
+++ b/tests-pom/pom.xml
@@ -14,10 +14,10 @@
<parent>
<groupId>eclipse.jdt.core</groupId>
<artifactId>eclipse.jdt.core</artifactId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
</parent>
<artifactId>tests-pom</artifactId>
- <version>4.10.0-SNAPSHOT</version>
+ <version>4.11.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<code.ignoredWarnings>${tests.ignoredWarnings}</code.ignoredWarnings>