From 8d24b66da7be35ac9edbad9e047a4122123bcd39 Mon Sep 17 00:00:00 2001 From: Dain Sundstrom Date: Fri, 16 Aug 2024 21:35:21 -0700 Subject: [PATCH] Revert "Upgrade to Airbase 163" This reverts commit 200a028113e5cb8942477bca2804bfa39412ca8a. --- pom.xml | 6 +++--- .../compress/gzip/JdkGzipHadoopOutputStream.java | 2 +- .../compress/snappy/SnappyFramedInputStream.java | 4 ++++ src/test/java/io/airlift/compress/zstd/TestUtil.java | 12 ++++++------ src/test/java/io/airlift/compress/zstd/TestZstd.java | 2 +- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/pom.xml b/pom.xml index 0e705eea..53b3b709 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ io.airlift airbase - 163 + 112 io.airlift @@ -32,9 +32,9 @@ scm:git:git://github.com/airlift/aircompressor.git scm:git:git@github.com:airlift/aircompressor.git - HEAD https://github.com/airlift/aircompressor/tree/master - + HEAD + diff --git a/src/main/java/io/airlift/compress/gzip/JdkGzipHadoopOutputStream.java b/src/main/java/io/airlift/compress/gzip/JdkGzipHadoopOutputStream.java index 9c52186e..929aac0a 100644 --- a/src/main/java/io/airlift/compress/gzip/JdkGzipHadoopOutputStream.java +++ b/src/main/java/io/airlift/compress/gzip/JdkGzipHadoopOutputStream.java @@ -88,7 +88,7 @@ private static class GZIPOutputStreamWrapper super(output, bufferSize); } - public void end() + public void end() throws IOException { // free the memory as early as possible def.end(); diff --git a/src/main/java/io/airlift/compress/snappy/SnappyFramedInputStream.java b/src/main/java/io/airlift/compress/snappy/SnappyFramedInputStream.java index aa46987d..03ceee50 100644 --- a/src/main/java/io/airlift/compress/snappy/SnappyFramedInputStream.java +++ b/src/main/java/io/airlift/compress/snappy/SnappyFramedInputStream.java @@ -315,6 +315,10 @@ public static final class FrameMetaData final int length; final FrameAction frameAction; + /** + * @param frameAction + * @param length + */ public FrameMetaData(FrameAction frameAction, int length) { this.frameAction = frameAction; diff --git a/src/test/java/io/airlift/compress/zstd/TestUtil.java b/src/test/java/io/airlift/compress/zstd/TestUtil.java index be98b95d..6ec1bcd7 100644 --- a/src/test/java/io/airlift/compress/zstd/TestUtil.java +++ b/src/test/java/io/airlift/compress/zstd/TestUtil.java @@ -27,12 +27,12 @@ public class TestUtil public static Object[][] test24bitIntegers() { return new Object[][] { - {new byte[] {1, 0, 0, 0}, 0, 1}, - {new byte[] {12, -83, 0, 0}, 0, 44300}, - {new byte[] {0, 0, -128}, 0, 8388608}, - {new byte[] {(byte) 0xFF, (byte) 0xFF, (byte) 0xFF}, 0, 16777215}, - {new byte[] {63, 25, 72, 0}, 0, 4725055}, - {new byte[] {0, 0, 0, 0, 0, 0, 1, 0, 0}, 6, 1} + {new byte[]{1, 0, 0, 0}, 0, 1}, + {new byte[]{12, -83, 0, 0}, 0, 44300}, + {new byte[]{0, 0, -128}, 0, 8388608}, + {new byte[]{(byte) 0xFF, (byte) 0xFF, (byte) 0xFF}, 0, 16777215}, + {new byte[]{63, 25, 72, 0}, 0, 4725055}, + {new byte[]{0, 0, 0, 0, 0, 0, 1, 0, 0}, 6, 1} }; } diff --git a/src/test/java/io/airlift/compress/zstd/TestZstd.java b/src/test/java/io/airlift/compress/zstd/TestZstd.java index 99a19d0b..a02bddf1 100644 --- a/src/test/java/io/airlift/compress/zstd/TestZstd.java +++ b/src/test/java/io/airlift/compress/zstd/TestZstd.java @@ -204,7 +204,7 @@ public void testVerifyMagicInAllFrames() @Test public void testDecompressIsMissingData() { - byte[] input = new byte[] {40, -75, 47, -3, 32, 0, 1, 0}; + byte[] input = new byte[]{40, -75, 47, -3, 32, 0, 1, 0}; byte[] output = new byte[1024]; assertThatThrownBy(() -> getDecompressor().decompress(input, 0, input.length, output, 0, output.length)) .matches(e -> e instanceof MalformedInputException || e instanceof UncheckedIOException)