aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCole Faust <colefaust@google.com>2022-10-15 21:33:29 -0700
committerCole Faust <colefaust@google.com>2022-10-15 21:33:29 -0700
commitf193236f81e14b49873c7d6c1ef6d26fba60efc3 (patch)
tree175590417700c14fe86aac39848f249e79c1c6ba
parent14aa962455d4270e2e2c0c0ee50ba63ccee2f100 (diff)
downloadantlr-f193236f81e14b49873c7d6c1ef6d26fba60efc3.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: Ied6ef35b36969aae537ec342ed7b4f4935b30148
-rw-r--r--Android.bp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Android.bp b/Android.bp
index d4a1660..18bd40a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -53,6 +53,9 @@ java_library_host {
//Remove DOTTreeGenerator.java, so that we don't have the StringTemplate library as a dependency
exclude_srcs: ["runtime/Java/src/main/java/org/antlr/runtime/tree/DOTTreeGenerator.java"],
errorprone: {
- javacflags: ["-Xep:MissingOverride:OFF"], // b/73499927
+ javacflags: [
+ "-Xep:MissingOverride:OFF", // b/73499927
+ "-Xep:EqualsHashCode:WARN",
+ ],
},
}