-
Notifications
You must be signed in to change notification settings - Fork 17
Avoid null pointer exception crashing the webapp. #956
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR aims to prevent null pointer exceptions from crashing the webapp by adding a dedicated catch block in the logout method.
- Added a catch block for NullPointerException in the logout method
- Introduced an import for ObjectUtils (currently unused)
} | ||
catch (NullPointerException e) | ||
{ | ||
log ("8 - NullPointerException " + e.getMessage()); | ||
sessionInfo.exceptionHandler(new GXMailException(e.getMessage(), MAIL_ConnectionLost)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Catching NullPointerException can mask underlying issues; consider refactoring the code to perform explicit null checks to prevent the exception from occurring.
} | |
catch (NullPointerException e) | |
{ | |
log ("8 - NullPointerException " + e.getMessage()); | |
sessionInfo.exceptionHandler(new GXMailException(e.getMessage(), MAIL_ConnectionLost)); |
Copilot uses AI. Check for mistakes.
Cherry pick to beta success |
Cherry pick to beta success |
Cherry pick to beta success |
Issue:203914