aboutsummaryrefslogtreecommitdiff
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
commitb19663bf5e7dcbf4d8d9a5147bdcc1aae529c969 (patch)
tree4f3c78f96c67a50923134095aa59b0e9b408b0bc
parent175858076dde95941f8b0ab6e17bf141e93249c3 (diff)
downloadjavaparser-b19663bf5e7dcbf4d8d9a5147bdcc1aae529c969.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: Ib3ce0dd18cfda42a4bbcfca9fa3ee336975c7519
-rw-r--r--Android.bp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 64dc07c91..0d8f79d55 100644
--- a/Android.bp
+++ b/Android.bp
@@ -65,6 +65,14 @@ java_library_host {
"javaparser-core/src/main/javacc-support/**/*.java",
"javaparser-core/generated-sources/**/*.java",
],
+
+ errorprone: {
+ javacflags: [
+ "-Xep:IdentityBinaryExpression:WARN",
+ "-Xep:DangerousLiteralNull:WARN",
+ "-Xep:DoubleBraceInitialization:WARN",
+ ],
+ },
}
java_library_host {