Skip to content

Commit 113a371

Browse files
garyrussellartembilan
authored andcommitted
Remove Exception from IOS.onInit()
1 parent 81b4ea1 commit 113a371

File tree

63 files changed

+118
-94
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+118
-94
lines changed

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/channel/AbstractAmqpChannel.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,6 +35,7 @@
3535
/**
3636
* @author Mark Fisher
3737
* @author Artem Bilan
38+
* @author Gary Russell
3839
*
3940
* @since 2.1
4041
*/
@@ -207,7 +208,7 @@ protected ConnectionFactory getConnectionFactory() {
207208
}
208209

209210
@Override
210-
protected void onInit() throws Exception {
211+
protected void onInit() {
211212
super.onInit();
212213
if (!this.initialized && this.rabbitTemplate != null) {
213214
if (this.connectionFactory != null) {

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/channel/AbstractSubscribableAmqpChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public boolean unsubscribe(MessageHandler handler) {
160160
}
161161

162162
@Override
163-
public void onInit() throws Exception {
163+
public void onInit() {
164164
super.onInit();
165165
this.dispatcher = this.createDispatcher();
166166
if (this.maxSubscribers == null) {

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/channel/PollableAmqpChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ protected String getRoutingKey() {
138138
}
139139

140140
@Override
141-
protected void onInit() throws Exception {
141+
protected void onInit() {
142142
AmqpTemplate amqpTemplate = getAmqpTemplate();
143143
if (this.queue == null) {
144144
if (getAdmin() == null && amqpTemplate instanceof RabbitTemplate) {

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/inbound/AmqpInboundGateway.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public String getComponentType() {
182182
}
183183

184184
@Override
185-
protected void onInit() throws Exception {
185+
protected void onInit() {
186186
if (this.retryTemplate != null) {
187187
Assert.state(getErrorChannel() == null, "Cannot have an 'errorChannel' property when a 'RetryTemplate' is "
188188
+ "provided; use an 'ErrorMessageSendingRecoverer' in the 'recoveryCallback' property to "

spring-integration-core/src/main/java/org/springframework/integration/aggregator/AbstractCorrelatingMessageHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ public void setApplicationEventPublisher(ApplicationEventPublisher applicationEv
311311
}
312312

313313
@Override
314-
protected void onInit() throws Exception {
314+
protected void onInit() {
315315
super.onInit();
316316
Assert.state(!(this.discardChannelName != null && this.discardChannel != null),
317317
"'discardChannelName' and 'discardChannel' are mutually exclusive.");

spring-integration-core/src/main/java/org/springframework/integration/channel/AbstractMessageChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ public ManagementOverrides getOverrides() {
352352
}
353353

354354
@Override
355-
protected void onInit() throws Exception {
355+
protected void onInit() {
356356
super.onInit();
357357
if (this.messageConverter == null) {
358358
if (getBeanFactory() != null) {

spring-integration-core/src/main/java/org/springframework/integration/channel/DefaultHeaderChannelRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public final int size() {
118118
}
119119

120120
@Override
121-
protected void onInit() throws Exception {
121+
protected void onInit() {
122122
super.onInit();
123123
Assert.notNull(getTaskScheduler(), "a task scheduler is required");
124124
}

spring-integration-core/src/main/java/org/springframework/integration/channel/DirectChannel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -82,7 +82,7 @@ protected UnicastingDispatcher getDispatcher() {
8282
}
8383

8484
@Override
85-
protected void onInit() throws Exception {
85+
protected void onInit() {
8686
super.onInit();
8787
if (this.maxSubscribers == null) {
8888
Integer maxSubscribers = this.getIntegrationProperty(IntegrationProperties.CHANNELS_MAX_UNICAST_SUBSCRIBERS, Integer.class);

spring-integration-core/src/main/java/org/springframework/integration/channel/ExecutorChannel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -98,7 +98,7 @@ protected UnicastingDispatcher getDispatcher() {
9898
}
9999

100100
@Override
101-
public final void onInit() throws Exception {
101+
public final void onInit() {
102102
Assert.state(getDispatcher().getHandlerCount() == 0, "You cannot subscribe() until the channel "
103103
+ "bean is fully initialized by the framework. Do not subscribe in a @Bean definition");
104104
super.onInit();

spring-integration-core/src/main/java/org/springframework/integration/channel/PublishSubscribeChannel.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,9 @@ public void setMinSubscribers(int minSubscribers) {
126126

127127
/**
128128
* Callback method for initialization.
129-
* @throws Exception the exception.
130129
*/
131130
@Override
132-
public final void onInit() throws Exception {
131+
public final void onInit() {
133132
super.onInit();
134133
if (this.executor != null) {
135134
Assert.state(getDispatcher().getHandlerCount() == 0,

0 commit comments

Comments
 (0)