make test for Brotli check for the library itself
@@ -59,8 +59,9 @@ public static boolean isBrotliCompressionAvailable() {
private static boolean internalIsBrotliCompressionAvailable() {
try {
- return BrotliCompressorInputStream.matches(null, 0);
- } catch (final NoClassDefFoundError error) {
+ Class.forName("org.brotli.dec.BrotliInputStream");
+ return true;
+ } catch (NoClassDefFoundError | Exception error) {
return false;
}
}
