Skip to content

Commit 1f9ae8a

Browse files
committed
Fix NPE in switch
Signed-off-by: Binlong Gao <gbinlong@amazon.com>
1 parent 33e2d12 commit 1f9ae8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/core/src/main/java/org/opensearch/core/common/util/CollectionUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ private static Iterable<?> convert(Object value) {
167167
case Map<?, ?> map -> () -> Iterators.concat(map.keySet().iterator(), map.values().iterator());
168168
case Iterable<?> iterable when value instanceof Path == false -> iterable;
169169
case Object[] objects -> Arrays.asList(objects);
170-
default -> null;
170+
case null, default -> null;
171171
};
172172
}
173173

0 commit comments

Comments
 (0)