diff --git a/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClient.java b/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClient.java index dd5b52436c..626d15dbff 100644 --- a/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClient.java +++ b/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClient.java @@ -1596,9 +1596,11 @@ static boolean isCompressing(HttpHeaders h) { } static String reactorNettyVersion() { - return Optional.ofNullable(HttpClient.class.getPackage() - .getImplementationVersion()) - .orElse("dev"); + Package pac = HttpClient.class.getPackage(); + if (pac == null) { + return "dev"; + } + return Optional.ofNullable(pac.getImplementationVersion()).orElse("dev"); } static final Logger log = Loggers.getLogger(HttpClient.class);