Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Truth, ErrorProne, and NullAway (#266)
* Update Truth to 0.42 0.42 Made various dependency fixes and upgrades, including fixing #473 and #467. Note that some annotations-only dependencies are now no longer <provided>. See google/guava#2721 for details, but in short, feel free to exclude them if that works for your setup. Fixed NPE in MapSubject.containsExactly (#468). 0.41 Changed most of Truth's failure messages to a multi-line, key-value format. Provided an API for testing messages of this format. (4a51035) Introduced the new API for building failure messages in a "key: value" format. See Subject.failWithActual and failWithoutActual, which use the new Fact class. (e06ca85) Changed the old API's failure messages to automatically add a "name: ..." field if the user called named(). In some cases, this adds a name where it was missing before; in others, it duplicates a name that is already present. The long-term fix for this will be to migrate to the new failure API, which always includes the name once, and possibly also to delete named() in favor of withMessage(). (911c939) Deprecated failWithRawMessageAndCause. Truth automatically attaches the cause if it's part of the assertion chain. If not, see the deprecation docs for the workaround. (3622e9c) Deprecated failComparing. Use check("foo").that(actual().foo()).isEqualTo(expectedFoo). (2db2a4f) Deprecated the remaining legacy fail* methods. (1f9b2d6) Hid protected method IterableSubject.failWithBadResultsAndSuffix() (5becbfe). Started throwing ComparisonFailure from MapSubject.containsEntry. (4330ec6) Started throwing ComparisonFailure from assertThat(singleElementIterable).containsExactly(otherSingleElementIterable). (e44edd1) Added code to remove Runner and Statement frames from the stack trace. (d2bb074) Added StringSubject.ignoringCase() (13e8054) Added ignoringExtraRepeatedFieldElements() to ProtoTruth. (f070204) Added comparingExpectedFieldsOnly() to ProtoTruth. (08908c1) Removed deprecated MultimapSubject.containsExactly(Multimap). Use containsExactlyEntriesIn(Multimap). (containsExactly(Object k0, Object v0, Object... rest) continues to exist.) (9c80ad5) Removed deprecated isPartiallyOrdered() methods. Use isOrdered() (5becbfe). Started throwing UOE from IterableSubject.isNoneOf() and isNotIn(). (46c8d3d) Switched to Checker Framework @NullableDecl instead of jsr305 @nullable. Tools that read these annotations may need to be updated to recognize the new annotation. (10ee459) * Update NulLAway to 0.6.0 * Update ErrorProne to 2.3.2 Highlights: Opt-in check AndroidJdkLibsChecker enforces which JDK libraries can be used in Android applications, and, with the -XepOpt:Android:Java8Libs flag, can allow select Java 8 library support via https://developer.android.com/studio/write/java8-support. Look out for this in bazel.build after the next release. Immutable{Annotation,Enum}Checker now requires the Error Prone @immutable annotation, not the JSR-305 @immutable annotation New Checks: Javadoc Checkers: InvalidParam, InvalidTag, InvalidThrows, ReturnFromVoid API Checkers: AndroidJdkLibsChecker, Java7ApiChecker, ApiDiffChecker AnnotateFormatMethod AnnotationPosition ArrayAsKeyOfSetOrMap AutoValueFinalMethods BadInstanceof BigDecimalEquals ClassNamedLikeTypeParameter CloseableProvides ComparingThisWithNull DeprecatedThreadMethods EqualsBrokenForNull EqualsGetClass EqualsUnsafeCast EqualsUsingHashCode EqualsWrongThing ExpectedExceptionRefactoring ExtendingJUnitAssert FloatingPointAssertionWithinEpsilon ImmutableRefactoring InconsistentHashCode InjectOnMemberAndConstructor LockNotBeforeTry MathAbsoluteRandom MathRoundIntLong MissingTestCall ModifiedButNotUsed NoFunctionalReturnType NullableDereference ObjectsHashCodePrimitive ProtoRedundantSet ProtosAsKeyOfSetOrMap SubstringOfZero SwigMemoryLeak SystemExitOutsideMain TestExceptionRefactoring ThreadPriorityCheck ToStringReturnsNull TruthAssertExpected TypeNameShadowing UndefinedEquals UnnecessaryParentheses UnsafeReflectiveConstructionCast UnusedException VariableNameSameAsType * AGP 3.2.1 * Fix misconfigured errorProne javac
- Loading branch information