Skip to content

Commit 05cc7be

Browse files
committed
checkstyle WhiteAround
WhiteAroundCheck script
1 parent 842aded commit 05cc7be

File tree

508 files changed

+2029
-1918
lines changed

Some content is hidden

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

508 files changed

+2029
-1918
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ subprojects { subproject ->
6969
apply from: "${rootDir}/src/checkstyle/fixModifiers.gradle"
7070
apply from: "${rootDir}/src/checkstyle/fixThis.gradle"
7171
apply from: "${rootDir}/src/checkstyle/fixRightCurly.gradle"
72+
apply from: "${rootDir}/src/checkstyle/fixWhiteAround.gradle"
7273

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

spring-integration-amqp/src/test/java/org/springframework/integration/amqp/StubRabbitConnectionFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@ public int getMessageCount() {
331331
@Override
332332
public String getQueue() {
333333
return queue;
334-
}};
334+
}
335+
};
335336
}
336337

337338
@Override

spring-integration-amqp/src/test/java/org/springframework/integration/amqp/channel/ChannelTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
*/
6666
@ContextConfiguration
6767
@RunWith(SpringJUnit4ClassRunner.class)
68-
@DirtiesContext(classMode=ClassMode.AFTER_EACH_TEST_METHOD)
68+
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
6969
public class ChannelTests extends LogAdjustingTestSupport {
7070

7171
@ClassRule

spring-integration-amqp/src/test/java/org/springframework/integration/amqp/config/AmqpInboundGatewayParserTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 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.
@@ -102,7 +102,7 @@ public void verifyLifeCycle() {
102102

103103
@SuppressWarnings("rawtypes")
104104
@Test
105-
public void verifyUsageWithHeaderMapper() throws Exception{
105+
public void verifyUsageWithHeaderMapper() throws Exception {
106106
DirectChannel requestChannel = context.getBean("requestChannel", DirectChannel.class);
107107
requestChannel.subscribe(new MessageHandler() {
108108
@Override
@@ -129,8 +129,8 @@ public Object answer(InvocationOnMock invocation) {
129129
MessageProperties properties = amqpReplyMessage.getMessageProperties();
130130
assertEquals("bar", properties.getHeaders().get("bar"));
131131
return null;
132-
}})
133-
.when(amqpTemplate).send(Mockito.any(String.class), Mockito.any(String.class),
132+
}
133+
}).when(amqpTemplate).send(Mockito.any(String.class), Mockito.any(String.class),
134134
Mockito.any(Message.class), Mockito.any(CorrelationData.class));
135135
ReflectionUtils.setField(amqpTemplateField, gateway, amqpTemplate);
136136

@@ -166,6 +166,6 @@ public void testInt2971HeaderMapperAndMappedHeadersExclusivity() {
166166
}
167167
}
168168

169-
private static class TestConverter extends SimpleMessageConverter {}
169+
private static class TestConverter extends SimpleMessageConverter { }
170170

171171
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
*/
5252
@ContextConfiguration
5353
@RunWith(SpringJUnit4ClassRunner.class)
54-
@DirtiesContext(classMode=ClassMode.AFTER_EACH_TEST_METHOD)
54+
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
5555
public class AmqpOutboundEndpointTests {
5656

5757
@Rule

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public Object getCorrelationKey(Message<?> message) {
5656
}
5757

5858
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
59-
if (beanFactory != null){
59+
if (beanFactory != null) {
6060
this.processor.setBeanFactory(beanFactory);
6161
}
6262
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ protected void afterRelease(MessageGroup messageGroup, Collection<Message<?>> co
7777
int size = messageGroup.getMessages().size();
7878
int sequenceSize = 0;
7979
Message<?> message = messageGroup.getOne();
80-
if (message != null){
80+
if (message != null) {
8181
sequenceSize = new IntegrationMessageHeaderAccessor(message).getSequenceSize();
8282
}
8383
// If there is no sequence then it must be incomplete or unbounded
84-
if (sequenceSize > 0 && sequenceSize == size){
84+
if (sequenceSize > 0 && sequenceSize == size) {
8585
remove(messageGroup);
8686
}
8787
else {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class SequenceNumberComparator implements Comparator<Message<?>> {
3838
public int compare(Message<?> o1, Message<?> o2) {
3939
Integer sequenceNumber1 = new IntegrationMessageHeaderAccessor(o1).getSequenceNumber();
4040
Integer sequenceNumber2 = new IntegrationMessageHeaderAccessor(o2).getSequenceNumber();
41-
if (sequenceNumber1 == sequenceNumber2) {//NOSONAR - early exit optimization
41+
if (sequenceNumber1 == sequenceNumber2) { //NOSONAR - early exit optimization
4242
return 0;
4343
}
4444
if (sequenceNumber1 == null) {

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
@@ -88,13 +88,13 @@ public boolean canRelease(MessageGroup messageGroup) {
8888
else {
8989
int size = messages.size();
9090

91-
if (size == 0){
91+
if (size == 0) {
9292
canRelease = true;
9393
}
9494
else {
9595
int sequenceSize = new IntegrationMessageHeaderAccessor(messageGroup.getOne()).getSequenceSize();
9696
// If there is no sequence then it must be incomplete....
97-
if (sequenceSize == size){
97+
if (sequenceSize == size) {
9898
canRelease = true;
9999
}
100100
}

spring-integration-core/src/main/java/org/springframework/integration/aop/MessagePublishingInterceptor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2016 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.
@@ -142,7 +142,7 @@ public final Object invoke(final MethodInvocation invocation) throws Throwable {
142142
context.setVariable(PublisherMetadataSource.RETURN_VALUE_VARIABLE_NAME, returnValue);
143143
return returnValue;
144144
}
145-
catch (Throwable t) {//NOSONAR - rethrown below
145+
catch (Throwable t) { //NOSONAR - rethrown below
146146
context.setVariable(PublisherMetadataSource.EXCEPTION_VARIABLE_NAME, t);
147147
throw t;
148148
}
@@ -182,7 +182,7 @@ private void publishMessage(Method method, StandardEvaluationContext context) th
182182
}
183183
else {
184184
if (this.defaultChannelName != null) {
185-
synchronized(this) {
185+
synchronized (this) {
186186
if (this.defaultChannelName != null && this.messagingTemplate.getDefaultDestination() == null) {
187187
Assert.state(this.channelResolver != null,
188188
"ChannelResolver is required to resolve channel names.");

0 commit comments

Comments
 (0)