From 3b1c73103d16ac9cdde80b72d5557a3cc0f1f575 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 --- .../com/google/common/testing/FakeTicker.java | 8 ++++---- .../google/common/testing/FakeTickerTest.java | 4 ++-- .../common/testing/GcFinalizationTest.java | 4 ++-- .../google/common/cache/CacheBuilderTest.java | 2 +- .../google/common/cache/CacheLoadingTest.java | 2 +- .../com/google/common/cache/LocalCacheTest.java | 2 +- .../google/common/collect/ContiguousSetTest.java | 4 ++-- .../com/google/common/collect/QueuesTest.java | 2 +- .../test/com/google/common/io/MoreFilesTest.java | 6 +++--- .../test/com/google/common/math/IntMathTest.java | 8 ++++---- .../com/google/common/math/LongMathTest.java | 6 +++--- .../com/google/common/reflect/ClassPathTest.java | 12 ++++++------ .../concurrent/AbstractFutureBenchmarks.java | 2 +- .../util/concurrent/AbstractFutureTest.java | 8 ++++---- .../util/concurrent/MoreExecutorsTest.java | 2 +- .../common/util/concurrent/TestThread.java | 2 +- .../guava/src/com/google/common/base/Joiner.java | 12 ++++++------ .../com/google/common/base/Preconditions.java | 2 +- .../src/com/google/common/base/Strings.java | 2 +- .../common/collect/ConcurrentHashMultiset.java | 2 +- .../com/google/common/collect/EnumHashBiMap.java | 4 ++-- .../src/com/google/common/collect/Maps.java | 2 +- .../google/common/collect/NaturalOrdering.java | 2 +- .../com/google/common/collect/StandardTable.java | 2 +- .../src/com/google/common/io/MoreFiles.java | 2 +- .../google/common/primitives/UnsignedBytes.java | 2 +- .../src/com/google/common/reflect/Types.java | 2 +- .../common/util/concurrent/AbstractFuture.java | 2 +- .../util/concurrent/FuturesGetChecked.java | 2 +- .../util/concurrent/InterruptibleTask.java | 2 +- .../common/util/concurrent/MoreExecutors.java | 2 +- .../util/concurrent/SimpleTimeLimiter.java | 2 +- .../common/util/concurrent/TimeoutFuture.java | 2 +- .../common/util/concurrent/Uninterruptibles.java | 6 +++--- .../common/testing/GcFinalizationTest.java | 4 ++-- .../google/common/cache/CacheBuilderTest.java | 2 +- .../google/common/cache/CacheLoadingTest.java | 2 +- .../com/google/common/cache/LocalCacheTest.java | 2 +- .../google/common/collect/ContiguousSetTest.java | 4 ++-- .../com/google/common/collect/QueuesTest.java | 2 +- .../test/com/google/common/io/MoreFilesTest.java | 6 +++--- .../test/com/google/common/math/IntMathTest.java | 8 ++++---- .../com/google/common/math/LongMathTest.java | 6 +++--- .../com/google/common/reflect/ClassPathTest.java | 16 ++++++++-------- .../concurrent/AbstractFutureBenchmarks.java | 2 +- .../util/concurrent/AbstractFutureTest.java | 8 ++++---- .../util/concurrent/MoreExecutorsTest.java | 2 +- .../common/util/concurrent/TestThread.java | 2 +- guava/src/com/google/common/base/Joiner.java | 10 +++++----- .../com/google/common/base/Preconditions.java | 2 +- guava/src/com/google/common/base/Strings.java | 2 +- .../common/collect/ConcurrentHashMultiset.java | 2 +- .../com/google/common/collect/EnumHashBiMap.java | 4 ++-- .../com/google/common/collect/ImmutableSet.java | 2 +- guava/src/com/google/common/collect/Maps.java | 2 +- .../google/common/collect/NaturalOrdering.java | 2 +- .../com/google/common/collect/StandardTable.java | 2 +- .../com/google/common/collect/Synchronized.java | 4 ++-- guava/src/com/google/common/io/MoreFiles.java | 2 +- .../google/common/primitives/UnsignedBytes.java | 2 +- guava/src/com/google/common/reflect/Types.java | 2 +- .../common/util/concurrent/AbstractFuture.java | 2 +- .../util/concurrent/FuturesGetChecked.java | 2 +- .../common/util/concurrent/MoreExecutors.java | 2 +- .../util/concurrent/SimpleTimeLimiter.java | 2 +- .../common/util/concurrent/TimeoutFuture.java | 2 +- .../common/util/concurrent/Uninterruptibles.java | 6 +++--- 67 files changed, 123 insertions(+), 123 deletions(-) diff --git a/android/guava-testlib/src/com/google/common/testing/FakeTicker.java b/android/guava-testlib/src/com/google/common/testing/FakeTicker.java index 888cfbe23e77..fbfd80dab048 100644 --- a/android/guava-testlib/src/com/google/common/testing/FakeTicker.java +++ b/android/guava-testlib/src/com/google/common/testing/FakeTicker.java @@ -72,8 +72,8 @@ public FakeTicker advance(long nanoseconds) { @GwtIncompatible @J2ktIncompatible @CanIgnoreReturnValue - @IgnoreJRERequirement // TODO: b/288085449 - Remove this once we use library-desugaring scents. - @Beta // TODO: b/288085449 - Remove @Beta after we're sure that Java 8 APIs are safe for Android + @IgnoreJRERequirement // TODO(b/288085449): Remove this once we use library-desugaring scents. + @Beta // TODO(b/288085449): Remove @Beta after we're sure that Java 8 APIs are safe for Android public FakeTicker advance(Duration duration) { return advance(duration.toNanos()); } @@ -104,8 +104,8 @@ public FakeTicker setAutoIncrementStep(long autoIncrementStep, TimeUnit timeUnit @GwtIncompatible @J2ktIncompatible @CanIgnoreReturnValue - @IgnoreJRERequirement // TODO: b/288085449 - Remove this once we use library-desugaring scents. - @Beta // TODO: b/288085449 - Remove @Beta after we're sure that Java 8 APIs are safe for Android + @IgnoreJRERequirement // TODO(b/288085449): Remove this once we use library-desugaring scents. + @Beta // TODO(b/288085449): Remove @Beta after we're sure that Java 8 APIs are safe for Android public FakeTicker setAutoIncrementStep(Duration autoIncrementStep) { return setAutoIncrementStep(autoIncrementStep.toNanos(), NANOSECONDS); } diff --git a/android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java b/android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java index faf67023ff45..a417e76c9178 100644 --- a/android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java +++ b/android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java @@ -56,7 +56,7 @@ public void nullPointerExceptions() { @Test @GwtIncompatible // java.time.Duration - @IgnoreJRERequirement // TODO: b/288085449 - Remove this once we use library-desugaring scents. + @IgnoreJRERequirement // TODO(b/288085449): Remove this once we use library-desugaring scents. public void advance() { FakeTicker ticker = new FakeTicker(); assertEquals(0, ticker.read()); @@ -100,7 +100,7 @@ public void autoIncrementStep_seconds() { @Test @GwtIncompatible // java.time.Duration - @IgnoreJRERequirement // TODO: b/288085449 - Remove this once we use library-desugaring scents. + @IgnoreJRERequirement // TODO(b/288085449): Remove this once we use library-desugaring scents. public void autoIncrementStep_duration() { FakeTicker ticker = new FakeTicker().setAutoIncrementStep(Duration.ofMillis(1)); assertEquals(0, ticker.read()); diff --git a/android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java b/android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java index b606f54f02c1..c41b29eea4f7 100644 --- a/android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java +++ b/android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java @@ -128,7 +128,7 @@ static final class Interruptenator extends Thread { this(interruptee, new AtomicBoolean(false)); } - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. Interruptenator(Thread interruptee, AtomicBoolean shutdown) { super( () -> { @@ -141,7 +141,7 @@ static final class Interruptenator extends Thread { start(); } - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. void shutdown() { shutdown.set(true); while (this.isAlive()) { diff --git a/android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java b/android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java index aa154ac66a33..dec031f8a00d 100644 --- a/android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java +++ b/android/guava-tests/test/com/google/common/cache/CacheBuilderTest.java @@ -440,7 +440,7 @@ public String load(String key) throws InterruptedException { @J2ktIncompatible @GwtIncompatible // QueuingRemovalListener - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. public void testRemovalNotification_clear_basher() throws InterruptedException { // If a clear() happens close to the end of computation, one of two things should happen: // - computation ends first: the removal listener is called, and the cache does not contain the diff --git a/android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java b/android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java index 7acda27e4476..42fdf5c1867d 100644 --- a/android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java +++ b/android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java @@ -2008,7 +2008,7 @@ public String load(String key) throws IOException, InterruptedException { * {@code getUnchecked}, and threads with an odd index will call {@code get}. If the cache throws * exceptions, this difference may be visible in the returned List. */ - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. private static List doConcurrentGet( LoadingCache cache, K key, int nThreads, CountDownLatch gettersStartedSignal) throws InterruptedException { diff --git a/android/guava-tests/test/com/google/common/cache/LocalCacheTest.java b/android/guava-tests/test/com/google/common/cache/LocalCacheTest.java index b86555b95691..21c6b90ffb06 100644 --- a/android/guava-tests/test/com/google/common/cache/LocalCacheTest.java +++ b/android/guava-tests/test/com/google/common/cache/LocalCacheTest.java @@ -567,7 +567,7 @@ public String load(String key) { } @Override - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. public ListenableFuture reload(String key, String oldValue) { return refreshExecutor.submit( () -> { diff --git a/android/guava-tests/test/com/google/common/collect/ContiguousSetTest.java b/android/guava-tests/test/com/google/common/collect/ContiguousSetTest.java index 11f19be5a706..4c4378ded6a0 100644 --- a/android/guava-tests/test/com/google/common/collect/ContiguousSetTest.java +++ b/android/guava-tests/test/com/google/common/collect/ContiguousSetTest.java @@ -282,7 +282,7 @@ public void testContains() { assertFalse(set.contains(4)); } - // TODO: https://youtrack.jetbrains.com/issue/KT-71001/ - Enable when Kotlin throws expected CCE. + // TODO(user): Enable when Kotlin throws expected CCE. @J2ktIncompatible public void testContains_typeMismatch() { ImmutableSortedSet set = ContiguousSet.create(Range.open(0, 4), integers()); @@ -299,7 +299,7 @@ public void testContainsAll() { } } - // TODO: https://youtrack.jetbrains.com/issue/KT-71001/ - Enable when Kotlin throws expected CCE. + // TODO(user): Enable when Kotlin throws expected CCE. @J2ktIncompatible public void testContainsAll_typeMismatch() { ImmutableSortedSet set = ContiguousSet.create(Range.closed(1, 3), integers()); diff --git a/android/guava-tests/test/com/google/common/collect/QueuesTest.java b/android/guava-tests/test/com/google/common/collect/QueuesTest.java index 89adc29c7b4a..af7596c4dbb6 100644 --- a/android/guava-tests/test/com/google/common/collect/QueuesTest.java +++ b/android/guava-tests/test/com/google/common/collect/QueuesTest.java @@ -291,7 +291,7 @@ private void assertInterruptibleDrained(BlockingQueue q) { } // same as above; uninterruptible version - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. private void assertUninterruptibleDrained(BlockingQueue q) { assertEquals(0, drainUninterruptibly(q, ImmutableList.of(), 0, 10, MILLISECONDS)); diff --git a/android/guava-tests/test/com/google/common/io/MoreFilesTest.java b/android/guava-tests/test/com/google/common/io/MoreFilesTest.java index 3554ec000054..4c6dff093ded 100644 --- a/android/guava-tests/test/com/google/common/io/MoreFilesTest.java +++ b/android/guava-tests/test/com/google/common/io/MoreFilesTest.java @@ -275,7 +275,7 @@ public void testCreateParentDirectories_multipleParentsNeeded() throws IOExcepti public void testCreateParentDirectories_noPermission() { if (isWindows()) { - return; // TODO: b/136041958 - Create/find a directory that we don't have permissions on? + return; // TODO(b/136041958): Create/find a directory that we don't have permissions on? } Path file = root().resolve("parent/nonexistent.file"); Path parent = file.getParent(); @@ -570,7 +570,7 @@ public void testDeleteDirectoryContents_symlinkToDir_sdsNotSupported_allowInsecu *

We can only test this with a file system that supports SecureDirectoryStream, because it's * not possible to protect against this if the file system doesn't. */ - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. public void testDirectoryDeletion_directorySymlinkRace() throws Exception { int iterations = isAndroid() ? 100 : 5000; for (DirectoryDeleteMethod method : EnumSet.allOf(DirectoryDeleteMethod.class)) { @@ -641,7 +641,7 @@ public void testDeleteRecursively_nonDirectoryFile() throws IOException { * between being a directory and being a symlink, while the given {@code target} is the target the * symlink should have. */ - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. private static Future startDirectorySymlinkSwitching( Path file, Path target, ExecutorService executor) { return executor.submit( diff --git a/android/guava-tests/test/com/google/common/math/IntMathTest.java b/android/guava-tests/test/com/google/common/math/IntMathTest.java index 976b63e7cac0..71feb5e26806 100644 --- a/android/guava-tests/test/com/google/common/math/IntMathTest.java +++ b/android/guava-tests/test/com/google/common/math/IntMathTest.java @@ -456,7 +456,7 @@ public void testGCDNegativeZeroThrows() { public void testCheckedAdd() { for (int a : ALL_INTEGER_CANDIDATES) { for (int b : ALL_INTEGER_CANDIDATES) { - // TODO: cpovirk - Test against Math.addExact instead? + // TODO(cpovirk): Test against Math.addExact instead? BigInteger expectedResult = bigInt(a).add(bigInt(b)); boolean expectedSuccess = fitsInInt(expectedResult); try { @@ -474,7 +474,7 @@ public void testCheckedAdd() { public void testCheckedSubtract() { for (int a : ALL_INTEGER_CANDIDATES) { for (int b : ALL_INTEGER_CANDIDATES) { - // TODO: cpovirk - Test against Math.subtractExact instead? + // TODO(cpovirk): Test against Math.subtractExact instead? BigInteger expectedResult = bigInt(a).subtract(bigInt(b)); boolean expectedSuccess = fitsInInt(expectedResult); try { @@ -492,7 +492,7 @@ public void testCheckedSubtract() { public void testCheckedMultiply() { for (int a : ALL_INTEGER_CANDIDATES) { for (int b : ALL_INTEGER_CANDIDATES) { - // TODO: cpovirk - Test against Math.multiplyExact instead? + // TODO(cpovirk): Test against Math.multiplyExact instead? BigInteger expectedResult = bigInt(a).multiply(bigInt(b)); boolean expectedSuccess = fitsInInt(expectedResult); try { @@ -742,7 +742,7 @@ public void testSaturatedAbs() { private static int force32(int value) { // GWT doesn't consistently overflow values to make them 32-bit, so we need to force it. - // TODO: b/404577035 - Remove this unless it's needed for J2CL. + // TODO(b/404577035): Remove this unless it's needed for J2CL. // One of its users, testDivNonZero, is currently @GwtIncompatible, but maybe it WOULD need it? // And if it's needed, maybe use our usual trick of ~~ instead? return value & 0xffffffff; diff --git a/android/guava-tests/test/com/google/common/math/LongMathTest.java b/android/guava-tests/test/com/google/common/math/LongMathTest.java index 812e214dca01..0ef37a6fbf8f 100644 --- a/android/guava-tests/test/com/google/common/math/LongMathTest.java +++ b/android/guava-tests/test/com/google/common/math/LongMathTest.java @@ -509,7 +509,7 @@ public void testGCDNegativeZeroThrows() { public void testCheckedAdd() { for (long a : ALL_LONG_CANDIDATES) { for (long b : ALL_LONG_CANDIDATES) { - // TODO: cpovirk - Test against Math.addExact instead? + // TODO(cpovirk): Test against Math.addExact instead? BigInteger expectedResult = bigInt(a).add(bigInt(b)); boolean expectedSuccess = fitsInLong(expectedResult); try { @@ -530,7 +530,7 @@ public void testCheckedAdd() { public void testCheckedSubtract() { for (long a : ALL_LONG_CANDIDATES) { for (long b : ALL_LONG_CANDIDATES) { - // TODO: cpovirk - Test against Math.subtractExact instead? + // TODO(cpovirk): Test against Math.subtractExact instead? BigInteger expectedResult = bigInt(a).subtract(bigInt(b)); boolean expectedSuccess = fitsInLong(expectedResult); try { @@ -563,7 +563,7 @@ public void testCheckedMultiply() { */ continue; } - // TODO: cpovirk - Test against Math.multiplyExact instead? + // TODO(cpovirk): Test against Math.multiplyExact instead? BigInteger expectedResult = bigInt(a).multiply(bigInt(b)); boolean expectedSuccess = fitsInLong(expectedResult); try { diff --git a/android/guava-tests/test/com/google/common/reflect/ClassPathTest.java b/android/guava-tests/test/com/google/common/reflect/ClassPathTest.java index ebeca030ca9c..775bd7a39c15 100644 --- a/android/guava-tests/test/com/google/common/reflect/ClassPathTest.java +++ b/android/guava-tests/test/com/google/common/reflect/ClassPathTest.java @@ -216,7 +216,7 @@ public void testScanFromFile_notJarFile() throws IOException { public void testGetClassPathEntry() throws MalformedURLException, URISyntaxException { if (isWindows()) { - return; // TODO: b/136041958 - We need to account for drive letters in the path. + return; // TODO(b/136041958): We need to account for drive letters in the path. } assertEquals( new File("/usr/test/dep.jar").toURI(), @@ -288,7 +288,7 @@ public void testGetClassPathFromManifest_jarInCurrentDirectory() throws IOExcept public void testGetClassPathFromManifest_absoluteDirectory() throws IOException { if (isWindows()) { - return; // TODO: b/136041958 - We need to account for drive letters in the path. + return; // TODO(b/136041958): We need to account for drive letters in the path. } File jarFile = new File("base/some.jar"); Manifest manifest = manifestClasspath("file:/with/absolute/dir"); @@ -298,7 +298,7 @@ public void testGetClassPathFromManifest_absoluteDirectory() throws IOException public void testGetClassPathFromManifest_absoluteJar() throws IOException { if (isWindows()) { - return; // TODO: b/136041958 - We need to account for drive letters in the path. + return; // TODO(b/136041958): We need to account for drive letters in the path. } File jarFile = new File("base/some.jar"); Manifest manifest = manifestClasspath("file:/with/absolute.jar"); @@ -308,7 +308,7 @@ public void testGetClassPathFromManifest_absoluteJar() throws IOException { public void testGetClassPathFromManifest_multiplePaths() throws IOException { if (isWindows()) { - return; // TODO: b/136041958 - We need to account for drive letters in the path. + return; // TODO(b/136041958): We need to account for drive letters in the path. } File jarFile = new File("base/some.jar"); Manifest manifest = manifestClasspath("file:/with/absolute.jar relative.jar relative/dir"); @@ -371,7 +371,7 @@ public void testGetPackageName() { @AndroidIncompatible public void testGetClassPathUrls() throws Exception { if (isWindows()) { - return; // TODO: b/136041958 - We need to account for drive letters in the path. + return; // TODO(b/136041958): We need to account for drive letters in the path. } String oldPathSeparator = PATH_SEPARATOR.value(); String oldClassPath = JAVA_CLASS_PATH.value(); @@ -518,7 +518,7 @@ private static File fullpath(String path) { private static URL makeJarUrlWithName(String name) throws IOException { /* - * TODO: cpovirk - Use java.nio.file.Files.createTempDirectory instead of + * TODO(cpovirk): Use java.nio.file.Files.createTempDirectory instead of * c.g.c.io.Files.createTempDir? */ File fullPath = new File(Files.createTempDir(), name); diff --git a/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java b/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java index 264099d96d56..8a347e0784f2 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java @@ -91,7 +91,7 @@ Facade newFacade() { abstract Facade newFacade(); } - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. static void awaitWaiting(Thread t) { while (true) { Thread.State state = t.getState(); diff --git a/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java b/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java index aa794e44fbbb..2f2426fd0b76 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java @@ -469,7 +469,7 @@ public void testCompletionFinishesWithDone() { @J2ktIncompatible public void testFutureBash() { if (isWindows()) { - return; // TODO: b/136041958 - Running very slowly on Windows CI. + return; // TODO(b/136041958): Running very slowly on Windows CI. } CyclicBarrier barrier = new CyclicBarrier( @@ -638,7 +638,7 @@ public void testFutureBash() { // setFuture and cancel() interact in more complicated ways than the other setters. public void testSetFutureCancelBash() { if (isWindows()) { - return; // TODO: b/136041958 - Running very slowly on Windows CI. + return; // TODO(b/136041958): Running very slowly on Windows CI. } int size = 50; CyclicBarrier barrier = @@ -1222,7 +1222,7 @@ public void run() { } } - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. void awaitWaiting() { while (!isBlocked()) { if (getState() == State.TERMINATED) { @@ -1265,7 +1265,7 @@ public void run() { } } - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. void awaitWaiting() { while (!isBlocked()) { if (getState() == State.TERMINATED) { diff --git a/android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java b/android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java index 2c71cf516c1e..024d2eb09a01 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java @@ -234,7 +234,7 @@ public void run() { } /** Wait for the given thread to reach the {@link State#TIMED_WAITING} thread state. */ - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. @J2ktIncompatible void awaitTimedWaiting(Thread thread) { while (true) { diff --git a/android/guava-tests/test/com/google/common/util/concurrent/TestThread.java b/android/guava-tests/test/com/google/common/util/concurrent/TestThread.java index 45bfa399fbbb..76fa537f7db0 100644 --- a/android/guava-tests/test/com/google/common/util/concurrent/TestThread.java +++ b/android/guava-tests/test/com/google/common/util/concurrent/TestThread.java @@ -71,7 +71,7 @@ public TestThread(L lockLikeObject, String threadName) { } /* - * TODO: b/318391980 - Once we test only under Java 20 and higher, avoid calling Thread.stop. As + * TODO(b/318391980): Once we test only under Java 20 and higher, avoid calling Thread.stop. As * of Java 20, it always throws an exception, and as of Java 26, the method does not even exist. * For now, we continue using it to clean up under older JDKs. * diff --git a/android/guava/src/com/google/common/base/Joiner.java b/android/guava/src/com/google/common/base/Joiner.java index 0a2241620c43..875422f67a7b 100644 --- a/android/guava/src/com/google/common/base/Joiner.java +++ b/android/guava/src/com/google/common/base/Joiner.java @@ -120,7 +120,7 @@ public A appendTo(A appendable, Iterator parts) throws @CanIgnoreReturnValue public final A appendTo(A appendable, @Nullable Object[] parts) throws IOException { - @SuppressWarnings("nullness") // TODO: b/316358623 - Remove suppression after fixing checker + @SuppressWarnings("nullness") // TODO(b/316358623): Remove suppression after fixing checker List partsList = Arrays.<@Nullable Object>asList(parts); return appendTo(appendable, partsList); } @@ -167,7 +167,7 @@ public final StringBuilder appendTo(StringBuilder builder, Iterator parts) { */ @CanIgnoreReturnValue public final StringBuilder appendTo(StringBuilder builder, @Nullable Object[] parts) { - @SuppressWarnings("nullness") // TODO: b/316358623 - Remove suppression after fixing checker + @SuppressWarnings("nullness") // TODO(b/316358623): Remove suppression after fixing checker List partsList = Arrays.<@Nullable Object>asList(parts); return appendTo(builder, partsList); } @@ -192,17 +192,17 @@ public final StringBuilder appendTo( */ public String join(Iterable parts) { // We don't use the same optimization here as in the JRE flavor. - // TODO: b/381289911 - Evaluate the performance impact of doing so. + // TODO(b/381289911): Evaluate the performance impact of doing so. return join(parts.iterator()); } /* - * TODO: b/381289911 - Make the Iterator overload use StringJoiner (including Android or not)—or + * TODO(b/381289911): Make the Iterator overload use StringJoiner (including Android or not)—or * some other optimization, given that StringJoiner can over-allocate: * https://bugs.openjdk.org/browse/JDK-8305774 */ - // TODO: b/381289911 - Optimize MapJoiner similarly to Joiner (including Android or not). + // TODO(b/381289911): Optimize MapJoiner similarly to Joiner (including Android or not). /** * Returns a string containing the string representation of each of {@code parts}, using the @@ -219,7 +219,7 @@ public final String join(Iterator parts) { * previously configured separator between each. */ public final String join(@Nullable Object[] parts) { - @SuppressWarnings("nullness") // TODO: b/316358623 - Remove suppression after fixing checker + @SuppressWarnings("nullness") // TODO(b/316358623): Remove suppression after fixing checker List partsList = Arrays.<@Nullable Object>asList(parts); return join(partsList); } diff --git a/android/guava/src/com/google/common/base/Preconditions.java b/android/guava/src/com/google/common/base/Preconditions.java index c9e5644a66e0..1f3a2ae80bd1 100644 --- a/android/guava/src/com/google/common/base/Preconditions.java +++ b/android/guava/src/com/google/common/base/Preconditions.java @@ -459,7 +459,7 @@ public static void checkArgument( */ public static void checkArgument( boolean expression, - // TODO: cl/604933487 - Make errorMessageTemplate consistently @Nullable across overloads. + // TODO(user): Make errorMessageTemplate consistently @Nullable across overloads. @Nullable String errorMessageTemplate, @Nullable Object p1, @Nullable Object p2) { diff --git a/android/guava/src/com/google/common/base/Strings.java b/android/guava/src/com/google/common/base/Strings.java index b642f9028aee..ee53cf4aac78 100644 --- a/android/guava/src/com/google/common/base/Strings.java +++ b/android/guava/src/com/google/common/base/Strings.java @@ -261,7 +261,7 @@ static boolean validSurrogatePairAt(CharSequence string, int index) { * non-null values are converted to strings using {@link Object#toString()}. * @since 25.1 */ - // TODO: b/136042644 - consider using Arrays.toString() for array parameters + // TODO(b/136042644): consider using Arrays.toString() for array parameters public static String lenientFormat( @Nullable String template, @Nullable Object @Nullable ... args) { template = String.valueOf(template); // null -> "null" diff --git a/android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java b/android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java index b1726f76da49..e807f23fa84f 100644 --- a/android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java +++ b/android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java @@ -179,7 +179,7 @@ public int size() { * 1. Both superclass toArray methods assume that size() gives a correct answer, while our size() * might not (and the answer might change while we're building the array). * - * TODO: cpovirk - Is this an issue anywhere anymore? It looks to have been fixed for Java 8 + * TODO(cpovirk): Is this an issue anywhere anymore? It looks to have been fixed for Java 8 * (https://bugs.openjdk.org/browse/JDK-7121314) and before Lollipop * (https://r.android.com/47508). We *would* need to worry for J2KT, whose own concurrency support * is evolving (b/381065164, b/458160722), but this class is @J2ktIncompatible. diff --git a/android/guava/src/com/google/common/collect/EnumHashBiMap.java b/android/guava/src/com/google/common/collect/EnumHashBiMap.java index dd6cce15419b..e003cf596235 100644 --- a/android/guava/src/com/google/common/collect/EnumHashBiMap.java +++ b/android/guava/src/com/google/common/collect/EnumHashBiMap.java @@ -77,7 +77,7 @@ public final class EnumHashBiMap, V extends @Nullable Object> private EnumHashBiMap(Class keyType) { super(new EnumMap(keyType), new HashMap()); - // TODO: cpovirk - Pre-size the HashMap based on the number of enum values? + // TODO(cpovirk): Pre-size the HashMap based on the number of enum values? this.keyTypeOrObjectUnderJ2cl = keyType; } @@ -127,7 +127,7 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo stream.defaultReadObject(); keyTypeOrObjectUnderJ2cl = (Class) requireNonNull(stream.readObject()); /* - * TODO: cpovirk - Pre-size the HashMap based on the number of enum values? (But *not* based on + * TODO(cpovirk): Pre-size the HashMap based on the number of enum values? (But *not* based on * the number of entries in the map, as that makes it easy for hostile inputs to trigger lots of * allocation—not that any program should be deserializing hostile inputs to begin with!) */ diff --git a/android/guava/src/com/google/common/collect/Maps.java b/android/guava/src/com/google/common/collect/Maps.java index b280c060b3dc..b0d1728452c3 100644 --- a/android/guava/src/com/google/common/collect/Maps.java +++ b/android/guava/src/com/google/common/collect/Maps.java @@ -3238,7 +3238,7 @@ private static final class FilteredEntryBiMap< extends FilteredEntryMap implements BiMap { @RetainedWith private final BiMap inverse; - @SuppressWarnings("nullness") // TODO: b/423853632 - Remove after checker is fixed. + @SuppressWarnings("nullness") // TODO(b/423853632): Remove after checker is fixed. private static Predicate> inversePredicate(Predicate> forwardPredicate) { return input -> forwardPredicate.apply(immutableEntry(input.getValue(), input.getKey())); diff --git a/android/guava/src/com/google/common/collect/NaturalOrdering.java b/android/guava/src/com/google/common/collect/NaturalOrdering.java index 343db614435a..49e5c51faf95 100644 --- a/android/guava/src/com/google/common/collect/NaturalOrdering.java +++ b/android/guava/src/com/google/common/collect/NaturalOrdering.java @@ -31,7 +31,7 @@ final class NaturalOrdering extends Ordering> implements Serializa static final NaturalOrdering INSTANCE = new NaturalOrdering(); /* - * TODO: b/287198172 - Consider eagerly initializing these, maybe making them static. But that + * TODO(b/287198172): Consider eagerly initializing these, maybe making them static. But that * would lead to at least slighly more work at startup time. */ @LazyInit private transient @Nullable Ordering<@Nullable Comparable> nullsFirst; diff --git a/android/guava/src/com/google/common/collect/StandardTable.java b/android/guava/src/com/google/common/collect/StandardTable.java index ee7ef3963139..a995a3ae3cc5 100644 --- a/android/guava/src/com/google/common/collect/StandardTable.java +++ b/android/guava/src/com/google/common/collect/StandardTable.java @@ -661,7 +661,7 @@ public Set rowKeySet() { * etc., skipping any columns that have appeared previously. */ @Override - // TODO: cl/934353699 - Make this `final` after cl/781580713 or a similar fix. + // TODO(user): Make this `final` after cl/781580713 or a similar fix. public Set columnKeySet() { Set result = columnKeySet; return (result == null) ? columnKeySet = new ColumnKeySet() : result; diff --git a/android/guava/src/com/google/common/io/MoreFiles.java b/android/guava/src/com/google/common/io/MoreFiles.java index 8d296f6aa60e..d0da738d5375 100644 --- a/android/guava/src/com/google/common/io/MoreFiles.java +++ b/android/guava/src/com/google/common/io/MoreFiles.java @@ -538,7 +538,7 @@ public static void deleteRecursively(Path path, RecursiveDeleteOption... options */ boolean sdsSupported = false; /* - * TODO: b/331925065 - Should we catch any exception from this `newDirectoryStream` call (i.e., + * TODO(b/331925065): Should we catch any exception from this `newDirectoryStream` call (i.e., * the one for `parentPath`), too? We should see what `rm -f` does, especially if we make * "ignore errors" behavior available to users of `deleteRecursively`. */ diff --git a/android/guava/src/com/google/common/primitives/UnsignedBytes.java b/android/guava/src/com/google/common/primitives/UnsignedBytes.java index 9220c8388b33..191b823e320c 100644 --- a/android/guava/src/com/google/common/primitives/UnsignedBytes.java +++ b/android/guava/src/com/google/common/primitives/UnsignedBytes.java @@ -498,7 +498,7 @@ static Comparator getBestComparator() { * aren't stripping UnsafeComparator today? Should we have Proguard configuration for it?) * * - if Unsafe is removed entirely from JDKs (or already absent in some unusual environment - * today). TODO: b/392974826 - Check for the existence of Unsafe and its methods + * today). TODO(b/392974826): Check for the existence of Unsafe and its methods * reflectively before attempting to access UnsafeComparator. Or, better yet, allow * UnsafeComparator to still initialize correctly even if Unsafe is unavailable. This would * protect against users that automatically preinitialize internal classes that they've seen diff --git a/android/guava/src/com/google/common/reflect/Types.java b/android/guava/src/com/google/common/reflect/Types.java index b3201fe9439e..8d379b4c0350 100644 --- a/android/guava/src/com/google/common/reflect/Types.java +++ b/android/guava/src/com/google/common/reflect/Types.java @@ -345,7 +345,7 @@ private static TypeVariable newTypeVariableImp * of {@code TypeVariable} from {@link TypeResolver#resolveType} will not be able to call {@code * getAnnotatedBounds()} on it, but that should hopefully be rare. * - *

TODO: b/147144588 - We are currently also missing the methods inherited from {@link + *

TODO(b/147144588): We are currently also missing the methods inherited from {@link * AnnotatedElement}, which {@code TypeVariable} began to extend only in Java 8. Those methods * refer only to types present under Android, so we could implement them in {@code * TypeVariableImpl} today. (We could probably then make {@code TypeVariableImpl} implement {@code diff --git a/android/guava/src/com/google/common/util/concurrent/AbstractFuture.java b/android/guava/src/com/google/common/util/concurrent/AbstractFuture.java index a54274bad077..998fc5290e38 100644 --- a/android/guava/src/com/google/common/util/concurrent/AbstractFuture.java +++ b/android/guava/src/com/google/common/util/concurrent/AbstractFuture.java @@ -275,7 +275,7 @@ public V get() throws InterruptedException, ExecutionException { @ParametricNullness @SuppressWarnings("nullness") // TODO(b/147136275): Remove once our checker understands & and |. /* - * TODO: b/112550045 - Use this from Futures.getDone when applicable? Note the small difference in + * TODO(b/112550045): Use this from Futures.getDone when applicable? Note the small difference in * failure message between the two at present. */ final V getFromAlreadyDoneTrustedFuture() throws ExecutionException { diff --git a/android/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java b/android/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java index ea2bfe2da9bc..fd2f43519c3b 100644 --- a/android/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java +++ b/android/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java @@ -209,7 +209,7 @@ private static List> preferringStringsThenT return WITH_STRING_PARAM_THEN_WITH_THROWABLE_PARAM.sortedCopy(constructors); } - // TODO: b/296487962 - Consider defining a total order over constructors. + // TODO(b/296487962): Consider defining a total order over constructors. private static final Ordering>> ORDERING_BY_CONSTRUCTOR_PARAMETER_LIST = Ordering.natural() .onResultOf((List> params) -> params.contains(String.class)) diff --git a/android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java b/android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java index f5d73b8b729c..348492cfec69 100644 --- a/android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java +++ b/android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java @@ -94,7 +94,7 @@ public final void run() { @SuppressWarnings({ "Interruption", // We are restoring an interrupt on this thread. - "ThreadPriorityCheck", // TODO: b/175898629 - Consider onSpinWait. + "ThreadPriorityCheck", // TODO(b/175898629): Consider onSpinWait. }) private void waitForInterrupt(Thread currentThread) { /* diff --git a/android/guava/src/com/google/common/util/concurrent/MoreExecutors.java b/android/guava/src/com/google/common/util/concurrent/MoreExecutors.java index 99c5586e3b66..c2754a2c33d7 100644 --- a/android/guava/src/com/google/common/util/concurrent/MoreExecutors.java +++ b/android/guava/src/com/google/common/util/concurrent/MoreExecutors.java @@ -531,7 +531,7 @@ public final List shutdownNow() { } /* - * TODO: https://github.com/google/guava/issues/2143 - In addition to overriding `execute`, also + * TODO(user): In addition to overriding `execute`, also * override the `Future`-returning methods of `ExecutorService` to propagate cancellation from * our `TrustedListenableFutureTask` to a `Future` returned by the delegate executor? */ diff --git a/android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java b/android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java index ee9880f51b2f..eb46de096e7f 100644 --- a/android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java +++ b/android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java @@ -47,7 +47,7 @@ */ @J2ktIncompatible @GwtIncompatible -// TODO: b/227335009 - Maybe change interruption behavior, but it requires thought. +// TODO(b/227335009): Maybe change interruption behavior, but it requires thought. @SuppressWarnings("Interruption") public final class SimpleTimeLimiter implements TimeLimiter { diff --git a/android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java b/android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java index 4a67acfbb995..1207b2d76f57 100644 --- a/android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java +++ b/android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java @@ -92,7 +92,7 @@ private static final class Fire implements Runnable } @Override - // TODO: b/227335009 - Maybe change interruption behavior, but it requires thought. + // TODO(b/227335009): Maybe change interruption behavior, but it requires thought. @SuppressWarnings("Interruption") public void run() { // If either of these reads return null then we must be after a successful cancel or another diff --git a/android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java b/android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java index f2b8d6f5b12e..d7c920bcb128 100644 --- a/android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java +++ b/android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java @@ -410,7 +410,7 @@ public static void putUninterruptibly(BlockingQueue queue, E element) { } } - // TODO: b/5042178 - Support Sleeper somehow (wrapper or interface method)? + // TODO(b/5042178): Support Sleeper somehow (wrapper or interface method)? /** * Invokes {@code unit.}{@link TimeUnit#sleep(long) sleep(sleepFor)} uninterruptibly. * @@ -423,7 +423,7 @@ public static void sleepUninterruptibly(Duration sleepFor) { sleepUninterruptibly(toNanosSaturated(sleepFor), NANOSECONDS); } - // TODO: b/5042178 - Support Sleeper somehow (wrapper or interface method)? + // TODO(b/5042178): Support Sleeper somehow (wrapper or interface method)? /** Invokes {@code unit.}{@link TimeUnit#sleep(long) sleep(sleepFor)} uninterruptibly. */ @J2ktIncompatible @GwtIncompatible // concurrency @@ -624,7 +624,7 @@ public static boolean awaitTerminationUninterruptibly( } } - // TODO: b/4370300 - Add support for waitUninterruptibly. + // TODO(b/4370300): Add support for waitUninterruptibly. private Uninterruptibles() {} } diff --git a/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java b/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java index b606f54f02c1..c41b29eea4f7 100644 --- a/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java +++ b/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java @@ -128,7 +128,7 @@ static final class Interruptenator extends Thread { this(interruptee, new AtomicBoolean(false)); } - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. Interruptenator(Thread interruptee, AtomicBoolean shutdown) { super( () -> { @@ -141,7 +141,7 @@ static final class Interruptenator extends Thread { start(); } - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. void shutdown() { shutdown.set(true); while (this.isAlive()) { diff --git a/guava-tests/test/com/google/common/cache/CacheBuilderTest.java b/guava-tests/test/com/google/common/cache/CacheBuilderTest.java index 711288f9c96d..cac92708d542 100644 --- a/guava-tests/test/com/google/common/cache/CacheBuilderTest.java +++ b/guava-tests/test/com/google/common/cache/CacheBuilderTest.java @@ -440,7 +440,7 @@ public String load(String key) throws InterruptedException { @J2ktIncompatible @GwtIncompatible // QueuingRemovalListener - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. public void testRemovalNotification_clear_basher() throws InterruptedException { // If a clear() happens close to the end of computation, one of two things should happen: // - computation ends first: the removal listener is called, and the cache does not contain the diff --git a/guava-tests/test/com/google/common/cache/CacheLoadingTest.java b/guava-tests/test/com/google/common/cache/CacheLoadingTest.java index 7acda27e4476..42fdf5c1867d 100644 --- a/guava-tests/test/com/google/common/cache/CacheLoadingTest.java +++ b/guava-tests/test/com/google/common/cache/CacheLoadingTest.java @@ -2008,7 +2008,7 @@ public String load(String key) throws IOException, InterruptedException { * {@code getUnchecked}, and threads with an odd index will call {@code get}. If the cache throws * exceptions, this difference may be visible in the returned List. */ - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. private static List doConcurrentGet( LoadingCache cache, K key, int nThreads, CountDownLatch gettersStartedSignal) throws InterruptedException { diff --git a/guava-tests/test/com/google/common/cache/LocalCacheTest.java b/guava-tests/test/com/google/common/cache/LocalCacheTest.java index 066a82bafaaf..a20bfc74ce06 100644 --- a/guava-tests/test/com/google/common/cache/LocalCacheTest.java +++ b/guava-tests/test/com/google/common/cache/LocalCacheTest.java @@ -567,7 +567,7 @@ public String load(String key) { } @Override - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. public ListenableFuture reload(String key, String oldValue) { return refreshExecutor.submit( () -> { diff --git a/guava-tests/test/com/google/common/collect/ContiguousSetTest.java b/guava-tests/test/com/google/common/collect/ContiguousSetTest.java index 11f19be5a706..4c4378ded6a0 100644 --- a/guava-tests/test/com/google/common/collect/ContiguousSetTest.java +++ b/guava-tests/test/com/google/common/collect/ContiguousSetTest.java @@ -282,7 +282,7 @@ public void testContains() { assertFalse(set.contains(4)); } - // TODO: https://youtrack.jetbrains.com/issue/KT-71001/ - Enable when Kotlin throws expected CCE. + // TODO(user): Enable when Kotlin throws expected CCE. @J2ktIncompatible public void testContains_typeMismatch() { ImmutableSortedSet set = ContiguousSet.create(Range.open(0, 4), integers()); @@ -299,7 +299,7 @@ public void testContainsAll() { } } - // TODO: https://youtrack.jetbrains.com/issue/KT-71001/ - Enable when Kotlin throws expected CCE. + // TODO(user): Enable when Kotlin throws expected CCE. @J2ktIncompatible public void testContainsAll_typeMismatch() { ImmutableSortedSet set = ContiguousSet.create(Range.closed(1, 3), integers()); diff --git a/guava-tests/test/com/google/common/collect/QueuesTest.java b/guava-tests/test/com/google/common/collect/QueuesTest.java index 89adc29c7b4a..af7596c4dbb6 100644 --- a/guava-tests/test/com/google/common/collect/QueuesTest.java +++ b/guava-tests/test/com/google/common/collect/QueuesTest.java @@ -291,7 +291,7 @@ private void assertInterruptibleDrained(BlockingQueue q) { } // same as above; uninterruptible version - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. private void assertUninterruptibleDrained(BlockingQueue q) { assertEquals(0, drainUninterruptibly(q, ImmutableList.of(), 0, 10, MILLISECONDS)); diff --git a/guava-tests/test/com/google/common/io/MoreFilesTest.java b/guava-tests/test/com/google/common/io/MoreFilesTest.java index 114f4c4b44d4..dd2104f8d8e7 100644 --- a/guava-tests/test/com/google/common/io/MoreFilesTest.java +++ b/guava-tests/test/com/google/common/io/MoreFilesTest.java @@ -299,7 +299,7 @@ public void testCreateParentDirectories_multipleParentsNeeded() throws IOExcepti public void testCreateParentDirectories_noPermission() { if (isWindows()) { - return; // TODO: b/136041958 - Create/find a directory that we don't have permissions on? + return; // TODO(b/136041958): Create/find a directory that we don't have permissions on? } Path file = root().resolve("parent/nonexistent.file"); Path parent = file.getParent(); @@ -594,7 +594,7 @@ public void testDeleteDirectoryContents_symlinkToDir_sdsNotSupported_allowInsecu *

We can only test this with a file system that supports SecureDirectoryStream, because it's * not possible to protect against this if the file system doesn't. */ - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. public void testDirectoryDeletion_directorySymlinkRace() throws Exception { int iterations = isAndroid() ? 100 : 5000; for (DirectoryDeleteMethod method : EnumSet.allOf(DirectoryDeleteMethod.class)) { @@ -665,7 +665,7 @@ public void testDeleteRecursively_nonDirectoryFile() throws IOException { * between being a directory and being a symlink, while the given {@code target} is the target the * symlink should have. */ - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. private static Future startDirectorySymlinkSwitching( Path file, Path target, ExecutorService executor) { return executor.submit( diff --git a/guava-tests/test/com/google/common/math/IntMathTest.java b/guava-tests/test/com/google/common/math/IntMathTest.java index 976b63e7cac0..71feb5e26806 100644 --- a/guava-tests/test/com/google/common/math/IntMathTest.java +++ b/guava-tests/test/com/google/common/math/IntMathTest.java @@ -456,7 +456,7 @@ public void testGCDNegativeZeroThrows() { public void testCheckedAdd() { for (int a : ALL_INTEGER_CANDIDATES) { for (int b : ALL_INTEGER_CANDIDATES) { - // TODO: cpovirk - Test against Math.addExact instead? + // TODO(cpovirk): Test against Math.addExact instead? BigInteger expectedResult = bigInt(a).add(bigInt(b)); boolean expectedSuccess = fitsInInt(expectedResult); try { @@ -474,7 +474,7 @@ public void testCheckedAdd() { public void testCheckedSubtract() { for (int a : ALL_INTEGER_CANDIDATES) { for (int b : ALL_INTEGER_CANDIDATES) { - // TODO: cpovirk - Test against Math.subtractExact instead? + // TODO(cpovirk): Test against Math.subtractExact instead? BigInteger expectedResult = bigInt(a).subtract(bigInt(b)); boolean expectedSuccess = fitsInInt(expectedResult); try { @@ -492,7 +492,7 @@ public void testCheckedSubtract() { public void testCheckedMultiply() { for (int a : ALL_INTEGER_CANDIDATES) { for (int b : ALL_INTEGER_CANDIDATES) { - // TODO: cpovirk - Test against Math.multiplyExact instead? + // TODO(cpovirk): Test against Math.multiplyExact instead? BigInteger expectedResult = bigInt(a).multiply(bigInt(b)); boolean expectedSuccess = fitsInInt(expectedResult); try { @@ -742,7 +742,7 @@ public void testSaturatedAbs() { private static int force32(int value) { // GWT doesn't consistently overflow values to make them 32-bit, so we need to force it. - // TODO: b/404577035 - Remove this unless it's needed for J2CL. + // TODO(b/404577035): Remove this unless it's needed for J2CL. // One of its users, testDivNonZero, is currently @GwtIncompatible, but maybe it WOULD need it? // And if it's needed, maybe use our usual trick of ~~ instead? return value & 0xffffffff; diff --git a/guava-tests/test/com/google/common/math/LongMathTest.java b/guava-tests/test/com/google/common/math/LongMathTest.java index 812e214dca01..0ef37a6fbf8f 100644 --- a/guava-tests/test/com/google/common/math/LongMathTest.java +++ b/guava-tests/test/com/google/common/math/LongMathTest.java @@ -509,7 +509,7 @@ public void testGCDNegativeZeroThrows() { public void testCheckedAdd() { for (long a : ALL_LONG_CANDIDATES) { for (long b : ALL_LONG_CANDIDATES) { - // TODO: cpovirk - Test against Math.addExact instead? + // TODO(cpovirk): Test against Math.addExact instead? BigInteger expectedResult = bigInt(a).add(bigInt(b)); boolean expectedSuccess = fitsInLong(expectedResult); try { @@ -530,7 +530,7 @@ public void testCheckedAdd() { public void testCheckedSubtract() { for (long a : ALL_LONG_CANDIDATES) { for (long b : ALL_LONG_CANDIDATES) { - // TODO: cpovirk - Test against Math.subtractExact instead? + // TODO(cpovirk): Test against Math.subtractExact instead? BigInteger expectedResult = bigInt(a).subtract(bigInt(b)); boolean expectedSuccess = fitsInLong(expectedResult); try { @@ -563,7 +563,7 @@ public void testCheckedMultiply() { */ continue; } - // TODO: cpovirk - Test against Math.multiplyExact instead? + // TODO(cpovirk): Test against Math.multiplyExact instead? BigInteger expectedResult = bigInt(a).multiply(bigInt(b)); boolean expectedSuccess = fitsInLong(expectedResult); try { diff --git a/guava-tests/test/com/google/common/reflect/ClassPathTest.java b/guava-tests/test/com/google/common/reflect/ClassPathTest.java index a06945e52954..5b80feb4199a 100644 --- a/guava-tests/test/com/google/common/reflect/ClassPathTest.java +++ b/guava-tests/test/com/google/common/reflect/ClassPathTest.java @@ -204,7 +204,7 @@ public void testScan_classPathCycle() throws IOException { public void testScanDirectory_symlinkCycle() throws IOException { if (isWindows()) { - return; // TODO: b/136041958 - Can we detect cycles under Windows? + return; // TODO(b/136041958): Can we detect cycles under Windows? } ClassLoader loader = ClassPathTest.class.getClassLoader(); // directory with a cycle, @@ -239,7 +239,7 @@ public void testScanDirectory_symlinkCycle() throws IOException { public void testScanDirectory_symlinkToRootCycle() throws IOException { if (isWindows()) { - return; // TODO: b/136041958 - Can we detect cycles under Windows? + return; // TODO(b/136041958): Can we detect cycles under Windows? } ClassLoader loader = ClassPathTest.class.getClassLoader(); // directory with a cycle, @@ -282,7 +282,7 @@ public void testScanFromFile_notJarFile() throws IOException { public void testGetClassPathEntry() throws MalformedURLException, URISyntaxException { if (isWindows()) { - return; // TODO: b/136041958 - We need to account for drive letters in the path. + return; // TODO(b/136041958): We need to account for drive letters in the path. } assertEquals( new File("/usr/test/dep.jar").toURI(), @@ -354,7 +354,7 @@ public void testGetClassPathFromManifest_jarInCurrentDirectory() throws IOExcept public void testGetClassPathFromManifest_absoluteDirectory() throws IOException { if (isWindows()) { - return; // TODO: b/136041958 - We need to account for drive letters in the path. + return; // TODO(b/136041958): We need to account for drive letters in the path. } File jarFile = new File("base/some.jar"); Manifest manifest = manifestClasspath("file:/with/absolute/dir"); @@ -364,7 +364,7 @@ public void testGetClassPathFromManifest_absoluteDirectory() throws IOException public void testGetClassPathFromManifest_absoluteJar() throws IOException { if (isWindows()) { - return; // TODO: b/136041958 - We need to account for drive letters in the path. + return; // TODO(b/136041958): We need to account for drive letters in the path. } File jarFile = new File("base/some.jar"); Manifest manifest = manifestClasspath("file:/with/absolute.jar"); @@ -374,7 +374,7 @@ public void testGetClassPathFromManifest_absoluteJar() throws IOException { public void testGetClassPathFromManifest_multiplePaths() throws IOException { if (isWindows()) { - return; // TODO: b/136041958 - We need to account for drive letters in the path. + return; // TODO(b/136041958): We need to account for drive letters in the path. } File jarFile = new File("base/some.jar"); Manifest manifest = manifestClasspath("file:/with/absolute.jar relative.jar relative/dir"); @@ -437,7 +437,7 @@ public void testGetPackageName() { @AndroidIncompatible public void testGetClassPathUrls() throws Exception { if (isWindows()) { - return; // TODO: b/136041958 - We need to account for drive letters in the path. + return; // TODO(b/136041958): We need to account for drive letters in the path. } String oldPathSeparator = PATH_SEPARATOR.value(); String oldClassPath = JAVA_CLASS_PATH.value(); @@ -584,7 +584,7 @@ private static File fullpath(String path) { private static URL makeJarUrlWithName(String name) throws IOException { /* - * TODO: cpovirk - Use java.nio.file.Files.createTempDirectory instead of + * TODO(cpovirk): Use java.nio.file.Files.createTempDirectory instead of * c.g.c.io.Files.createTempDir? */ File fullPath = new File(Files.createTempDir(), name); diff --git a/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java b/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java index 264099d96d56..8a347e0784f2 100644 --- a/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java +++ b/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java @@ -91,7 +91,7 @@ Facade newFacade() { abstract Facade newFacade(); } - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. static void awaitWaiting(Thread t) { while (true) { Thread.State state = t.getState(); diff --git a/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java b/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java index aa794e44fbbb..2f2426fd0b76 100644 --- a/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java @@ -469,7 +469,7 @@ public void testCompletionFinishesWithDone() { @J2ktIncompatible public void testFutureBash() { if (isWindows()) { - return; // TODO: b/136041958 - Running very slowly on Windows CI. + return; // TODO(b/136041958): Running very slowly on Windows CI. } CyclicBarrier barrier = new CyclicBarrier( @@ -638,7 +638,7 @@ public void testFutureBash() { // setFuture and cancel() interact in more complicated ways than the other setters. public void testSetFutureCancelBash() { if (isWindows()) { - return; // TODO: b/136041958 - Running very slowly on Windows CI. + return; // TODO(b/136041958): Running very slowly on Windows CI. } int size = 50; CyclicBarrier barrier = @@ -1222,7 +1222,7 @@ public void run() { } } - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. void awaitWaiting() { while (!isBlocked()) { if (getState() == State.TERMINATED) { @@ -1265,7 +1265,7 @@ public void run() { } } - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. void awaitWaiting() { while (!isBlocked()) { if (getState() == State.TERMINATED) { diff --git a/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java b/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java index 2c71cf516c1e..024d2eb09a01 100644 --- a/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java +++ b/guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java @@ -234,7 +234,7 @@ public void run() { } /** Wait for the given thread to reach the {@link State#TIMED_WAITING} thread state. */ - @SuppressWarnings("ThreadPriorityCheck") // TODO: b/175898629 - Consider onSpinWait. + @SuppressWarnings("ThreadPriorityCheck") // TODO(b/175898629): Consider onSpinWait. @J2ktIncompatible void awaitTimedWaiting(Thread thread) { while (true) { diff --git a/guava-tests/test/com/google/common/util/concurrent/TestThread.java b/guava-tests/test/com/google/common/util/concurrent/TestThread.java index 45bfa399fbbb..76fa537f7db0 100644 --- a/guava-tests/test/com/google/common/util/concurrent/TestThread.java +++ b/guava-tests/test/com/google/common/util/concurrent/TestThread.java @@ -71,7 +71,7 @@ public TestThread(L lockLikeObject, String threadName) { } /* - * TODO: b/318391980 - Once we test only under Java 20 and higher, avoid calling Thread.stop. As + * TODO(b/318391980): Once we test only under Java 20 and higher, avoid calling Thread.stop. As * of Java 20, it always throws an exception, and as of Java 26, the method does not even exist. * For now, we continue using it to clean up under older JDKs. * diff --git a/guava/src/com/google/common/base/Joiner.java b/guava/src/com/google/common/base/Joiner.java index 24e24df5423b..5f3bd3c169cf 100644 --- a/guava/src/com/google/common/base/Joiner.java +++ b/guava/src/com/google/common/base/Joiner.java @@ -120,7 +120,7 @@ public A appendTo(A appendable, Iterator parts) throws @CanIgnoreReturnValue public final A appendTo(A appendable, @Nullable Object[] parts) throws IOException { - @SuppressWarnings("nullness") // TODO: b/316358623 - Remove suppression after fixing checker + @SuppressWarnings("nullness") // TODO(b/316358623): Remove suppression after fixing checker List partsList = Arrays.<@Nullable Object>asList(parts); return appendTo(appendable, partsList); } @@ -167,7 +167,7 @@ public final StringBuilder appendTo(StringBuilder builder, Iterator parts) { */ @CanIgnoreReturnValue public final StringBuilder appendTo(StringBuilder builder, @Nullable Object[] parts) { - @SuppressWarnings("nullness") // TODO: b/316358623 - Remove suppression after fixing checker + @SuppressWarnings("nullness") // TODO(b/316358623): Remove suppression after fixing checker List partsList = Arrays.<@Nullable Object>asList(parts); return appendTo(builder, partsList); } @@ -233,12 +233,12 @@ public String join(Iterable parts) { } /* - * TODO: b/381289911 - Make the Iterator overload use StringJoiner (including Android or not)—or + * TODO(b/381289911): Make the Iterator overload use StringJoiner (including Android or not)—or * some other optimization, given that StringJoiner can over-allocate: * https://bugs.openjdk.org/browse/JDK-8305774 */ - // TODO: b/381289911 - Optimize MapJoiner similarly to Joiner (including Android or not). + // TODO(b/381289911): Optimize MapJoiner similarly to Joiner (including Android or not). /** * Returns a string containing the string representation of each of {@code parts}, using the @@ -255,7 +255,7 @@ public final String join(Iterator parts) { * previously configured separator between each. */ public final String join(@Nullable Object[] parts) { - @SuppressWarnings("nullness") // TODO: b/316358623 - Remove suppression after fixing checker + @SuppressWarnings("nullness") // TODO(b/316358623): Remove suppression after fixing checker List partsList = Arrays.<@Nullable Object>asList(parts); return join(partsList); } diff --git a/guava/src/com/google/common/base/Preconditions.java b/guava/src/com/google/common/base/Preconditions.java index c9e5644a66e0..1f3a2ae80bd1 100644 --- a/guava/src/com/google/common/base/Preconditions.java +++ b/guava/src/com/google/common/base/Preconditions.java @@ -459,7 +459,7 @@ public static void checkArgument( */ public static void checkArgument( boolean expression, - // TODO: cl/604933487 - Make errorMessageTemplate consistently @Nullable across overloads. + // TODO(user): Make errorMessageTemplate consistently @Nullable across overloads. @Nullable String errorMessageTemplate, @Nullable Object p1, @Nullable Object p2) { diff --git a/guava/src/com/google/common/base/Strings.java b/guava/src/com/google/common/base/Strings.java index b642f9028aee..ee53cf4aac78 100644 --- a/guava/src/com/google/common/base/Strings.java +++ b/guava/src/com/google/common/base/Strings.java @@ -261,7 +261,7 @@ static boolean validSurrogatePairAt(CharSequence string, int index) { * non-null values are converted to strings using {@link Object#toString()}. * @since 25.1 */ - // TODO: b/136042644 - consider using Arrays.toString() for array parameters + // TODO(b/136042644): consider using Arrays.toString() for array parameters public static String lenientFormat( @Nullable String template, @Nullable Object @Nullable ... args) { template = String.valueOf(template); // null -> "null" diff --git a/guava/src/com/google/common/collect/ConcurrentHashMultiset.java b/guava/src/com/google/common/collect/ConcurrentHashMultiset.java index b1726f76da49..e807f23fa84f 100644 --- a/guava/src/com/google/common/collect/ConcurrentHashMultiset.java +++ b/guava/src/com/google/common/collect/ConcurrentHashMultiset.java @@ -179,7 +179,7 @@ public int size() { * 1. Both superclass toArray methods assume that size() gives a correct answer, while our size() * might not (and the answer might change while we're building the array). * - * TODO: cpovirk - Is this an issue anywhere anymore? It looks to have been fixed for Java 8 + * TODO(cpovirk): Is this an issue anywhere anymore? It looks to have been fixed for Java 8 * (https://bugs.openjdk.org/browse/JDK-7121314) and before Lollipop * (https://r.android.com/47508). We *would* need to worry for J2KT, whose own concurrency support * is evolving (b/381065164, b/458160722), but this class is @J2ktIncompatible. diff --git a/guava/src/com/google/common/collect/EnumHashBiMap.java b/guava/src/com/google/common/collect/EnumHashBiMap.java index dd6cce15419b..e003cf596235 100644 --- a/guava/src/com/google/common/collect/EnumHashBiMap.java +++ b/guava/src/com/google/common/collect/EnumHashBiMap.java @@ -77,7 +77,7 @@ public final class EnumHashBiMap, V extends @Nullable Object> private EnumHashBiMap(Class keyType) { super(new EnumMap(keyType), new HashMap()); - // TODO: cpovirk - Pre-size the HashMap based on the number of enum values? + // TODO(cpovirk): Pre-size the HashMap based on the number of enum values? this.keyTypeOrObjectUnderJ2cl = keyType; } @@ -127,7 +127,7 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo stream.defaultReadObject(); keyTypeOrObjectUnderJ2cl = (Class) requireNonNull(stream.readObject()); /* - * TODO: cpovirk - Pre-size the HashMap based on the number of enum values? (But *not* based on + * TODO(cpovirk): Pre-size the HashMap based on the number of enum values? (But *not* based on * the number of entries in the map, as that makes it easy for hostile inputs to trigger lots of * allocation—not that any program should be deserializing hostile inputs to begin with!) */ diff --git a/guava/src/com/google/common/collect/ImmutableSet.java b/guava/src/com/google/common/collect/ImmutableSet.java index 2662b08c0524..e957f9fde27b 100644 --- a/guava/src/com/google/common/collect/ImmutableSet.java +++ b/guava/src/com/google/common/collect/ImmutableSet.java @@ -96,7 +96,7 @@ public static ImmutableSet of(E e1) { } /* - * TODO: b/315526394 - Skip the Builder entirely for the of(...) methods, since we don't need to + * TODO(b/315526394): Skip the Builder entirely for the of(...) methods, since we don't need to * worry that we might trigger the fallback to the JDK-backed implementation? (The varargs one * _could_, so we could keep it as it is. Or we could convince ourselves that hash flooding is * unlikely in practice there, too.) diff --git a/guava/src/com/google/common/collect/Maps.java b/guava/src/com/google/common/collect/Maps.java index 5c5cb370b7e5..0700c9a2e57d 100644 --- a/guava/src/com/google/common/collect/Maps.java +++ b/guava/src/com/google/common/collect/Maps.java @@ -3345,7 +3345,7 @@ private static final class FilteredEntryBiMap< extends FilteredEntryMap implements BiMap { @RetainedWith private final BiMap inverse; - @SuppressWarnings("nullness") // TODO: b/423853632 - Remove after checker is fixed. + @SuppressWarnings("nullness") // TODO(b/423853632): Remove after checker is fixed. private static Predicate> inversePredicate(Predicate> forwardPredicate) { return input -> forwardPredicate.apply(immutableEntry(input.getValue(), input.getKey())); diff --git a/guava/src/com/google/common/collect/NaturalOrdering.java b/guava/src/com/google/common/collect/NaturalOrdering.java index 343db614435a..49e5c51faf95 100644 --- a/guava/src/com/google/common/collect/NaturalOrdering.java +++ b/guava/src/com/google/common/collect/NaturalOrdering.java @@ -31,7 +31,7 @@ final class NaturalOrdering extends Ordering> implements Serializa static final NaturalOrdering INSTANCE = new NaturalOrdering(); /* - * TODO: b/287198172 - Consider eagerly initializing these, maybe making them static. But that + * TODO(b/287198172): Consider eagerly initializing these, maybe making them static. But that * would lead to at least slighly more work at startup time. */ @LazyInit private transient @Nullable Ordering<@Nullable Comparable> nullsFirst; diff --git a/guava/src/com/google/common/collect/StandardTable.java b/guava/src/com/google/common/collect/StandardTable.java index cf3b4920fb7e..e55cc2693b52 100644 --- a/guava/src/com/google/common/collect/StandardTable.java +++ b/guava/src/com/google/common/collect/StandardTable.java @@ -691,7 +691,7 @@ public Set rowKeySet() { * etc., skipping any columns that have appeared previously. */ @Override - // TODO: cl/934353699 - Make this `final` after cl/781580713 or a similar fix. + // TODO(user): Make this `final` after cl/781580713 or a similar fix. public Set columnKeySet() { Set result = columnKeySet; return (result == null) ? columnKeySet = new ColumnKeySet() : result; diff --git a/guava/src/com/google/common/collect/Synchronized.java b/guava/src/com/google/common/collect/Synchronized.java index 5dc448207ddf..908a68a89905 100644 --- a/guava/src/com/google/common/collect/Synchronized.java +++ b/guava/src/com/google/common/collect/Synchronized.java @@ -1188,7 +1188,7 @@ public V computeIfAbsent(K key, Function mappingFunction } } - @SuppressWarnings("nullness") // TODO: b/423853632 - Remove after checker is fixed. + @SuppressWarnings("nullness") // TODO(b/423853632): Remove after checker is fixed. @Override public @Nullable V computeIfPresent( K key, BiFunction remappingFunction) { @@ -1206,7 +1206,7 @@ public V computeIfAbsent(K key, Function mappingFunction } } - @SuppressWarnings("nullness") // TODO: b/423853632 - Remove after checker is fixed. + @SuppressWarnings("nullness") // TODO(b/423853632): Remove after checker is fixed. @Override public @Nullable V merge( K key, diff --git a/guava/src/com/google/common/io/MoreFiles.java b/guava/src/com/google/common/io/MoreFiles.java index 3b0011d73b98..d8955f6269cc 100644 --- a/guava/src/com/google/common/io/MoreFiles.java +++ b/guava/src/com/google/common/io/MoreFiles.java @@ -535,7 +535,7 @@ public static void deleteRecursively(Path path, RecursiveDeleteOption... options */ boolean sdsSupported = false; /* - * TODO: b/331925065 - Should we catch any exception from this `newDirectoryStream` call (i.e., + * TODO(b/331925065): Should we catch any exception from this `newDirectoryStream` call (i.e., * the one for `parentPath`), too? We should see what `rm -f` does, especially if we make * "ignore errors" behavior available to users of `deleteRecursively`. */ diff --git a/guava/src/com/google/common/primitives/UnsignedBytes.java b/guava/src/com/google/common/primitives/UnsignedBytes.java index a1fc275cd29a..781310c5b127 100644 --- a/guava/src/com/google/common/primitives/UnsignedBytes.java +++ b/guava/src/com/google/common/primitives/UnsignedBytes.java @@ -505,7 +505,7 @@ static Comparator getBestComparator() { * aren't stripping UnsafeComparator today? Should we have Proguard configuration for it?) * * - if Unsafe is removed entirely from JDKs (or already absent in some unusual environment - * today). TODO: b/392974826 - Check for the existence of Unsafe and its methods + * today). TODO(b/392974826): Check for the existence of Unsafe and its methods * reflectively before attempting to access UnsafeComparator. Or, better yet, allow * UnsafeComparator to still initialize correctly even if Unsafe is unavailable. This would * protect against users that automatically preinitialize internal classes that they've seen diff --git a/guava/src/com/google/common/reflect/Types.java b/guava/src/com/google/common/reflect/Types.java index e428493b7e93..7a5d726ef265 100644 --- a/guava/src/com/google/common/reflect/Types.java +++ b/guava/src/com/google/common/reflect/Types.java @@ -345,7 +345,7 @@ private static TypeVariable newTypeVariableImp * of {@code TypeVariable} from {@link TypeResolver#resolveType} will not be able to call {@code * getAnnotatedBounds()} on it, but that should hopefully be rare. * - *

TODO: b/147144588 - We are currently also missing the methods inherited from {@link + *

TODO(b/147144588): We are currently also missing the methods inherited from {@link * AnnotatedElement}, which {@code TypeVariable} began to extend only in Java 8. Those methods * refer only to types present under Android, so we could implement them in {@code * TypeVariableImpl} today. (We could probably then make {@code TypeVariableImpl} implement {@code diff --git a/guava/src/com/google/common/util/concurrent/AbstractFuture.java b/guava/src/com/google/common/util/concurrent/AbstractFuture.java index a54274bad077..998fc5290e38 100644 --- a/guava/src/com/google/common/util/concurrent/AbstractFuture.java +++ b/guava/src/com/google/common/util/concurrent/AbstractFuture.java @@ -275,7 +275,7 @@ public V get() throws InterruptedException, ExecutionException { @ParametricNullness @SuppressWarnings("nullness") // TODO(b/147136275): Remove once our checker understands & and |. /* - * TODO: b/112550045 - Use this from Futures.getDone when applicable? Note the small difference in + * TODO(b/112550045): Use this from Futures.getDone when applicable? Note the small difference in * failure message between the two at present. */ final V getFromAlreadyDoneTrustedFuture() throws ExecutionException { diff --git a/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java b/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java index 4611a30155f1..974d5d5688b5 100644 --- a/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java +++ b/guava/src/com/google/common/util/concurrent/FuturesGetChecked.java @@ -251,7 +251,7 @@ private static List> preferringStringsThenT return WITH_STRING_PARAM_THEN_WITH_THROWABLE_PARAM.sortedCopy(constructors); } - // TODO: b/296487962 - Consider defining a total order over constructors. + // TODO(b/296487962): Consider defining a total order over constructors. private static final Ordering>> ORDERING_BY_CONSTRUCTOR_PARAMETER_LIST = Ordering.natural() .onResultOf((List> params) -> params.contains(String.class)) diff --git a/guava/src/com/google/common/util/concurrent/MoreExecutors.java b/guava/src/com/google/common/util/concurrent/MoreExecutors.java index 60ecd348eef4..d211b1f1f63c 100644 --- a/guava/src/com/google/common/util/concurrent/MoreExecutors.java +++ b/guava/src/com/google/common/util/concurrent/MoreExecutors.java @@ -528,7 +528,7 @@ public final List shutdownNow() { } /* - * TODO: https://github.com/google/guava/issues/2143 - In addition to overriding `execute`, also + * TODO(user): In addition to overriding `execute`, also * override the `Future`-returning methods of `ExecutorService` to propagate cancellation from * our `TrustedListenableFutureTask` to a `Future` returned by the delegate executor? */ diff --git a/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java b/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java index ee9880f51b2f..eb46de096e7f 100644 --- a/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java +++ b/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java @@ -47,7 +47,7 @@ */ @J2ktIncompatible @GwtIncompatible -// TODO: b/227335009 - Maybe change interruption behavior, but it requires thought. +// TODO(b/227335009): Maybe change interruption behavior, but it requires thought. @SuppressWarnings("Interruption") public final class SimpleTimeLimiter implements TimeLimiter { diff --git a/guava/src/com/google/common/util/concurrent/TimeoutFuture.java b/guava/src/com/google/common/util/concurrent/TimeoutFuture.java index 4a67acfbb995..1207b2d76f57 100644 --- a/guava/src/com/google/common/util/concurrent/TimeoutFuture.java +++ b/guava/src/com/google/common/util/concurrent/TimeoutFuture.java @@ -92,7 +92,7 @@ private static final class Fire implements Runnable } @Override - // TODO: b/227335009 - Maybe change interruption behavior, but it requires thought. + // TODO(b/227335009): Maybe change interruption behavior, but it requires thought. @SuppressWarnings("Interruption") public void run() { // If either of these reads return null then we must be after a successful cancel or another diff --git a/guava/src/com/google/common/util/concurrent/Uninterruptibles.java b/guava/src/com/google/common/util/concurrent/Uninterruptibles.java index 092364785752..c31e4a9d8ada 100644 --- a/guava/src/com/google/common/util/concurrent/Uninterruptibles.java +++ b/guava/src/com/google/common/util/concurrent/Uninterruptibles.java @@ -406,7 +406,7 @@ public static void putUninterruptibly(BlockingQueue queue, E element) { } } - // TODO: b/5042178 - Support Sleeper somehow (wrapper or interface method)? + // TODO(b/5042178): Support Sleeper somehow (wrapper or interface method)? /** * Invokes {@code unit.}{@link TimeUnit#sleep(long) sleep(sleepFor)} uninterruptibly. * @@ -418,7 +418,7 @@ public static void sleepUninterruptibly(Duration sleepFor) { sleepUninterruptibly(toNanosSaturated(sleepFor), NANOSECONDS); } - // TODO: b/5042178 - Support Sleeper somehow (wrapper or interface method)? + // TODO(b/5042178): Support Sleeper somehow (wrapper or interface method)? /** Invokes {@code unit.}{@link TimeUnit#sleep(long) sleep(sleepFor)} uninterruptibly. */ @J2ktIncompatible @GwtIncompatible // concurrency @@ -615,7 +615,7 @@ public static boolean awaitTerminationUninterruptibly( } } - // TODO: b/4370300 - Add support for waitUninterruptibly. + // TODO(b/4370300): Add support for waitUninterruptibly. private Uninterruptibles() {} }