Combine identical catch blocks
This commit is contained in:
parent
149216e8ec
commit
f1dc94534f
|
@ -363,13 +363,7 @@ public class JSONObject {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IllegalAccessException e) {
|
catch (IllegalAccessException | InvocationTargetException | JSONException e) {
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
catch (JSONException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
catch (InvocationTargetException e) {
|
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -891,10 +891,7 @@ public class JMSServerControlImpl extends AbstractControl implements JMSServerCo
|
||||||
ActiveMQDestination.decomposeQueueNameForDurableSubscription(consumer.getQueue().getName().toString());
|
ActiveMQDestination.decomposeQueueNameForDurableSubscription(consumer.getQueue().getName().toString());
|
||||||
obj.put("durable", true);
|
obj.put("durable", true);
|
||||||
}
|
}
|
||||||
catch (IllegalArgumentException e) {
|
catch (IllegalArgumentException | JMSRuntimeException e) {
|
||||||
obj.put("durable", false);
|
|
||||||
}
|
|
||||||
catch (JMSRuntimeException e) {
|
|
||||||
obj.put("durable", false);
|
obj.put("durable", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -956,10 +956,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
|
||||||
scheduleRetryConnect();
|
scheduleRetryConnect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (ActiveMQInterruptedException e) {
|
catch (ActiveMQInterruptedException | InterruptedException e) {
|
||||||
ActiveMQServerLogger.LOGGER.errorConnectingBridge(e, this);
|
|
||||||
}
|
|
||||||
catch (InterruptedException e) {
|
|
||||||
ActiveMQServerLogger.LOGGER.errorConnectingBridge(e, this);
|
ActiveMQServerLogger.LOGGER.errorConnectingBridge(e, this);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
|
@ -1138,10 +1135,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
|
||||||
}
|
}
|
||||||
ActiveMQServerLogger.LOGGER.bridgeStopped(name);
|
ActiveMQServerLogger.LOGGER.bridgeStopped(name);
|
||||||
}
|
}
|
||||||
catch (RuntimeException e) {
|
catch (InterruptedException | RuntimeException e) {
|
||||||
ActiveMQServerLogger.LOGGER.error("Failed to stop bridge", e);
|
|
||||||
}
|
|
||||||
catch (InterruptedException e) {
|
|
||||||
ActiveMQServerLogger.LOGGER.error("Failed to stop bridge", e);
|
ActiveMQServerLogger.LOGGER.error("Failed to stop bridge", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,11 +120,8 @@ public final class SharedStoreBackupActivation extends Activation {
|
||||||
startFailbackChecker();
|
startFailbackChecker();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (InterruptedException e) {
|
catch (ClosedChannelException | InterruptedException e) {
|
||||||
// this is ok, we are being stopped
|
// these are ok, we are being stopped
|
||||||
}
|
|
||||||
catch (ClosedChannelException e) {
|
|
||||||
// this is ok too, we are being stopped
|
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
if (!(e.getCause() instanceof InterruptedException)) {
|
if (!(e.getCause() instanceof InterruptedException)) {
|
||||||
|
|
|
@ -90,9 +90,7 @@ public class GuestLoginModule implements LoginModule {
|
||||||
passwordCallback.clearPassword();
|
passwordCallback.clearPassword();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (IOException ioe) {
|
catch (IOException | UnsupportedCallbackException e) {
|
||||||
}
|
|
||||||
catch (UnsupportedCallbackException uce) {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (debug) {
|
if (debug) {
|
||||||
|
|
|
@ -102,11 +102,8 @@ public class LDAPLoginModule implements LoginModule {
|
||||||
try {
|
try {
|
||||||
handler.handle(callbacks);
|
handler.handle(callbacks);
|
||||||
}
|
}
|
||||||
catch (IOException ioe) {
|
catch (IOException | UnsupportedCallbackException e) {
|
||||||
throw (LoginException) new LoginException().initCause(ioe);
|
throw (LoginException) new LoginException().initCause(e);
|
||||||
}
|
|
||||||
catch (UnsupportedCallbackException uce) {
|
|
||||||
throw (LoginException) new LoginException().initCause(uce);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String password;
|
String password;
|
||||||
|
|
Loading…
Reference in New Issue