1
0
mirror of synced 2026-08-05 01:36:56 +00:00

Remove redundant throws clauses

Removes exceptions that are declared in a method's signature but never thrown by the method itself or its implementations/derivatives.
This commit is contained in:
Lars Grefer
2019-08-23 01:03:54 +02:00
parent f0515a021c
commit 34dd5fea30
418 changed files with 1146 additions and 1273 deletions
@@ -58,13 +58,13 @@ public class ReactorContextTestExecutionListener
private static class DelegateTestExecutionListener extends AbstractTestExecutionListener {
@Override
public void beforeTestMethod(TestContext testContext) throws Exception {
public void beforeTestMethod(TestContext testContext) {
SecurityContext securityContext = TestSecurityContextHolder.getContext();
Hooks.onLastOperator(CONTEXT_OPERATOR_KEY, Operators.lift((s, sub) -> new SecuritySubContext<>(sub, securityContext)));
}
@Override
public void afterTestMethod(TestContext testContext) throws Exception {
public void afterTestMethod(TestContext testContext) {
Hooks.resetOnLastOperator(CONTEXT_OPERATOR_KEY);
}
@@ -58,7 +58,7 @@ public class WithSecurityContextTestExecutionListener
* still not found, then no {@link SecurityContext} is populated.
*/
@Override
public void beforeTestMethod(TestContext testContext) throws Exception {
public void beforeTestMethod(TestContext testContext) {
TestSecurityContext testSecurityContext = createTestSecurityContext(
testContext.getTestMethod(), testContext);
if (testSecurityContext == null) {
@@ -166,7 +166,7 @@ public class WithSecurityContextTestExecutionListener
* {@link SecurityContextHolder} after each test method.
*/
@Override
public void afterTestMethod(TestContext testContext) throws Exception {
public void afterTestMethod(TestContext testContext) {
TestSecurityContextHolder.clearContext();
}
@@ -92,7 +92,7 @@ public final class SecurityMockMvcResultMatchers {
private Consumer<Authentication> assertAuthentication;
@Override
public void match(MvcResult result) throws Exception {
public void match(MvcResult result) {
SecurityContext context = load(result);
Authentication auth = context.getAuthentication();
@@ -252,7 +252,7 @@ public final class SecurityMockMvcResultMatchers {
private AuthenticationTrustResolver trustResolver = new AuthenticationTrustResolverImpl();
@Override
public void match(MvcResult result) throws Exception {
public void match(MvcResult result) {
SecurityContext context = load(result);
Authentication authentication = context.getAuthentication();