diff --git a/ribbon-core/src/main/java/com/netflix/client/config/ReloadableClientConfig.java b/ribbon-core/src/main/java/com/netflix/client/config/ReloadableClientConfig.java index e53ecd82..ac302f29 100644 --- a/ribbon-core/src/main/java/com/netflix/client/config/ReloadableClientConfig.java +++ b/ribbon-core/src/main/java/com/netflix/client/config/ReloadableClientConfig.java @@ -309,7 +309,11 @@ private Optional resolverScopedProperty(IClientConfigKey key) { @Override public Optional getIfSet(IClientConfigKey key) { - return Optional.ofNullable((T)internalProperties.get(key)); + Optional value = (Optional)internalProperties.get(key); + if (value == null) { + return Optional.empty(); + } + return value; } private T resolveValueToType(IClientConfigKey key, Object value) {