We are pleased to announce ErrorProne version 2.0.15!
Checks enabled by default:
Errors
CompatibleWith Annotation - New annotation-driven check for incompatible type checking. Enforces that parameters passed to a method are 'cast-compatible' with a type argument. See IncompatibleArgumentType, CompatibleWithAnnotationMisuse, CollectionIncompatibleType.
CollectionIncompatibleType - Promoted from warning.
UnusedCollectionModifiedInPlace - New check for modifying a copy of a collection in place (e.g.: Collections.sort) without otherwise holding a reference to the modified collection.
IsLoggableTagLength - New check to prevent passing a tag to android.util.Log isLoggable that is too long.
ImmutableModification - New check to disallow calling mutators on Guava immutable collections.
AsyncCallableReturnsNull - Add an AsyncCallable (new in Guava 20) analog to AsyncFunctionReturnsNull.
FilesLinesLeak - New check for Files.lines calls where the stream isn't closed. Requires Files.lines to be used with try-with-resources. Ameliorates #264.
Warnings
ImmutableEnumChecker - New check to ensure enums are always deeply immutable.
Experimental checks, off by default:
StaticOrDefaultInterfaceMethod - New Android check to disallow the use of static and default methods in interfaces.
ArgumentParameterMismatch - New check for possible incorrect arguments to method calls.
MethodCanBeStatic - New check for methods that could be static.
Other:
GuardedByChecker - Adds checking for @GuardedBy locks/methods inside the catch and finally parts of try-with-resources statements.
Update to Guava 20.
DefaultCharset - Make sure the suggested fix adds all required imports