aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Faust <colefaust@google.com>2022-11-18 22:18:46 -0800
committerCole Faust <colefaust@google.com>2022-11-18 22:18:46 -0800
commitabbf88a3deda64ebdba98e614ad11e8ae5a7f497 (patch)
treea4743b0c207c081882a00ca930e8fda10f43bf70
parent3a78f87d14a46ddb9cb5742ed4069de8d4b4dc4b (diff)
downloadtruth-abbf88a3deda64ebdba98e614ad11e8ae5a7f497.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: Id45c2bdaad178e50de60029e03366fecbd1d20e2
-rw-r--r--Android.bp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index ec216957..75ba7fe4 100644
--- a/Android.bp
+++ b/Android.bp
@@ -43,6 +43,11 @@ java_library {
],
plugins: ["auto_value_plugin"],
sdk_version: "current",
+ errorprone: {
+ javacflags: [
+ "-Xep:NoCanIgnoreReturnValueOnClasses:WARN",
+ ],
+ },
}
java_library {