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: Ib13fd06cb992fb18051d363148f4a1b30c928fb7
1 file changed
tree: b7e80dbb4d7285c01055bf4048e06a0734c50a9d
  1. .mvn/
  2. src/
  3. .gitignore
  4. .hgeol
  5. .hgignore
  6. Android.bp
  7. CleanSpec.mk
  8. docker-run-jdk6.sh
  9. docker-run-jdk7.sh
  10. docker-run-jdk8.sh
  11. docker-run.sh
  12. LICENSE.txt
  13. METADATA
  14. MODULE_LICENSE_APACHE2
  15. mvnw
  16. mvnw.bat
  17. NOTICE
  18. OWNERS
  19. patch-android-src
  20. pom.xml
  21. pom.yaml
  22. README.md
  23. README.version
README.md

The art of simplicity is a puzzle of complexity.

Overview

YAML is a data serialization format designed for human readability and interaction with scripting languages.

SnakeYAML is a YAML processor for the Java Virtual Machine.

SnakeYAML features

  • a complete YAML 1.1 processor. In particular, SnakeYAML can parse all examples from the specification.
  • Unicode support including UTF-8/UTF-16 input/output.
  • high-level API for serializing and deserializing native Java objects.
  • support for all types from the YAML types repository.
  • relatively sensible error messages.

Info

Contribute