aboutsummaryrefslogtreecommitdiff
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
commita8f72f0e2186fbaebf7aea40dec0f2e9da2b7e3a (patch)
tree6ebb7c55dcfea54a4a3de51c5491adba911ec81d
parentbc0f4f987a28b7161e46baf6cfd6d246f5cb5472 (diff)
downloadnanohttpd-a8f72f0e2186fbaebf7aea40dec0f2e9da2b7e3a.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: Ie32975cb4f4a8f9fa51cd4ffab69a284f5259ba8
-rw-r--r--Android.bp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index d612612..b9552e8 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,6 +41,12 @@ java_library {
"webserver/src/main/**/*.java",
],
sdk_version: "current",
+ errorprone: {
+ javacflags: [
+ "-Xep:BadShiftAmount:WARN",
+ "-Xep:DoubleBraceInitialization:WARN",
+ ],
+ },
}
java_library {
@@ -50,4 +56,9 @@ java_library {
"websocket/src/main/**/*.java",
],
sdk_version: "current",
+ errorprone: {
+ javacflags: [
+ "-Xep:BadShiftAmount:WARN",
+ ],
+ },
}