From 3406074b376d162aa4c39c414538aab348cfa3e7 Mon Sep 17 00:00:00 2001 From: cpovirk Date: Thu, 15 Feb 2024 15:04:48 -0800 Subject: [PATCH] Document more about how and why to migrate off `Truth8`. This continues our work on https://github.com/google/truth/issues/746. RELNOTES=n/a PiperOrigin-RevId: 607468197 --- core/src/main/java/com/google/common/truth/Truth8.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/google/common/truth/Truth8.java b/core/src/main/java/com/google/common/truth/Truth8.java index 6c49dc34c..44d03161c 100644 --- a/core/src/main/java/com/google/common/truth/Truth8.java +++ b/core/src/main/java/com/google/common/truth/Truth8.java @@ -33,7 +33,11 @@ * The obsolete entry point for assertions about Java 8 types. * * @deprecated Instead of this class's methods, use the identical methods declared in the main - * {@link Truth} class. + * {@link Truth} class. In most cases, you can migrate your whole project + * mechanically: {@code git grep -l Truth8 | xargs perl -pi -e 's/\bTruth8\b/Truth/g;'} + * Migration is important if you static import {@code assertThat}: If you do not migrate, + * such static imports will become ambiguous in Truth 1.4.2, breaking your build. */ @Deprecated // The methods here are no more dangerous that wherever the user got the (e.g.) Stream.