Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException during programatically configuring the library #17

Closed
milanov opened this issue Jan 22, 2020 · 1 comment
Closed

Comments

@milanov
Copy link

milanov commented Jan 22, 2020

Describe the bug
The PropertyUtil#getYamlValue throws a null pointer exception if there is no native-query configuration in the yaml file:

Map<String, String> map = (HashMap<String, String>) obj.get("native-query");
return Optional.ofNullable(map.get(propertyName.replace("native-query.", "")));

To Reproduce
Try to define a class to configure a class that extends NativeQueryConfig, but don't include any native-query configuration in an existing yaml file.

Expected behavior
It should work without having to include any configuration in the properties file.

@gasparbarancelli
Copy link
Owner

I released a new version of the library, update it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants