Closed
Description
We have numerous places in Boot where we've declared that an exception is thrown when it isn't or when the exception is a RuntimeException
so it doesn't need to be declared. There's a PR that removes them which I am in favour of. I think it would also be nice to try and stop them reappearing. To that end, we could change the Eclipse JDT core preferences. Instead of the following:
We'd use the following:
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
The changes above will result in warnings being generated for checked exceptions that are unnecessarily declared as thrown. It won't help with unchecked exceptions.