Skip to content

Commit 57306bf

Browse files
Update src/main/java/org/opensearch/neuralsearch/util/ProcessorDocumentUtils.java
Co-authored-by: Martin Gaievski <gaievski@amazon.com> Signed-off-by: zane-neo <zaniu@amazon.com>
1 parent bb82974 commit 57306bf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/opensearch/neuralsearch/util/ProcessorDocumentUtils.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ private static void validateMapTypeValue(
5858
final Environment environment,
5959
final boolean allowEmpty
6060
) {
61-
if (sourceValue == null) return; // allow map type value to be null.
61+
// allow map type value to be null
62+
if (Objects.isNull(sourceValue) {
63+
return;
64+
}
6265
validateDepth(sourceKey, depth, indexName, clusterService, environment);
6366
if (!(fieldMap instanceof Map)) { // source value is map type means configuration has to be map type
6467
throw new IllegalArgumentException(

0 commit comments

Comments
 (0)