gerrit-rest-java-client
gerrit-rest-java-client copied to clipboard
Bump com.google.truth:truth from 0.44 to 1.3.0
Bumps com.google.truth:truth from 0.44 to 1.3.0.
Release notes
Sourced from com.google.truth:truth's releases.
1.3.0
In this release, our assertions on Java 8 types begin to move from the
truth-java8-extensionsartifact and theTruth8class to the maintruthartifact and theTruthclass. This change should not break compatibility for anyone, even users who test under old versions of Android without API desugaring. Additionally, we will never break binary compatibility, though some users will have to make changes to their source code in order for it to compile against newer versions.This change will be routine for most users, but we're providing as much information as we can for any users who do encounter problems.
We will post fuller instructions for migration later on, once we've learned more from our internal migration efforts. For now, you may find that you need to make one kind of change, and you may elect to make others. (If we missed anything, please open an issue to report problems or request help.)
The change you might need to make:
- By adding new overloads of
Truth.assertThat, we cause some code to fail to compile because of an overload ambiguity. This is rare, but it can happen if you static import bothTruth.assertThatand some otherassertThatmethod that includes overloads forOptionalorStream. (It does not happen forTruth8.assertThat, though, except with the Eclipse compiler. Nor it does necessarily happen for otherassertThat(Stream)andassertThat(Optional)methods.) If this happens to you, you'll need to remove one of the static imports, changing the corresponding call sites from "assertThat" to "FooSubject.assertThat."
- Alternatively, you may choose to wait until we make further changes to the new
Truth.assertThatoverloads. Once we make those further changes, you may be able to simultaneously replace all your imports ofTruth8.assertThatwith imports ofTruth.assertThatas you upgrade to the new version, likely without introducing overload ambiguities.The changes you might elect to make:
If you use
Truth8.assertThat(Stream)orTruth8.assertThat(Optional), you can migrate to the new overloads inTruth. If you static importTruth8.assertThat, you can usually make this change simply by replacing that static import with a static import ofTruth.assertThat—or, if you already have an import ofTruth.assertThat, by just removing the import ofTruth8.assertThat. (If you additionally use less common assertion methods, likeassertThat(OptionalInt), you'll want to use both imports for now. Later, we'll moveassertThat(OptionalInt)and friends, too.) We recommend making this change now, since your calls toTruth8.assertThatwill fail to compile against some future version of Truth, unless you plan to wait to update your Truth dependency until we've made all our changes for Java 8 types.If you use
assertWithMessage(...).about(streams()).that(...),expect.about(optionals()).that(...), or similar, you can remove your call toabout. This change will never be necessary; it is just a simplification.If you depend on
truth-java8-extension, you may remove it. All its classes are now part of the maintruthartifact. This change, too, is not necessary; it is just a simplification. (OK, if your build system has a concept of strict deps, there is a chance that you'll need to add deps ontruthto replace your deps ontruth-java8-extension.)Finally, the changelog for this release:
- Made
StreamSubjectavoid collecting theStreamuntil necessary, and made itsisEqualToandisNotEqualTomethods no longer always throw. (f8ecaec69)- Added
assertThatoverloads forOptionalandStreamto the mainTruthclass. (37fd8bea9)- Added
thatoverloads to make it possible to write type-specific assertions when usingexpect.that(optional)andexpect.that(stream). (ca7e8f4c5)- Moved the
truth-java8-extensionclasses into the maintruthartifact. There is no longer any need to depend ontruth-java8-extension, which is now empty. (We've also removed theTruth8GWT module.) (eb0426eb7)Again, if you have any problems, please let us know.
1.2.0
- Fixed a bug that caused ProtoTruth to ignore the contents of unpacked
Anymessages. This fix may cause tests to fail, since ProtoTruth will now check whether the message contents match. If so, you may need to change the values that your tests expect, or there may be a bug in the code under test that had been hidden by the Truth bug. Sorry for the trouble. (8bd3ef613)- Added
isWithin().of()support toIntegerSubjectandLongSubject. (6464cb5ca, 0e99a2711)1.1.5
- Updated Truth to depend on Guava 32.0.1. The previous Guava version, 32.0.0, contained a bug under Windows, which did not affect Truth's functionality but could cause problems for people who use Guava's I/O functionality in their codebase. Affected users can already manually update their Guava dependency to 32.0.1, but if they don't depend directly on Guava, they may find it easier to upgrade to this new Truth release instead.
- Fixed
IterableOfProtosSubjectto produce a proper failure message instead of NPE when the actual value isnull.1.1.4
- Updated Truth to build with
-source 8 -target 8. This means that it no longer runs under Java 7 VMs. It continues to run under Android, even old versions, for all apps that have enabled support for Java 8 language features. (db5db2429)- Updated Truth to depend on Guava 32.0.0. That release contains changes related to CVEs. Neither of the CVEs relates to any methods that are used by Truth, so this version bump is just about eliminating any warnings related to the old version and helping tools like Maven to select the newest version of Guava. (f8d4dbba8adc65effba70879d59a39da092dce51, 99b1df8852a25b5638590bea1b55a31ae536936d)
- Added support for
value of: method()toexpect.that, matching the existing support forassertThat. (bd8efd003)- Enhanced
IterableSubject.containsAtLeastElementsIn().inOrder()to print an extra line that shows only the expected elements in their actual order. (9da7dd184)- Annotated Truth for nullness. (2151add71)
1.1.3
- Fixed a bug in how
comparingExpectedFieldsOnly()handlesoneoffields. (f27208428)- Improved
comparingExpectedFieldsOnlyto work when required fields are absent. (f27208428)- Changed
Subject.toString()to throwUnsupportedOperationException. (fa4c7b512)1.1.2
... (truncated)
Commits
- See full diff in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot mergewill merge this PR after your CI passes on it@dependabot squash and mergewill squash and merge this PR after your CI passes on it@dependabot cancel mergewill cancel a previously requested merge and block automerging@dependabot reopenwill reopen this PR if it is closed@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)