From 5e50fb8333f90a226b27b89324df6814e19a1c2f Mon Sep 17 00:00:00 2001
From: Michael Osipov <1983-01-06@gmx.net>
Date: Fri, 14 Oct 2022 20:49:52 +0200
Subject: [PATCH] Add test output for MCOMPILER-509
---
.../plexus-compiler-javac/pom.xml | 4 +-
.../javac/ErrorMessageParserTest.java | 99 +-
.../src/test/resources/MCOMPILER-509.txt | 3831 +++++++++++++++++
3 files changed, 3892 insertions(+), 42 deletions(-)
create mode 100644 plexus-compilers/plexus-compiler-javac/src/test/resources/MCOMPILER-509.txt
diff --git a/plexus-compilers/plexus-compiler-javac/pom.xml b/plexus-compilers/plexus-compiler-javac/pom.xml
index c44bacc3..212fc87f 100644
--- a/plexus-compilers/plexus-compiler-javac/pom.xml
+++ b/plexus-compilers/plexus-compiler-javac/pom.xml
@@ -7,7 +7,7 @@
plexus-compilers
2.12.2-SNAPSHOT
-
+
plexus-compiler-javac
Plexus Javac Component
@@ -33,5 +33,5 @@
test
-
+
diff --git a/plexus-compilers/plexus-compiler-javac/src/test/java/org/codehaus/plexus/compiler/javac/ErrorMessageParserTest.java b/plexus-compilers/plexus-compiler-javac/src/test/java/org/codehaus/plexus/compiler/javac/ErrorMessageParserTest.java
index b54b4128..b21c402f 100644
--- a/plexus-compilers/plexus-compiler-javac/src/test/java/org/codehaus/plexus/compiler/javac/ErrorMessageParserTest.java
+++ b/plexus-compilers/plexus-compiler-javac/src/test/java/org/codehaus/plexus/compiler/javac/ErrorMessageParserTest.java
@@ -26,7 +26,9 @@
import java.io.BufferedReader;
import java.io.IOException;
+import java.io.InputStreamReader;
import java.io.StringReader;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
@@ -679,16 +681,16 @@ public void testCRLF_windows()
@Test
public void testJava6Error() throws Exception
{
- String out = "Error.java:3: cannot find symbol" + EOL +
- "symbol : class Properties" + EOL +
- "location: class Error" + EOL +
- " Properties p = new Properties();" + EOL +
- " ^" + EOL +
- "Error.java:3: cannot find symbol" + EOL +
- "symbol : class Properties" + EOL +
- "location: class Error" + EOL +
- " Properties p = new Properties();" + EOL +
- " ^" + EOL +
+ String out = "Error.java:3: cannot find symbol" + EOL +
+ "symbol : class Properties" + EOL +
+ "location: class Error" + EOL +
+ " Properties p = new Properties();" + EOL +
+ " ^" + EOL +
+ "Error.java:3: cannot find symbol" + EOL +
+ "symbol : class Properties" + EOL +
+ "location: class Error" + EOL +
+ " Properties p = new Properties();" + EOL +
+ " ^" + EOL +
"2 errors";
List compilerErrors = JavacCompiler.parseModernStream( 1, new BufferedReader( new StringReader( out ) ));
@@ -710,7 +712,7 @@ public void testJava6Error() throws Exception
assertThat( message1.getStartLine(), is(3) );
assertThat( message1.getEndLine(), is(3) );
-
+
CompilerMessage message2 = compilerErrors.get( 1 );
assertThat( message2.isError(), is(true) );
@@ -731,52 +733,52 @@ public void testJava6Error() throws Exception
@Test
public void testJava7Error() throws Exception
{
- String out = "Error.java:3: error: cannot find symbol" + EOL +
- " Properties p = new Properties();" + EOL +
- " ^" + EOL +
- " symbol: class Properties" + EOL +
- " location: class Error" + EOL +
- "Error.java:3: error: cannot find symbol" + EOL +
- " Properties p = new Properties();" + EOL +
- " ^" + EOL +
- " symbol: class Properties" + EOL +
- " location: class Error" + EOL +
+ String out = "Error.java:3: error: cannot find symbol" + EOL +
+ " Properties p = new Properties();" + EOL +
+ " ^" + EOL +
+ " symbol: class Properties" + EOL +
+ " location: class Error" + EOL +
+ "Error.java:3: error: cannot find symbol" + EOL +
+ " Properties p = new Properties();" + EOL +
+ " ^" + EOL +
+ " symbol: class Properties" + EOL +
+ " location: class Error" + EOL +
"2 errors";
-
+
List compilerErrors = JavacCompiler.parseModernStream( 1, new BufferedReader( new StringReader( out ) ));
-
+
assertThat( compilerErrors, notNullValue() );
-
+
CompilerMessage message1 = compilerErrors.get( 0 );
assertThat( message1.isError(), is(true) );
-
+
assertThat( message1.getMessage(), is("error: cannot find symbol" + EOL +
" symbol: class Properties" + EOL +
" location: class Error") );
-
+
assertThat( message1.getStartColumn(), is(16) );
-
+
assertThat( message1.getEndColumn(), is(26) );
-
+
assertThat( message1.getStartLine(), is(3) );
-
+
assertThat( message1.getEndLine(), is(3) );
-
+
CompilerMessage message2 = compilerErrors.get( 1 );
-
+
assertThat( message2.isError(), is(true) );
-
+
assertThat( message2.getMessage(), is("error: cannot find symbol" + EOL +
" symbol: class Properties" + EOL +
" location: class Error") );
-
+
assertThat( message2.getStartColumn(), is(35) );
-
+
assertThat( message2.getEndColumn(), is(48) );
-
+
assertThat( message2.getStartLine(), is(3) );
-
+
assertThat( message2.getEndLine(), is(3) );
}
@@ -785,13 +787,13 @@ public void testBugParade() throws Exception
{
String out = "An exception has occurred in the compiler (1.7.0_80). "
+ "Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. "
- + "Include your program and the following diagnostic in your report. Thank you." + EOL +
+ + "Include your program and the following diagnostic in your report. Thank you." + EOL +
"com.sun.tools.javac.code.Symbol$CompletionFailure: class file for java.util.Optional not found";
-
+
List compilerErrors = JavacCompiler.parseModernStream( 4, new BufferedReader( new StringReader( out ) ));
assertThat( compilerErrors, notNullValue() );
-
+
assertThat( compilerErrors.size(), is(1) );
}
@@ -919,7 +921,7 @@ public void testIssue37() throws IOException {
public void testJvmError() throws Exception
{
String out = "Error occurred during initialization of boot layer" + EOL +
- "java.lang.module.FindException: Module java.xml.bind not found";
+ "java.lang.module.FindException: Module java.xml.bind not found";
List compilerErrors = JavacCompiler.parseModernStream( 1, new BufferedReader( new StringReader( out ) ));
@@ -980,6 +982,23 @@ public void testWarningFollowedByBadSourceFileError() throws Exception
validateBadSourceFile(secondMessage);
}
+ @Test
+ public void testMCOMPILER509() throws Exception
+ {
+ List compilerMessages = JavacCompiler.parseModernStream( 0,
+ new BufferedReader( new InputStreamReader(
+ getClass().getResourceAsStream( "/MCOMPILER-509.txt" ), StandardCharsets.UTF_8 ) ) );
+
+ int i = 1;
+ for ( CompilerMessage message : compilerMessages )
+ {
+ System.out.println( i + ":========================================:" + i );
+ System.out.println( message );
+ System.out.println( i + ":========================================:" + i );
+ i++;
+ }
+ }
+
private void validateBadSourceFile(CompilerMessage message)
{
assertThat( "Is an Error", message.getKind(), is(CompilerMessage.Kind.ERROR) );
diff --git a/plexus-compilers/plexus-compiler-javac/src/test/resources/MCOMPILER-509.txt b/plexus-compilers/plexus-compiler-javac/src/test/resources/MCOMPILER-509.txt
new file mode 100644
index 00000000..fb1732ce
--- /dev/null
+++ b/plexus-compilers/plexus-compiler-javac/src/test/resources/MCOMPILER-509.txt
@@ -0,0 +1,3831 @@
+WARNING: An illegal reflective access operation has occurred
+WARNING: Illegal reflective access by org.checkerframework.javacutil.Resolver (file:/C:/Users/osipovmi/.m2/repository/org/checkerframework/checker/3.25.0/checker-3.25.0.jar) to method com.sun.tools.javac.comp.Resolve.findMethod(com.sun.tools.javac.comp.Env,com.sun.tools.javac.code.Type,com.sun.tools.javac.util.Name,com.sun.tools.javac.util.List,com.sun.tools.javac.util.List,boolean,boolean)
+WARNING: Please consider reporting this to the maintainers of org.checkerframework.javacutil.Resolver
+WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
+WARNING: All illegal access operations will be denied in a future release
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\BlockParentHandler.java:208: warning: [not.interned] attempting to use a non-@Interned comparison operand
+ if (nonList != nonListStartAst) {
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\BlockParentHandler.java:208: warning: [not.interned] attempting to use a non-@Interned comparison operand
+ if (nonList != nonListStartAst) {
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\AbstractExpressionHandler.java:60: warning: [initialization.fields.uninitialized] the constructor does not initialize fields: indent
+ protected AbstractExpressionHandler(IndentationCheck indentCheck, String typeName,
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\AbstractExpressionHandler.java:441: warning: [not.interned] attempting to use a non-@Interned comparison operand
+ while (curNode != ast && toVisit == null) {
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\AbstractExpressionHandler.java:441: warning: [not.interned] attempting to use a non-@Interned comparison operand
+ while (curNode != ast && toVisit == null) {
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\IndentationCheck.java:317: warning: [assignment] incompatible types in assignment.
+
+ private final LineWrappingHandler lineWrappingHandler = new LineWrappingHandler(this);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.LineWrappingHandler.class) @NonNull LineWrappingHandler
+
+ required: @Initialized @NonNull LineWrappingHandler
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\IndentationCheck.java:317: warning: [argument] incompatible argument for parameter instance of LineWrappingHandler.
+
+ private final LineWrappingHandler lineWrappingHandler = new LineWrappingHandler(this);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.api.AbstractCheck.class) @NonNull IndentationCheck
+
+ required: @Initialized @NonNull IndentationCheck
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\IndentationCheck.java:323: warning: [initialization.field.uninitialized] the default constructor does not initialize field incorrectIndentationLines
+ private Set incorrectIndentationLines;
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\IndentationCheck.java:533: warning: [argument] incompatible argument for parameter parent of getHandler.
+
+ handlers.peek());
+ ^
+ found : @Initialized @Nullable AbstractExpressionHandler
+
+ required: @Initialized @NonNull AbstractExpressionHandler
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\AbstractCheck.java:49: warning: [type.argument] incompatible type argument for type parameter T of ThreadLocal.
+
+ private final ThreadLocal context = ThreadLocal.withInitial(FileContext::new);
+ ^
+ found : @Initialized @NonNull FileContext
+
+ required: [extends @Initialized @Nullable Object super null (NullType)]
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\AbstractCheck.java:239: warning: [argument] incompatible argument for parameter customMessage of Violation.
+
+ getCustomMessages().get(key)));
+ ^
+ found : @Initialized @Nullable String
+
+ required: @Initialized @NonNull String
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\AbstractCheck.java:257: warning: [argument] incompatible argument for parameter customMessage of Violation.
+
+ getCustomMessages().get(key)));
+ ^
+ found : @Initialized @Nullable String
+
+ required: @Initialized @NonNull String
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\AbstractCheck.java:289: warning: [argument] incompatible argument for parameter customMessage of Violation.
+
+ getCustomMessages().get(key)));
+ ^
+ found : @Initialized @Nullable String
+
+ required: @Initialized @NonNull String
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\AbstractCheck.java:339: warning: [initialization.field.uninitialized] the default constructor does not initialize field fileContents
+ private FileContents fileContents;
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\AbstractViolationReporter.java:41: warning: [initialization.field.uninitialized] the default constructor does not initialize field id
+ private String id;
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\AutomaticBean.java:80: warning: [initialization.field.uninitialized] the default constructor does not initialize field configuration
+ private Configuration configuration;
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\AutomaticBean.java:348: warning: [return] incompatible types in return.
+
+ return result;
+ ^
+ type of expression: @Initialized @Nullable URI
+
+ method return type: @Initialized @NonNull Object
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\AutomaticBean.java:372: warning: [toarray.nullable.elements.not.newarray] call of toArray on collection of non-null elements yields an array of possibly-null elements; omit the argument to toArray or make it an explicit array constructor
+ return result.toArray(CommonUtil.EMPTY_STRING_ARRAY);
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\AutomaticBean.java:401: warning: [toarray.nullable.elements.not.newarray] call of toArray on collection of non-null elements yields an array of possibly-null elements; omit the argument to toArray or make it an explicit array constructor
+ return result.toArray(EMPTY_MODIFIER_ARRAY);
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\LineWrappingHandler.java:257: warning: [not.interned] attempting to use a non-@Interned comparison operand
+ while (curNode != lastNode) {
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\LineWrappingHandler.java:257: warning: [not.interned] attempting to use a non-@Interned comparison operand
+ while (curNode != lastNode) {
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:53: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.CASE_GROUP, CaseHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:54: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.LITERAL_SWITCH, SwitchHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:55: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.SLIST, SlistHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:56: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.PACKAGE_DEF, PackageDefHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:57: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.LITERAL_ELSE, ElseHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:58: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.LITERAL_IF, IfHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:59: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.LITERAL_TRY, TryHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:60: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.LITERAL_CATCH, CatchHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:61: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.LITERAL_FINALLY, FinallyHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:62: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.LITERAL_DO, DoWhileHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:63: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.LITERAL_WHILE, WhileHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:64: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.LITERAL_FOR, ForHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:65: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.METHOD_DEF, MethodDefHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:66: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.CTOR_DEF, MethodDefHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:67: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.CLASS_DEF, ClassDefHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:68: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.ENUM_DEF, ClassDefHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:69: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.OBJBLOCK, ObjectBlockHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:70: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.INTERFACE_DEF, ClassDefHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:71: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.IMPORT, ImportHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:72: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.ARRAY_INIT, ArrayInitHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:73: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.ANNOTATION_ARRAY_INIT, AnnotationArrayInitHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:74: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.METHOD_CALL, MethodCallHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:75: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.CTOR_CALL, MethodCallHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:76: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.SUPER_CTOR_CALL, MethodCallHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:77: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.LABELED_STAT, LabelHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:78: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.STATIC_INIT, StaticInitHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:79: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.INSTANCE_INIT, SlistHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:80: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.VARIABLE_DEF, MemberDefHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:81: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.LITERAL_NEW, NewHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:82: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.INDEX_OP, IndexHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:83: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.LITERAL_SYNCHRONIZED, SynchronizedHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:84: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.LAMBDA, LambdaHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:85: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.ANNOTATION_DEF, ClassDefHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:86: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.ANNOTATION_FIELD_DEF, MethodDefHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:87: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.SWITCH_RULE, SwitchRuleHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:88: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.LITERAL_YIELD, YieldHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:89: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.RECORD_DEF, ClassDefHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:90: warning: [method.invocation] call to register(int,java.lang.Class) not allowed on the given receiver.
+
+ register(TokenTypes.COMPACT_CTOR_DEF, MethodDefHandler.class);
+ ^
+ found : @UnderInitialization(com.puppycrawl.tools.checkstyle.checks.indentation.HandlerFactory.class) @NonNull HandlerFactory
+
+ required: @Initialized @NonNull HandlerFactory
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:163: warning: [type.argument] incompatible type argument for type parameter T extends Object of invokeConstructor.
+
+ resultHandler = (AbstractExpressionHandler) CommonUtil.invokeConstructor(
+ ^
+ found : capture#125[ extends @UnknownKeyFor Object super @KeyForBottom Void]
+
+ required: [extends @UnknownKeyFor Object super @UnknownKeyFor NullType]
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:164: warning: [argument] incompatible argument for parameter constructor of invokeConstructor.
+
+ handlerCtor, indentCheck, ast, parent);
+ ^
+ found : @Initialized @Nullable Constructor
+
+ required: @Initialized @NonNull Constructor
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\HandlerFactory.java:166: warning: [return] incompatible types in return.
+
+ return resultHandler;
+ ^
+ type of expression: @Initialized @Nullable AbstractExpressionHandler
+
+ method return type: @Initialized @NonNull AbstractExpressionHandler
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\Violation.java:124: warning: [assignment] incompatible types in assignment.
+
+ this.args = null;
+ ^
+ found : null (NullType)
+
+ required: @Initialized @NonNull Object @Initialized @NonNull []
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\Violation.java:368: warning: [override.param] Incompatible parameter type for object.
+
+ public boolean equals(Object object) {
+ ^
+ found : @Initialized @NonNull Object
+
+ required: @Initialized @Nullable Object
+
+ Consequence: method in @Initialized @NonNull Violation
+
+ @Initialized @NonNull boolean equals(@Initialized @NonNull Violation this, @Initialized @NonNull Object p0)
+
+ cannot override method in @Initialized @NonNull Object
+
+ @Initialized @NonNull boolean equals(@Initialized @NonNull Object this, @Initialized @Nullable Object p0)
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\FileContents.java:224: warning: [return] incompatible types in return.
+
+ return javadocComments.get(lineNo);
+ ^
+ type of expression: @Initialized @Nullable TextBlock
+
+ method return type: @Initialized @NonNull TextBlock
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\FileText.java:109: warning: [assignment] incompatible types in assignment.
+
+ lineBreaks = null;
+ ^
+ found : null (NullType)
+
+ required: @Initialized @NonNull int @Initialized @NonNull []
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\FileText.java:127: warning: [initialization.fields.uninitialized] the constructor does not initialize fields: lineBreaks
+ public FileText(File file, List lines) {
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\FileText.java:134: warning: [assignment] incompatible types in assignment.
+
+ charset = null;
+ ^
+ found : null (NullType)
+
+ required: @Initialized @NonNull Charset
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\FileText.java:136: warning: [assignment] incompatible types in assignment.
+
+ this.lines = lines.toArray(CommonUtil.EMPTY_STRING_ARRAY);
+ ^
+ found : @Initialized @Nullable String @Initialized @NonNull []
+
+ required: @Initialized @NonNull String @Initialized @NonNull []
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\FileText.java:136: warning: [toarray.nullable.elements.not.newarray] call of toArray on collection of non-null elements yields an array of possibly-null elements; omit the argument to toArray or make it an explicit array constructor
+ this.lines = lines.toArray(CommonUtil.EMPTY_STRING_ARRAY);
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\FileText.java:152: warning: [initialization.fields.uninitialized] the constructor does not initialize fields: lineBreaks
+ public FileText(File file, String charsetName) throws IOException {
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\FileText.java:183: warning: [assignment] incompatible types in assignment.
+
+ lines = textLines.toArray(CommonUtil.EMPTY_STRING_ARRAY);
+ ^
+ found : @Initialized @Nullable String @Initialized @NonNull []
+
+ required: @Initialized @NonNull String @Initialized @NonNull []
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\FileText.java:183: warning: [toarray.nullable.elements.not.newarray] call of toArray on collection of non-null elements yields an array of possibly-null elements; omit the argument to toArray or make it an explicit array constructor
+ lines = textLines.toArray(CommonUtil.EMPTY_STRING_ARRAY);
+ ^
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\api\LineColumn.java:78: warning: [override.param] Incompatible parameter type for other.
+
+ public boolean equals(Object other) {
+ ^
+ found : @Initialized @NonNull Object
+
+ required: @Initialized @Nullable Object
+
+ Consequence: method in @Initialized @NonNull LineColumn
+
+ @Initialized @NonNull boolean equals(@Initialized @NonNull LineColumn this, @Initialized @NonNull Object p0)
+
+ cannot override method in @Initialized @NonNull Object
+
+ @Initialized @NonNull boolean equals(@Initialized @NonNull Object this, @Initialized @Nullable Object p0)
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\DetailAstSet.java:86: warning: [return] incompatible types in return.
+
+ return startColumn;
+ ^
+ type of expression: @Initialized @Nullable Integer
+
+ method return type: @Initialized @NonNull Integer
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\indentation\DetailAstSet.java:114: warning: [return] incompatible types in return.
+
+ return astLines.get(lineNum);
+ ^
+ type of expression: @Initialized @Nullable DetailAST
+
+ method return type: @Initialized @NonNull DetailAST
+C:\Entwicklung\Projekte\checkstyle\src\main\java\com\puppycrawl\tools\checkstyle\checks\javadoc\AbstractJavadocCheck.java:78: warning: [type.argument] incompatible type argument for type parameter T of ThreadLocal.
+
+ private static final ThreadLocal