From 3dd5f5ebb91da251b408d60b8ac27af56c923558 Mon Sep 17 00:00:00 2001 From: jhqwqmc <2110242767@qq.com> Date: Tue, 29 Apr 2025 22:33:54 +0800 Subject: [PATCH] =?UTF-8?q?refactor(pack):=20=E4=BC=98=E5=8C=96s3=E4=BB=A3?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../net/momirealms/craftengine/core/pack/host/impl/S3Host.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/net/momirealms/craftengine/core/pack/host/impl/S3Host.java b/core/src/main/java/net/momirealms/craftengine/core/pack/host/impl/S3Host.java index 7ec02bff9..dad48ea33 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/pack/host/impl/S3Host.java +++ b/core/src/main/java/net/momirealms/craftengine/core/pack/host/impl/S3Host.java @@ -214,7 +214,7 @@ public class S3Host implements ResourcePackHost { if (port <= 0 || port > 65535) { throw new LocalizedException("warning.config.host.proxy.missing_port"); } - String scheme = (String) proxySetting.get("scheme"); + String scheme = Optional.ofNullable(proxySetting.get("scheme")).map(String::valueOf).orElse(null); if (scheme == null || scheme.isEmpty()) { throw new LocalizedException("warning.config.host.proxy.missing_scheme"); }