Skip to content

Releases: google/error-prone

Error Prone 2.49.0

07 Apr 10:59

Choose a tag to compare

This release includes several changes to Matcher APIs, and removed some deprecated or problematic APIs:

  • Remove deprecated MethodMatchers.withSignature API, which relies on fragile toString behaviour. Alternatives for matching on method signatures with varargs and type parameters were added in a98a1c5.
  • Removed variableType(Matcher) API. Matchers.variableType(Matcher) uses VariableTree#getType to match variable types, which own't work for lambda parameters with inferred types after JDK-8268850. The recommended replacement is variableType(TypePredicate).
  • Make enclosingPackage return an optional. Module elements are not enclosed by a package, checks using enclosingPackage shouldn't assume an enclosing package exists when processing arbitrary elements.
  • New FieldMatchers API, similar to MethodMatchers (1dd9c3a).

New checks:

Closed issues: #2283, #3503, #5210, #5289, #5548, #5548, #5554, #5609, #5614, #5656

Full changelog: v2.48.0...v2.49.0

Error Prone 2.48.0

27 Feb 13:26

Choose a tag to compare

Changes:

  • Added support for passing flags with command-line argument files (@-files) (8e84edf)

New checks:

Closed issues: #5529, #5537, #5522, #5521

Full changelog: v2.47.0...v2.48.0

Error Prone 2.47.0

05 Feb 08:59

Choose a tag to compare

New checks:

Closed issues: #1811, #4168, #5459, #5460

Full changelog: v2.46.0...v2.47.0

Error Prone 2.46.0

08 Jan 14:44

Choose a tag to compare

Changes:

New checks:

Full changelog: v2.45.0...v2.46.0

Error Prone 2.45.0

27 Nov 15:54

Choose a tag to compare

Changes:

  • Improved compatibility with latest JDK 26 EA builds.

New checks:

Closed issues: #5335

Full changelog: v2.44.0...v2.45.0

Error Prone 2.44.0

07 Nov 12:06

Choose a tag to compare

Changes

Closed issues: #5218, #5278

Full changelog: v2.43.0...v2.44.0

Error Prone 2.43.0

22 Oct 14:20

Choose a tag to compare

The minimum supported JDK version to run Error Prone is now JDK 21 (#4867).

Changes:

  • -XepPatchChecks now skips disabled checks (#4943)
  • AndroidJdkLibsChecker has been removed, the recommended replacement for Android code is Android Lint's NewApi check

New checks:

Closed issues: #4943, #5102, #5107, #5121, #5158, #5217, #5239

Full changelog: v2.42.0...v2.43.0

Error Prone 2.42.0

17 Sep 22:16

Choose a tag to compare

New checks:

Changes:

  • The return type of ASTHelpers.asFlagSet has changed. The previous type was EnumSet<Flags.Flag>, where Flags.Flag is an enum in the javac class Flags. A recent JDK change has replaced that enum with a new top-level enum called FlagsEnum. It is not possible to change ASTHelpers.asFlagSet in a way that would be type-safe and compatible with the enums from JDKs both before and after the change. Instead, the method now returns ImmutableSet<String>, where the strings come from the toString() of the enum constants. That means they are "native", "abstract", etc.
  • Flag IO.print[ln]() in SystemOut.

Full changelog: v2.41.0...v2.42.0

Error Prone 2.41.0

24 Jul 16:21

Choose a tag to compare

New checks:

  • EffectivelyPrivate: Detect declarations that have public or protected modifiers, but are effectively private

Changes:

  • Skip BooleanLiteral findings if the target type is boxed (#5134)

Full changelog: v2.40.0...v2.41.0

Error Prone 2.40.0

09 Jul 18:49

Choose a tag to compare

Changes:

Full changelog: v2.39.0...v2.40.0