From aadfdc3094310639c5e2b5ebe0119dc672910f84 Mon Sep 17 00:00:00 2001 From: Error Prone Team Date: Fri, 8 Dec 2023 07:46:33 -0800 Subject: [PATCH] WellKnownThreadSafety: Add common PKIX types to known thread-safe list. PiperOrigin-RevId: 589128835 --- .../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 63c08dbda4f..0824e83c221 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(); }