Skip to content

Commit 336800d

Browse files
committed
Spotbugs
1 parent 9837c0c commit 336800d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/csanchez/jenkins/plugins/kubernetes/KubernetesProvisioningLimits.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import java.util.logging.Logger;
77

88
import edu.umd.cs.findbugs.annotations.NonNull;
9+
import net.jcip.annotations.GuardedBy;
910
import org.kohsuke.accmod.Restricted;
1011
import org.kohsuke.accmod.restrictions.NoExternalUse;
1112

@@ -26,6 +27,7 @@
2627
public final class KubernetesProvisioningLimits {
2728
private static final Logger LOGGER = Logger.getLogger(KubernetesProvisioningLimits.class.getName());
2829

30+
@GuardedBy("this")
2931
private boolean init;
3032

3133
/**
@@ -59,8 +61,8 @@ private synchronized boolean initInstance() {
5961
cloudCounts.put(node.getCloudName(), getGlobalCount(node.getCloudName()) + node.getNumExecutors());
6062
podTemplateCounts.put(node.getTemplateId(), getPodTemplateCount(node.getTemplateId()) + node.getNumExecutors());
6163
});
62-
init = true;
6364
});
65+
init = true;
6466
return false;
6567
}
6668

0 commit comments

Comments
 (0)