aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Faust <colefaust@google.com>2022-10-15 21:33:32 -0700
committerCole Faust <colefaust@google.com>2022-10-15 21:33:32 -0700
commit2269e9a67a76d15df8d7ad7c4fe66b0c585de5f1 (patch)
treecbeb3377651ed0f70bcd90e6c9f46a7fb3b42e57
parent01f81946ddc96ce797759395e984aa02d5cb5bdb (diff)
downloadjacoco-2269e9a67a76d15df8d7ad7c4fe66b0c585de5f1.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: I366cb605eb539fb15750e245e498e768ff8b1ad8
-rw-r--r--Android.bp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index c4481f23..d7d6e33c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -105,6 +105,12 @@ java_library {
"asm-commons-9.2",
"asm-tree-9.2",
],
+ errorprone: {
+ javacflags: [
+ "-Xep:EqualsHashCode:WARN",
+ "-Xep:ReturnValueIgnored:WARN",
+ ],
+ },
}
// Generates stubs containing the classes that will be referenced by instrumented bytecode.
@@ -167,6 +173,12 @@ java_library_host {
"args4j-2.0.28",
],
+ errorprone: {
+ javacflags: [
+ "-Xep:EqualsHashCode:WARN",
+ "-Xep:ReturnValueIgnored:WARN",
+ ],
+ },
}
java_library_host {