From 0b77ec47236ef037c407bef70eeb3ed67b83711b Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 27 Nov 2026 03:29:58 -0800 Subject: [PATCH] java client: read security.toml without an [https.client] section toml.getBoolean returns null for a missing key, so unboxing it threw a NullPointerException in the static initializer and every FilerClient failed with ExceptionInInitializerError when security.toml held only other sections, such as [grpc] or [jwt.filer_signing]. Co-Authored-By: Claude Opus 5.5 --- .../src/main/java/seaweedfs/client/FilerSecurityContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other/java/client/src/main/java/seaweedfs/client/FilerSecurityContext.java b/other/java/client/src/main/java/seaweedfs/client/FilerSecurityContext.java index 64a6f13df8..cd73dc38b1 100644 --- a/other/java/client/src/main/java/seaweedfs/client/FilerSecurityContext.java +++ b/other/java/client/src/main/java/seaweedfs/client/FilerSecurityContext.java @@ -86,7 +86,7 @@ public abstract class FilerSecurityContext extends SslContext { } } - if (toml.getBoolean("https.client.enabled")) { + if (toml.getBoolean("https.client.enabled", false)) { httpTrustCertCollectionFilePath = toml.getString("https.client.ca"); logger.debug("loading HTTP ca from {}", httpTrustCertCollectionFilePath); httpClientCertChainFilePath = toml.getString("https.client.cert");