Java 7: Identical 'catch' branches in 'try' statement
This commit is contained in:
parent
5e44a249f8
commit
25c06be1eb
|
@ -111,11 +111,7 @@ public class DefaultAuthenticationEventPublisher implements AuthenticationEventP
|
|||
try {
|
||||
event = constructor.newInstance(authentication, exception);
|
||||
}
|
||||
catch (IllegalAccessException ignored) {
|
||||
}
|
||||
catch (InstantiationException ignored) {
|
||||
}
|
||||
catch (InvocationTargetException ignored) {
|
||||
catch (IllegalAccessException | InvocationTargetException | InstantiationException ignored) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -179,17 +179,12 @@ public class ProviderManager implements AuthenticationManager, MessageSourceAwar
|
|||
break;
|
||||
}
|
||||
}
|
||||
catch (AccountStatusException e) {
|
||||
catch (AccountStatusException | InternalAuthenticationServiceException e) {
|
||||
prepareException(e, authentication);
|
||||
// SEC-546: Avoid polling additional providers if auth failure is due to
|
||||
// invalid account status
|
||||
throw e;
|
||||
}
|
||||
catch (InternalAuthenticationServiceException e) {
|
||||
prepareException(e, authentication);
|
||||
throw e;
|
||||
}
|
||||
catch (AuthenticationException e) {
|
||||
} catch (AuthenticationException e) {
|
||||
lastException = e;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -116,11 +116,7 @@ public class OpenID4JavaConsumer implements OpenIDConsumer {
|
|||
authReq.addExtension(fetchRequest);
|
||||
}
|
||||
}
|
||||
catch (MessageException e) {
|
||||
throw new OpenIDConsumerException(
|
||||
"Error processing ConsumerManager authentication", e);
|
||||
}
|
||||
catch (ConsumerException e) {
|
||||
catch (MessageException | ConsumerException e) {
|
||||
throw new OpenIDConsumerException(
|
||||
"Error processing ConsumerManager authentication", e);
|
||||
}
|
||||
|
@ -164,13 +160,7 @@ public class OpenID4JavaConsumer implements OpenIDConsumer {
|
|||
verification = consumerManager.verify(receivingURL.toString(), openidResp,
|
||||
discovered);
|
||||
}
|
||||
catch (MessageException e) {
|
||||
throw new OpenIDConsumerException("Error verifying openid response", e);
|
||||
}
|
||||
catch (DiscoveryException e) {
|
||||
throw new OpenIDConsumerException("Error verifying openid response", e);
|
||||
}
|
||||
catch (AssociationException e) {
|
||||
catch (MessageException | AssociationException | DiscoveryException e) {
|
||||
throw new OpenIDConsumerException("Error verifying openid response", e);
|
||||
}
|
||||
|
||||
|
|
|
@ -77,10 +77,7 @@ public class ClientApplication {
|
|||
System.out
|
||||
.println("This client proxy factory does not have a setUsername(String) method");
|
||||
}
|
||||
catch (IllegalAccessException ignored) {
|
||||
ignored.printStackTrace();
|
||||
}
|
||||
catch (InvocationTargetException ignored) {
|
||||
catch (IllegalAccessException | InvocationTargetException ignored) {
|
||||
ignored.printStackTrace();
|
||||
}
|
||||
|
||||
|
@ -98,9 +95,7 @@ public class ClientApplication {
|
|||
System.out
|
||||
.println("This client proxy factory does not have a setPassword(String) method");
|
||||
}
|
||||
catch (IllegalAccessException ignored) {
|
||||
}
|
||||
catch (InvocationTargetException ignored) {
|
||||
catch (IllegalAccessException | InvocationTargetException ignored) {
|
||||
}
|
||||
|
||||
System.out.println("Calling ContactManager '" + beanName + "'");
|
||||
|
|
|
@ -114,19 +114,9 @@ public class WebXmlMappableAttributesRetriever implements ResourceLoaderAware,
|
|||
doc = db.parse(aStream);
|
||||
return doc;
|
||||
}
|
||||
catch (FactoryConfigurationError e) {
|
||||
catch (FactoryConfigurationError | IOException | SAXException | ParserConfigurationException e) {
|
||||
throw new RuntimeException("Unable to parse document object", e);
|
||||
}
|
||||
catch (ParserConfigurationException e) {
|
||||
throw new RuntimeException("Unable to parse document object", e);
|
||||
}
|
||||
catch (SAXException e) {
|
||||
throw new RuntimeException("Unable to parse document object", e);
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new RuntimeException("Unable to parse document object", e);
|
||||
}
|
||||
finally {
|
||||
} finally {
|
||||
try {
|
||||
aStream.close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue