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:
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user