From a1ef8ae116cff4fd0e3cf7f68e6688eccfc29a2c Mon Sep 17 00:00:00 2001 From: Error Prone Team Date: Thu, 7 Dec 2023 15:39:26 -0800 Subject: [PATCH] WellKnownThreadSafety: Add common PKIX types to known thread-safe list. PiperOrigin-RevId: 588931468 --- .../bugpatterns/threadsafety/WellKnownThreadSafety.java | 4 ++++ 1 file changed, 4 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 63c08dbda4ff..0824e83c2212 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 @@ -102,6 +102,8 @@ private static ImmutableMap buildThreadSafeClasses( .add(java.util.concurrent.locks.ReadWriteLock.class) .add(java.util.concurrent.locks.ReentrantLock.class) .add(java.util.concurrent.locks.ReentrantReadWriteLock.class) + .add(java.security.cert.X509Certificate.class) + .add(java.security.cert.TrustAnchor.class) .add(java.security.SecureRandom.class) .add("com.google.common.time.Clock") .add("com.google.common.time.TimeSource") @@ -138,6 +140,8 @@ private static ImmutableMap buildThreadSafeClasses( .add("kotlinx.coroutines.sync.Mutex") .add("kotlinx.coroutines.sync.Semaphore") .add("kotlin.Unit") + .add("org.bouncycastle.cms.CMSSignedData") + .add("org.bouncycastle.pkcs.PKCS10CertificationRequest") .build(); }