Catch common Java mistakes as compile-time errors

Overview

Error Prone

Error Prone is a static analysis tool for Java that catches common programming mistakes at compile-time.

public class ShortSet {
  public static void main (String[] args) {
    Set<Short> s = new HashSet<>();
    for (short i = 0; i < 100; i++) {
      s.add(i);
      s.remove(i - 1);
    }
    System.out.println(s.size());
  }
}
error: [CollectionIncompatibleType] Argument 'i - 1' should not be passed to this method;
its type int is not compatible with its collection's type argument Short
      s.remove(i - 1);
              ^
    (see https://errorprone.info/bugpattern/CollectionIncompatibleType)
1 error

Getting Started

Our documentation is at errorprone.info.

Error Prone works with Bazel, Maven, Ant, and Gradle. See our installation instructions for details.

Developing Error Prone

Developing and building Error Prone is documented on the wiki.

Links

Comments
  • JDK 14/15 compatibility

    JDK 14/15 compatibility

    What version of Error Prone are you using?

    2.3.4 (originally 2.3.1)

    Does this issue reproduce with the latest release?

    Yes

    What did you do?

    Error-prone does not work with JDK12 EA b09 and produces the following exception:

        [javac] 1 warning
        [javac] An exception has occurred in the compiler (12-ea). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
        [javac] java.lang.NoSuchMethodError: com.sun.tools.javac.util.Log.error(Lcom/sun/tools/javac/util/JCDiagnostic$DiagnosticPosition;Ljava/lang/String;[Ljava/lang/Object;)V
        [javac] 	at com.google.errorprone.ErrorProneError.logFatalError(ErrorProneError.java:55)
        [javac] 	at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:155)
        [javac] 	at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
        [javac] 	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1418)
        [javac] 	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1365)
        [javac] 	at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:960)
        [javac] 	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:311)
        [javac] 	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:170)
        [javac] 	at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
        [javac] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        [javac] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        [javac] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        [javac] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        [javac] 	at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:57)
        [javac] 	at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1404)
        [javac] 	at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1133)
        [javac] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
        [javac] 	at jdk.internal.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
        [javac] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        [javac] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        [javac] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
        [javac] 	at org.apache.tools.ant.Task.perform(Task.java:350)
        [javac] 	at org.apache.tools.ant.Target.execute(Target.java:449)
        [javac] 	at org.apache.tools.ant.Target.performTasks(Target.java:470)
        [javac] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
        [javac] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
        [javac] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        [javac] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        [javac] 	at org.apache.tools.ant.Main.runBuild(Main.java:834)
        [javac] 	at org.apache.tools.ant.Main.startAnt(Main.java:223)
        [javac] 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
        [javac] 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
    

    It works fine with previous build (JDK 12 EA b08). I don't know what change causes this error.

    opened by don-vip 48
  • Full Java 8 support

    Full Java 8 support

    Original issue created by [email protected] on 2014-03-27 at 04:19 PM


    Right now we have a build for javac 8 but are missing two important items needed for full support:

    1. Our Jenkins continuous build does not run Java 8 yet, only 6 and 7.

    2. We don't yet distribute the error-prone 8 jars to Sonatype. We probably want to distribute two sets of jars, one for versions 6 and 7, and one for 8. It would be nice if Maven could figure out which dependency to use based on the version of javac installed.

    Priority-High migrated Status-Accepted 
    opened by cushon 26
  • 'An illegal reflective access operation has occurred' warnings

    'An illegal reflective access operation has occurred' warnings

    The warning:

    Changes detected - recompiling the module!
    Compiling 8 source files to /home/my_stuff/target/classes
    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by com.google.errorprone.bugpatterns.FutureReturnValueIgnored (file:/my_home/.m2/repository/com/google/errorprone/error_prone_core/2.3.2/error_prone_core-2.3.2.jar) to field com.sun.tools.javac.code.Type$StructuralTypeMapping$4.this$0
    WARNING: Please consider reporting this to the maintainers of com.google.errorprone.bugpatterns.FutureReturnValueIgnored
    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
    
    $ java --version
    openjdk 11.0.1 2018-10-16
    OpenJDK Runtime Environment 18.9 (build 11.0.1+13)
    OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)
    

    Java code that (rightfully) triggers the warning:

    @SuppressWarnings("FutureReturnValueIgnored")
    private void schedule(Runnable runnable, long delayMs) {
        try {
            scheduledExecutorService.schedule(runnable, delayMs, TimeUnit.MILLISECONDS);
        } catch (RejectedExecutionException ex) {
            // shutting down, no more checks
        }
    }
    

    I'm using the maven plugin as such:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
            <release>11</release>
            <debug>true</debug>
            <showDeprecation>true</showDeprecation>
            <showWarnings>true</showWarnings>
            <compilerArgument>-parameters</compilerArgument>
            <compilerArgs>
                <arg>-Xlint:all</arg>
                <arg>-Xlint:-processing</arg>
                <arg>-Werror</arg>
                <arg>-XDcompilePolicy=simple</arg>
                <arg>-Xplugin:ErrorProne</arg> 
            </compilerArgs>
            <annotationProcessorPaths>
                <path>
                    <groupId>com.google.errorprone</groupId>
                    <artifactId>error_prone_core</artifactId>
                    <version>2.3.2</version>
                </path>
            </annotationProcessorPaths> 
        </configuration>
    </plugin>
    
    opened by zimmi 24
  • lombok causes an IndexOutOfBoundsException in ParameterName

    lombok causes an IndexOutOfBoundsException in ParameterName

    After #690 was fixed, I removed the exclusions for the problematic bug patterns and tried to compile a project using Lombok, but it looks like the new bug pattern ParameterName also does not work well with Lombok it seems. Next time I'll make sure to try out Error Prone snapshots before a release :)

    Versions

    Error Prone version: 2.1.2 Lombok version: 1.16.18 / 1.16.16 Maven version: Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T04:39:06+09:00) Java version: 1.8.0_144, vendor: Oracle Corporation

    Note that I am also able to reproduce the issue with JDK 9.

    Reproducing Class:

    import lombok.Data;
    
    @Data
    public class SomeData {}
    

    Stack trace

    [ERROR]      Please report this at https://github.com/google/error-prone/issues/new and include the following:
    [ERROR]   
    [ERROR]      error-prone version: 2.1.2
    [ERROR]      Stack Trace:
    [ERROR]      java.lang.IndexOutOfBoundsException
    [ERROR]         at java.nio.HeapCharBuffer.subSequence(HeapCharBuffer.java:580)
    [ERROR]         at java.nio.HeapCharBuffer.subSequence(HeapCharBuffer.java:42)
    [ERROR]         at com.google.errorprone.bugpatterns.ParameterName.checkArguments(ParameterName.java:85)
    [ERROR]         at com.google.errorprone.bugpatterns.ParameterName.matchMethodInvocation(ParameterName.java:64)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScanner.visitMethodInvocation(ErrorProneScanner.java:907)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScanner.visitMethodInvocation(ErrorProneScanner.java:146)
    [ERROR]         at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1644)
    [ERROR]         at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
    [ERROR]         at com.google.errorprone.scanner.Scanner.scan(Scanner.java:82)
    [ERROR]         at com.google.errorprone.scanner.Scanner.scan(Scanner.java:42)
    [ERROR]         at com.sun.source.util.TreeScanner.visitUnary(TreeScanner.java:612)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScanner.visitUnary(ErrorProneScanner.java:1126)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScanner.visitUnary(ErrorProneScanner.java:146)
    [ERROR]         at com.sun.tools.javac.tree.JCTree$JCUnary.accept(JCTree.java:1956)
    [ERROR]         at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
    [ERROR]         at com.google.errorprone.scanner.Scanner.scan(Scanner.java:82)
    [ERROR]         at com.google.errorprone.scanner.Scanner.scan(Scanner.java:42)
    [ERROR]         at com.sun.source.util.TreeScanner.visitIf(TreeScanner.java:418)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScanner.visitIf(ErrorProneScanner.java:758)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScanner.visitIf(ErrorProneScanner.java:146)
    [ERROR]         at com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1427)
    [ERROR]         at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
    [ERROR]         at com.google.errorprone.scanner.Scanner.scan(Scanner.java:82)
    [ERROR]         at com.google.errorprone.scanner.Scanner.scan(Scanner.java:42)
    [ERROR]         at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:90)
    [ERROR]         at com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
    [ERROR]         at com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:248)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScanner.visitBlock(ErrorProneScanner.java:530)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScanner.visitBlock(ErrorProneScanner.java:146)
    [ERROR]         at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1026)
    [ERROR]         at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
    [ERROR]         at com.google.errorprone.scanner.Scanner.scan(Scanner.java:82)
    [ERROR]         at com.google.errorprone.scanner.Scanner.scan(Scanner.java:42)
    [ERROR]         at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:90)
    [ERROR]         at com.sun.source.util.TreeScanner.visitMethod(TreeScanner.java:206)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScanner.visitMethod(ErrorProneScanner.java:898)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScanner.visitMethod(ErrorProneScanner.java:146)
    [ERROR]         at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:898)
    [ERROR]         at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
    [ERROR]         at com.google.errorprone.scanner.Scanner.scan(Scanner.java:82)
    [ERROR]         at com.google.errorprone.scanner.Scanner.scan(Scanner.java:42)
    [ERROR]         at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:90)
    [ERROR]         at com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
    [ERROR]         at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
    [ERROR]         at com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:187)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:590)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:146)
    [ERROR]         at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
    [ERROR]         at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
    [ERROR]         at com.google.errorprone.scanner.Scanner.scan(Scanner.java:82)
    [ERROR]         at com.google.errorprone.scanner.Scanner.scan(Scanner.java:42)
    [ERROR]         at com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
    [ERROR]         at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
    [ERROR]         at com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:144)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:605)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:146)
    [ERROR]         at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:591)
    [ERROR]         at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:56)
    [ERROR]         at com.google.errorprone.scanner.Scanner.scan(Scanner.java:64)
    [ERROR]         at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:41)
    [ERROR]         at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:145)
    [ERROR]         at com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:120)
    [ERROR]         at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1425)
    [ERROR]         at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1374)
    [ERROR]         at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
    [ERROR]         at com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:100)
    [ERROR]         at com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:142)
    [ERROR]         at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:96)
    [ERROR]         at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:90)
    [ERROR]         at com.google.errorprone.BaseErrorProneCompiler.run(BaseErrorProneCompiler.java:137)
    [ERROR]         at com.google.errorprone.BaseErrorProneCompiler.run(BaseErrorProneCompiler.java:108)
    [ERROR]         at com.google.errorprone.ErrorProneCompiler.run(ErrorProneCompiler.java:118)
    [ERROR]         at org.codehaus.plexus.compiler.javac.errorprone.JavacCompilerWithErrorProne$CompilerInvoker.compile(JavacCompilerWithErrorProne.java:222)
    [ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [ERROR]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [ERROR]         at java.lang.reflect.Method.invoke(Method.java:498)
    [ERROR]         at org.codehaus.plexus.compiler.javac.errorprone.JavacCompilerWithErrorProne.performCompile(JavacCompilerWithErrorProne.java:91)
    [ERROR]         at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1075)
    [ERROR]         at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:168)
    [ERROR]         at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    [ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    [ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
    [ERROR]         at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
    [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:51)
    [ERROR]         at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    [ERROR]         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
    [ERROR]         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
    [ERROR]         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
    [ERROR]         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
    [ERROR]         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
    [ERROR]         at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
    [ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [ERROR]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [ERROR]         at java.lang.reflect.Method.invoke(Method.java:498)
    [ERROR]         at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    [ERROR]         at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    [ERROR]         at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    [ERROR]         at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    [ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [ERROR]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    [ERROR]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    [ERROR]         at java.lang.reflect.Method.invoke(Method.java:498)
    [ERROR]         at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)
    [ERROR]         at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)
    [ERROR]         at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:50)
    

    Workaround

    Disable the newly introduced ParameterName bug pattern via a compiler argument: -Xep:ParameterName:OFF

    lombok 
    opened by shakuzen 24
  • NullPointerException in 2.1.1 in Android compilation

    NullPointerException in 2.1.1 in Android compilation

    I can't see an obvious check that's failing here. This is compiling an Android application.

    3 warnings
    An exception has occurred in the compiler (1.8.0_112-release). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
    java.lang.NullPointerException
    	at com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitApply(Flow.java:1233)
    	at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1628)
    	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
    	at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:393)
    	at com.sun.tools.javac.tree.TreeScanner.visitExec(TreeScanner.java:213)
    	at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1446)
    	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
    	at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:393)
    	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
    	at com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitBlock(Flow.java:995)
    	at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1014)
    	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
    	at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:393)
    	at com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitMethodDef(Flow.java:962)
    	at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:866)
    	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
    	at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:393)
    	at com.sun.tools.javac.comp.Flow$FlowAnalyzer.visitClassDef(Flow.java:925)
    	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:774)
    	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
    	at com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:393)
    	at com.sun.tools.javac.comp.Flow$FlowAnalyzer.analyzeTree(Flow.java:1325)
    	at com.sun.tools.javac.comp.Flow$FlowAnalyzer.analyzeTree(Flow.java:1315)
    	at com.sun.tools.javac.comp.Flow.analyzeTree(Flow.java:213)
    	at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1410)
    	at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1374)
    	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
    	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 com.google.errorprone.BaseErrorProneCompiler.run(BaseErrorProneCompiler.java:137)
    	at com.google.errorprone.BaseErrorProneCompiler.run(BaseErrorProneCompiler.java:108)
    	at com.google.errorprone.ErrorProneCompiler.run(ErrorProneCompiler.java:118)
    	at com.google.errorprone.ErrorProneCompiler.compile(ErrorProneCompiler.java:65)
    	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 net.ltgt.gradle.errorprone.ErrorProneCompiler.execute(ErrorProneCompiler.java:76)
    	at net.ltgt.gradle.errorprone.ErrorProneCompiler.execute(ErrorProneCompiler.java:26)
    	at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.delegateAndHandleErrors(NormalizingJavaCompiler.java:104)
    	at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:53)
    	at org.gradle.api.internal.tasks.compile.NormalizingJavaCompiler.execute(NormalizingJavaCompiler.java:38)
    	at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:35)
    	at org.gradle.api.internal.tasks.compile.CleaningJavaCompilerSupport.execute(CleaningJavaCompilerSupport.java:25)
    	at org.gradle.api.tasks.compile.JavaCompile.performCompilation(JavaCompile.java:206)
    	at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:187)
    	at org.gradle.api.tasks.compile.JavaCompile.compile(JavaCompile.java:130)
    	at com.android.build.gradle.tasks.factory.AndroidJavaCompile.compile(AndroidJavaCompile.java:49)
    	at sun.reflect.GeneratedMethodAccessor1187.invoke(Unknown Source)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
    	at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:163)
    	at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
    	at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:123)
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:95)
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:76)
    	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
    	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
    	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
    	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
    	at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)
    	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
    	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
    	at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
    	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
    	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236)
    	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228)
    	at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
    	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
    	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
    	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)
    	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
    	at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77)
    	at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58)
    	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
    	at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    	at java.lang.Thread.run(Thread.java:745)
    
     FAILED
    
    FAILURE: Build failed with an exception.
    
    opened by leepa 24
  • Infinite compilation on JDK11

    Infinite compilation on JDK11

    When upgrading to JDK 11.01, the compilation never finishes but has high CPU activity. When removing ErrorProne, the compilation completes without a problem. I am unsure how to debug, e.g. to see what the javac process is doing, to provide more details.

    Environment:

    • JDK 11.01 (upgrading from 10+46)
    • Mac OS X Mojave
    • Gradle 5.0
    • ErrorProne:
      • core: 2.3.2
      • javac: 9+181-r4173-1
      • plugin: 0.6
    • Annotation Processors:
      • autoFactory: 1.0-beta6
      • autoValue: 1.6.3
      • autoValueBuilder: 2.9.1

    Of course if I disable the annotation processors then it fails due to the missing generated classes, but does terminate. Removing autoFactory leads to the hang, while autoValue is used too frequently to get a hang prior. So there is a chance that it is related to annotation processing (such as due to Gradle's incremental support), but could be something else.

    opened by ben-manes 21
  • Lombok breaks NestedInstanceOfConditions and InstanceOfAndCastMatchWrongType

    Lombok breaks NestedInstanceOfConditions and InstanceOfAndCastMatchWrongType

    Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:06-04:00) Java version: 1.8.0_131, vendor: Oracle Corporation Lombok version: 1.16.16

    java.lang.NullPointerException
            at lombok.javac.apt.LombokFileObjects.createEmpty(LombokFileObjects.java:123)
            at lombok.javac.apt.InterceptingJavaFileManager.getJavaFileForOutput(InterceptingJavaFileManager.java:47)
            at com.sun.tools.javac.processing.JavacFiler.createSourceOrClassFile(JavacFiler.java:478)
            at com.sun.tools.javac.processing.JavacFiler.createSourceFile(JavacFiler.java:417)
            at lombok.javac.apt.LombokProcessor.forceNewRound(LombokProcessor.java:333)
            at lombok.javac.apt.LombokProcessor.process(LombokProcessor.java:322)
            at lombok.core.AnnotationProcessor$JavacDescriptor.process(AnnotationProcessor.java:114)
            at lombok.core.AnnotationProcessor.process(AnnotationProcessor.java:164)
            at lombok.launch.AnnotationProcessorHider$AnnotationProcessor.process(AnnotationProcessor.java:74)
            at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:968)
            at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:884)
            at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2200(JavacProcessingEnvironment.java:108)
            at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1204)
            at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1313)
            at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1267)
            at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:943)
            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 com.google.errorprone.BaseErrorProneCompiler.run(BaseErrorProneCompiler.java:137)
            at com.google.errorprone.BaseErrorProneCompiler.run(BaseErrorProneCompiler.java:108)
            at com.google.errorprone.ErrorProneCompiler.run(ErrorProneCompiler.java:118)
            at com.google.errorprone.ErrorProneCompiler.compile(ErrorProneCompiler.java:65)
            at org.codehaus.plexus.compiler.javac.errorprone.JavacCompilerWithErrorProne$CompilerInvoker.compile(JavacCompilerWithErrorProne.java:219)
            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.codehaus.plexus.compiler.javac.errorprone.JavacCompilerWithErrorProne.performCompile(JavacCompilerWithErrorProne.java:91)
            at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:825)
            at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
            at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
            at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
            at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
            at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
            at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)
            at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
            at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
            at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
            at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
            at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
            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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
            at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
            at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
            at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    
    error-prone version: 2.0.21                                                                                                                                                 
    Stack Trace:                                                                                                                                                                
    java.lang.ClassCastException: com.sun.tools.javac.tree.JCTree$JCBinary cannot be cast to com.sun.source.tree.ParenthesizedTree                                              
       at com.google.errorprone.bugpatterns.NestedInstanceOfConditions.matchIf(NestedInstanceOfConditions.java:53)                                                              
       at com.google.errorprone.scanner.ErrorProneScanner.visitIf(ErrorProneScanner.java:752)                                                                                   
       at com.google.errorprone.scanner.ErrorProneScanner.visitIf(ErrorProneScanner.java:146)                                                                                   
       at com.sun.tools.javac.tree.JCTree$JCIf.accept(JCTree.java:1427)                                                                                                         
       at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)                                                                                                     
       at com.google.errorprone.scanner.Scanner.scan(Scanner.java:82)                                                                                                           
       at com.google.errorprone.scanner.Scanner.scan(Scanner.java:42)                                                                                                           
       at com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)                                                                                                            
       at com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:248)                                                                                                      
       at com.google.errorprone.scanner.ErrorProneScanner.visitBlock(ErrorProneScanner.java:530)                                                                                
       at com.google.errorprone.scanner.ErrorProneScanner.visitBlock(ErrorProneScanner.java:146)                                                                                
       at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1026)                                                                                                      
       at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)                                                                                                     
       at com.google.errorprone.scanner.Scanner.scan(Scanner.java:82)                                                                                                           
       at com.google.errorprone.scanner.Scanner.scan(Scanner.java:42)                                                                                                           
       at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:90)                                                                                                    
       at com.sun.source.util.TreeScanner.visitMethod(TreeScanner.java:206)                                                                                                     
       at com.google.errorprone.scanner.ErrorProneScanner.visitMethod(ErrorProneScanner.java:898)                                                                               
       at com.google.errorprone.scanner.ErrorProneScanner.visitMethod(ErrorProneScanner.java:146)                                                                               
       at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:898)                                                                                                  
       at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)                                                                                                     
       at com.google.errorprone.scanner.Scanner.scan(Scanner.java:82)                                                                                                           
       at com.google.errorprone.scanner.Scanner.scan(Scanner.java:42)                                                                                                           
       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:590)                                                                                
       at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:146)                                                                                
       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:82)                                                                                                           
       at com.google.errorprone.scanner.Scanner.scan(Scanner.java:42)                                                                                                           
       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:605)                                                                      
       at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:146)                                                                      
       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:64)                                                                                                           
       at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:41)                                                                
       at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:145)                                                                                        
       at com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:120)                                                                                        
       at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1425)                                                                                                    
       at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1374)                                                                                                    
       at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)                                                                                                  
       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 com.google.errorprone.BaseErrorProneCompiler.run(BaseErrorProneCompiler.java:137)                                                                                     
       at com.google.errorprone.BaseErrorProneCompiler.run(BaseErrorProneCompiler.java:108)                                                                                     
       at com.google.errorprone.ErrorProneCompiler.run(ErrorProneCompiler.java:118)                                                                                             
       at com.google.errorprone.ErrorProneCompiler.compile(ErrorProneCompiler.java:65)                                                                                          
       at org.codehaus.plexus.compiler.javac.errorprone.JavacCompilerWithErrorProne$CompilerInvoker.compile(JavacCompilerWithErrorProne.java:219)                               
       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.codehaus.plexus.compiler.javac.errorprone.JavacCompilerWithErrorProne.performCompile(JavacCompilerWithErrorProne.java:91)                                         
       at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:825)                                                                          
       at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)                                                                                          
       at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)                                                                     
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)                                                                                       
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)                                                                                       
       at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)                                                                                       
       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)                                                              
       at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)                                                               
       at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)                                                 
       at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)                                                                               
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)                                                                                                        
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)                                                                                                        
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)                                                                                                          
       at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)                                                                                                              
       at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)                                                                                                               
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)                                                                                                                 
       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.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)                                                                                   
       at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)                                                                                           
       at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)                                                                                 
       at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)                                                                                             
    
    opened by davidmontoyago 20
  • Upgrade javac to JDK10 to support classfile version 54

    Upgrade javac to JDK10 to support classfile version 54

    When running error-prone with JDK 10-ea+35 we get the following compilation warnings:

    [javac] warning: /modules/java.base/java/lang/Deprecated.class: major version 54 is newer than 53, the highest major version supported by this compiler.
    [javac]   It is recommended that the compiler be upgraded.
    

    for each class of the JDK. This is due to JDK-8188870: Bump classfile version number to 54.

    With the new release cycle, the compiler will have to be updated every 6 months to support the new classfile version.

    Maybe you could directly switch to JDK11 as classfile version 55 is coming soon, see JDK-8191913: Bump classfile version number to 55.

    opened by don-vip 19
  • Calling Map/Collection methods with arguments that are not compatible with type parameters

    Calling Map/Collection methods with arguments that are not compatible with type parameters

    Original issue created by [email protected] on 2013-03-05 at 03:23 PM


    There are some methods on Map<K,V> or Collection<V> that accept Object because of compatibility reasons, while in fact they should accept <V>. We can check that arguments passed to those methods are compatible with V.

    Example: Map<MyProto, Integer> map = ...; MyProto.Builder proto = MyProto.newBuilder()...; if (map.get(proto)) { ... };

    Following checks can be introduced for all "Map<K,V> map" and "T arg" variables:

    1. map.containsKey(arg) --> check that either "T extends K" or "T super K"
    2. map.containsValue(arg) --> check that either "T extends V" or "T super V"
    3. map.get(arg) --> check that either "T extends K" or "T super K"
    4. map.remove(arg) --> check that either "T extends K" or "T super K"

    Following checks can be introduced for all "Collection<V> coll" and "T arg" variables:

    1. coll.contains(arg) --> check that either "T extends V" or "T super V"
    2. coll.remove(arg) --> check that either "T extends V" or "T super V"

    Same for List.indexOf, List.lastIndexOf.

    Priority-High Type-NewCheck migrated Status-Accepted 
    opened by cushon 19
  • error_prone_core 2.0.6 adds Objects.requireNonNull() to source (which can crash Android)

    error_prone_core 2.0.6 adds Objects.requireNonNull() to source (which can crash Android)

    I've been using the error-prone compiler for my Android application. java.util.Objects was only added recently to Android (API 19). The most recent version of error_prone_core (2.0.6) can add Objects.requireNonNull() to the source, which causes the Android app to crash if run on an older device.

    I haven't been able to track down exactly how this happens; I'm not super familiar with error-prone's internals.

    I've been using error-prone via the gradle-errorprone-plugin for Android builds. By default it pulls in the latest error_prone_core for use. As a workaround you can force it to use 2.0.5.


    As an aside, the stack traces that result are quite mystifying since the source will contain no references to java.util.Objects. For example:

    Fatal Exception: java.lang.NoClassDefFoundError: java.util.Objects
           at com.trello.syncadapter.StarredBoardsSync.execute(StarredBoardsSync.java:66)
           at com.trello.syncadapter.StarredBoardsSync.performSync(StarredBoardsSync.java:58)
           at com.trello.syncadapter.TSyncAdapter.onPerformSync(TSyncAdapter.java:49)
           at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:254)
    

    ...Where StarredBoardsSync didn't even import java.util.Objects in the original source.

    opened by dlew 17
  • Checks on exception handling code

    Checks on exception handling code

    In our recent research paper with the title "Simple Testing Can Prevent Most Critical Failures", we found that a large number of the most deadly failures in production distributed systems are the result of trivial mistakes in exception handling code. Exception handling code is particularly critical to distributed systems as they're often the last line of defence. We observed three simple, yet deadly, bug patterns:

    • "TODO"/"FIXME" in the catch block
    • Empty catch block
    • Abort in exception over-catch

    We implemented a simple checker called Aspirator to detect these three types of mistakes, and it found and fixed hundreds of bugs from Hadoop, HBase, Spark, etc. HBase developers asked us to implement these checks into error-prone, therefore I'm providing these three checks in this pull request.

    Type-NewCheck cla: yes 
    opened by diy1 17
  • An unhandled exception was thrown by the Error Prone static analysis plugin.

    An unhandled exception was thrown by the Error Prone static analysis plugin.

    error-prone version: 2.16 BugPattern: UnusedVariable Stack Trace: java.lang.IndexOutOfBoundsException: Range [1887, 1869) out of bounds for length 4717 at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:112) at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:349) at java.base/java.util.Objects.checkFromToIndex(Objects.java:411) at java.base/java.nio.HeapCharBuffer.subSequence(HeapCharBuffer.java:671) at java.base/java.nio.HeapCharBuffer.subSequence(HeapCharBuffer.java:44) at com.google.errorprone.VisitorState.getOffsetTokens(VisitorState.java:607) at com.google.errorprone.fixes.SuggestedFixes.replaceIncludingComments(SuggestedFixes.java:1667) at com.google.errorprone.bugpatterns.UnusedVariable.buildUnusedVarFixes(UnusedVariable.java:396) at com.google.errorprone.bugpatterns.UnusedVariable.matchCompilationUnit(UnusedVariable.java:236) at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:449) at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:555) at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:150) at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:619) at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:66) at com.google.errorprone.scanner.Scanner.scan(Scanner.java:58) at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:43) at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:152) at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1394) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1341) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:933) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94) at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:237) at org.jetbrains.jps.incremental.java.JavaBuilder.lambda$compileJava$2(JavaBuilder.java:524) at org.jetbrains.jps.incremental.java.JavaBuilder.invokeJavac(JavaBuilder.java:587) at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:522) at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:365) at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:290) at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:244) at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1523) at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:1153) at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1303) at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:1118) at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:889) at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:471) at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:197) at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:150) at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:357) at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:179) at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:218) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)

    opened by lavistta01 1
  • An unhandled exception was thrown by the Error Prone static analysis plugin.

    An unhandled exception was thrown by the Error Prone static analysis plugin.

    [ERROR] error-prone version: 2.15.0 [ERROR] BugPattern: UnusedMethod [ERROR] Stack Trace: [ERROR] java.lang.IndexOutOfBoundsException: Range [4068, 3949) out of bounds for length 4074 [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:595) [ERROR] at com.google.errorprone.fixes.SuggestedFixes.replaceIncludingComments(SuggestedFixes.java:1667) [ERROR] at com.google.errorprone.bugpatterns.UnusedMethod.fixNonConstructors(UnusedMethod.java:352) [ERROR] at com.google.errorprone.bugpatterns.UnusedMethod.matchCompilationUnit(UnusedMethod.java:326) [ERROR] at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:449) [ERROR] at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:555) [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:1129) [ERROR] at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:188) [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)

    opened by Pavan47Rao 3
  • java: An unhandled exception was thrown by the Error Prone static analysis plugin.

    java: An unhandled exception was thrown by the Error Prone static analysis plugin.

     error-prone version: 2.6.0
     BugPattern: JavaLangClash
     Stack Trace:
     java.lang.NoSuchMethodError: 'java.lang.Iterable com.sun.tools.javac.code.Scope$WriteableScope.getSymbolsByName(com.sun.tools.javac.util.Name, com.sun.tools.javac.util.Filter)'
    at com.google.errorprone.bugpatterns.JavaLangClash.check(JavaLangClash.java:66)
    at com.google.errorprone.bugpatterns.JavaLangClash.matchClass(JavaLangClash.java:53)
    at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:450)
    at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:548)
    at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:151)
    at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:851)
    at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:92)
    at com.google.errorprone.scanner.Scanner.scan(Scanner.java:74)
    at com.google.errorprone.scanner.Scanner.scan(Scanner.java:48)
    at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:111)
    at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:119)
    at jdk.compiler/com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:152)
    at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:561)
    at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:151)
    at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:619)
    at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:66)
    at com.google.errorprone.scanner.Scanner.scan(Scanner.java:58)
    at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:43)
    at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:152)
    at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
    at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1394)
    at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1341)
    at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:933)
    at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
    at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
    at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
    at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
    at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:237)
    at org.jetbrains.jps.incremental.java.JavaBuilder.lambda$compileJava$2(JavaBuilder.java:523)
    at org.jetbrains.jps.incremental.java.JavaBuilder.invokeJavac(JavaBuilder.java:586)
    at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:521)
    at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:364)
    at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:289)
    at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:243)
    at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1523)
    at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:1153)
    at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1303)
    at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:1118)
    at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:889)
    at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:471)
    at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:197)
    at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:150)
    at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:371)
    at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:193)
    at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:211)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    
    opened by bynetlior 1
  • IndexOutOfBoundsException  for UnusedVariable

    IndexOutOfBoundsException for UnusedVariable

     error-prone version: 2.13.1
     BugPattern: UnusedVariable
     Stack Trace:
     java.lang.IndexOutOfBoundsException: Range [1110, 1103) out of bounds for length 3600
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:76)
        at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:313)
        at java.base/java.util.Objects.checkFromToIndex(Objects.java:385)
        at java.base/java.nio.HeapCharBuffer.subSequence(HeapCharBuffer.java:664)
        at java.base/java.nio.HeapCharBuffer.subSequence(HeapCharBuffer.java:44)
        at com.google.errorprone.VisitorState.getOffsetTokens(VisitorState.java:595)
        at com.google.errorprone.fixes.SuggestedFixes.replaceIncludingComments(SuggestedFixes.java:1666)
        at com.google.errorprone.bugpatterns.UnusedVariable.buildUnusedVarFixes(UnusedVariable.java:395)
        at com.google.errorprone.bugpatterns.UnusedVariable.matchCompilationUnit(UnusedVariable.java:235)
        at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:449)
        at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:555)
        at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:150)
        at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:614)
        at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:60)
        at com.google.errorprone.scanner.Scanner.scan(Scanner.java:58)
        at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:43)
        at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:152)
        at jdk.compiler/com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:132)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1394)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1341)
        at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:933)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
        at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
        at org.gradle.internal.compiler.java.IncrementalCompileTask.call(IncrementalCompileTask.java:89)
        at org.gradle.api.internal.tasks.compile.AnnotationProcessingCompileTask.call(AnnotationProcessingCompileTask.java:94)
        at org.gradle.api.internal.tasks.compile.ResourceCleaningCompilationTask.call(ResourceCleaningCompilationTask.java:57)
        at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:54)
        at org.gradle.api.internal.tasks.compile.JdkJavaCompiler.execute(JdkJavaCompiler.java:39)
        at org.gradle.api.internal.tasks.compile.daemon.AbstractDaemonCompiler$CompilerWorkAction.execute(AbstractDaemonCompiler.java:135)
        at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63)
        at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:49)
        at org.gradle.workers.internal.AbstractClassLoaderWorker$1.create(AbstractClassLoaderWorker.java:43)
        at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100)
        at org.gradle.workers.internal.AbstractClassLoaderWorker.executeInClassLoader(AbstractClassLoaderWorker.java:43)
        at org.gradle.workers.internal.FlatClassLoaderWorker.run(FlatClassLoaderWorker.java:32)
        at org.gradle.workers.internal.FlatClassLoaderWorker.run(FlatClassLoaderWorker.java:22)
        at org.gradle.workers.internal.WorkerDaemonServer.run(WorkerDaemonServer.java:87)
        at org.gradle.workers.internal.WorkerDaemonServer.run(WorkerDaemonServer.java:56)
        at org.gradle.process.internal.worker.request.WorkerAction$1.call(WorkerAction.java:138)
        at org.gradle.process.internal.worker.child.WorkerLogEventListener.withWorkerLoggingProtocol(WorkerLogEventListener.java:41)
        at org.gradle.process.internal.worker.request.WorkerAction.run(WorkerAction.java:135)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:568)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
        at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
        at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
        at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:833)
    

    1 error

    opened by NZhuravlev 2
