Removed calls toprintStackTrace()` and replace with proper logging calls.
Remove throws declarations if method doesn't throw the declared exceptions
Do not swallow exceptions without logging the stack trace and adding comment as to why the exception is being swallowed
Chain all exceptions
Do not explicitly throw Throwable, Exception, or RuntimeException
For phase 1 all new Throwable calls will be replaced with the following:
IllegalArgumentException Thrown when parameters are invalid. Message should contain the invalid parameter and, if possible, a message about valid values. If a non-nullable parameter is null an NPE may be thrown instead.
IllegalStateException Thrown when a value of an instance field is not valid for successful execution of a method.
calls to
printStackTrace()` and replace with proper logging calls.throws
declarations if method doesn't throw the declared exceptionsThrowable
,Exception
, orRuntimeException
new Throwable
calls will be replaced with the following:IllegalArgumentException
Thrown when parameters are invalid. Message should contain the invalid parameter and, if possible, a message about valid values. If a non-nullable parameter isnull
an NPE may be thrown instead.IllegalStateException
Thrown when a value of an instance field is not valid for successful execution of a method.