Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lombok causes an IndexOutOfBoundsException in AnnotationPosition #1327

Closed
sulume opened this issue Aug 6, 2019 · 8 comments
Closed

lombok causes an IndexOutOfBoundsException in AnnotationPosition #1327

sulume opened this issue Aug 6, 2019 · 8 comments
Labels

Comments

@sulume
Copy link

sulume commented Aug 6, 2019

Description of the problem / feature request:

(omitted): error: An unhandled exception was thrown by the Error Prone static analysis plugin.
    @NonNull private String id;
                            ^
     Please report this at https://github.com/google/error-prone/issues/new and include the following:

     error-prone version: 2.3.3
     BugPattern: AnnotationPosition
     Stack Trace:
     java.lang.IndexOutOfBoundsException
        at java.nio.HeapCharBuffer.subSequence(HeapCharBuffer.java:580)
        at java.nio.HeapCharBuffer.subSequence(HeapCharBuffer.java:42)
        at com.google.errorprone.VisitorState.getSourceForNode(VisitorState.java:513)
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
        at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
        at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
        at com.google.errorprone.bugpatterns.AnnotationPosition.joinSource(AnnotationPosition.java:248)
        at com.google.errorprone.bugpatterns.AnnotationPosition.checkAnnotations(AnnotationPosition.java:227)
        at com.google.errorprone.bugpatterns.AnnotationPosition.handle(AnnotationPosition.java:127)
        at com.google.errorprone.bugpatterns.AnnotationPosition.matchVariable(AnnotationPosition.java:107)
        at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:433)
        at com.google.errorprone.scanner.ErrorProneScanner.visitVariable(ErrorProneScanner.java:870)
        at com.google.errorprone.scanner.ErrorProneScanner.visitVariable(ErrorProneScanner.java:150)
        at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:968)
        at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at com.google.errorprone.scanner.Scanner.scan(Scanner.java:71)
        at com.google.errorprone.scanner.Scanner.scan(Scanner.java:45)
        at com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
        at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
        at com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:187)
        at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:535)
        at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:150)
        at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
        at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at com.google.errorprone.scanner.Scanner.scan(Scanner.java:71)
        at com.google.errorprone.scanner.Scanner.scan(Scanner.java:45)
        at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:90)
        at com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
        at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
        at com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:187)
        at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:535)
        at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:150)
        at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
        at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
        at com.google.errorprone.scanner.Scanner.scan(Scanner.java:71)
        at com.google.errorprone.scanner.Scanner.scan(Scanner.java:45)
        at com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
        at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
        at com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:144)
        at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:546)
        at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:150)
        at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:591)
        at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:56)
        at com.google.errorprone.scanner.Scanner.scan(Scanner.java:55)
        at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:43)
        at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:151)
        at com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:120)
        at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1404)
        at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1353)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:946)
        at com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:100)
        at com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:142)
        at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:96)
        at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:90)
        at org.gradle.api.internal.tasks.compile.AnnotationProcessingCompileTask.call(AnnotationProcessingCompileTask.java:92)
        at org.gradle.api.internal.tasks.compile.ResourceCleaningCompilationTask.call(ResourceCleaningCompilationTask.java:57)
        at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:50)
        at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:36)
        at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerCallable.call(AbstractDaemonCompiler.java:86)
        at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerCallable.call(AbstractDaemonCompiler.java:74)
        at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:42)
        at org.gradle.workers.internal.WorkerDaemonServer.execute(WorkerDaemonServer.java:38)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:111)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:175)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:157)
        at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
        at java.lang.Thread.run(Thread.java:748)

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Not sure. The code pointed was a field of a static subclass annotated with lombok.NonNull.

What version of Error Prone are you using?

2.3.3

Have you found anything relevant by searching the web?

No.

@thomasgalvin
Copy link

thomasgalvin commented Sep 2, 2019

Can you provide a source code example?

@php-coder
Copy link

php-coder commented Jan 20, 2020

I have code that fails similarly: RegisterAccountForm I'm not sure that it exactly the same issue. Please, let me know if you want me to submit another issue for my case.

P.S. I'm using error-prone 2.3.4

@thomasgalvin
Copy link

thomasgalvin commented Jan 21, 2020

I have code that fails similarly: RegisterAccountForm I'm not sure that it exactly the same issue. Please, let me know if you want me to submit another issue for my case.

