Checkstyle - Phase I - Unused Imports

I copied the checkstyle config from spring-boot and commented
out most of the rules.

Over time, we should uncomment each rule and fix violations.
This commit is contained in:
Gary Russell
2016-03-04 15:47:08 -05:00
parent 15026062ac
commit 5fe827a3dd
32 changed files with 236 additions and 87 deletions

View File

@@ -57,6 +57,7 @@ subprojects { subproject ->
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
if (project.hasProperty('platformVersion')) {
apply plugin: 'spring-io'
@@ -238,12 +239,16 @@ subprojects { subproject ->
from javadoc
}
checkstyle {
configFile = new File(rootDir, "src/checkstyle/checkstyle.xml")
}
artifacts {
archives sourcesJar
archives javadocJar
}
build.dependsOn jacocoTestReport
build.dependsOn jacocoTestReport, check
}
project('spring-integration-test') {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
package org.springframework.integration.config;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanClassLoaderAware;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
@@ -30,7 +29,6 @@ import org.springframework.integration.endpoint.SourcePollingChannelAdapter;
import org.springframework.integration.scheduling.PollerMetadata;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.core.BeanFactoryMessageChannelDestinationResolver;
import org.springframework.messaging.core.DestinationResolutionException;
import org.springframework.messaging.core.DestinationResolver;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
@@ -138,6 +136,7 @@ public class SourcePollingChannelAdapterFactoryBean implements FactoryBean<Sourc
initializeAdapter();
}
@Override
public SourcePollingChannelAdapter getObject() throws Exception {
if (this.adapter == null) {
initializeAdapter();
@@ -145,10 +144,12 @@ public class SourcePollingChannelAdapterFactoryBean implements FactoryBean<Sourc
return this.adapter;
}
@Override
public Class<?> getObjectType() {
return SourcePollingChannelAdapter.class;
}
@Override
public boolean isSingleton() {
return true;
}
@@ -203,30 +204,36 @@ public class SourcePollingChannelAdapterFactoryBean implements FactoryBean<Sourc
* SmartLifecycle implementation (delegates to the created adapter)
*/
@Override
public boolean isAutoStartup() {
return (this.adapter == null) || this.adapter.isAutoStartup();
}
@Override
public int getPhase() {
return (this.adapter != null) ? this.adapter.getPhase() : 0;
}
@Override
public boolean isRunning() {
return (this.adapter != null) && this.adapter.isRunning();
}
@Override
public void start() {
if (this.adapter != null) {
this.adapter.start();
}
}
@Override
public void stop() {
if (this.adapter != null) {
this.adapter.stop();
}
}
@Override
public void stop(Runnable callback) {
if (this.adapter != null) {
this.adapter.stop(callback);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,7 +16,6 @@
package org.springframework.integration.filter;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.context.Lifecycle;
import org.springframework.integration.MessageRejectedException;
@@ -24,7 +23,6 @@ import org.springframework.integration.core.MessageSelector;
import org.springframework.integration.handler.AbstractReplyProducingPostProcessingMessageHandler;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.core.DestinationResolutionException;
import org.springframework.util.Assert;
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,6 @@ import org.springframework.core.convert.ConversionService;
import org.springframework.integration.support.DefaultMessageBuilderFactory;
import org.springframework.integration.support.MessageBuilderFactory;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**
* General utility methods.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
package org.springframework.integration.util;
import java.util.Iterator;
import java.util.NoSuchElementException;
/**
* An {@link Iterator} implementation to convert each item from the target

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,32 +25,25 @@ import static org.junit.Assert.assertTrue;
import static org.mockito.BDDMockito.willThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.core.task.SimpleAsyncTaskExecutor;
import org.springframework.core.task.SyncTaskExecutor;
import org.springframework.integration.dispatcher.RoundRobinLoadBalancingStrategy;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.MessageDeliveryException;
import org.springframework.messaging.MessageHandler;
import org.springframework.integration.dispatcher.RoundRobinLoadBalancingStrategy;
import org.springframework.messaging.support.ChannelInterceptorAdapter;
import org.springframework.messaging.support.ExecutorChannelInterceptor;
import org.springframework.messaging.support.GenericMessage;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.scheduling.concurrent.ConcurrentTaskExecutor;
import org.springframework.scheduling.concurrent.CustomizableThreadFactory;
@@ -233,6 +226,7 @@ public class ExecutorChannelTests {
this.latch = latch;
}
@Override
public void handleMessage(Message<?> message) {
this.thread = Thread.currentThread();
if (this.shouldFail) {
@@ -246,7 +240,7 @@ public class ExecutorChannelTests {
private static class BeforeHandleInterceptor extends ChannelInterceptorAdapter
implements ExecutorChannelInterceptor {
private AtomicInteger counter = new AtomicInteger();
private final AtomicInteger counter = new AtomicInteger();
private volatile boolean afterHandledInvoked;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,6 @@ import static org.junit.Assert.assertTrue;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import org.junit.Before;
import org.junit.Test;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertSame;
import static org.mockito.Mockito.mock;
import org.junit.Test;
import org.mockito.Mockito;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.integration.IntegrationMessageHeaderAccessor;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,6 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat;
@@ -62,7 +61,6 @@ import org.springframework.integration.annotation.MessagingGateway;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.integration.config.EnableIntegration;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.integration.support.utils.IntegrationUtils;
import org.springframework.integration.test.util.TestUtils;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,12 +19,11 @@ package org.springframework.integration.message;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicInteger;
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
import org.springframework.messaging.Message;
/**
* Factory for handler beans that are useful for testing.
*
*
* @author Mark Fisher
*/
@SuppressWarnings("unused")

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,10 +24,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.integration.endpoint.AbstractEndpoint;
import org.springframework.integration.filter.*;
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
import org.springframework.integration.handler.advice.AbstractRequestHandlerAdvice;
import org.springframework.integration.support.MessageBuilder;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,8 +17,6 @@
package org.springframework.integration.file.config;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -28,7 +26,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.integration.endpoint.EventDrivenConsumer;
import org.springframework.integration.file.transformer.FileToStringTransformer;
import org.springframework.integration.support.MessageBuilderFactory;
import org.springframework.integration.transformer.MessageTransformingHandler;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

View File

@@ -17,7 +17,6 @@
package org.springframework.integration.ftp.outbound;
import static org.hamcrest.Matchers.anyOf;
import static org.hamcrest.Matchers.contains;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;

View File

@@ -21,7 +21,6 @@ import java.io.IOException;
import java.io.OutputStream;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@@ -20,8 +20,8 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
import org.springframework.messaging.MessageHandler;
import org.springframework.messaging.MessagingException;
import org.springframework.messaging.SubscribableChannel;
import org.springframework.messaging.support.ErrorMessage;
import org.springframework.test.annotation.DirtiesContext;
@@ -29,7 +29,6 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.gemstone.gemfire.cache.EntryEvent;
import com.gemstone.gemfire.internal.cache.DistributedRegion;
import com.gemstone.gemfire.internal.cache.LocalRegion;
/**
@@ -88,6 +87,7 @@ public class GemfireInboundChannelAdapterTests {
@Test
public void testErrorChannel() {
channel3.subscribe(new MessageHandler() {
@Override
public void handleMessage(Message<?> message) throws MessagingException {
throw new MessagingException("got an error");
}
@@ -104,6 +104,7 @@ public class GemfireInboundChannelAdapterTests {
public int count = 0;
@Override
public void handleMessage(Message<?> message) throws MessagingException {
assertTrue(message instanceof ErrorMessage);
count++;
@@ -115,6 +116,7 @@ public class GemfireInboundChannelAdapterTests {
public Object event = null;
@Override
public void handleMessage(Message<?> message) throws MessagingException {
event = message.getPayload();
}

View File

@@ -27,7 +27,6 @@ import static org.junit.Assert.fail;
import org.codehaus.groovy.control.CompilerConfiguration;
import org.codehaus.groovy.control.MultipleCompilationErrorsException;
import org.codehaus.groovy.control.customizers.ASTTransformationCustomizer;
import org.codehaus.groovy.control.customizers.ImportCustomizer;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -52,8 +51,6 @@ import org.springframework.stereotype.Component;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import groovy.transform.CompileStatic;
/**
* @author Mark Fisher
* @author Artem Bilan

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2015 the original author or authors.
* Copyright 2013-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,7 +26,6 @@ import javax.servlet.http.HttpServletResponse;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,7 +35,6 @@ import org.junit.runner.RunWith;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.parsing.BeanDefinitionParsingException;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.http.HttpHeaders;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
package org.springframework.integration.jdbc;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.HashMap;
@@ -79,6 +78,7 @@ public class AggregatorIntegrationTests {
@SuppressWarnings("unused")
private static class ExceptionMessageHandler implements MessageHandler {
@Override
public void handleMessage(Message<?> message) throws MessagingException {
TransactionSynchronizationManager.registerSynchronization(new RollbackTxSync());
throw new RuntimeException("intentional");

View File

@@ -40,7 +40,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.integration.jdbc.config.JdbcTypesEnum;
import org.springframework.integration.jdbc.storedproc.User;
import org.springframework.integration.support.MessageBuilder;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,6 @@ import org.springframework.integration.core.MessageSource;
import org.springframework.integration.jms.util.JmsAdapterUtils;
import org.springframework.integration.support.AbstractIntegrationMessageBuilder;
import org.springframework.jms.core.JmsTemplate;
import org.springframework.jms.support.converter.MessageConverter;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessagingException;
import org.springframework.util.Assert;

View File

@@ -22,8 +22,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
import javax.jms.JMSException;
import org.apache.log4j.Level;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
@@ -34,7 +32,6 @@ import org.springframework.context.ApplicationContext;
import org.springframework.integration.core.MessagingTemplate;
import org.springframework.integration.jms.ChannelPublishingJmsMessageListener;
import org.springframework.integration.jms.JmsOutboundGateway;
import org.springframework.integration.test.rule.Log4jLevelAdjuster;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.MessageHandler;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015 the original author or authors.
* Copyright 2015-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,12 +43,10 @@ import org.springframework.integration.core.MessagingTemplate;
import org.springframework.integration.endpoint.AbstractMessageSource;
import org.springframework.integration.handler.AbstractReplyProducingMessageHandler;
import org.springframework.integration.support.management.DefaultMessageChannelMetrics;
import org.springframework.integration.support.management.DefaultMessageHandlerMetrics;
import org.springframework.integration.support.management.MetricsContext;
import org.springframework.integration.test.util.TestUtils;
import org.springframework.messaging.Message;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.annotation.Repeat;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,7 +27,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.serializer.JdkSerializationRedisSerializer;
import org.springframework.data.redis.serializer.StringRedisSerializer;
import org.springframework.integration.channel.DirectChannel;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2007-2015 the original author or authors
* Copyright 2007-2016 the original author or authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,8 +34,6 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,14 +18,9 @@ package org.springframework.integration.security.config;
import static org.hamcrest.Matchers.instanceOf;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.Executors;
import org.junit.After;
@@ -39,23 +34,18 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;
import org.springframework.integration.annotation.BridgeTo;
import org.springframework.integration.annotation.Poller;
import org.springframework.integration.annotation.ServiceActivator;
import org.springframework.integration.channel.ChannelInterceptorAware;
import org.springframework.integration.channel.DirectChannel;
import org.springframework.integration.channel.ExecutorChannel;
import org.springframework.integration.channel.QueueChannel;
import org.springframework.integration.config.EnableIntegration;
import org.springframework.integration.config.GlobalChannelInterceptor;
import org.springframework.integration.router.RecipientListRouter;
import org.springframework.integration.security.SecurityTestUtils;
import org.springframework.integration.security.TestHandler;
import org.springframework.integration.security.channel.ChannelSecurityInterceptor;
import org.springframework.integration.security.channel.SecuredChannel;
import org.springframework.integration.security.channel.SecurityContextPropagationChannelInterceptor;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.MessageHandler;
import org.springframework.messaging.MessageHandlingException;
import org.springframework.messaging.PollableChannel;
import org.springframework.messaging.SubscribableChannel;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,6 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.nio.ByteBuffer;
import java.util.Collections;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -71,7 +70,6 @@ import org.springframework.messaging.MessageHandler;
import org.springframework.messaging.PollableChannel;
import org.springframework.messaging.handler.annotation.MessageExceptionHandler;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.messaging.simp.annotation.SendToUser;
import org.springframework.messaging.simp.annotation.SubscribeMapping;
import org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler;
@@ -86,7 +84,6 @@ import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.MultiValueMap;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.client.WebSocketClient;
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,8 +41,8 @@ import org.springframework.integration.core.MessageProducer;
import org.springframework.integration.test.util.TestUtils;
import org.springframework.integration.websocket.ClientWebSocketContainer;
import org.springframework.integration.websocket.IntegrationWebSocketContainer;
import org.springframework.integration.websocket.TomcatWebSocketTestServer;
import org.springframework.integration.websocket.TestServerConfig;
import org.springframework.integration.websocket.TomcatWebSocketTestServer;
import org.springframework.integration.websocket.support.SubProtocolHandlerRegistry;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
@@ -54,7 +54,6 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.client.WebSocketClient;
import org.springframework.web.socket.client.jetty.JettyWebSocketClient;
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import org.springframework.web.socket.messaging.StompSubProtocolHandler;
import org.springframework.web.socket.messaging.SubProtocolHandler;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,8 +36,8 @@ import org.springframework.integration.channel.QueueChannel;
import org.springframework.integration.config.EnableIntegration;
import org.springframework.integration.websocket.ClientWebSocketContainer;
import org.springframework.integration.websocket.IntegrationWebSocketContainer;
import org.springframework.integration.websocket.TomcatWebSocketTestServer;
import org.springframework.integration.websocket.TestServerConfig;
import org.springframework.integration.websocket.TomcatWebSocketTestServer;
import org.springframework.integration.websocket.support.SubProtocolHandlerRegistry;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageHandler;
@@ -48,7 +48,6 @@ import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.web.socket.client.WebSocketClient;
import org.springframework.web.socket.client.jetty.JettyWebSocketClient;
import org.springframework.web.socket.client.standard.StandardWebSocketClient;
import org.springframework.web.socket.messaging.StompSubProtocolHandler;
import org.springframework.web.socket.messaging.SubProtocolHandler;

View File

@@ -0,0 +1,17 @@
^\Q/*\E$
^\Q * Copyright \E20\d\d\-20\d\d\Q the original author or authors.\E$
^\Q *\E$
^\Q * Licensed under the Apache License, Version 2.0 (the "License");\E$
^\Q * you may not use this file except in compliance with the License.\E$
^\Q * You may obtain a copy of the License at\E$
^\Q *\E$
^\Q * http://www.apache.org/licenses/LICENSE-2.0\E$
^\Q *\E$
^\Q * Unless required by applicable law or agreed to in writing, software\E$
^\Q * distributed under the License is distributed on an "AS IS" BASIS,\E$
^\Q * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\E$
^\Q * See the License for the specific language governing permissions and\E$
^\Q * limitations under the License.\E$
^\Q */\E$
^$
^.*$

View File

@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
</suppressions>

View File

@@ -0,0 +1,165 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<!-- Root Checks -->
<!-- <module name="RegexpHeader"> -->
<!-- <property name="headerFile" value="${checkstyle.header.file}" /> -->
<!-- <property name="fileExtensions" value="java" /> -->
<!-- </module> -->
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf"/>
</module>
<!-- TreeWalker Checks -->
<module name="TreeWalker">
<!-- Annotations -->
<!-- <module name="AnnotationUseStyle"> -->
<!-- <property name="elementStyle" value="compact" /> -->
<!-- </module> -->
<!-- <module name="MissingOverride" /> -->
<!-- <module name="PackageAnnotation" /> -->
<!-- <module name="AnnotationLocation"> -->
<!-- <property name="allowSamelineSingleParameterlessAnnotation" -->
<!-- value="false" /> -->
<!-- </module> -->
<!-- Block Checks -->
<!-- <module name="EmptyBlock"> -->
<!-- <property name="option" value="text" /> -->
<!-- </module> -->
<!-- <module name="LeftCurly" /> -->
<!-- <module name="RightCurly"> -->
<!-- <property name="option" value="alone" /> -->
<!-- </module> -->
<!-- <module name="NeedBraces" /> -->
<!-- <module name="AvoidNestedBlocks" /> -->
<!-- Class Design -->
<!-- <module name="FinalClass" /> -->
<!-- <module name="InterfaceIsType" /> -->
<!-- <module name="HideUtilityClassConstructor" /> -->
<!-- <module name="MutableException" /> -->
<!-- <module name="InnerTypeLast" /> -->
<!-- <module name="OneTopLevelClass" /> -->
<!-- Coding -->
<!-- <module name="CovariantEquals" /> -->
<!-- <module name="EmptyStatement" /> -->
<!-- <module name="EqualsHashCode" /> -->
<!-- <module name="InnerAssignment" /> -->
<!-- <module name="SimplifyBooleanExpression" /> -->
<!-- <module name="SimplifyBooleanReturn" /> -->
<!-- <module name="StringLiteralEquality" /> -->
<!-- <module name="NestedForDepth"> -->
<!-- <property name="max" value="3" /> -->
<!-- </module> -->
<!-- <module name="NestedIfDepth"> -->
<!-- <property name="max" value="3" /> -->
<!-- </module> -->
<!-- <module name="NestedTryDepth"> -->
<!-- <property name="max" value="3" /> -->
<!-- </module> -->
<!-- <module name="MultipleVariableDeclarations" /> -->
<!-- <module name="RequireThis"> -->
<!-- <property name="checkMethods" value="false" /> -->
<!-- </module> -->
<!-- <module name="OneStatementPerLine" /> -->
<!-- Imports -->
<!-- <module name="AvoidStarImport" /> -->
<!-- <module name="AvoidStaticImport"> -->
<!-- <property name="excludes" -->
<!-- value="org.assertj.core.api.Assertions.*, org.junit.Assert.*, org.junit.Assume.*, org.junit.internal.matchers.ThrowableMessageMatcher.*, org.hamcrest.CoreMatchers.*, org.hamcrest.Matchers.*, org.springframework.boot.configurationprocessor.ConfigurationMetadataMatchers.*, org.springframework.boot.configurationprocessor.TestCompiler.*, org.mockito.Mockito.*, org.mockito.BDDMockito.*, org.mockito.Matchers.*, org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*, org.springframework.test.web.servlet.result.MockMvcResultMatchers.*, org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.*, org.springframework.security.test.web.servlet.setup.SecurityMockMvcConfigurers.*, org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo" /> -->
<!-- </module> -->
<!-- <module name="IllegalImport" /> -->
<!-- <module name="RedundantImport" /> -->
<module name="UnusedImports">
<property name="processJavadoc" value="true" />
</module>
<!-- <module name="ImportOrder"> -->
<!-- <property name="groups" value="java,/^javax?\./,*,org.springframework" /> -->
<!-- <property name="ordered" value="true" /> -->
<!-- <property name="separated" value="true" /> -->
<!-- <property name="option" value="bottom" /> -->
<!-- <property name="sortStaticImportsAlphabetically" value="true" /> -->
<!-- </module> -->
<!-- Javadoc Comments -->
<!-- <module name="JavadocType"> -->
<!-- <property name="scope" value="package"/> -->
<!-- <property name="authorFormat" value=".+\s.+"/> -->
<!-- </module> -->
<!-- <module name="JavadocMethod"> -->
<!-- <property name="allowMissingJavadoc" value="true" /> -->
<!-- </module> -->
<!-- <module name="JavadocVariable"> -->
<!-- <property name="scope" value="public"/> -->
<!-- </module> -->
<!-- <module name="JavadocStyle"> -->
<!-- <property name="checkEmptyJavadoc" value="true"/> -->
<!-- </module> -->
<!-- <module name="NonEmptyAtclauseDescription" /> -->
<!-- <module name="JavadocTagContinuationIndentation"> -->
<!-- <property name="offset" value="0"/> -->
<!-- </module> -->
<!-- <module name="AtclauseOrder"> -->
<!-- <property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF"/> -->
<!-- <property name="tagOrder" value="@param, @author, @since, @see, @version, @serial, @deprecated"/> -->
<!-- </module> -->
<!-- <module name="AtclauseOrder"> -->
<!-- <property name="target" value="METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/> -->
<!-- <property name="tagOrder" value="@param, @return, @throws, @since, @deprecated, @see"/> -->
<!-- </module> -->
<!-- Miscellaneous -->
<!-- <module name="CommentsIndentation" /> -->
<!-- <module name="UpperEll" /> -->
<!-- <module name="ArrayTypeStyle" /> -->
<!-- <module name="OuterTypeFilename" /> -->
<!-- Modifiers -->
<!-- <module name="RedundantModifier" /> -->
<!-- Regexp -->
<!-- <module name="RegexpSinglelineJava"> -->
<!-- <property name="format" value="^\t* +\t*\S" /> -->
<!-- <property name="message" -->
<!-- value="Line has leading space characters; indentation should be performed with tabs only." /> -->
<!-- <property name="ignoreComments" value="true" /> -->
<!-- </module> -->
<!-- <module name="RegexpSinglelineJava"> -->
<!-- <property name="maximum" value="0"/> -->
<!-- <property name="format" value="org\.mockito\.Mockito\.(when|doThrow|doAnswer)" /> -->
<!-- <property name="message" -->
<!-- value="Please use BDDMockto imports." /> -->
<!-- <property name="ignoreComments" value="true" /> -->
<!-- </module> -->
<!-- <module name="RegexpSinglelineJava"> -->
<!-- <property name="maximum" value="0"/> -->
<!-- <property name="format" value="org\.junit\.Assert\.assert" /> -->
<!-- <property name="message" -->
<!-- value="Please use AssertJ imports." /> -->
<!-- <property name="ignoreComments" value="true" /> -->
<!-- </module> -->
<!-- <module name="Regexp"> -->
<!-- <property name="format" value="[ \t]+$" /> -->
<!-- <property name="illegalPattern" value="true" /> -->
<!-- <property name="message" value="Trailing whitespace" /> -->
<!-- </module> -->
<!-- Whitespace -->
<!-- <module name="GenericWhitespace" /> -->
<!-- <module name="MethodParamPad" /> -->
<!-- <module name="NoWhitespaceAfter" > -->
<!-- <property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS, ARRAY_DECLARATOR"/> -->
<!-- </module> -->
<!-- <module name="NoWhitespaceBefore" /> -->
<!-- <module name="ParenPad" /> -->
<!-- <module name="TypecastParenPad" /> -->
<!-- <module name="WhitespaceAfter" /> -->
<!-- <module name="WhitespaceAround" /> -->
</module>
</module>