Skip to content

Commit 842aded

Browse files
garyrussellartembilan
authored andcommitted
checkstyle MutableException
checkstyle EmptyBlock checkstyle fixRightCurly Script checkstyle EmptyStatement checkstyle RightCurly checkstyle TailingWhite checkstyle NeedBraces Fix the line separator in the `fixRightCurly.gradle`
1 parent c0b19e6 commit 842aded

File tree

271 files changed

+1094
-821
lines changed

Some content is hidden

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

271 files changed

+1094
-821
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ subprojects { subproject ->
6868
apply from: "${rootDir}/src/checkstyle/fixHeaders.gradle"
6969
apply from: "${rootDir}/src/checkstyle/fixModifiers.gradle"
7070
apply from: "${rootDir}/src/checkstyle/fixThis.gradle"
71+
apply from: "${rootDir}/src/checkstyle/fixRightCurly.gradle"
7172

7273
if (project.hasProperty('platformVersion')) {
7374
apply plugin: 'spring-io'

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/support/AmqpHeaderMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/**
2424
* A convenience interface that extends {@link HeaderMapper}
2525
* but parameterized with {@link MessageProperties}.
26-
*
26+
*
2727
* @author Mark Fisher
2828
* @author Oleg Zhurakousky
2929
* @since 2.1

spring-integration-amqp/src/test/java/org/springframework/integration/amqp/outbound/AmqpOutboundEndpointTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public class AmqpOutboundEndpointTests {
9090
@Test
9191
public void testGatewayPublisherConfirms() throws Exception {
9292
while (this.amqpTemplateConfirms.receive(this.queue.getName()) != null) {
93-
;
93+
// drain
9494
}
9595

9696
Message<?> message = MessageBuilder.withPayload("hello")
@@ -119,7 +119,7 @@ public void testGatewayPublisherConfirms() throws Exception {
119119
assertEquals(Boolean.TRUE, ack.getHeaders().get(AmqpHeaders.PUBLISH_CONFIRM));
120120

121121
while (this.amqpTemplateConfirms.receive(this.queue.getName()) != null) {
122-
;
122+
// drain
123123
}
124124
}
125125

@@ -149,7 +149,7 @@ public void adapterWithContentType() throws Exception {
149149
RabbitTemplate template = new RabbitTemplate(this.connectionFactory);
150150
template.setQueue(this.queue.getName());
151151
while (template.receive() != null) {
152-
;
152+
// drain
153153
}
154154
Message<?> message = MessageBuilder.withPayload("hello")
155155
.setHeader(AmqpHeaders.CONTENT_TYPE, "application/json")
@@ -169,7 +169,7 @@ public void adapterWithContentType() throws Exception {
169169
assertEquals("hello", new String(m.getBody(), "UTF-8"));
170170
assertEquals("text/plain", m.getMessageProperties().getContentType());
171171
while (template.receive() != null) {
172-
;
172+
// drain
173173
}
174174
}
175175

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ public Message<Object> receive() {
126126
if (log.isDebugEnabled()) {
127127
log.debug(String.format("Released message for key [%s]: %s.", key, nextMessage));
128128
}
129-
} else {
129+
}
130+
else {
130131
remove(key);
131132
}
132133
@SuppressWarnings("unchecked")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* This implementation of MessageGroupProcessor will take the messages from the
3030
* MessageGroup and pass them on in a single message with a Collection as a payload.
31-
*
31+
*
3232
* @author Iwein Fuld
3333
* @author Alexander Peters
3434
* @author Mark Fisher

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/**
2222
* A {@link ReleaseStrategy} that evaluates an expression.
23-
*
23+
*
2424
* @author Dave Syer
2525
*/
2626
public class ExpressionEvaluatingReleaseStrategy extends ExpressionEvaluatingMessageListProcessor implements
Lines changed: 57 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,57 @@
1-
/*
2-
* Copyright 2002-2016 the original author or authors.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
16-
17-
package org.springframework.integration.aggregator;
18-
19-
import org.springframework.integration.store.MessageGroup;
20-
21-
/**
22-
* A {@link ReleaseStrategy} that releases only the first <code>n</code> messages, where <code>n</code> is a threshold.
23-
*
24-
* @author Dave Syer
25-
* @author Oleg Zhurakousky
26-
*
27-
*/
28-
public class MessageCountReleaseStrategy implements ReleaseStrategy {
29-
30-
private final int threshold;
31-
32-
/**
33-
* @param threshold the number of messages to accept before releasing
34-
*/
35-
public MessageCountReleaseStrategy(int threshold) {
36-
super();
37-
this.threshold = threshold;
38-
}
39-
40-
/**
41-
* Convenient constructor is only one message is required (threshold=1).
42-
*/
43-
public MessageCountReleaseStrategy() {
44-
this(1);
45-
}
46-
47-
/**
48-
* Release the group if it has more messages than the threshold and has not previously been released.
49-
* It is possible that more messages than the threshold could be released, but only if multiple consumers
50-
* receive messages from the same group concurrently.
51-
*/
52-
public boolean canRelease(MessageGroup group) {
53-
return group.size() >= this.threshold;
54-
}
55-
56-
}
1+
/*
2+
* Copyright 2002-2016 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.springframework.integration.aggregator;
18+
19+
import org.springframework.integration.store.MessageGroup;
20+
21+
/**
22+
* A {@link ReleaseStrategy} that releases only the first <code>n</code> messages, where <code>n</code> is a threshold.
23+
*
24+
* @author Dave Syer
25+
* @author Oleg Zhurakousky
26+
*
27+
*/
28+
public class MessageCountReleaseStrategy implements ReleaseStrategy {
29+
30+
private final int threshold;
31+
32+
/**
33+
* @param threshold the number of messages to accept before releasing
34+
*/
35+
public MessageCountReleaseStrategy(int threshold) {
36+
super();
37+
this.threshold = threshold;
38+
}
39+
40+
/**
41+
* Convenient constructor is only one message is required (threshold=1).
42+
*/
43+
public MessageCountReleaseStrategy() {
44+
this(1);
45+
}
46+
47+
/**
48+
* Release the group if it has more messages than the threshold and has not previously been released.
49+
* It is possible that more messages than the threshold could be released, but only if multiple consumers
50+
* receive messages from the same group concurrently.
51+
*/
52+
@Override
53+
public boolean canRelease(MessageGroup group) {
54+
return group.size() >= this.threshold;
55+
}
56+
57+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/**
2424
* Strategy for determining when a group of messages reaches a state of
2525
* completion (i.e. can trip a barrier).
26-
*
26+
*
2727
* @author Mark Fisher
2828
* @author Dave Syer
2929
*/

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ public boolean canRelease(MessageGroup messageGroup) {
8181
int nextSequenceNumber = new IntegrationMessageHeaderAccessor(minMessage).getSequenceNumber();
8282
int lastReleasedMessageSequence = messageGroup.getLastReleasedMessageSequenceNumber();
8383

84-
if (nextSequenceNumber - lastReleasedMessageSequence == 1){
85-
canRelease = true;;
84+
if (nextSequenceNumber - lastReleasedMessageSequence == 1) {
85+
canRelease = true;
8686
}
8787
}
8888
else {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121

2222
/**
2323
* A {@link ReleaseStrategy} that releases all messages if any of the following is true:
24-
*
24+
*
2525
* <ul>
2626
* <li>The sequence is complete (if there is one).</li>
2727
* <li>There are more messages than a threshold set by the user.</li>
2828
* <li>The time elapsed since the earliest message, according to their timestamps, exceeds a timeout set by the user.</li>
2929
* </ul>
30-
*
30+
*
3131
* @author Dave Syer
32-
*
32+
*
3333
* @since 2.0
3434
*/
3535
public class TimeoutCountSequenceSizeReleaseStrategy implements ReleaseStrategy {

0 commit comments

Comments
 (0)