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: I8446f9076a45ebf7e7ffa06cb0d4ddb1001b6c00
These benchmarks use the Caliper benchmark framework, and can be run on a remote device using Vogar: http://code.google.com/p/caliper/ http://code.google.com/p/vogar/ ------------------------- Quick Command Line Reference: # Build vogar and dependencies. $> mmma -j32 external/vogar # First make sure art has permissions to dalvik-cache, otherwise it will run slower with interpreter. $> adb root # Run vogar in benchmark mode, telling it to use app_process (not dalvikvm which is default) # Otherwise you will likely crash with UnsatisfiedLinkError despite having correct JNI code. $> vogar --mode app_process --benchmark path/to/Benchmark.java # Sometimes your benchmarks might time out, if so increase the timeout: # (--timeout goes to vogar, and --time-limit goes to caliper) $> vogar --timeout 1000 --mode app_process --benchmark path/to/Benchmark -- --time-limit 9999s