ClickHouse / ClickHouse/clickhouse-java
Replace unmaintained lz4-java with Apache Commons Compress LZ4
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 636
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 28
Description
org.lz4:lz4-java (1.8.0) has been unmaintained for years and triggers JDK 17 + startup warnings:
> WARNING: A restricted method in java.lang.System has been called
> WARNING: java.lang.System::loadLibrary has been called by net.jpountz.util.Native in an unnamed module (file:/home/X/.gradle/caches/modules-2/files-2.1/org.lz4/lz4-java/1.8.0/4b986a99445e49ea5fbf5d149c4b63f6ed6c6780/lz4-java-1.8.0.jar)
> WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
> WARNING: Restricted methods will be blocked in a future release unless native access is enabled
This native-loading path can also hurt performance.
Proposed fix
- Drop org.lz4:lz4-java.
- Add org.apache.commons:commons-compress (current release).
- Switch to its LZ4 APIs (org.apache.commons.compress.compressors.lz4.*).
Apache Commons Compress is actively maintained and JDK-compatible:
https://commons.apache.org/proper/commons-compress/apidocs/org/apache/commons/compress/compressors/lz4/package-summary.html
Contributor guide
Assessment
This issue has not been assessed yet.