Skip to content

Commit 1f2bd72

Browse files
committed
apacheGH-34432: [Java] NoCompressionCodec throws for unsupported codec type
1 parent fe88d9a commit 1f2bd72

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎java/vector/src/main/java/org/apache/arrow/vector/compression/NoCompressionCodec.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ public static class Factory implements CompressionCodec.Factory {
6161

6262
@Override
6363
public CompressionCodec createCodec(CompressionUtil.CodecType codecType) {
64+
if (codecType != CompressionUtil.CodecType.NO_COMPRESSION) {
65+
throw new IllegalArgumentException(
66+
"Unsupported codec type: " + codecType + " for NoCompressionCodec");
67+
}
6468
return NoCompressionCodec.INSTANCE;
6569
}
6670
}

0 commit comments

Comments
 (0)