Releases(v2.16)
Owner
Google
Google ❤️ Open Source
Google
enjarify 8.6 0.0 L5 Python Enjarify is a tool for translating Dalvik bytecode to equivalent Java bytecode. This allows Java analysis tools to analyze Android applications.

Note: This repository may be out of date. Future development will occur at https://github.com/Storyyeller/enjarify. Introduction Enjarify is a tool fo

Google 2.7k Jan 8, 2023
CLI tool for decompiling Android apps to Java. It does resources! It does Java! Its real easy!

Easy-as-pie Android Decompiler Why One stop shop I got pretty tired of decompiling Android apps with a bunch of steps that I had to remember all the t

Alex Davis 619 Dec 27, 2022
Create one-time links for securely sending data

Dead Drop Service Send One-Time Secrets in a secure way A Dead Drop service written in Kotlin / KTor. This service uses sjcl on client-side to encrypt

Florian Mötz 5 Jan 27, 2022
Signal Protocol library for Java/Android

Overview A ratcheting forward secrecy protocol that works in synchronous and asynchronous messaging environments. PreKeys This protocol uses a concept

Signal 1.8k Dec 24, 2022
Grab’n Run, a simple and effective Java Library for Android projects to secure dynamic code loading.

Grab’n Run, a simple and effective Java Library for Android projects to secure dynamic code loading.

