Skip to content

Commit da823f8

Browse files
committed
Review
(cherry picked from commit 67ccb2e)
1 parent 5c4a384 commit da823f8

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

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)