summaryrefslogtreecommitdiff
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
commit30349d685a028f1faf02dfcba07239eefc51cb0d (patch)
tree1878ef2a484422dc275f3f93d230e0786a6457f9
parentb650e2d59be8a453d701522abbf340a120821093 (diff)
downloadxmp_toolkit-30349d685a028f1faf02dfcba07239eefc51cb0d.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: I68a369c8e5393820b72e3e10b0e001de514cf7e8
-rw-r--r--XMPCore/Android.bp5
1 files changed, 5 insertions, 0 deletions
diff --git a/XMPCore/Android.bp b/XMPCore/Android.bp
index c432274..a704dcb 100644
--- a/XMPCore/Android.bp
+++ b/XMPCore/Android.bp
@@ -21,4 +21,9 @@ java_library {
// Include all the java files.
srcs: ["src/**/*.java"],
sdk_version: "current",
+ errorprone: {
+ javacflags: [
+ "-Xep:ComparableType:WARN",
+ ],
+ },
}