-
Notifications
You must be signed in to change notification settings - Fork 318
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
Avoid NPE in DefaultApplications.java #1126
Conversation
avoid NPE, if environmentJsons is null from application entity
|
@marc-schaefers - Thanks for the submission! Are you seeing this NPE in actual usage of the library? Do you have a stack trace you can share? Just looking for a little more context on this. Also, you need to click through the links above and appease the EasyCLA bot before we can accept this PR. |
Hi, i use the PushApplicationRequest to push a static build pack with the cloud foundry java libs. On one app name i get a nullpointer exception: So i have changed this line to insert an empty map, if the jsons env null and now it works like expected. |
Thanks for the additional info. I think I can see how it might get into that case. I'm kind of surprised that the server is returning null and not an empty map, but we should handle it either way. Two points of feedback on the PR:
Thanks |
Change null check to optional
Hi @dmikusa-pivotal , the source code is updated now and i added a new push test case. |
Sorry for the delay, Log4j2 issues had us scrambling before the holidays. Thanks for the PR! |
Avoid NPE, if `environmentJsons` is null from the application entity & add test for push with null entity env.
avoid NPE, if environmentJsons is null from application entity