-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Truth, ErrorProne, and NullAway #266
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)
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
jbarr21
approved these changes
Oct 12, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.