Skip to content

Commit

Permalink
Do not use stream to create TypeDecoders
Browse files Browse the repository at this point in the history
  • Loading branch information
wendigo committed Nov 1, 2024
1 parent 9c970f0 commit 59c3bef
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ private JsonDecodingUtils() {}
public static TypeDecoder[] createTypeDecoders(List<Column> columns)
{
verify(!columns.isEmpty(), "Columns must not be empty");
return columns.stream()
.map(column -> createTypeDecoder(column.getTypeSignature()))
.toArray(TypeDecoder[]::new);
TypeDecoder[] decoders = new TypeDecoder[columns.size()];
for (int i = 0; i < columns.size(); i++) {
decoders[i] = createTypeDecoder(columns.get(i).getTypeSignature());
}
return decoders;
}

public interface TypeDecoder
Expand Down

0 comments on commit 59c3bef

Please sign in to comment.