Skip to content

Commit f9f142f

Browse files
committed
fix
1 parent 8da9ce7 commit f9f142f

File tree

1 file changed

+5
-3
lines changed
  • instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties

1 file changed

+5
-3
lines changed

instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/internal/properties/SpringConfigProperties.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
package io.opentelemetry.instrumentation.spring.autoconfigure.internal.properties;
77

8-
import static java.util.Collections.emptyList;
9-
108
import io.opentelemetry.api.internal.ConfigUtil;
119
import io.opentelemetry.exporter.otlp.internal.OtlpConfigUtil;
1210
import io.opentelemetry.instrumentation.resources.internal.ResourceProviderPropertiesCustomizer;
@@ -212,7 +210,7 @@ public List<String> getList(String name) {
212210
}
213211

214212
List<String> envValue = (List<String>) environment.getProperty(normalizedName, List.class);
215-
return or(envValue, otelSdkProperties.getList(name));
213+
return mustOr(envValue, otelSdkProperties.getList(name));
216214
}
217215

218216
@Nullable
@@ -283,4 +281,8 @@ private static Map<String, String> mergeWithOtel(
283281
private static <T> T or(@Nullable T first, @Nullable T second) {
284282
return first != null ? first : second;
285283
}
284+
285+
private static <T> T mustOr(@Nullable T first, T second) {
286+
return first != null ? first : second;
287+
}
286288
}

0 commit comments

Comments
 (0)