P.S. I'm using error-prone 2.3.4

Can you paste the stack trace?

@php-coder
Copy link

php-coder commented Jan 21, 2020

Can you paste the stack trace?

Sure, but I haven't found how to instruct maven/error-prone to output it. I tried to pass <debug>true</debug> to maven-compiler plugin and tried to run mvn -X compile but it didn't work or shown a stacktrace that doesn't contain error-prone libraries (only maven). Documentation on the site also doesn't seem mention how to enable debug/trace mode.

Could you guide me, please?

@thomasgalvin
Copy link

thomasgalvin commented Jan 21, 2020

Can you paste the stack trace?

Sure, but I haven't found how to instruct maven/error-prone to output it. I tried to pass <debug>true</debug> to maven-compiler plugin and tried to run mvn -X compile but it didn't work or shown a stacktrace that doesn't contain error-prone libraries (only maven). Documentation on the site also doesn't seem mention how to enable debug/trace mode.

Could you guide me, please?

If you aren't seeing error prone in the stack trace, you're having a different issue. When this bug happens, there's a stack trace pointing to a specific line in the EP library itself.

@cushon cushon added the lombok label May 19, 2020
@cushon cushon changed the title error: An unhandled exception was thrown by the Error Prone static analysis plugin. lombok causes an IndexOutOfBoundsException in AnnotationPosition Jan 19, 2021
@cushon
Copy link
Collaborator

cushon commented Jan 19, 2021

Does anyone have a self-contained minimal example of code that causes a crash in AnnotationPosition?

@fprochazka
Copy link

fprochazka commented Jan 6, 2022

I'm not using lombok, but the combination of @Nullable var causes a similar problem

    public static void main(final String[] args)
    {
        @Nullable var date = now();
        System.out.println(date);
    }

    public static Date now()
    {
        return Date.from(Instant.now(Clock.systemDefaultZone()));
    }
