summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Faust <colefaust@google.com>2022-10-15 21:33:33 -0700
committerCole Faust <colefaust@google.com>2022-10-15 21:33:33 -0700
commitc29e69b8e363cf86dc7a44f766cc4e2fec2b314c (patch)
treefbe29d8cad9bc0050b6eb8eeb8a9b1551e7b8780
parentc978470e72bceeb947b9ab201554f48b31200675 (diff)
downloadmockito-c29e69b8e363cf86dc7a44f766cc4e2fec2b314c.tar.gz
Fix errorprone warnings that should be errors
This commit is part of a large scale change to fix errorprone errors that have been downgraded to warnings in the android source tree, so that they can be promoted to errors again. The full list of changes include the following, but not all will be present in any one individual commit: BadAnnotationImplementation BadShiftAmount BanJNDI BoxedPrimitiveEquality ComparableType ComplexBooleanConstant CollectionToArraySafeParameter ConditionalExpressionNumericPromotion DangerousLiteralNull DoubleBraceInitialization DurationFrom DurationTemporalUnit EmptyTopLevelDeclaration EqualsNull EqualsReference FormatString FromTemporalAccessor GetClassOnAnnotation GetClassOnClass HashtableContains IdentityBinaryExpression IdentityHashMapBoxing InstantTemporalUnit InvalidTimeZoneID InvalidZoneId IsInstanceIncompatibleType JUnitParameterMethodNotFound LockOnBoxedPrimitive MathRoundIntLong MislabeledAndroidString MisusedDayOfYear MissingSuperCall MisusedWeekYear ModifyingCollectionWithItself NoCanIgnoreReturnValueOnClasses NonRuntimeAnnotation NullableOnContainingClass NullTernary OverridesJavaxInjectableMethod ParcelableCreator PeriodFrom PreconditionsInvalidPlaceholder ProtoBuilderReturnValueIgnored ProtoFieldNullComparison RandomModInteger RectIntersectReturnValueIgnored ReturnValueIgnored SelfAssignment SelfComparison SelfEquals SizeGreaterThanOrEqualsZero StringBuilderInitWithChar TreeToString TryFailThrowable UnnecessaryCheckNotNull UnusedCollectionModifiedInPlace XorPower See https://errorprone.info/bugpatterns for more information on the checks. Bug: 253827323 Test: m RUN_ERROR_PRONE=true javac-check Change-Id: I907959a17cd5fdf6504a654a08b4be93ef400d88
-rw-r--r--Android.bp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index fa02f9d..ed0ade3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -79,6 +79,7 @@ java_library_static {
errorprone: {
javacflags: [
"-Xep:CollectionIncompatibleType:WARN", // b/74213384
+ "-Xep:BoxedPrimitiveEquality:WARN",
],
}
}