Error Prone 2.3.2
Highlights:
- Opt-in check AndroidJdkLibsChecker enforces which JDK libraries can be used in Android applications, and, with the
-XepOpt:Android:Java8Libs
flag, can allow select Java 8 library support via https://developer.android.com/studio/write/java8-support. Look out for this in bazel.build after the next release. Immutable{Annotation,Enum}Checker
now requires the Error Prone@Immutable
annotation, not the JSR-305@Immutable
annotation
New Checks:
- Javadoc Checkers: InvalidParam, InvalidTag, InvalidThrows, ReturnFromVoid
- API Checkers: AndroidJdkLibsChecker, Java7ApiChecker, ApiDiffChecker
- AnnotateFormatMethod
- AnnotationPosition
- ArrayAsKeyOfSetOrMap
- AutoValueFinalMethods
- BadInstanceof
- BigDecimalEquals
- ClassNamedLikeTypeParameter
- CloseableProvides
- ComparingThisWithNull
- DeprecatedThreadMethods
- EqualsBrokenForNull
- EqualsGetClass
- EqualsUnsafeCast
- EqualsUsingHashCode
- EqualsWrongThing
- ExpectedExceptionRefactoring
- ExtendingJUnitAssert
- FloatingPointAssertionWithinEpsilon
- ImmutableRefactoring
- InconsistentHashCode
- InjectOnMemberAndConstructor
- LockNotBeforeTry
- MathAbsoluteRandom
- MathRoundIntLong
- MissingTestCall
- ModifiedButNotUsed
- NoFunctionalReturnType
- NullableDereference
- ObjectsHashCodePrimitive
- ProtoRedundantSet
- ProtosAsKeyOfSetOrMap
- SubstringOfZero
- SwigMemoryLeak
- SystemExitOutsideMain
- TestExceptionRefactoring
- ThreadPriorityCheck
- ToStringReturnsNull
- TruthAssertExpected
- TypeNameShadowing
- UndefinedEquals
- UnnecessaryParentheses
- UnsafeReflectiveConstructionCast
- UnusedException
- VariableNameSameAsType
Fixes Issues:
#1008, #1028, #1038, #1040, #1077, #1078, #1079, #1083, #1084, #1085, #1095, #1096, #1101, #1125, #1129, #1130, #35, #607, #783, #849, #926