You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to error-prone-announce, error-pro...@googlegroups.com
We are pleased to announce the release of version 2.0.14 of Error Prone! It is available for download from Maven Central.
Checks enabled by default with this release:
Errors:
JavaxInjectOnAbstractMethod - Error when abstract (or default interface) methods are annotated with @javax.inject.Inject. Injection frameworks don't inject these methods.
FunctionalInterfaceMethodChanged - When a @FunctionalInterface overrides another @FunctionalInterface while changing its behavior. This is rife for errors when used with lambdas.
PackageInfo - When one declares any types inside package-info.java
UnnecessaryTypeArgument - Calling a method that doesn't declare a generic type with a type argument: System.out.<String>println();
NarrowingCompoundAssignment - Finds instances where precision loss occurs with compound assignment (int x = 42; x*= 2.0 narrows from double to int)
FunctionalInterfaceClash - When a class defines two methods with the same name whose call sites are ambiguous when being passed lambdas
AmbiguousMethodReference - When a class defines two methods that would be ambiguous when used as a method reference
InputStreamSlowMultibyteRead - Subclasses of InputStream that don't override read(byte[], int, int) can be slow when reading multiple bytes (the read() method is just used over and over again).
TruthConstantAsserts - When using Truth test assertions assertThat(SOME_CONSTANT).isEqualTo(myTestThing) is wrong. It should be reversed
Treat enums as effectively constant for purposes of declaring whether or not a field should be considered a constant.
Recognize C++ kStyleConstants to rewrite to STYLE_CONSTANTS instead of K_STYLE_CONSTANTS
TruthSelfEquals - Better-handle methods that return custom subject instances
ArgumentParameterSwap - Major rework of the checker. While the intent is the same, the mechanism by which arguments are matched to parameters has been changed dramatically.
ReturnValueIgnored - Detect if the return value of methods on types in java.util.function are ignored (except for Consumers)
MissingFail - Will now trigger if the catch block in a try/fail/catch pattern has any method named verify*
Added two new flags:
-XepAllErrorsAsWarnings, to demote all suppressible errors to warnings. This is helpful for first-time compiles over codebases, to see all of the issues so one can fix them at once
-XepAllDisabledChecksAsWarnings, to eagerly enable every check that is normally disabled by default. It is more likely to cause errors from more unstable checks. Those unstable checks can be further disabled like normal
New experimental feature: Patch in place!
More documentation to come, but by adding -XepPatch:IN_PLACE, Error Prone will apply all of the suggested fixes directly to your source. One can even generate a patch file (see example maven pom configured this way)