未验证 提交 2a6e2e5f 编写于 作者: E elandau 提交者: GitHub

Merge pull request #423 from elandau/bugfix/getIfSet

config: Fix getIfSet
......@@ -309,7 +309,11 @@ public abstract class ReloadableClientConfig implements IClientConfig {
@Override
public <T> Optional<T> getIfSet(IClientConfigKey<T> key) {
return Optional.ofNullable((T)internalProperties.get(key));
Optional<T> value = (Optional<T>)internalProperties.get(key);
if (value == null) {
return Optional.empty();
}
return value;
}
private <T> T resolveValueToType(IClientConfigKey<T> key, Object value) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册