summaryrefslogtreecommitdiff
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
commit0d549df7cca68f17751ff08c85d1efc3f0f30511 (patch)
tree4428a926491876c1101c23c8a483c729e30bfea0
parentb7d77aac2578f58cbe00864fb38e82300c99844f (diff)
downloadjsilver-0d549df7cca68f17751ff08c85d1efc3f0f30511.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: I3ecdc891e1c443973c6ac9b13d7aeb20fa299227
-rw-r--r--Android.bp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index a2eddc0..ee82683 100644
--- a/Android.bp
+++ b/Android.bp
@@ -35,4 +35,9 @@ java_library_host {
srcs: ["src/**/*.java"],
libs: ["guava"],
java_resource_dirs: ["src"],
+ errorprone: {
+ javacflags: [
+ "-Xep:PreconditionsInvalidPlaceholder:WARN",
+ ],
+ },
}