Luca Falsina 418 Dec 29, 2022
TweetNaCl in Java - a port of TweetNaCl-js

TweetNacl in Java: port of tweetnacl-js API/Usage Suggest always use TweetNaclFast implementation Public key authenticated encryption get key pair: Bo

AppNet.Link 40 Nov 10, 2022
Dex to Java decompiler

JADX jadx - Dex to Java decompiler Command line and GUI tools for producing Java source code from Android Dex and Apk files Main features: decompile D

null 32.8k Jan 2, 2023
Analyze any Android/Java based app or game

ClassyShark Introduction ClassyShark is a standalone binary inspection tool for Android developers. It can reliably browse any Android executable and

Google 7.2k Jan 3, 2023
A Java ePub reader and parser framework for Android.

FolioReader-Android is an EPUB reader written in Java and Kotlin. Features Custom Fonts Custom Text Size Themes / Day mode / Night mode Text Highlight

FolioReader 2.1k Jan 3, 2023
A program analysis tool to find cryptographic misuse in Java and Android.

A program analysis tool to find cryptographic misuse in Java and Android.

null 92 Dec 15, 2022
CRYLOGGER: Detecting Crypto Misuses for Android and Java Apps Dynamically

CRYLOGGER: Detecting Crypto Misuses for Android and Java Apps Dynamically

