Error Prone 2.0.21 release

124 views
Skip to first unread message

Eddie Aftandilian

unread,
Jul 6, 2017, 7:47:03 PM7/6/17
to error-pron...@googlegroups.com, error-pro...@googlegroups.com

Error Prone 2.0.21 is now available for download from Maven Central.


(There release notes include all changes since 2.0.19.)


New features

  • Added support for passing command-line flags to bug checkers.  See errorprone.info/docs/flags#pass-additional-info-to-bugcheckers for details (#524)

  • Added -XepPatchImportOrder:<order> to control the import order when patchIng. Valid orders are “static-first”, “static-last”, “android-static-first”, and “android-static-last”

  • Update to javac-9-dev-r4023-2 (#592)


New checks


Bugs fixed

  • -XepAllDisabledChecksAsWarnings now takes flag position into account (#486)

  • Recognize safe try/finally/close patterns in MustBeClosedChecker (#489)

  • Make well-known immutable and unsafe classes for Immutable checkers customizable with new-style command line flags (#512)

  • Catch uses of Scanner in DefaultCharset (#603)

  • Avoid subclassing CompilationTask in BaseErrorProneJavaCompiler (#608)

  • Add second suggested fix to ArgumentSelectionDefectChecker which applies named comments to parameters (#609)

  • Handle broken classpaths more gracefully in ImmutableAnalysis (#615)

  • Fix inheritance of @Immutable annotations (#615)

  • Fix issue where InstanceOfAndCastMatchWrongType was crashing on array accesses (#651)


Changes to existing checks

  • [ArgumentParameterMismatch, ArgumentParameterSwap] Removed these and replaced with ArgumentSelectionDefectChecker

  • [CheckReturnValue, FutureReturnValueIgnored, ReturnValueIgnored, PromiseReturnValueIgnored] Handle the case when a function is called in a lambda with a void return type

  • [ElementsCountedInLoop] Removed this check

  • [FormatMethod] Add support for constructors

  • [FutureReturnValueIgnored] Downgrade from ERROR to WARNING

  • [FutureReturnValueIgnored] Whitelist ChannelFuture#addListener(s)

  • [GuardedBy] Support all annotations named 'GuardedBy'

  • [JUnit3TestNotRun] Expand check to find non-public test methods.

  • [JUnit4TestNotRun] Improve summary message

  • [LiteralClassName] Downgrade from WARNING to SUGGESTION (#579)

  • [LogicalAssignment] Downgrade from ERROR to WARNING

  • [MutableConstantField] Replace declaration type regardless of the original declaration type

  • [MutableConstantField] Do not suggest a fix when the declaration type is already immutable

  • [MutableConstantField] Choose the new LHS type according to the original LHS type if possible, otherwise, use the RHS type

  • [MutableConstantField] Fix references to Multimap and Multiset

  • [NarrowingCompoundAssignment] Report errors for long-to-int conversions

  • [ProtocolBufferOrdinal] Check when calling ordinal() on protobuf-lite enums as well as protobuf enums

  • [ProtocolBufferOrdinal] Upgrade from WARNING to ERROR

Reply all
Reply to author
Forward
0 new messages