Skip to content

Commit 8d4316a

Browse files
authored
Avoid NPE on featureDiscovery creation (#9353)
* Avoid NPE on featureDiscovery creation * Review
1 parent 23cacab commit 8d4316a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

communication/src/main/java/datadog/communication/ddagent/SharedCommunicationObjects.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public DDAgentFeaturesDiscovery featuresDiscovery(Config config) {
142142
DDAgentFeaturesDiscovery ret = featuresDiscovery;
143143
if (ret == null) {
144144
synchronized (this) {
145-
if (featuresDiscovery == null) {
145+
if ((ret = featuresDiscovery) == null) {
146146
createRemaining(config);
147147
ret =
148148
new DDAgentFeaturesDiscovery(

0 commit comments

Comments
 (0)