-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
Unchecked exception handling #9637
base: master
Are you sure you want to change the base?
Unchecked exception handling #9637
Conversation
… and improve JavaDoc
… and improve JavaDoc
What you're saying is basically that you discarded some changes from your previous PR, but that's not relevant for review of this one. Here you're just adding Javadoc and documenting that an argument is not null. Please fix the formatting errors. |
Also, do not open a new PR. Update this one. |
Refactor validateIconSize method: Remove redundant exception handling and improve JavaDoc
Description:
This PR refactors the validateIconSize method to address feedback regarding redundant exception handling and code formatting. The following changes have been made:
Redundant Exception Handling Removed: The unnecessary try-catch blocks for RuntimeException and Exception have been removed. The method now focuses solely on throwing a SecurityException when the iconSize does not match the expected pattern.
Enhanced JavaDoc: A Detailed JavaDoc has been added to clarify the method's functionality, including descriptions of the parameters and any exceptions that may be thrown.
@nonnull Annotation: The @nonnull annotation has been added to the iconSize parameter to prevent NullPointerException and ensure the method's input is always valid.
Simplified Exception Message: The exception message now includes the invalid iconSize value to provide better context in the event of an error.