aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Faust <colefaust@google.com>2022-10-15 21:33:28 -0700
committerCole Faust <colefaust@google.com>2022-10-15 21:33:28 -0700
commitf4521a3e14ac1e2619b90f0134bfab767af35dde (patch)
tree9d46ebdeb73e6c765bed37408bca81e9e2e24d13
parent00d0443c3a2a66b4402c22c3ce211215cc3cf481 (diff)
downloadturbine-f4521a3e14ac1e2619b90f0134bfab767af35dde.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: Idc9dfee8f682d3dfaccb73537cd4a8cfbadc19a7
-rw-r--r--Android.bp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index f5880c2..2236365 100644
--- a/Android.bp
+++ b/Android.bp
@@ -55,4 +55,10 @@ java_library_host {
proto: {
type: "full",
},
+
+ errorprone: {
+ javacflags: [
+ "-Xep:NoCanIgnoreReturnValueOnClasses:WARN",
+ ],
+ },
}