diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/ThreadSafeChecker.java b/core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/ThreadSafeChecker.java index 8823038dc2d6..581397b5e1fa 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/ThreadSafeChecker.java +++ b/core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/ThreadSafeChecker.java @@ -137,9 +137,8 @@ public Description matchTypeParameter(TypeParameterTree tree, VisitorState state ThreadSafeAnalysis analysis = new ThreadSafeAnalysis(this, state, wellKnownThreadSafety); if (analysis.hasThreadSafeTypeParameterAnnotation((TypeVariableSymbol) sym)) { if (analysis.getThreadSafeAnnotation(sym.owner, state) == null) { - // TODO: b/324092874 -- Update this message to use the new annotation name. return buildDescription(tree) - .setMessage("@ThreadSafe.TypeParameter is only supported on threadsafe classes") + .setMessage("@ThreadSafeTypeParameter is only supported on threadsafe classes") .build(); } } @@ -199,11 +198,10 @@ public Description matchClass(ClassTree tree, VisitorState state) { .map(Entry::getKey) .collect(toImmutableSet()); if (!threadSafeAndContainer.isEmpty()) { - // TODO: b/324092874 -- Update this message to use the new annotation name. return buildDescription(tree) .setMessage( String.format( - "using both @ThreadSafe.TypeParameter and @ThreadSafe.Element is redundant: %s", + "using both @ThreadSafeTypeParameter and @ThreadSafe.Element is redundant: %s", Joiner.on("', '").join(threadSafeAndContainer))) .build(); } diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/threadsafety/ThreadSafeCheckerTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/threadsafety/ThreadSafeCheckerTest.java index 3a186843e69d..f8de59f8724e 100644 --- a/core/src/test/java/com/google/errorprone/bugpatterns/threadsafety/ThreadSafeCheckerTest.java +++ b/core/src/test/java/com/google/errorprone/bugpatterns/threadsafety/ThreadSafeCheckerTest.java @@ -1001,16 +1001,6 @@ public void knownThreadSafeFlag() { .doTest(); } - // TODO: b/324092874 - Remove this test once ThreadSafe.TypeParameter is removed. - - // TODO: b/324092874 - Remove this test once ThreadSafe.TypeParameter is removed. - - // TODO: b/324092874 - Remove this test once ThreadSafe.TypeParameter is removed. - - // TODO: b/324092874 - Remove this test once ThreadSafe.TypeParameter is removed. - - // TODO: b/324092874 - Remove this test once ThreadSafe.TypeParameter is removed. - @Test public void annotatedClassType() { compilationHelper @@ -1025,16 +1015,7 @@ public void annotatedClassType() { .doTest(); } - // TODO: b/324092874 - Remove this test once ThreadSafe.TypeParameter is removed. - // Regression test for b/117937500 - // TODO: b/324092874 - Remove this test once ThreadSafe.TypeParameter is removed. - - // Regression test for b/117937500 - - // javac does not instantiate type variables when they are not used for target typing, so we - // cannot check whether their instantiations are thread-safe. - // TODO: b/324092874 - Remove this test once ThreadSafe.TypeParameter is removed. // javac does not instantiate type variables when they are not used for target typing, so we // cannot check whether their instantiations are thread-safe.