From bb5408b6eea400f68c55407a919ad583ea0f537d Mon Sep 17 00:00:00 2001 From: cpovirk Date: Tue, 28 Jul 2026 13:35:21 -0700 Subject: [PATCH] Adapt to the once and future TODO style. RELNOTES=n/a PiperOrigin-RevId: 955441453 --- .../src/main/java/com/google/common/truth/IntStreamSubject.java | 2 +- core/src/main/java/com/google/common/truth/IterableSubject.java | 2 +- .../main/java/com/google/common/truth/LongStreamSubject.java | 2 +- core/src/main/java/com/google/common/truth/MultimapSubject.java | 2 +- core/src/main/java/com/google/common/truth/SubjectUtils.java | 2 +- .../com/google/common/truth/ComparisonFailureWithFactsTest.java | 2 +- .../test/java/com/google/common/truth/CorrespondenceTest.java | 2 +- .../test/java/com/google/common/truth/IterableSubjectTest.java | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/com/google/common/truth/IntStreamSubject.java b/core/src/main/java/com/google/common/truth/IntStreamSubject.java index 9f65717eb..3aac009dd 100644 --- a/core/src/main/java/com/google/common/truth/IntStreamSubject.java +++ b/core/src/main/java/com/google/common/truth/IntStreamSubject.java @@ -272,7 +272,7 @@ private Fact actualContents() { /** Ordered implementation that does nothing because an earlier check already caused a failure. */ private static final Ordered ALREADY_FAILED = () -> {}; - // TODO: b/246961366 - Do we want to override + deprecate isEqualTo/isNotEqualTo? + // TODO(b/246961366): Do we want to override + deprecate isEqualTo/isNotEqualTo? // TODO(user): Do we want to support comparingElementsUsing() on StreamSubject? } diff --git a/core/src/main/java/com/google/common/truth/IterableSubject.java b/core/src/main/java/com/google/common/truth/IterableSubject.java index eb0ad7c98..ec794accf 100644 --- a/core/src/main/java/com/google/common/truth/IterableSubject.java +++ b/core/src/main/java/com/google/common/truth/IterableSubject.java @@ -2061,7 +2061,7 @@ public final void containsNoneOf(E first, E second, E... rest) { * Checks that the actual iterable contains no elements that correspond to any of the given * elements. */ - @SuppressWarnings("nullness") // TODO: b/423853632 - Remove after checker is fixed. + @SuppressWarnings("nullness") // TODO(b/423853632): Remove after checker is fixed. public void containsNoneIn(Iterable excluded) { if (actual == null) { failWithActual( diff --git a/core/src/main/java/com/google/common/truth/LongStreamSubject.java b/core/src/main/java/com/google/common/truth/LongStreamSubject.java index e3a292a5e..9b8e9c5df 100644 --- a/core/src/main/java/com/google/common/truth/LongStreamSubject.java +++ b/core/src/main/java/com/google/common/truth/LongStreamSubject.java @@ -272,7 +272,7 @@ private Fact actualContents() { /** Ordered implementation that does nothing because an earlier check already caused a failure. */ private static final Ordered ALREADY_FAILED = () -> {}; - // TODO: b/246961366 - Do we want to override + deprecate isEqualTo/isNotEqualTo? + // TODO(b/246961366): Do we want to override + deprecate isEqualTo/isNotEqualTo? // TODO(user): Do we want to support comparingElementsUsing() on StreamSubject? } diff --git a/core/src/main/java/com/google/common/truth/MultimapSubject.java b/core/src/main/java/com/google/common/truth/MultimapSubject.java index 7ca6546b4..fe75aa34f 100644 --- a/core/src/main/java/com/google/common/truth/MultimapSubject.java +++ b/core/src/main/java/com/google/common/truth/MultimapSubject.java @@ -623,7 +623,7 @@ private UsingCorrespondence( * Checks that the actual multimap contains an entry with the given key and a value that * corresponds to the given value. */ - @SuppressWarnings("nullness") // TODO: b/423853632 - Remove after checker is fixed. + @SuppressWarnings("nullness") // TODO(b/423853632): Remove after checker is fixed. public void containsEntry(@Nullable Object key, E value) { Entry entry = immutableEntry(key, value); if (actual == null) { diff --git a/core/src/main/java/com/google/common/truth/SubjectUtils.java b/core/src/main/java/com/google/common/truth/SubjectUtils.java index 82d618b51..e9d69dac9 100644 --- a/core/src/main/java/com/google/common/truth/SubjectUtils.java +++ b/core/src/main/java/com/google/common/truth/SubjectUtils.java @@ -508,7 +508,7 @@ static ImmutableList sandwich(E first, E[] array, E last) { return expected == null ? asList((E) null) : asList(expected); } - // TODO: b/316358623 - Inline this helper method after fixing our nullness checker to not need it. + // TODO(b/316358623): Inline this helper method after fixing our nullness checker to not need it. @SuppressWarnings("nullness") // the aforementioned checker bug static List asList(E... a) { return Arrays.asList(a); diff --git a/core/src/test/java/com/google/common/truth/ComparisonFailureWithFactsTest.java b/core/src/test/java/com/google/common/truth/ComparisonFailureWithFactsTest.java index 109982b6c..c7ac78414 100644 --- a/core/src/test/java/com/google/common/truth/ComparisonFailureWithFactsTest.java +++ b/core/src/test/java/com/google/common/truth/ComparisonFailureWithFactsTest.java @@ -277,7 +277,7 @@ public void serialization_comparisonFailureWithFacts() { (ComparisonFailure) makeComparisonFailure(messages, facts, expected, actual, cause); ComparisonFailure reserializedFailure = reserialize(original); - // TODO: b/491194734 - Remove this redundant cast once Kotlin header compilation permits. + // TODO(b/491194734): Remove this redundant cast once Kotlin header compilation permits. ErrorWithFacts reserialized = (ErrorWithFacts) ((AssertionError) reserializedFailure); assertThat(reserializedFailure).hasMessageThat().isEqualTo(original.getMessage()); assertThat(reserializedFailure).hasCauseThat().hasMessageThat().isEqualTo(cause.getMessage()); diff --git a/core/src/test/java/com/google/common/truth/CorrespondenceTest.java b/core/src/test/java/com/google/common/truth/CorrespondenceTest.java index cafb9092c..307ea994a 100644 --- a/core/src/test/java/com/google/common/truth/CorrespondenceTest.java +++ b/core/src/test/java/com/google/common/truth/CorrespondenceTest.java @@ -410,7 +410,7 @@ public void tolerance_compare_negativeTolerance() { @Test /* - * TODO: b/136037484 - Make tolerance() return false instead of throwing? Declare it with + * TODO(b/136037484): Make tolerance() return false instead of throwing? Declare it with * @Nullable types even though it throws? */ @J2ktIncompatible diff --git a/core/src/test/java/com/google/common/truth/IterableSubjectTest.java b/core/src/test/java/com/google/common/truth/IterableSubjectTest.java index 9ea35e676..ec646db03 100644 --- a/core/src/test/java/com/google/common/truth/IterableSubjectTest.java +++ b/core/src/test/java/com/google/common/truth/IterableSubjectTest.java @@ -1248,7 +1248,7 @@ public String toString() { } @Test - @J2ktIncompatible // TODO: b/420703524 - Detect the Kotlin/Native default toString() output + @J2ktIncompatible // TODO(b/420703524): Detect the Kotlin/Native default toString() output public void withNoToStringOverride() { Iterable iterable = () -> Iterators.forArray(1, 2, 3);