From 4603b05221edd800f95f8fd5453212c211e983d8 Mon Sep 17 00:00:00 2001 From: Stephen Salinas Date: Fri, 9 Apr 2021 09:04:43 -0400 Subject: [PATCH] One additional null check in uploader client return --- .../com/hubspot/singularity/s3uploader/S3ClientProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SingularityS3Uploader/src/main/java/com/hubspot/singularity/s3uploader/S3ClientProvider.java b/SingularityS3Uploader/src/main/java/com/hubspot/singularity/s3uploader/S3ClientProvider.java index 9fa893d09b..00d79f4ad5 100644 --- a/SingularityS3Uploader/src/main/java/com/hubspot/singularity/s3uploader/S3ClientProvider.java +++ b/SingularityS3Uploader/src/main/java/com/hubspot/singularity/s3uploader/S3ClientProvider.java @@ -66,7 +66,7 @@ public void run() { public synchronized void tryRemoveClient(String key) { AtomicInteger holds = clientHolds.get(key); - if (holds.get() == 0) { + if (holds != null && holds.get() == 0) { clientHolds.remove(key); clientByKey.remove(key); }