error-prone icon indicating copy to clipboard operation
error-prone copied to clipboard

Catch common Java mistakes as compile-time errors

Results 366 error-prone issues
Sort by recently updated
recently updated
newest added

Currently, com.google.errorprone.annotations (version 2.10.0) is not an OSGi bundle. Some entries are missing in MANIFEST.MF: ``` Manifest-Version: 1.0 Automatic-Module-Name: com.google.errorprone.annotations Archiver-Version: Plexus Archiver Built-By: cushon Created-By: Apache Maven 3.6.3 Build-Jdk:...

``` [ERROR] Please report this at https://github.com/google/error-prone/issues/new and include the following: [ERROR] [ERROR] error-prone version: 2.11.0 [ERROR] BugPattern: SameNameButDifferent [ERROR] Stack Trace: [ERROR] java.lang.NullPointerException [ERROR] at com.google.errorprone.bugpatterns.SameNameButDifferent.getBetterImport(SameNameButDifferent.java:187) [ERROR] at com.google.errorprone.bugpatterns.SameNameButDifferent.matchCompilationUnit(SameNameButDifferent.java:142)...

I'm writing a custom check by extending `CheckReturnValue` and overriding the `specializedMatcher()` method, so that some unchecked values are allowed. Here is the bug pattern code: ```java @AutoService(BugChecker.class) @BugPattern( name...

In our code base, the new check AlreadyChecked in Error Prone 2.11.0 reported a finding that I misinterpreted at first. Our code looked like this: ```java public class Test {...

Use `shouldKeep` to suppress several checks, interpreting Keep as "don't change the modifiers or really anything about this element". Also, remove annotations from UnusedMethod which are now annotated with Keep...

The problem observed with error-prone 2.10.0 The problem is reported for methods with well-known annotations like `org.junit.jupiter.api.BeforeEach`, `javax.validation.constraints.AssertTrue` and `com.fasterxml.jackson.annotation.JsonProperty` The reported methods are indeed not used directly by our...

The exception is thrown when analysing code comparing java.util.logging.Level using the equality operator. ``` /Users/axel/Development/IdeaProjects/Library/utility/utility-swing/src/test/java/com/dua3/utility/swing/TestSwingComponents.java:126: error: An unhandled exception was thrown by the Error Prone static analysis plugin. if (level==Level.SEVERE)...

Stop using JdkObsolete Stack in PreferredInterfaceType.

Sometimes there are Java classes which are safe to compare using '==' operator, like Java enums. It can be the special custom made Enum classes for instance or some other...

As mentioned in https://github.com/google/error-prone/issues/2786#issuecomment-1003368760, we are planning to move away from forking `javac`. However, after disabling the `fork` option, we noticed that the metaspace (off-heap) usage increased significantly (220 MiB...