AOM-175: Add validation checks in getProviderForUser method#245
AOM-175: Add validation checks in getProviderForUser method#245aadvik93 wants to merge 2 commits intoopenmrs:masterfrom
Conversation
|
Do we really need the Also, since we are trying to make this method more robust, should we consider adding a defensive check for |
@sudhanshu-raj, You’re right that Context.getProviderService() should normally not return null in a properly initialized OpenMRS runtime, so the defensive check there didn’t add much value. I’ve removed that check and added a validation for user.getPerson() == null to avoid a potential NPE when calling getProvidersByPerson(). This has been updated in the latest commit. |
Description
This PR adds defensive validation checks in the getProviderForUser method in LegacyUIImpl.java.
Changes
Related Issue
Fixes AOM-175