brotli4j is declared as a regular compile-scope dependency in openpdf's POM, but it should be <optional>true</optional> since it is optional and can be toggled on via flag.
For now any project that includes openpdf transitively gets brotli4j on its classpath. Libraries that detect brotli4j at runtime (e.g.pache HttpClient 5 registers a Brotli decompressor when it finds brotli4j) will then try to use it — and fail with UnsatisfiedLinkError because the JNI native library is not bundled.
To reproduce:
Add openpdf 3.0.5 to a project that also uses httpclient5. Any HTTP response will trigger:
java.lang.UnsatisfiedLinkError: 'java.nio.ByteBuffer com.aayushatharva.brotli4j.decoder.DecoderJNI.nativeCreate(long[])'
brotli4j is declared as a regular compile-scope dependency in openpdf's POM, but it should be
<optional>true</optional>since it is optional and can be toggled on via flag.For now any project that includes openpdf transitively gets brotli4j on its classpath. Libraries that detect brotli4j at runtime (e.g.pache HttpClient 5 registers a Brotli decompressor when it finds brotli4j) will then try to use it — and fail with UnsatisfiedLinkError because the JNI native library is not bundled.
To reproduce:
Add openpdf 3.0.5 to a project that also uses httpclient5. Any HTTP response will trigger:
java.lang.UnsatisfiedLinkError: 'java.nio.ByteBuffer com.aayushatharva.brotli4j.decoder.DecoderJNI.nativeCreate(long[])'