Skip to content

Commit eca8a68

Browse files
committed
Encoders: improve isElementList
1 parent 023397f commit eca8a68

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

driver/src/main/java/jdbc/client/result/parser/encoder/EncoderFactory.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,11 @@ private static abstract class ListElementListEncoder<T> extends ElementListEncod
627627
protected boolean isElementList(@NotNull Object data, @NotNull Params params) {
628628
if (!super.isElementList(data, params)) return false;
629629
List<?> dataList = (List<?>) data;
630-
return dataList.isEmpty() || dataList.get(0) instanceof List;
630+
for (Object dataListElement : dataList) {
631+
if (dataListElement == null) continue;
632+
return dataListElement instanceof List;
633+
}
634+
return true;
631635
}
632636
}
633637
}

0 commit comments

Comments
 (0)