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
commit23897742e398d2d877daa3330f82f5e5bc686fef (patch)
treea575b26119dc051cd54c25356bc331ad09396cc7
parent29343f2547b947f9fe28e9bb2a9fec93c40636f2 (diff)
downloadnist-sip-23897742e398d2d877daa3330f82f5e5bc686fef.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: Ieb1c25f272fee4f12ae3325f5806d0bfeace218b
-rw-r--r--Android.bp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 010e58c..4d7225f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -55,6 +55,9 @@ java_library_static {
errorprone: {
javacflags: [
"-Xep:MissingOverride:OFF", // Ignore missing @Override.
+ "-Xep:HashtableContains:OFF",
+ "-Xep:RandomModInteger:OFF",
+ "-Xep:InvalidTimeZoneID:OFF",
],
},
lint: {