We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5c4a384 commit da823f8Copy full SHA for da823f8
1 file changed
communication/src/main/java/datadog/communication/ddagent/SharedCommunicationObjects.java
@@ -142,7 +142,7 @@ public DDAgentFeaturesDiscovery featuresDiscovery(Config config) {
142
DDAgentFeaturesDiscovery ret = featuresDiscovery;
143
if (ret == null) {
144
synchronized (this) {
145
- if (featuresDiscovery == null) {
+ if ((ret = featuresDiscovery) == null) {
146
createRemaining(config);
147
ret =
148
new DDAgentFeaturesDiscovery(
@@ -163,8 +163,6 @@ public DDAgentFeaturesDiscovery featuresDiscovery(Config config) {
163
}
164
165
featuresDiscovery = ret;
166
- } else {
167
- return featuresDiscovery;
168
169
170
0 commit comments