Skip to content

Commit 67ccb2e

Browse files
committed
Review
1 parent cf7d5bb commit 67ccb2e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

Lines changed: 1 addition & 3 deletions
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(
@@ -163,8 +163,6 @@ public DDAgentFeaturesDiscovery featuresDiscovery(Config config) {
163163
}
164164
}
165165
featuresDiscovery = ret;
166-
} else {
167-
return featuresDiscovery;
168166
}
169167
}
170168
}

0 commit comments

Comments
 (0)