From ae3a19f44e173847d5e01bc95fd0b1d74a41d6b6 Mon Sep 17 00:00:00 2001 From: Error Prone Team Date: Wed, 14 Feb 2024 13:32:39 -0800 Subject: [PATCH] Add some known thread safe types to[] These types are already in [] TAP train ticket - [] PiperOrigin-RevId: 607088877 --- .../bugpatterns/threadsafety/WellKnownThreadSafety.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/WellKnownThreadSafety.java b/core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/WellKnownThreadSafety.java index 7b56993ca78..9aea947a68a 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/WellKnownThreadSafety.java +++ b/core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/WellKnownThreadSafety.java @@ -142,6 +142,11 @@ private static ImmutableMap buildThreadSafeClasses( .add("kotlinx.coroutines.CoroutineDispatcher") .add("kotlinx.coroutines.CoroutineScope") .add("kotlinx.coroutines.ExecutorCoroutineDispatcher") + .add("kotlinx.coroutines.flow.Flow", "T") + .add("kotlinx.coroutines.flow.SharedFlow", "T") + .add("kotlinx.coroutines.flow.MutableSharedFlow", "T") + .add("kotlinx.coroutines.flow.StateFlow", "T") + .add("kotlinx.coroutines.flow.MutableStateFlow", "T") .add("kotlinx.coroutines.sync.Mutex") .add("kotlinx.coroutines.sync.Semaphore") .add("kotlin.Unit")