Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion clickhouse-data/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</dependency>

<dependency>
<groupId>org.lz4</groupId>
<groupId>at.yawk.lz4</groupId>
<artifactId>lz4-java</artifactId>
<optional>true</optional>
</dependency>
Expand Down
13 changes: 7 additions & 6 deletions clickhouse-http-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@
<artifactId>dec</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.lz4</groupId>
<artifactId>lz4-pure-java</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.tukaani</groupId>
<artifactId>xz</artifactId>
Expand Down Expand Up @@ -95,6 +90,12 @@
<version>3.13.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>at.yawk.lz4</groupId>
<artifactId>lz4-java</artifactId>
<optional>true</optional>
</dependency>
</dependencies>

<build>
Expand All @@ -119,7 +120,7 @@
<includes>
<include>com.clickhouse:clickhouse-data</include>
<include>com.clickhouse:clickhouse-client</include>
<include>org.lz4:lz4-pure-java</include>
<include>at.yawk.lz4:lz4-java</include>
</includes>
</artifactSet>
<relocations>
Expand Down
2 changes: 1 addition & 1 deletion clickhouse-jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.lz4</groupId>
<groupId>at.yawk.lz4</groupId>
<artifactId>lz4-java</artifactId>
<version>${lz4.version}</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion clickhouse-r2dbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</dependency>

<dependency>
<groupId>org.lz4</groupId>
<groupId>at.yawk.lz4</groupId>
<artifactId>lz4-java</artifactId>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion client-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</dependency>

<dependency>
<groupId>org.lz4</groupId>
<groupId>at.yawk.lz4</groupId>
<artifactId>lz4-java</artifactId>
<version>${lz4.version}</version>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public void testLoadingServerContext() throws Exception {
@Test(groups = {"integration"})
public void testDisableNative() {
try (Client client = newClient().disableNativeCompression(true).build()) {
Assert.assertTrue(client.toString().indexOf("JavaUnsafe") != -1);
Assert.assertTrue(client.toString().contains("JavaSafe") || client.toString().contains("JavaUnsafe"));
}
}

Expand Down
10 changes: 2 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<jctools.version>4.0.1</jctools.version>
<opencensus.version>0.31.1</opencensus.version>
<protobuf.version>3.23.4</protobuf.version>
<lz4.version>1.8.0</lz4.version>
<lz4.version>1.10.2</lz4.version>
<msgpack.version>0.9.5</msgpack.version>
<roaring-bitmap.version>0.9.47</roaring-bitmap.version>
<slf4j.version>2.0.7</slf4j.version>
Expand Down Expand Up @@ -189,17 +189,11 @@
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>

<dependency>
<groupId>org.lz4</groupId>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Native-image configs reference potentially missing Unsafe LZ4 classes

Medium Severity

The library upgrade to at.yawk.lz4:lz4-java removes Unsafe factory instances per the PR description, and the test was updated accordingly to accept either JavaSafe or JavaUnsafe. However, the native-image reflection configs in clickhouse-jdbc and jdbc-v2 still reference LZ4JavaUnsafeCompressor, LZ4JavaUnsafeFastDecompressor, LZ4JavaUnsafeSafeDecompressor, and LZ4HCJavaUnsafeCompressor classes with their INSTANCE fields. If these classes or fields no longer exist in the new library, GraalVM native-image builds will fail when attempting to register these for reflection.

Additional Locations (1)

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not see any references in native image.

<groupId>at.yawk.lz4</groupId>
<artifactId>lz4-java</artifactId>
<version>${lz4.version}</version>
</dependency>
<dependency>
<groupId>org.lz4</groupId>
<artifactId>lz4-pure-java</artifactId>
<version>${lz4.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
Expand Down
Loading