Sourced from com.google.errorprone:error_prone_core's releases.
Error Prone 2.26.1
This release contains all of the changes in 2.26.0, plus a bug fix to the module name of the annotations artifact
com.google.errorprone.annotations
(https://github.com/google/error-prone/commit/9d99ee76f2ca8568b69150f5df7fe845c8545d16)Starting in
2.26.x
, the 'annotations' artifact now includes amodule-info.java
for Java Platform Module System support, thanks to@sgammon
in #4311.
Compatibility note:
Now that the annotations artifact explicit declares a module instead of relying on
Automatic-Module-Name
, JDK 17 and newer perform stricter module encapsulation checks. Modularized libraries depending on Error Prone annotations2.26.x
and newer may see errors like:error: package com.google.errorprone.annotations is not visible import com.google.errorprone.annotations.CheckReturnValue; ^ (package com.google.errorprone.annotations is declared in module com.google.errorprone.annotations, but module ... does not read it)
The fix is to add
requires static
to the module declaration of modularized libraries that depend on Error Prone annotations:module your.module { ... + requires static com.google.errorprone.annotations; }
Full Changelog: https://github.com/google/error-prone/compare/v2.26.0...v2.26.1
Error Prone 2.26.0
Warning: This release contains a bug, please use 2.26.1 or newer instead.
Changes:
- The 'annotations' artifact now includes a
module-info.java
for Java Platform Module System support, thanks to@sgammon
in #4311.- Disabled checks passed to
-XepPatchChecks
are now ignored, instead of causing a crash. Thanks to@oxkitsune
in #4028.New checks:
SystemConsoleNull
: Null-checkingSystem.console()
is not a reliable way to detect if the console is connected to a terminal.EnumOrdinal
: Discourage uses ofEnum.ordinal()
Closed issues: #2649, #3908, #4028, #4311, #4314
Full Changelog: https://github.com/google/error-prone/compare/v2.25.0...v2.26.0
Error Prone 2.25.0
New checks:
... (truncated)
b380572
Release Error Prone 2.26.19d99ee7
fix: module name → com.google.errorprone.annotations
ea5ef6d
Add the 'compile' goal for 'compile-java9'0e95364
feat: add jpms definition for annotations
9da2d55
Ignore disabled checks passed to -XepPatchChecks
3292632
Increase year range on Date
usages.ad513d5
Recommend using var
for var unused = ...;
and
`var thrown = assertThrows(...af37d35
ImpossibleNullComparison: emit empty fixes.297019c
Fix some mistakes in the EnumOrdinal examplesf3dbb09
Move the EnumOrdinal.md doc to the right place (it got overwritten by
automat...