Skip to content

Commit 9a144fc

Browse files
committed
fix(system): we don't need to advance the parser anymore to the first token
1 parent ddd9ceb commit 9a144fc

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

core/src/main/java/io/kestra/core/serializers/FileSerde.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -180,23 +180,13 @@ public static <T> Mono<Long> writeAll(Flux<T> values, SequenceWriter seqWriter)
180180
}
181181

182182
private static <T> MappingIterator<T> createMappingIterator(ObjectMapper objectMapper, Reader reader, TypeReference<T> type) throws IOException {
183-
// See https://github.com/FasterXML/jackson-dataformats-binary/issues/493
184-
// There is a limitation with the MappingIterator that cannot differentiate between an array of things (of whatever shape)
185-
// and a sequence/stream of things (of Array shape).
186-
// To work around that, we need to create a JsonParser and advance to the first token.
187183
try (var parser = objectMapper.createParser(reader)) {
188-
parser.nextToken();
189184
return objectMapper.readerFor(type).readValues(parser);
190185
}
191186
}
192187

193188
private static <T> MappingIterator<T> createMappingIterator(ObjectMapper objectMapper, Reader reader, Class<T> type) throws IOException {
194-
// See https://github.com/FasterXML/jackson-dataformats-binary/issues/493
195-
// There is a limitation with the MappingIterator that cannot differentiate between an array of things (of whatever shape)
196-
// and a sequence/stream of things (of Array shape).
197-
// To work around that, we need to create a JsonParser and advance to the first token.
198189
try (var parser = objectMapper.createParser(reader)) {
199-
parser.nextToken();
200190
return objectMapper.readerFor(type).readValues(parser);
201191
}
202192
}

0 commit comments

Comments
 (0)