Skip to content

Commit db3f0ed

Browse files
author
Sylvain Lebresne
committed
Make sure we don't crash if LZ4 is not there
1 parent 0fe2639 commit db3f0ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

driver-core/src/main/java/com/datastax/driver/core/FrameCompressor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public Frame compress(Frame frame) throws IOException {
120120
try {
121121
int written = compressor.compress(input, 0, input.length, output, INTEGER_BYTES, maxCompressedLength);
122122
return frame.with(ChannelBuffers.wrappedBuffer(output, 0, INTEGER_BYTES + written));
123-
} catch (LZ4Exception e) {
123+
} catch (Exception e) {
124124
throw new IOException(e);
125125
}
126126
}
@@ -141,7 +141,7 @@ public Frame decompress(Frame frame) throws IOException {
141141
throw new IOException("Compressed lengths mismatch");
142142

143143
return frame.with(ChannelBuffers.wrappedBuffer(output));
144-
} catch (LZ4Exception e) {
144+
} catch (Exception e) {
145145
throw new IOException(e);
146146
}
147147
}

0 commit comments

Comments
 (0)