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

View File

@@ -51,12 +51,11 @@ public class MockOpenIDConsumer implements OpenIDConsumer {
// ========================================================================================================
public String beginConsumption(HttpServletRequest req, String claimedIdentity,
String returnToUrl, String realm) throws OpenIDConsumerException {
String returnToUrl, String realm) {
return redirectUrl;
}
public OpenIDAuthenticationToken endConsumption(HttpServletRequest req)
throws OpenIDConsumerException {
public OpenIDAuthenticationToken endConsumption(HttpServletRequest req) {
return token;
}

View File

@@ -42,7 +42,7 @@ public class OpenIDAuthenticationFilterTests {
private static final String DEFAULT_TARGET_URL = FILTER_PROCESS_URL;
@Before
public void setUp() throws Exception {
public void setUp() {
filter = new OpenIDAuthenticationFilter();
filter.setConsumer(new MockOpenIDConsumer(REDIRECT_URL));
SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
@@ -65,8 +65,7 @@ public class OpenIDAuthenticationFilterTests {
filter.setConsumer(new MockOpenIDConsumer() {
public String beginConsumption(HttpServletRequest req,
String claimedIdentity, String returnToUrl, String realm)
throws OpenIDConsumerException {
String claimedIdentity, String returnToUrl, String realm) {
assertThat(claimedIdentity).isEqualTo(CLAIMED_IDENTITY_URL);
assertThat(returnToUrl).isEqualTo(DEFAULT_TARGET_URL);
assertThat(realm).isEqualTo("http://localhost:8080/");