9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-29 20:09:13 +00:00

refactor(pack): 优化s3代理

This commit is contained in:
jhqwqmc
2025-04-29 22:33:54 +08:00
parent 088ef92343
commit 3dd5f5ebb9

View File

@@ -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");
}