SolutionGuidance / psm

Welcome to the Medicare/Medicaid Provider Enrollment Screening Portal
http://projectpsm.org/
Other
26 stars 20 forks source link

Prevent NPE on notification email #1064

Closed jasonaowen closed 5 years ago

jasonaowen commented 5 years ago

We do not collect email addresses in the enrollment application process for every provider type. Check that there is an email address before sending an email so as to avoid throwing a null pointer exception.

@HemKal previously authored this as #1005, but wasn't available to finish polishing before we needed to merge, and #1005 is from @HemKal's fork and so I can't overwrite it and need to, instead, open a new PR.

Resolves #968 NPE on submitting a personal care assistant enrollment application Resolves #1005 Prevent NPE on notification email

jasonaowen commented 5 years ago

I manually tested by submitting a new enrollment application as a Personal Care Assistant, and was able to both get the success message and see the warning in the WildFly log:

17:51:18,905 WARNING [gov.medicaid.services.impl.NotificationServiceBean] (default task-8) Skipping notification as email address was missing

The integration tests all passed on #1005, and we need to set up for the demo tonight, so I'm going to merge this without waiting for those.