Error Prone v2.3.0 Release Notes

Release Date: 2018-04-19 // over 4 years ago
  • ๐Ÿ†• New checks:

    • [ParcelableCreator]: Detects classes which implement Parcelable but don't have CREATOR
    • [InconsistentCapitalization] It is confusing to have a field and a parameter under the same scope that differ only in capitalization
    • [TruthIncompatibleType] Argument is not compatible with the subject's type
    • [ByteBufferBackingArray] ByteBuffer.array() shouldn't be called unless ByteBuffer.arrayOffset() is used or if the ByteBuffer was initialized using ByteBuffer.wrap() or ByteBuffer.allocate()
    • [OrphanedFormatString] String literal contains format specifiers, but is not passed to a format method
    • [ScopeOnModule] Scopes on modules have no function and will soon be an error
    • ๐Ÿ–จ [CatchAndPrintStackTrace] Logging or rethrowing exceptions should usually be preferred to catching and calling printStackTrace
    • [VarTypeName] var should not be used as a type name

    Other changes:

    • โœ‚ Remove MoreAsserts from TryFailThrowable
    • โž• Add java.util.Arrays to ReturnValueIgnored check
    • ๐Ÿ‘Œ Improve BugCheckerRefactoringTestHelper usability
    • Extend SizeGreaterThanOrEqualsZero check to check proto repeated fields
    • Disallow method references to @DoNotCall methods
    • Disallow Error Prone BugPattern names that includes spaces.
    • โž• Add an optional suffix comment to SuggestedFixes.addSuppressWarnings
    • ๐Ÿ‘ Allow @CompatibleWith to be used on varargs parameters.
    • โš  Make StreamResourceLeak a warning
    • โœ… Recognize null test methods in java.util.Objects in nullness analysis
    • Detect more cases of nested and ignored futures.
    • โœ… Make the failure message in DiagnosticTestHelper easier to read.
    • โš  Enable QualifierOrScopeOnInjectMethod as a WARNING
    • Consolidate NamedParameters and ParameterName

    ๐Ÿ›  Fixes issues: #789, #893, #897, #899, #899, #904, #914, #921, #931, #942, #945, #954, #993