Avoid throws Exception where possible - Phase I

* Polishing - PR Comments
This commit is contained in:
Gary Russell
2019-03-07 12:53:52 -05:00
committed by Artem Bilan
parent 005bc80680
commit b187bca36e
130 changed files with 992 additions and 784 deletions

View File

@@ -119,7 +119,7 @@ public class CustomObjectNameTests {
public static class HandlerWithCustomObjectName extends AbstractMessageHandler {
@Override
public void handleMessageInternal(Message<?> message) throws Exception {
public void handleMessageInternal(Message<?> message) {
}
}
@@ -153,7 +153,7 @@ public class CustomObjectNameTests {
public static class HandlerWithStandardObjectName extends AbstractMessageHandler {
@Override
protected void handleMessageInternal(Message<?> message) throws Exception {
protected void handleMessageInternal(Message<?> message) {
}
}

View File

@@ -180,7 +180,7 @@ public class NotificationPublishingChannelAdapterParserTests {
public static class FooAdvice extends AbstractRequestHandlerAdvice {
@Override
protected Object doInvoke(ExecutionCallback callback, Object target, Message<?> message) throws Exception {
protected Object doInvoke(ExecutionCallback callback, Object target, Message<?> message) {
adviceCalled++;
return callback.execute();
}

View File

@@ -159,7 +159,7 @@ public class OperationInvokingChannelAdapterParserTests {
public static class FooAdvice extends AbstractRequestHandlerAdvice {
@Override
protected Object doInvoke(ExecutionCallback callback, Object target, Message<?> message) throws Exception {
protected Object doInvoke(ExecutionCallback callback, Object target, Message<?> message) {
adviceCalled++;
return callback.execute();
}

View File

@@ -163,7 +163,7 @@ public class OperationInvokingOutboundGatewayTests {
public static class FooAdvice extends AbstractRequestHandlerAdvice {
@Override
protected Object doInvoke(ExecutionCallback callback, Object target, Message<?> message) throws Exception {
protected Object doInvoke(ExecutionCallback callback, Object target, Message<?> message) {
adviceCalled++;
return callback.execute();
}

View File

@@ -318,12 +318,11 @@ public class IdempotentReceiverIntegrationTests {
}
@Bean
public Advice fooAdvice(final AtomicInteger adviceCalled) {
public Advice fooAdvice(@SuppressWarnings("unused") final AtomicInteger adviceCalled) {
return new AbstractRequestHandlerAdvice() {
@Override
protected Object doInvoke(ExecutionCallback callback, Object target, Message<?> message)
throws Exception {
protected Object doInvoke(ExecutionCallback callback, Object target, Message<?> message) {
adviceCalled.incrementAndGet();
return callback.execute();
}

View File

@@ -78,7 +78,7 @@ public class TransformerContextTests {
public static class FooAdvice extends AbstractRequestHandlerAdvice {
@Override
protected Object doInvoke(ExecutionCallback callback, Object target, Message<?> message) throws Exception {
protected Object doInvoke(ExecutionCallback callback, Object target, Message<?> message) {
adviceCalled++;
return callback.execute();
}