Luca Piccolboni 139 Dec 12, 2022
Java bytecode obfuscator created by x4e.

Binscure Java bytecode obfuscator created by x4e. Usage First, create a config file, (example config here). When you have a config file, run binscure

null 35 Nov 22, 2022
Appdbg - make it possible to run android dex file in original Java Virtual Machine

Appdbg - make it possible to run android dex file in original Java Virtual Machine

null 137 Dec 20, 2022
A RSA Cipher implementation for Kotlin/Java

A RSA Cipher implementation for Kotlin/Java.

Lyzev 3 Aug 22, 2022
Soot - A Java optimization framework

Using Soot? Let us know about it! We are regularly applying for funding to help us maintain Soot. You can help us immensely by letting us know about p

Soot Program Analysis Framework 2.5k Jan 2, 2023
Smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation

About smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation. The syntax is loosely based on

Ben Gruver 5.7k Dec 27, 2022
Find Security Bugs is the SpotBugs plugin for security audits of Java web applications

The SpotBugs plugin for security audits of Java web applications and Android applications. (Also work with Kotlin, Groovy and Scala projects)

OWASP Find Security Bugs 2k Jan 6, 2023
A set of lint rules to check for common mistakes when styling and theming on Android

A set of lint rules to check for common mistakes when styling and theming on Android

GuilhE 6 Aug 29, 2022
🤹 Common Kotlin utilities made for my personal usage, comes with SLF4J utilities, common extensions, common Gradle utilities, and more.

?? common-utils Common Kotlin utilities made for my personal usage, comes with SLF4J utilities, common extensions, ansi-colours, common Gradle utiliti

Noel ʕ •ᴥ•ʔ 6 Dec 2, 2022
Catch `dd`, `ddd`, `dump`, `sleep` and `ray` functions in your code

catch-debug-code Template ToDo list Create a new IntelliJ Platform Plugin Template project. Get familiar with the template documentation. Verify the p

Moath Alhajri 1 Apr 29, 2022