java.lang.IndexOutOfBoundsException: Range [3318, -1) out of bounds for length 7539
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project core: Compilation failure
[ERROR] /home/fprochazka/devel/reproducer/src/main/java/com/cogvio/Trigger.java:[78,23] An unhandled exception was thrown by the Error Prone static analysis plugin.
[ERROR]      Please report this at https://github.com/google/error-prone/issues/new and include the following:
[ERROR]   
[ERROR]      error-prone version: 2.10.0
[ERROR]      BugPattern: AnnotationPosition
[ERROR]      Stack Trace:
[ERROR]      java.lang.IndexOutOfBoundsException: Range [3318, -1) out of bounds for length 7539
[ERROR]   	at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
[ERROR]   	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:76)
[ERROR]   	at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:313)
[ERROR]   	at java.base/java.util.Objects.checkFromToIndex(Objects.java:385)
[ERROR]   	at java.base/java.nio.HeapCharBuffer.subSequence(HeapCharBuffer.java:664)
[ERROR]   	at java.base/java.nio.HeapCharBuffer.subSequence(HeapCharBuffer.java:44)
[ERROR]   	at com.google.errorprone.VisitorState.getOffsetTokens(VisitorState.java:589)
[ERROR]   	at com.google.errorprone.bugpatterns.AnnotationPosition.annotationTokens(AnnotationPosition.java:180)
[ERROR]   	at com.google.errorprone.bugpatterns.AnnotationPosition.handle(AnnotationPosition.java:120)
[ERROR]   	at com.google.errorprone.bugpatterns.AnnotationPosition.matchVariable(AnnotationPosition.java:110)
[ERROR]   	at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:449)
[ERROR]   	at com.google.errorprone.scanner.ErrorProneScanner.visitVariable(ErrorProneScanner.java:884)
[ERROR]   	at com.google.errorprone.scanner.ErrorProneScanner.visitVariable(ErrorProneScanner.java:150)
[ERROR]   	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:1045)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:86)
[ERROR]   	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:74)
[ERROR]   	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:48)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:111)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:272)
[ERROR]   	at com.google.errorprone.scanner.ErrorProneScanner.visitBlock(ErrorProneScanner.java:520)
[ERROR]   	at com.google.errorprone.scanner.ErrorProneScanner.visitBlock(ErrorProneScanner.java:150)
[ERROR]   	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1103)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:86)
[ERROR]   	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:74)
[ERROR]   	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:48)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:96)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreeScanner.visitMethod(TreeScanner.java:224)
[ERROR]   	at com.google.errorprone.scanner.ErrorProneScanner.visitMethod(ErrorProneScanner.java:740)
[ERROR]   	at com.google.errorprone.scanner.ErrorProneScanner.visitMethod(ErrorProneScanner.java:150)
[ERROR]   	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:953)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:86)
[ERROR]   	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:74)
[ERROR]   	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:48)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:96)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:111)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:119)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:203)
[ERROR]   	at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:548)
[ERROR]   	at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:150)
[ERROR]   	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:860)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:86)
[ERROR]   	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:74)
[ERROR]   	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:48)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:111)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:119)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:152)
[ERROR]   	at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:560)
[ERROR]   	at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:150)
[ERROR]   	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:614)
[ERROR]   	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:60)
[ERROR]   	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:58)
[ERROR]   	at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:43)
[ERROR]   	at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:152)
[ERROR]   	at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
[ERROR]   	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1394)
[ERROR]   	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1341)
[ERROR]   	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:933)
[ERROR]   	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
[ERROR]   	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
[ERROR]   	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
[ERROR]   	at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
[ERROR]   	at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126)
[ERROR]   	at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:174)
[ERROR]   	at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1134)
[ERROR]   	at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:187)
[ERROR]   	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR]   	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR]   	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR]   	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR]   	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR]   	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR]   	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR]   	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR]   	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR]   	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR]   	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR]   	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:972)
[ERROR]   	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
[ERROR]   	at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
[ERROR]   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR]   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]   	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[ERROR]   	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR]   	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR]   	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR]   	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[ERROR]   	at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
pom.xml
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.8.1</version>
    <configuration combine.self="append">
        <release>11</release>
        <compilerArgs combine.self="override">
            <arg>-Werror</arg>
            <arg>-Xlint:all,-fallthrough,-processing,-serial,-classfile,-path</arg>
            <arg>-parameters</arg>
            <arg>-XDcompilePolicy=simple</arg>
            <arg>-Xplugin:ErrorProne
                -XepDisableWarningsInGeneratedCode
                -XepAllDisabledChecksAsWarnings
                -XepOpt:Immutable:KnownImmutable=javax.money.CurrencyUnit
                -Xep:AndroidJdkLibsChecker:OFF
                -Xep:BooleanParameter:OFF
                -Xep:CatchingUnchecked:OFF
                -Xep:DeduplicateConstants:OFF
                -Xep:FieldCanBeFinal:OFF
                -Xep:HashCodeToString:OFF
                -Xep:ImmutableMemberCollection:OFF
                -Xep:InconsistentOverloads:OFF
                -Xep:InlineMeSuggester:OFF
                -Xep:InvalidBlockTag:OFF
                -Xep:Java7ApiChecker:OFF
                -Xep:Java8ApiChecker:OFF
                -Xep:MethodCanBeStatic:OFF
                -Xep:MissingSummary:OFF
                -Xep:NoFunctionalReturnType:OFF
                -Xep:OptionalOfRedundantMethod:OFF
                -Xep:ReturnMissingNullable:OFF
                -Xep:StaticOrDefaultInterfaceMethod:OFF
                -Xep:StaticQualifiedUsingExpression:OFF
                -Xep:StringSplitter:OFF
                -Xep:SuppressWarningsWithoutExplanation:OFF
                -Xep:TooManyParameters:OFF
                -Xep:TryFailRefactoring:OFF
                -Xep:TypeParameterNaming:OFF
                -Xep:UnnecessaryFinal:OFF
                -Xep:Var:OFF
                -Xep:WildcardImport:OFF
            </arg>
        </compilerArgs>
        <annotationProcessorPaths combine.self="append">
            <path>
                <groupId>com.google.errorprone</groupId>
                <artifactId>error_prone_core</artifactId>
                <version>2.10.0</version>
            </path>
            <path>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>31.0.1-jre</version>
            </path>
        </annotationProcessorPaths>
        <showWarnings>true</showWarnings>
    </configuration>
</plugin>

@Stephan202
Copy link
Contributor

Stephan202 commented Jan 18, 2022

@fprochazka it appears to happen for all annotated var usages; I filed #2867.

Stephan202 added a commit to PicnicSupermarket/error-prone that referenced this issue Jan 19, 2022
Stephan202 added a commit to PicnicSupermarket/error-prone that referenced this issue Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants