Skip to content

Commit 4ac3a79

Browse files
garyrussellartembilan
authored andcommitted
checkstyle FinalClassCheck
fixes fixModifiers after fixFinal Revert CachingSessionFactory Class is spied in tests. checkstyle - Import Rules checkstyle InterfaceIsType checkstyle InnerTypeLast checkstyle OneStatementPerLine CovariantEquals OneTopLevelClass * Revert `'\n'` -> `System.lineSeparator()` in the Gradle scripts to meet Git `autocrlf = true` on Windows * Fix timing issue with the `LastModifiedFileListFilterTests`, when the `age = 1` might not be enough for the file object when we have some delay before checking
1 parent 43af472 commit 4ac3a79

File tree

105 files changed

+738
-525
lines changed

Some content is hidden

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

105 files changed

+738
-525
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ subprojects { subproject ->
6464
apply plugin: 'jacoco'
6565
apply plugin: 'checkstyle'
6666

67+
apply from: "${rootDir}/src/checkstyle/fixFinal.gradle"
6768
apply from: "${rootDir}/src/checkstyle/fixHeaders.gradle"
6869
apply from: "${rootDir}/src/checkstyle/fixModifiers.gradle"
6970
apply from: "${rootDir}/src/checkstyle/fixThis.gradle"

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

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,59 @@ public void onInit() throws Exception {
201201
}
202202
}
203203

204+
/*
205+
* SmartLifecycle implementation (delegates to the MessageListener container)
206+
*/
207+
208+
@Override
209+
public boolean isAutoStartup() {
210+
return (this.container != null) && this.container.isAutoStartup();
211+
}
212+
213+
@Override
214+
public int getPhase() {
215+
return (this.container != null) ? this.container.getPhase() : 0;
216+
}
217+
218+
@Override
219+
public boolean isRunning() {
220+
return (this.container != null) && this.container.isRunning();
221+
}
222+
223+
@Override
224+
public void start() {
225+
if (this.container != null) {
226+
this.container.start();
227+
}
228+
}
229+
230+
@Override
231+
public void stop() {
232+
if (this.container != null) {
233+
this.container.stop();
234+
}
235+
}
236+
237+
@Override
238+
public void stop(Runnable callback) {
239+
if (this.container != null) {
240+
this.container.stop(callback);
241+
}
242+
}
243+
244+
@Override
245+
public void destroy() throws Exception {
246+
if (this.container != null) {
247+
this.container.destroy();
248+
}
249+
}
250+
204251
protected abstract AbstractDispatcher createDispatcher();
205252

206253
protected abstract String obtainQueueName(AmqpAdmin admin, String channelName);
207254

208255

209-
private static class DispatchingMessageListener implements MessageListener {
256+
private static final class DispatchingMessageListener implements MessageListener {
210257

211258
private final Log logger = LogFactory.getLog(this.getClass());
212259

@@ -283,52 +330,4 @@ protected Message<Object> buildMessage(org.springframework.amqp.core.Message mes
283330

284331
}
285332

286-
287-
/*
288-
* SmartLifecycle implementation (delegates to the MessageListener container)
289-
*/
290-
291-
@Override
292-
public boolean isAutoStartup() {
293-
return (this.container != null) && this.container.isAutoStartup();
294-
}
295-
296-
@Override
297-
public int getPhase() {
298-
return (this.container != null) ? this.container.getPhase() : 0;
299-
}
300-
301-
@Override
302-
public boolean isRunning() {
303-
return (this.container != null) && this.container.isRunning();
304-
}
305-
306-
@Override
307-
public void start() {
308-
if (this.container != null) {
309-
this.container.start();
310-
}
311-
}
312-
313-
@Override
314-
public void stop() {
315-
if (this.container != null) {
316-
this.container.stop();
317-
}
318-
}
319-
320-
@Override
321-
public void stop(Runnable callback) {
322-
if (this.container != null) {
323-
this.container.stop(callback);
324-
}
325-
}
326-
327-
@Override
328-
public void destroy() throws Exception {
329-
if (this.container != null) {
330-
this.container.destroy();
331-
}
332-
}
333-
334333
}

spring-integration-amqp/src/main/java/org/springframework/integration/amqp/outbound/AbstractAmqpOutboundEndpoint.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ else if (!ack && this.confirmNackChannel != null) {
431431
}
432432
}
433433

434-
protected static class CorrelationDataWrapper extends CorrelationData {
434+
protected static final class CorrelationDataWrapper extends CorrelationData {
435435

436436
private final Object userData;
437437

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @since 4.3
3131
*
3232
*/
33-
public class MappingUtils {
33+
public final class MappingUtils {
3434

3535
private MappingUtils() {
3636
super();

spring-integration-core/src/main/java/org/springframework/integration/annotation/GatewayHeader.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616

1717
package org.springframework.integration.annotation;
1818

19-
import static java.lang.annotation.RetentionPolicy.RUNTIME;
20-
2119
import java.lang.annotation.Retention;
20+
import java.lang.annotation.RetentionPolicy;
2221
import java.lang.annotation.Target;
2322

2423
/**
@@ -28,7 +27,7 @@
2827
* @since 4.0
2928
*/
3029
@Target({ })
31-
@Retention(RUNTIME)
30+
@Retention(RetentionPolicy.RUNTIME)
3231
public @interface GatewayHeader {
3332

3433
/**

spring-integration-core/src/main/java/org/springframework/integration/annotation/Poller.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014-2015 the original author or authors.
2+
* Copyright 2014-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.
@@ -16,9 +16,8 @@
1616

1717
package org.springframework.integration.annotation;
1818

19-
import static java.lang.annotation.RetentionPolicy.RUNTIME;
20-
2119
import java.lang.annotation.Retention;
20+
import java.lang.annotation.RetentionPolicy;
2221
import java.lang.annotation.Target;
2322

2423
import org.springframework.integration.scheduling.PollerMetadata;
@@ -43,7 +42,7 @@
4342
* @since 4.0
4443
*/
4544
@Target({})
46-
@Retention(RUNTIME)
45+
@Retention(RetentionPolicy.RUNTIME)
4746
public @interface Poller {
4847

4948
/**

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

Lines changed: 3 additions & 3 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.
@@ -108,7 +108,7 @@ private Pointcut buildPointcut() {
108108
}
109109

110110

111-
private static class MetaAnnotationMatchingPointcut implements Pointcut {
111+
private static final class MetaAnnotationMatchingPointcut implements Pointcut {
112112

113113
private final ClassFilter classFilter;
114114

@@ -168,7 +168,7 @@ public MethodMatcher getMethodMatcher() {
168168
}
169169

170170

171-
private static class MetaAnnotationMethodMatcher extends AnnotationMethodMatcher {
171+
private static final class MetaAnnotationMethodMatcher extends AnnotationMethodMatcher {
172172

173173
private final Class<? extends Annotation> annotationType;
174174

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public synchronized void run() {
226226
}
227227

228228

229-
private class MessageChannelWrapper {
229+
private final class MessageChannelWrapper {
230230

231231
private final MessageChannel channel;
232232

@@ -237,11 +237,11 @@ private MessageChannelWrapper(MessageChannel channel, long expireAt) {
237237
this.expireAt = expireAt;
238238
}
239239

240-
public final long getExpireAt() {
240+
public long getExpireAt() {
241241
return this.expireAt;
242242
}
243243

244-
public final MessageChannel getChannel() {
244+
public MessageChannel getChannel() {
245245
return this.channel;
246246
}
247247

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected Message<?> doReceive(long timeout) {
103103
return message;
104104
}
105105

106-
private static class SequenceFallbackComparator implements Comparator<Message<?>> {
106+
private static final class SequenceFallbackComparator implements Comparator<Message<?>> {
107107

108108
private final Comparator<Message<?>> targetComparator;
109109

@@ -136,7 +136,7 @@ public int compare(Message<?> message1, Message<?> message2) {
136136
}
137137

138138
//we need this because of INT-2508
139-
private class MessageWrapper implements Message<Object> {
139+
private final class MessageWrapper implements Message<Object> {
140140
private final Message<?> rootMessage;
141141
private final long sequence;
142142

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public void afterMessageHandled(Message<?> message, MessageChannel channel, Mess
9191
protected abstract void populatePropagatedContext(S state, Message<?> message, MessageChannel channel);
9292

9393

94-
private static class MessageWithThreadState<S> implements Message<Object> {
94+
private static final class MessageWithThreadState<S> implements Message<Object> {
9595

9696
private final Message<?> message;
9797

0 commit comments

Comments
 (0)