From 0bb132fde1b2e2d031e7ffefb92261651b3b782b Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Mon, 23 Oct 2023 11:36:09 +0200 Subject: [PATCH] Make the ZSTD Substitutions more robust --- .../runtime/graal/HttpContentCompressorSubstitutions.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/netty/runtime/src/main/java/io/quarkus/netty/runtime/graal/HttpContentCompressorSubstitutions.java b/extensions/netty/runtime/src/main/java/io/quarkus/netty/runtime/graal/HttpContentCompressorSubstitutions.java index 4f75e275a5eec..baeb441687e80 100644 --- a/extensions/netty/runtime/src/main/java/io/quarkus/netty/runtime/graal/HttpContentCompressorSubstitutions.java +++ b/extensions/netty/runtime/src/main/java/io/quarkus/netty/runtime/graal/HttpContentCompressorSubstitutions.java @@ -37,7 +37,9 @@ public IsZstdAbsent() { try { Class.forName("com.github.luben.zstd.Zstd"); zstdAbsent = false; - } catch (ClassNotFoundException e) { + } catch (Exception e) { + // It can be a classloading issue (the library is not available), or a native issue + // (the library for the current OS/arch is not available) zstdAbsent = true; } }