Skip to content

Commit

Permalink
Add some known thread safe types to[]
Browse files Browse the repository at this point in the history
Tested:
    TAP for global presubmit queue
    []
PiperOrigin-RevId: 603189890
  • Loading branch information
chaoren authored and Error Prone Team committed Feb 1, 2024
1 parent 4eb812d commit d7cc8bb
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ private static ImmutableMap<String, AnnotationInfo> buildThreadSafeClasses(
.add(java.util.concurrent.Executor.class)
.add(java.util.concurrent.ExecutorService.class)
.add(java.util.concurrent.Future.class, "V")
.add(java.util.concurrent.CompletableFuture.class, "T")
.add(java.util.concurrent.Semaphore.class)
.add(java.util.concurrent.ScheduledExecutorService.class)
.add(java.util.concurrent.locks.Condition.class)
Expand All @@ -105,6 +106,8 @@ private static ImmutableMap<String, AnnotationInfo> buildThreadSafeClasses(
.add(java.security.cert.X509Certificate.class)
.add(java.security.cert.TrustAnchor.class)
.add(java.security.SecureRandom.class)
.add("com.google.common.base.Ticker")
.add("com.google.common.testing.FakeTicker")
.add("com.google.common.time.Clock")
.add("com.google.common.time.TimeSource")
.add("com.google.common.util.concurrent.AtomicLongMap", "K")
Expand Down Expand Up @@ -132,8 +135,10 @@ private static ImmutableMap<String, AnnotationInfo> buildThreadSafeClasses(
.add(java.lang.reflect.Method.class)
.add(java.lang.reflect.Field.class)
.add("com.github.benmanes.caffeine.cache.Cache", "K", "V")
.add("com.github.benmanes.caffeine.cache.AsyncCache", "K", "V")
.add("com.github.benmanes.caffeine.cache.LoadingCache", "K", "V")
.add("com.github.benmanes.caffeine.cache.AsyncLoadingCache", "K", "V")
.add("com.github.benmanes.caffeine.cache.stats.ConcurrentStatsCounter")
.add("kotlinx.coroutines.CoroutineDispatcher")
.add("kotlinx.coroutines.CoroutineScope")
.add("kotlinx.coroutines.ExecutorCoroutineDispatcher")
Expand Down

0 comments on commit d7cc8bb

Please sign in to comment.