Skip to content
New issue

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

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

Already on GitHub? # to your account

Potential NPE in the Configuration Server's FileInfoVisitor if no element with the "type" key exist #1176

Closed
mariusoe opened this issue Aug 3, 2021 · 0 comments · Fixed by #1179
Labels
area/config-server bug Something isn't working

Comments

@mariusoe
Copy link
Member

mariusoe commented Aug 3, 2021

In the class FileInfoVisitor of the configuration server, the first line of a configuration file will be converted into a Map representing a Json object. In case a valid JSON object is present in the first comment line but without an element with key type, a NPE will occure:

String typeString = "UI_" + jsonMap.get("type").toUpperCase().replace("-", "_");

It has to be verified, that the element exist before invoking methods on it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area/config-server bug Something isn't working
Projects
None yet
1 participant