1
0
mirror of synced 2026-08-05 17:57:15 +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
@@ -90,13 +90,13 @@ public class MultiAnnotationTests {
}
@Test(expected = AccessDeniedException.class)
public void preAuthorizedOnlyServiceDeniesIfRoleMissing() throws Exception {
public void preAuthorizedOnlyServiceDeniesIfRoleMissing() {
SecurityContextHolder.getContext().setAuthentication(joe_b);
preService.preAuthorizedMethod();
}
@Test(expected = AccessDeniedException.class)
public void securedOnlyRoleAServiceDeniesIfRoleMissing() throws Exception {
public void securedOnlyRoleAServiceDeniesIfRoleMissing() {
SecurityContextHolder.getContext().setAuthentication(joe_b);
secService.securedMethod();
}
@@ -32,7 +32,7 @@ public class SEC933ApplicationContextTests {
private UserDetailsService userDetailsService;
@Test
public void testSimpleApplicationContextBootstrap() throws Exception {
public void testSimpleApplicationContextBootstrap() {
assertThat(userDetailsService).isNotNull();
}
}
@@ -31,7 +31,7 @@ public class PythonInterpreterBasedSecurityTests {
private TestService service;
@Test
public void serviceMethod() throws Exception {
public void serviceMethod() {
SecurityContextHolder.getContext().setAuthentication(
new UsernamePasswordAuthenticationToken("bob", "bobspassword"));