kumuluz / kumuluzee

Lightweight open-source framework for developing microservices using standard Java EE technologies and migrating Java EE to cloud-native architecture.
https://ee.kumuluz.com
MIT License
291 stars 71 forks source link

ConfigurationUtil.get(String) returning String representation instead of Optional.empty() #215

Closed osbeorn closed 2 years ago

osbeorn commented 2 years ago

Assume we have the following config.yml

mp:
  jwt:
    verify:
      publickey:
        location: http://localhost:8081/jwks
      issuer: http://example.com

We then try to get the mp.jwt.verify.publickey property like so

Optional<String> value = ConfigurationUtil.getInstance().get("mp.jwt.verify.publickey");

The resulting value is

{location=https:localhost:8081/jwks}

which is a string representation of the leftover leaf in the YAML structure.

The expected result is actually Optional.empty().