Skip to content

Commit 5faacbd

Browse files
committed
pr review
1 parent 68ee9a6 commit 5faacbd

File tree

1 file changed

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

1 file changed

+4
-3
lines changed

instrumentation/spring/spring-boot-autoconfigure/src/main/java/io/opentelemetry/instrumentation/spring/autoconfigure/EmbeddedConfigFile.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,11 @@ static Map<String, Object> convertFlatPropsToNested(Map<String, String> flatProp
104104
list.set(index, value);
105105
} else {
106106
// Need to create a nested map at this index
107-
if (list.get(index) == null) {
108-
list.set(index, new HashMap<String, Object>());
109-
}
110107
current = (Map<String, Object>) list.get(index);
108+
if (current == null) {
109+
current = new HashMap<>();
110+
list.set(index, current);
111+
}
111112
}
112113
} else {
113114
// Regular property (not an array)

0 commit comments

Comments
 (0)