Skip to content

Commit 57f96bb

Browse files
garyrussellartembilan
authored andcommitted
checkstyle Misc Rules
checkstyle Nesting checkstyle GenericWhitespace checkstyle MethodParamPad checkstyle NoWhiteSpace checkstyle ParenPad Script checkstyle ParenPad
1 parent 05cc7be commit 57f96bb

File tree

87 files changed

+744
-635
lines changed

Some content is hidden

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

87 files changed

+744
-635
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ subprojects { subproject ->
7070
apply from: "${rootDir}/src/checkstyle/fixThis.gradle"
7171
apply from: "${rootDir}/src/checkstyle/fixRightCurly.gradle"
7272
apply from: "${rootDir}/src/checkstyle/fixWhiteAround.gradle"
73+
apply from: "${rootDir}/src/checkstyle/fixParenPad.gradle"
7374

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

spring-integration-core/src/main/java/org/springframework/integration/annotation/Payloads.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-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.
@@ -33,7 +33,7 @@
3333
* @author Dave Syer
3434
* @since 2.0
3535
*/
36-
@Target( { ElementType.PARAMETER, ElementType.METHOD })
36+
@Target({ ElementType.PARAMETER, ElementType.METHOD })
3737
@Retention(RetentionPolicy.RUNTIME)
3838
@Documented
3939
public @interface Payloads {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public abstract class AbstractMessageSourceAdvice implements MethodInterceptor {
3535
public final Object invoke(MethodInvocation invocation) throws Throwable {
3636
Object target = invocation.getThis();
3737
if (!(target instanceof MessageSource)
38-
|| invocation.getMethod().getName() != "receive") {
38+
|| !invocation.getMethod().getName().equals("receive")) {
3939
return invocation.proceed();
4040
}
4141

spring-integration-core/src/main/java/org/springframework/integration/config/xml/AnnotationConfigParser.java

Lines changed: 3 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-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.
@@ -36,12 +36,13 @@
3636
*/
3737
public class AnnotationConfigParser implements BeanDefinitionParser {
3838

39+
@Override
3940
public BeanDefinition parse(final Element element, ParserContext parserContext) {
4041
new IntegrationRegistrar().registerBeanDefinitions(new StandardAnnotationMetadata(Object.class) {
4142

4243
@Override
4344
public Map<String, Object> getAnnotationAttributes(String annotationType) {
44-
return Collections.<String, Object> singletonMap("value", element.getAttribute("default-publisher-channel"));
45+
return Collections.<String, Object>singletonMap("value", element.getAttribute("default-publisher-channel"));
4546
}
4647
}, parserContext.getRegistry());
4748

spring-integration-core/src/main/java/org/springframework/integration/history/MessageHistoryConfigurer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public void setComponentNamePatternsSet(Set<String> componentNamePatternsSet) {
119119
Assert.notNull(componentNamePatternsSet, "'componentNamePatternsSet' must not be null");
120120
Assert.state(!this.running, "'componentNamePatternsSet' cannot be changed without invoking stop() first");
121121
for (String s : componentNamePatternsSet) {
122-
String[] componentNamePatterns = StringUtils.delimitedListToStringArray(s, "," , " ");
122+
String[] componentNamePatterns = StringUtils.delimitedListToStringArray(s, ",", " ");
123123
Arrays.sort(componentNamePatterns);
124124
if (this.componentNamePatternsExplicitlySet
125125
&& !Arrays.equals(this.componentNamePatterns, componentNamePatterns)) {

spring-integration-core/src/main/java/org/springframework/integration/store/AbstractMessageGroupStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public int getMessageCountForAllMessageGroups() {
159159
public int getMessageGroupCount() {
160160
int count = 0;
161161
for (@SuppressWarnings("unused") MessageGroup group : this) {
162-
count ++;
162+
count++;
163163
}
164164
return count;
165165
}

spring-integration-core/src/main/java/org/springframework/integration/store/SimpleMessageGroup.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class SimpleMessageGroup implements MessageGroup {
5353
private volatile boolean complete;
5454

5555
public SimpleMessageGroup(Object groupId) {
56-
this(Collections.<Message<?>> emptyList(), groupId);
56+
this(Collections.<Message<?>>emptyList(), groupId);
5757
}
5858

5959
public SimpleMessageGroup(Collection<? extends Message<?>> messages, Object groupId) {
@@ -90,6 +90,7 @@ public long getTimestamp() {
9090
return this.timestamp;
9191
}
9292

93+
@Override
9394
public void setLastModified(long lastModified) {
9495
this.lastModified = lastModified;
9596
}
@@ -104,10 +105,12 @@ public boolean canAdd(Message<?> message) {
104105
return true;
105106
}
106107

108+
@Override
107109
public void add(Message<?> messageToAdd) {
108110
addMessage(messageToAdd);
109111
}
110112

113+
@Override
111114
public boolean remove(Message<?> message) {
112115
return this.messages.remove(message);
113116
}
@@ -126,6 +129,7 @@ public Collection<Message<?>> getMessages() {
126129
return Collections.unmodifiableCollection(this.messages);
127130
}
128131

132+
@Override
129133
public void setLastReleasedMessageSequenceNumber(int sequenceNumber) {
130134
this.lastReleasedMessageSequence = sequenceNumber;
131135
}
@@ -166,6 +170,7 @@ public Message<?> getOne() {
166170
}
167171
}
168172

173+
@Override
169174
public void clear() {
170175
this.messages.clear();
171176
}

spring-integration-core/src/main/java/org/springframework/integration/store/SimpleMessageGroupFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public SimpleMessageGroupFactory(GroupType type) {
4545

4646
@Override
4747
public MessageGroup create(Object groupId) {
48-
return create(Collections.<Message<?>> emptyList(), groupId);
48+
return create(Collections.<Message<?>>emptyList(), groupId);
4949
}
5050

5151
@Override

spring-integration-core/src/main/java/org/springframework/integration/support/IdGenerators.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ public class IdGenerators {
3737
*/
3838
public static class JdkIdGenerator implements IdGenerator {
3939

40-
@Override
41-
public UUID generateId() {
42-
return UUID.randomUUID();
43-
}
40+
@Override
41+
public UUID generateId() {
42+
return UUID.randomUUID();
43+
}
4444

45-
}
45+
}
4646

4747
/**
4848
* Based on the two {@link AtomicLong}s, for {@code topBits} and {@code bottomBits},
@@ -59,23 +59,23 @@ public UUID generateId() {
5959
* is initialized. Therefore, it is not suitable when persisting messages based on their ID; it should
6060
* only be used when the absolute best performance is required and messages are not persisted.
6161
*/
62-
public static class SimpleIncrementingIdGenerator implements IdGenerator {
62+
public static class SimpleIncrementingIdGenerator implements IdGenerator {
6363

64-
private final AtomicLong topBits = new AtomicLong();
64+
private final AtomicLong topBits = new AtomicLong();
6565

66-
private final AtomicLong bottomBits = new AtomicLong();
66+
private final AtomicLong bottomBits = new AtomicLong();
6767

68-
@Override
69-
public UUID generateId() {
70-
long bottomBits = this.bottomBits.incrementAndGet();
71-
if (bottomBits == 0) {
72-
return new UUID(this.topBits.incrementAndGet(), bottomBits);
73-
}
74-
else {
75-
return new UUID(this.topBits.get(), bottomBits);
76-
}
77-
}
68+
@Override
69+
public UUID generateId() {
70+
long bottomBits = this.bottomBits.incrementAndGet();
71+
if (bottomBits == 0) {
72+
return new UUID(this.topBits.incrementAndGet(), bottomBits);
73+
}
74+
else {
75+
return new UUID(this.topBits.get(), bottomBits);
76+
}
77+
}
7878

79-
}
79+
}
8080

8181
}

spring-integration-core/src/main/java/org/springframework/integration/support/json/AbstractJacksonJsonObjectMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public abstract class AbstractJacksonJsonObjectMapper<N, P, J> extends JsonObjec
4242
implements BeanClassLoaderAware {
4343

4444
protected static final Collection<Class<?>> supportedJsonTypes =
45-
Arrays.<Class<?>> asList(String.class, byte[].class, File.class, URL.class, InputStream.class, Reader.class);
45+
Arrays.<Class<?>>asList(String.class, byte[].class, File.class, URL.class, InputStream.class, Reader.class);
4646

4747
private volatile ClassLoader classLoader = ClassUtils.getDefaultClassLoader();
4848

0 commit comments

Comments
 (0)