Skip to content

Commit

Permalink
config: Fix getIfSet
Browse files Browse the repository at this point in the history
  • Loading branch information
elandau committed May 21, 2019
1 parent 5075840 commit f10be52
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,11 @@ private <T> Optional<T> resolverScopedProperty(IClientConfigKey<T> key) {

@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) {
Expand Down

0 comments on commit f10be52

Please sign in to comment.