diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java index c4a8159b01a..671951324b2 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java @@ -28,6 +28,7 @@ import org.aspectj.lang.JoinPoint; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.weaver.tools.PointcutParser; import org.aspectj.weaver.tools.PointcutPrimitive; + import org.springframework.core.ParameterNameDiscoverer; import org.springframework.util.StringUtils; diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java index 65b5cba813f..3fad4610041 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java @@ -37,6 +37,7 @@ import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.AjType; import org.aspectj.lang.reflect.AjTypeSystem; import org.aspectj.lang.reflect.PerClauseKind; + import org.springframework.aop.aspectj.AspectJExpressionPointcut; import org.springframework.aop.framework.AopConfigException; import org.springframework.core.ParameterNameDiscoverer; diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/package-info.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/package-info.java index 36b3f59f3d0..3c5ed99325f 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/package-info.java @@ -1,10 +1,6 @@ - /** - * * Classes enabling AspectJ 5 @Annotated classes to be used in Spring AOP. * *

Normally to be used through an AspectJAutoProxyCreator rather than directly. - * */ package org.springframework.aop.aspectj.annotation; - diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/package-info.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/package-info.java index 4070ecc9d2b..4ac96700ca4 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/package-info.java @@ -1,9 +1,5 @@ - /** - * * Base classes enabling auto-proxying based on AspectJ. * Support for AspectJ annotation aspects resides in the "aspectj.annotation" package. - * */ package org.springframework.aop.aspectj.autoproxy; - diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/package-info.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/package-info.java index 99d336b05a8..d6415a15a39 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/package-info.java @@ -1,5 +1,4 @@ /** - * * AspectJ integration package. Includes Spring AOP advice implementations for AspectJ 5 * annotation-style methods, and an AspectJExpressionPointcut: a Spring AOP Pointcut * implementation that allows use of the AspectJ pointcut expression language with the Spring AOP @@ -8,7 +7,5 @@ *

Note that use of this package does not require the use of the {@code ajc} compiler * or AspectJ load-time weaver. It is intended to enable the use of a valuable subset of AspectJ * functionality, with consistent semantics, with the proxy-based Spring AOP framework. - * */ package org.springframework.aop.aspectj; - diff --git a/spring-aop/src/main/java/org/springframework/aop/config/package-info.java b/spring-aop/src/main/java/org/springframework/aop/config/package-info.java index 37bae19a262..bb218b7e498 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support package for declarative AOP configuration, * with XML schema being the primary configuration format. - * */ package org.springframework.aop.config; - diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/ObjenesisCglibAopProxy.java b/spring-aop/src/main/java/org/springframework/aop/framework/ObjenesisCglibAopProxy.java index 1d50e41b107..ee71e87e983 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/ObjenesisCglibAopProxy.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/ObjenesisCglibAopProxy.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/package-info.java b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/package-info.java index 0b3d0a28bfc..8074a56ae3c 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/package-info.java @@ -1,18 +1,12 @@ - /** - * * SPI package allowing Spring AOP framework to handle arbitrary advice types. - *
- * Users who want merely to use the Spring AOP framework, rather than extend + * + *

Users who want merely to use the Spring AOP framework, rather than extend * its capabilities, don't need to concern themselves with this package. - *
- * You may wish to use these adapters to wrap Spring-specific advices, such as MethodBeforeAdvice, - * in MethodInterceptor, to allow their use in another AOP framework supporting the AOP Alliance interfaces. - *
- *
- * These adapters do not depend on any other Spring framework classes to allow such usage. - *
* + *

You may wish to use these adapters to wrap Spring-specific advices, such as MethodBeforeAdvice, + * in MethodInterceptor, to allow their use in another AOP framework supporting the AOP Alliance interfaces. + * + *

These adapters do not depend on any other Spring framework classes to allow such usage. */ package org.springframework.aop.framework.adapter; - diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/package-info.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/package-info.java index 8646ea49588..376fc165ca3 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/package-info.java @@ -1,6 +1,4 @@ - /** - * * Bean post-processors for use in ApplicationContexts to simplify AOP usage * by automatically creating AOP proxies without the need to use a ProxyFactoryBean. * @@ -10,7 +8,5 @@ *

NB: Automatic auto-proxying is not supported for BeanFactory implementations, * as post-processors beans are only automatically detected in application contexts. * Post-processors can be explicitly registered on a ConfigurableBeanFactory instead. - * */ package org.springframework.aop.framework.autoproxy; - diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/package-info.java b/spring-aop/src/main/java/org/springframework/aop/framework/package-info.java index 3581a82efe3..31f8391c437 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/package-info.java @@ -1,6 +1,4 @@ - /** - * * Package containing Spring's basic AOP infrastructure, compliant with the * AOP Alliance interfaces. * @@ -13,7 +11,5 @@ *

The ProxyFactoryBean is a convenient way to create AOP proxies in a BeanFactory * or ApplicationContext. However, proxies can be created programmatically using the * ProxyFactory class. - * */ package org.springframework.aop.framework; - diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/package-info.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/package-info.java index 710eeafca21..dc57a3e9655 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/package-info.java @@ -1,10 +1,6 @@ - /** - * * Provides miscellaneous interceptor implementations. * More specific interceptors can be found in corresponding * functionality packages, like "transaction" and "orm". - * */ package org.springframework.aop.interceptor; - diff --git a/spring-aop/src/main/java/org/springframework/aop/package-info.java b/spring-aop/src/main/java/org/springframework/aop/package-info.java index b5691ccfa67..aaa6126598b 100644 --- a/spring-aop/src/main/java/org/springframework/aop/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/package-info.java @@ -1,25 +1,20 @@ - /** - * * Core Spring AOP interfaces, built on AOP Alliance AOP interoperability interfaces. * - *
Any AOP Alliance MethodInterceptor is usable in Spring. + *

Any AOP Alliance MethodInterceptor is usable in Spring. * *
Spring AOP also offers: *

* - *
- * Spring AOP can be used programmatically or (preferably) + *

Spring AOP can be used programmatically or (preferably) * integrated with the Spring IoC container. - * */ package org.springframework.aop; - diff --git a/spring-aop/src/main/java/org/springframework/aop/scope/package-info.java b/spring-aop/src/main/java/org/springframework/aop/scope/package-info.java index 05a44a4cefa..5f4404db450 100644 --- a/spring-aop/src/main/java/org/springframework/aop/scope/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/scope/package-info.java @@ -1,8 +1,4 @@ - /** - * * Support for AOP-based scoping of target objects, with configurable backend. - * */ package org.springframework.aop.scope; - diff --git a/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java index 05577f7d6c4..7ef41f0a3fd 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/NameMatchMethodPointcut.java @@ -18,9 +18,9 @@ package org.springframework.aop.support; import java.io.Serializable; import java.lang.reflect.Method; +import java.util.Arrays; import java.util.LinkedList; import java.util.List; -import java.util.Arrays; import org.springframework.util.ObjectUtils; import org.springframework.util.PatternMatchUtils; diff --git a/spring-aop/src/main/java/org/springframework/aop/support/annotation/package-info.java b/spring-aop/src/main/java/org/springframework/aop/support/annotation/package-info.java index 3dbfef0c9d1..a91142c9723 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/annotation/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/annotation/package-info.java @@ -1,8 +1,4 @@ - /** - * * Annotation support for AOP pointcuts. - * */ package org.springframework.aop.support.annotation; - diff --git a/spring-aop/src/main/java/org/springframework/aop/support/package-info.java b/spring-aop/src/main/java/org/springframework/aop/support/package-info.java index 08d3f248f83..88a441ed854 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/package-info.java @@ -1,8 +1,4 @@ - /** - * * Convenience classes for using Spring's AOP API. - * */ package org.springframework.aop.support; - diff --git a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-2.0.xsd b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-2.0.xsd index 22fd8fc5095..bc3235b9d9d 100644 --- a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-2.0.xsd +++ b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-2.0.xsd @@ -1,12 +1,11 @@ + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tool="http://www.springframework.org/schema/tool" + targetNamespace="http://www.springframework.org/schema/aop" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> diff --git a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-2.5.xsd b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-2.5.xsd index e6ba181ba4f..a2e88256945 100644 --- a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-2.5.xsd +++ b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-2.5.xsd @@ -1,12 +1,11 @@ + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tool="http://www.springframework.org/schema/tool" + targetNamespace="http://www.springframework.org/schema/aop" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> diff --git a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.0.xsd b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.0.xsd index 879f57f7ccb..db650af2891 100644 --- a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.0.xsd +++ b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.0.xsd @@ -1,12 +1,11 @@ + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tool="http://www.springframework.org/schema/tool" + targetNamespace="http://www.springframework.org/schema/aop" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> diff --git a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.1.xsd b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.1.xsd index 0c79746566d..80e3f83d364 100644 --- a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.1.xsd +++ b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.1.xsd @@ -1,12 +1,11 @@ + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tool="http://www.springframework.org/schema/tool" + targetNamespace="http://www.springframework.org/schema/aop" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> diff --git a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.2.xsd b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.2.xsd index 7dae8fc4469..e2ab2b7e7a8 100644 --- a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.2.xsd +++ b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-3.2.xsd @@ -1,12 +1,11 @@ + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tool="http://www.springframework.org/schema/tool" + targetNamespace="http://www.springframework.org/schema/aop" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> diff --git a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-4.0.xsd b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-4.0.xsd index 6f76f196dc4..816e4782cda 100644 --- a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-4.0.xsd +++ b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-4.0.xsd @@ -1,12 +1,11 @@ + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tool="http://www.springframework.org/schema/tool" + targetNamespace="http://www.springframework.org/schema/aop" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> diff --git a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-4.1.xsd b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-4.1.xsd index c2406b5e439..e9f004203d6 100644 --- a/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-4.1.xsd +++ b/spring-aop/src/main/resources/org/springframework/aop/config/spring-aop-4.1.xsd @@ -1,12 +1,11 @@ + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tool="http://www.springframework.org/schema/tool" + targetNamespace="http://www.springframework.org/schema/aop" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscovererTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscovererTests.java index 7662195c0fd..5167b5d76cd 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscovererTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscovererTests.java @@ -15,13 +15,14 @@ */ package org.springframework.aop.aspectj; -import static org.junit.Assert.*; +import java.lang.reflect.Method; import org.aspectj.lang.JoinPoint; import org.junit.Test; + import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer.AmbiguousBindingException; -import java.lang.reflect.Method; +import static org.junit.Assert.*; /** * Unit tests for the {@link AspectJAdviceParameterNameDiscoverer} class. diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java index b042d8155a2..6419fbe7746 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java @@ -16,8 +16,6 @@ package org.springframework.aop.aspectj; -import static org.junit.Assert.*; - import java.lang.reflect.Method; import org.aopalliance.intercept.MethodInterceptor; @@ -27,17 +25,19 @@ import org.aspectj.weaver.tools.PointcutPrimitive; import org.aspectj.weaver.tools.UnsupportedPointcutPrimitiveException; import org.junit.Before; import org.junit.Test; + import org.springframework.aop.ClassFilter; import org.springframework.aop.MethodMatcher; import org.springframework.aop.Pointcut; import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.support.DefaultPointcutAdvisor; - import org.springframework.tests.sample.beans.IOther; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; import org.springframework.tests.sample.beans.subpkg.DeepBean; +import static org.junit.Assert.*; + /** * @author Rob Harrop * @author Rod Johnson diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java index 057ad77309f..d6835aa1b07 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java @@ -16,12 +16,12 @@ package org.springframework.aop.aspectj; -import static org.junit.Assert.*; - import org.junit.Test; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * Tests for matching of bean() pointcut designator. * diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java index 0e0e4377c9a..3edb4758bda 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java @@ -26,16 +26,17 @@ import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.reflect.MethodSignature; import org.aspectj.lang.reflect.SourceLocation; import org.aspectj.runtime.reflect.Factory; -import static org.junit.Assert.*; import org.junit.Test; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.aop.MethodBeforeAdvice; import org.springframework.aop.framework.AopContext; import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.interceptor.ExposeInvocationInterceptor; import org.springframework.aop.support.AopUtils; +import org.springframework.tests.sample.beans.ITestBean; +import org.springframework.tests.sample.beans.TestBean; + +import static org.junit.Assert.*; /** * @author Rod Johnson diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJAdviceParameterNameDiscovererTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJAdviceParameterNameDiscovererTests.java index 2b92a5c6611..ac44fb9f398 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJAdviceParameterNameDiscovererTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJAdviceParameterNameDiscovererTests.java @@ -17,6 +17,7 @@ package org.springframework.aop.aspectj; import org.junit.Test; + import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer.AmbiguousBindingException; /** diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java index dc48ec3b3ee..f14bee5dfcf 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java @@ -16,9 +16,6 @@ package org.springframework.aop.aspectj; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import java.util.HashMap; import java.util.List; @@ -26,11 +23,13 @@ import java.util.Map; import org.junit.Before; import org.junit.Test; - import test.annotation.EmptySpringAnnotation; import test.annotation.transaction.Tx; + import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * Java5-specific {@link AspectJExpressionPointcutTests}. * diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/TrickyAspectJPointcutExpressionTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/TrickyAspectJPointcutExpressionTests.java index 088ba138c35..22ef9db88eb 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/TrickyAspectJPointcutExpressionTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/TrickyAspectJPointcutExpressionTests.java @@ -1,8 +1,5 @@ package org.springframework.aop.aspectj; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; - import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Inherited; @@ -12,6 +9,7 @@ import java.lang.annotation.Target; import java.lang.reflect.Method; import org.junit.Test; + import org.springframework.aop.Advisor; import org.springframework.aop.MethodBeforeAdvice; import org.springframework.aop.ThrowsAdvice; @@ -19,6 +17,8 @@ import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.core.OverridingClassLoader; +import static org.junit.Assert.*; + /** * @author Dave Syer */ diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java index 0275360441b..87470d708b0 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java @@ -16,18 +16,18 @@ package org.springframework.aop.aspectj; -import static org.junit.Assert.*; - import org.junit.Test; + import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.support.DefaultListableBeanFactory; - import org.springframework.tests.sample.beans.CountingTestBean; import org.springframework.tests.sample.beans.IOther; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; import org.springframework.tests.sample.beans.subpkg.DeepBean; +import static org.junit.Assert.*; + /** * Unit tests for the {@link TypePatternClassFilter} class. * diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java index 971b82c5f1b..6d925271ce9 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java @@ -37,9 +37,12 @@ import org.aspectj.lang.annotation.DeclareParents; import org.aspectj.lang.annotation.DeclarePrecedence; import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; - import org.junit.Ignore; import org.junit.Test; +import test.aop.DefaultLockable; +import test.aop.Lockable; +import test.aop.PerTargetAspect; +import test.aop.TwoAdviceAspect; import org.springframework.aop.Advisor; import org.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory.SyntheticInstantiationAdvisor; @@ -55,11 +58,6 @@ import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.ObjectUtils; -import test.aop.DefaultLockable; -import test.aop.Lockable; -import test.aop.PerTargetAspect; -import test.aop.TwoAdviceAspect; - import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java index 66d5e0f739e..424505004d1 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java @@ -16,8 +16,6 @@ package org.springframework.aop.aspectj.annotation; -import static org.junit.Assert.*; - import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.reflect.Method; @@ -27,11 +25,13 @@ import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.junit.Test; -import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer; +import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * @author Adrian Colyer * @author Juergen Hoeller diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java index 60d370e3ef3..b524e0c74bb 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java @@ -16,17 +16,17 @@ package org.springframework.aop.aspectj.annotation; -import static org.junit.Assert.*; - import org.junit.Test; +import test.aop.PerTargetAspect; + import org.springframework.aop.Pointcut; import org.springframework.aop.aspectj.AspectJExpressionPointcut; import org.springframework.aop.aspectj.AspectJExpressionPointcutTests; import org.springframework.aop.framework.AopConfigException; - -import test.aop.PerTargetAspect; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectMetadataTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectMetadataTests.java index 9ae67ea71d8..8a12bdb51fe 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectMetadataTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectMetadataTests.java @@ -16,14 +16,14 @@ package org.springframework.aop.aspectj.annotation; -import static org.junit.Assert.*; import org.aspectj.lang.reflect.PerClauseKind; import org.junit.Test; +import test.aop.PerTargetAspect; import org.springframework.aop.Pointcut; import org.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFactoryTests.ExceptionAspect; -import test.aop.PerTargetAspect; +import static org.junit.Assert.*; /** * @since 2.0 diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java index 16d6f0e9e79..29fc1b79fac 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java @@ -16,16 +16,16 @@ package org.springframework.aop.aspectj.annotation; -import static org.junit.Assert.assertEquals; - import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.junit.Ignore; import org.junit.Test; +import test.aop.PerThisAspect; + import org.springframework.util.SerializationTestUtils; -import test.aop.PerThisAspect; +import static org.junit.Assert.*; /** * @author Rob Harrop diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java index f1ff305aad4..c5a3574e8aa 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java @@ -16,10 +16,9 @@ package org.springframework.aop.aspectj.autoproxy; -import static org.junit.Assert.assertEquals; - import org.junit.Before; import org.junit.Test; + import org.springframework.aop.config.AopConfigUtils; import org.springframework.aop.config.AopNamespaceUtils; import org.springframework.beans.factory.config.BeanDefinition; @@ -32,6 +31,8 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.factory.xml.XmlReaderContext; import org.springframework.tests.beans.CollectingReaderEventListener; +import static org.junit.Assert.*; + /** * @author Rob Harrop * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java index fec13dbbed1..87caedd021f 100644 --- a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java @@ -16,16 +16,12 @@ package org.springframework.aop.config; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import java.util.HashSet; import java.util.Set; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.BeanReference; import org.springframework.beans.factory.parsing.BeanComponentDefinition; @@ -36,6 +32,9 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; import org.springframework.tests.beans.CollectingReaderEventListener; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * @author Rob Harrop * @author Juergen Hoeller diff --git a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java index 7320dd553cc..b46c057e6a6 100644 --- a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java @@ -16,16 +16,16 @@ package org.springframework.aop.config; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import org.junit.Test; + import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * @author Mark Fisher * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java b/spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java index 9e0b3d14ebb..e1b6b22bd2b 100644 --- a/spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java @@ -16,14 +16,15 @@ package org.springframework.aop.config; -import static org.junit.Assert.assertTrue; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * Tests that the <aop:config/> element can be used as a top level element. * diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java index bfd5a35c079..ad7ad9dc7b3 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java @@ -16,8 +16,6 @@ package org.springframework.aop.framework; -import static org.junit.Assert.*; - import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; @@ -25,11 +23,13 @@ import java.util.Arrays; import java.util.List; import org.junit.Test; -import org.springframework.aop.SpringProxy; +import org.springframework.aop.SpringProxy; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/ClassWithConstructor.java b/spring-aop/src/test/java/org/springframework/aop/framework/ClassWithConstructor.java index fd7ee4a4b79..e456224efb8 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/ClassWithConstructor.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/ClassWithConstructor.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/IntroductionBenchmarkTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/IntroductionBenchmarkTests.java index eaaf2d8d42b..e3337cd7feb 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/IntroductionBenchmarkTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/IntroductionBenchmarkTests.java @@ -17,11 +17,11 @@ package org.springframework.aop.framework; import org.junit.Test; -import org.springframework.aop.support.DelegatingIntroductionInterceptor; -import org.springframework.util.StopWatch; +import org.springframework.aop.support.DelegatingIntroductionInterceptor; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; +import org.springframework.util.StopWatch; /** * Benchmarks for introductions. diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java index 4cf3c22239d..70833204835 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java @@ -16,8 +16,6 @@ package org.springframework.aop.framework; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import java.util.LinkedList; import java.util.List; @@ -28,6 +26,8 @@ import org.junit.Test; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/NullPrimitiveTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/NullPrimitiveTests.java index 11b127d0bcb..e138781702a 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/NullPrimitiveTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/NullPrimitiveTests.java @@ -16,15 +16,16 @@ package org.springframework.aop.framework; -import static org.junit.Assert.assertEquals; - import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import org.springframework.aop.AopInvocationException; +import static org.junit.Assert.*; + /** * Test for SPR-4675. A null value returned from around advice is very hard to debug if * the caller expects a primitive. diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java index 3c373cdb77a..e0c765e5805 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java @@ -16,16 +16,17 @@ package org.springframework.aop.framework; -import static org.junit.Assert.assertEquals; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * @author Juergen Hoeller * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java index 7f856028885..7b509ba6e78 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java @@ -16,13 +16,6 @@ package org.springframework.aop.framework; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import javax.accessibility.Accessible; import javax.swing.JFrame; import javax.swing.RootPaneContainer; @@ -31,6 +24,7 @@ import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; import org.junit.Ignore; import org.junit.Test; + import org.springframework.aop.Advisor; import org.springframework.aop.interceptor.DebugInterceptor; import org.springframework.aop.support.AopUtils; @@ -44,6 +38,9 @@ import org.springframework.tests.sample.beans.IOther; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Also tests AdvisedSupport and ProxyCreatorSupport superclasses. * diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java index 667652f3ef6..25e35f57833 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java @@ -20,11 +20,11 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.lang.reflect.Method; import java.rmi.RemoteException; - import javax.transaction.TransactionRolledbackException; import org.aopalliance.intercept.MethodInvocation; import org.junit.Test; + import org.springframework.aop.ThrowsAdvice; import org.springframework.tests.aop.advice.MethodCounter; diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java index db2751f5137..8d4c43a6e7d 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java @@ -16,11 +16,10 @@ package org.springframework.aop.interceptor; -import static org.junit.Assert.assertEquals; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.junit.Test; + import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; import org.springframework.tests.sample.beans.DerivedTestBean; @@ -28,6 +27,8 @@ import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.SerializationTestUtils; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java index 3b0bd31e530..8ce6962b0eb 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java @@ -16,15 +16,15 @@ package org.springframework.aop.interceptor; -import static org.junit.Assert.*; - import org.junit.Test; + import org.springframework.aop.framework.ProxyFactory; import org.springframework.beans.factory.NamedBean; - import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java index 5a0cc658c93..8a13f376e82 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java @@ -16,18 +16,18 @@ package org.springframework.aop.interceptor; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import org.aopalliance.intercept.MethodInvocation; import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * Non-XML tests are in AbstractAopProxyTests * diff --git a/spring-aop/src/test/java/org/springframework/aop/scope/DefaultScopedObjectTests.java b/spring-aop/src/test/java/org/springframework/aop/scope/DefaultScopedObjectTests.java index 4e3d3ca6197..129917637a2 100644 --- a/spring-aop/src/test/java/org/springframework/aop/scope/DefaultScopedObjectTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/scope/DefaultScopedObjectTests.java @@ -17,6 +17,7 @@ package org.springframework.aop.scope; import org.junit.Test; + import org.springframework.beans.factory.config.ConfigurableBeanFactory; import static org.mockito.BDDMockito.*; diff --git a/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java b/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java index 84c4decb198..9886a0a145c 100644 --- a/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java @@ -16,14 +16,15 @@ package org.springframework.aop.scope; -import static org.junit.Assert.assertSame; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * @author Mark Fisher * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java index f858da5e86f..64ab845a045 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java @@ -20,6 +20,7 @@ import java.io.IOException; import org.junit.Before; import org.junit.Test; + import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.SerializationTestUtils; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java b/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java index 79501c9ae71..0c4ccf75814 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java @@ -16,13 +16,10 @@ package org.springframework.aop.support; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import org.junit.Test; + import org.springframework.aop.ClassFilter; import org.springframework.aop.MethodMatcher; import org.springframework.aop.Pointcut; @@ -32,6 +29,8 @@ import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.SerializationTestUtils; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java b/spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java index 51f18dde21f..a62be0bcf02 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java @@ -16,15 +16,15 @@ package org.springframework.aop.support; -import static org.junit.Assert.*; - import org.junit.Test; + import org.springframework.aop.ClassFilter; import org.springframework.core.NestedRuntimeException; - import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java index 513885ed21f..b229c3ee59b 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java @@ -16,18 +16,18 @@ package org.springframework.aop.support; -import static org.junit.Assert.*; - import java.lang.reflect.Method; import org.junit.Test; + import org.springframework.aop.ClassFilter; import org.springframework.aop.MethodMatcher; import org.springframework.aop.Pointcut; import org.springframework.core.NestedRuntimeException; - import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java index a64e78c26f5..b7ea4caf2cd 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java @@ -16,16 +16,16 @@ package org.springframework.aop.support; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; - import org.junit.Test; + import org.springframework.aop.Pointcut; import org.springframework.aop.framework.ProxyFactory; import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java index e6f96cf0f22..2be7fe8a1b4 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java @@ -20,6 +20,7 @@ import java.io.Serializable; import org.aopalliance.intercept.MethodInterceptor; import org.junit.Test; + import org.springframework.aop.IntroductionAdvisor; import org.springframework.aop.IntroductionInterceptor; import org.springframework.aop.framework.ProxyFactory; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java b/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java index 0f4fd8d3cef..afa1726b018 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java @@ -16,19 +16,18 @@ package org.springframework.aop.support; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import org.junit.Test; + import org.springframework.aop.MethodMatcher; import org.springframework.tests.sample.beans.IOther; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.SerializationTestUtils; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java index 6a027d6ecd8..a96e61cdca0 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java @@ -16,12 +16,9 @@ package org.springframework.aop.support; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import org.junit.Before; import org.junit.Test; + import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; import org.springframework.tests.aop.interceptor.NopInterceptor; @@ -30,6 +27,8 @@ import org.springframework.tests.sample.beans.Person; import org.springframework.tests.sample.beans.SerializablePerson; import org.springframework.util.SerializationTestUtils; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java b/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java index b24dccc2c9d..6404c8d7605 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java @@ -16,16 +16,16 @@ package org.springframework.aop.support; -import static org.junit.Assert.*; - import java.lang.reflect.Method; import org.junit.Test; + import org.springframework.aop.ClassFilter; import org.springframework.aop.Pointcut; - import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java b/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java index b21073601ba..d652f472b07 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java @@ -16,10 +16,8 @@ package org.springframework.aop.support; -import static org.junit.Assert.assertEquals; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import org.junit.Test; + import org.springframework.aop.framework.Advised; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; @@ -31,6 +29,9 @@ import org.springframework.tests.sample.beans.Person; import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.SerializationTestUtils; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceProxyTests.java b/spring-aop/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceProxyTests.java index af6b44c0ca1..8c876f69991 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceProxyTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceProxyTests.java @@ -16,16 +16,17 @@ package org.springframework.aop.target; -import static org.junit.Assert.assertTrue; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import org.junit.Test; + import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; import org.springframework.tests.sample.beans.ITestBean; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * @author Rob Harrop * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java index 0fef2f1b3eb..47005c5d239 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java @@ -16,14 +16,10 @@ package org.springframework.aop.target; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import org.junit.After; import org.junit.Before; import org.junit.Test; + import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.support.DefaultPointcutAdvisor; @@ -36,6 +32,9 @@ import org.springframework.tests.sample.beans.SerializablePerson; import org.springframework.tests.sample.beans.SideEffectBean; import org.springframework.util.SerializationTestUtils; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/target/LazyCreationTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/LazyCreationTargetSourceTests.java index 2a584f9a5c5..08e1f885abd 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/LazyCreationTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/LazyCreationTargetSourceTests.java @@ -16,12 +16,13 @@ package org.springframework.aop.target; -import static org.junit.Assert.*; - import org.junit.Test; + import org.springframework.aop.TargetSource; import org.springframework.aop.framework.ProxyFactory; +import static org.junit.Assert.*; + /** * @author Rob Harrop * @author Juergen Hoeller diff --git a/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java index b5bb4a1751c..7419018e65c 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java @@ -16,19 +16,18 @@ package org.springframework.aop.target; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import java.util.Set; import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; import org.springframework.tests.sample.beans.ITestBean; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * @author Juergen Hoeller * @author Rob Harrop diff --git a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java index 91e1d087f59..7d1fa2c9651 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java @@ -16,10 +16,8 @@ package org.springframework.aop.target; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - import org.junit.Test; + import org.springframework.aop.TargetSource; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -28,6 +26,8 @@ import org.springframework.tests.sample.beans.SerializablePerson; import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.SerializationTestUtils; +import static org.junit.Assert.*; + /** * Unit tests relating to the abstract {@link AbstractPrototypeBasedTargetSource} * and not subclasses. diff --git a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java index 99079185f7a..164eeab3b6b 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java @@ -16,11 +16,9 @@ package org.springframework.aop.target; -import static org.junit.Assert.assertEquals; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -28,6 +26,9 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; import org.springframework.tests.sample.beans.SideEffectBean; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java index f9f096052d6..e805401ba5f 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java @@ -16,19 +16,18 @@ package org.springframework.aop.target; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.fail; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.SideEffectBean; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java index 9732cfa4d98..68e68e519f4 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java @@ -16,12 +16,13 @@ package org.springframework.aop.target.dynamic; -import static org.junit.Assert.*; - import org.junit.Test; + import org.springframework.tests.Assume; import org.springframework.tests.TestGroup; +import static org.junit.Assert.*; + /** * @author Rob Harrop * @author Chris Beams diff --git a/spring-aop/src/test/java/org/springframework/tests/aop/advice/TimestampIntroductionAdvisor.java b/spring-aop/src/test/java/org/springframework/tests/aop/advice/TimestampIntroductionAdvisor.java index 353e9a783dc..5186dfce8ca 100644 --- a/spring-aop/src/test/java/org/springframework/tests/aop/advice/TimestampIntroductionAdvisor.java +++ b/spring-aop/src/test/java/org/springframework/tests/aop/advice/TimestampIntroductionAdvisor.java @@ -16,8 +16,8 @@ package org.springframework.tests.aop.advice; -import org.springframework.aop.support.DelegatingIntroductionInterceptor; import org.springframework.aop.support.DefaultIntroductionAdvisor; +import org.springframework.aop.support.DelegatingIntroductionInterceptor; import org.springframework.tests.aop.interceptor.TimestampIntroductionInterceptor; /** diff --git a/spring-aop/src/test/java/test/aop/PerTargetAspect.java b/spring-aop/src/test/java/test/aop/PerTargetAspect.java index 7c8c1fec83d..fb1026481a1 100644 --- a/spring-aop/src/test/java/test/aop/PerTargetAspect.java +++ b/spring-aop/src/test/java/test/aop/PerTargetAspect.java @@ -1,11 +1,25 @@ -/** +/* + * Copyright 2002-2014 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + package test.aop; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; + import org.springframework.core.Ordered; @Aspect("pertarget(execution(* *.getSpouse()))") @@ -33,4 +47,5 @@ public class PerTargetAspect implements Ordered { public void setOrder(int order) { this.order = order; } + } diff --git a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj index 4a0d464b0ff..cd3a128fddf 100644 --- a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj @@ -29,12 +29,12 @@ import org.springframework.beans.factory.annotation.Configurable; import org.springframework.beans.factory.wiring.BeanConfigurerSupport; /** - * Concrete aspect that uses the {@link Configurable} - * annotation to identify which classes need autowiring. + * Concrete aspect that uses the {@link Configurable} annotation to identify + * which classes need autowiring. * - *

The bean name to look up will be taken from the - * {@code @Configurable} annotation if specified, otherwise the - * default bean name to look up will be the FQN of the class being configured. + *

The bean name to look up will be taken from the {@code @Configurable} + * annotation if specified, otherwise the default bean name to look up will be + * the fully qualified name of the class being configured. * * @author Rod Johnson * @author Ramnivas Laddad diff --git a/spring-aspects/src/main/java/org/springframework/cache/aspectj/AbstractCacheAspect.aj b/spring-aspects/src/main/java/org/springframework/cache/aspectj/AbstractCacheAspect.aj index 61b93e0551e..20f2adb0a58 100644 --- a/spring-aspects/src/main/java/org/springframework/cache/aspectj/AbstractCacheAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/cache/aspectj/AbstractCacheAspect.aj @@ -20,6 +20,7 @@ import java.lang.reflect.Method; import org.aspectj.lang.annotation.SuppressAjWarnings; import org.aspectj.lang.reflect.MethodSignature; + import org.springframework.beans.factory.DisposableBean; import org.springframework.cache.interceptor.CacheAspectSupport; import org.springframework.cache.interceptor.CacheOperationInvoker; diff --git a/spring-aspects/src/main/java/org/springframework/cache/aspectj/JCacheCacheAspect.aj b/spring-aspects/src/main/java/org/springframework/cache/aspectj/JCacheCacheAspect.aj index 738b7186d5b..505035e71c0 100644 --- a/spring-aspects/src/main/java/org/springframework/cache/aspectj/JCacheCacheAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/cache/aspectj/JCacheCacheAspect.aj @@ -17,7 +17,6 @@ package org.springframework.cache.aspectj; import java.lang.reflect.Method; - import javax.cache.annotation.CachePut; import javax.cache.annotation.CacheRemove; import javax.cache.annotation.CacheRemoveAll; diff --git a/spring-aspects/src/main/java/org/springframework/orm/jpa/aspectj/JpaExceptionTranslatorAspect.aj b/spring-aspects/src/main/java/org/springframework/orm/jpa/aspectj/JpaExceptionTranslatorAspect.aj index 43ba3a20137..9ecc53f96e8 100644 --- a/spring-aspects/src/main/java/org/springframework/orm/jpa/aspectj/JpaExceptionTranslatorAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/orm/jpa/aspectj/JpaExceptionTranslatorAspect.aj @@ -27,6 +27,7 @@ import org.springframework.dao.DataAccessException; import org.springframework.orm.jpa.EntityManagerFactoryUtils; public aspect JpaExceptionTranslatorAspect { + pointcut entityManagerCall(): call(* EntityManager.*(..)) || call(* EntityManagerFactory.*(..)) || call(* EntityTransaction.*(..)) || call(* Query.*(..)); @@ -41,4 +42,5 @@ public aspect JpaExceptionTranslatorAspect { throw re; } } -} \ No newline at end of file + +} diff --git a/spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspect.aj b/spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspect.aj index 157215037a1..cbd592f5042 100644 --- a/spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspect.aj @@ -17,7 +17,6 @@ package org.springframework.scheduling.aspectj; import java.lang.reflect.Method; - import java.util.concurrent.Future; import org.springframework.core.annotation.AnnotationUtils; diff --git a/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AbstractTransactionAspect.aj b/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AbstractTransactionAspect.aj index f9c70661ae1..29669b526db 100644 --- a/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AbstractTransactionAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AbstractTransactionAspect.aj @@ -18,6 +18,7 @@ package org.springframework.transaction.aspectj; import org.aspectj.lang.annotation.SuppressAjWarnings; import org.aspectj.lang.reflect.MethodSignature; + import org.springframework.transaction.interceptor.TransactionAspectSupport; import org.springframework.transaction.interceptor.TransactionAttributeSource; diff --git a/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AnnotationTransactionAspect.aj b/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AnnotationTransactionAspect.aj index 70a82b5f4ee..77db8ea48bd 100644 --- a/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AnnotationTransactionAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AnnotationTransactionAspect.aj @@ -32,9 +32,9 @@ import org.springframework.transaction.annotation.Transactional; * *

An @Transactional annotation on a method within the class overrides the * default transaction semantics given by the class annotation (if present). - * Any method may be annotated (regardless of visibility). - * Annotating non-public methods directly is the only way - * to get transaction demarcation for the execution of such operations. + * Any method may be annotated (regardless of visibility). Annotating + * non-public methods directly is the only way to get transaction demarcation + * for the execution of such operations. * * @author Rod Johnson * @author Ramnivas Laddad diff --git a/spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/AutoProxyWithCodeStyleAspectsTests.java b/spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/AutoProxyWithCodeStyleAspectsTests.java index e6f8cb8459e..edf79ec8d34 100644 --- a/spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/AutoProxyWithCodeStyleAspectsTests.java +++ b/spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/AutoProxyWithCodeStyleAspectsTests.java @@ -16,10 +16,10 @@ package org.springframework.aop.aspectj.autoproxy; -import org.springframework.context.support.ClassPathXmlApplicationContext; - import junit.framework.TestCase; +import org.springframework.context.support.ClassPathXmlApplicationContext; + /** * @author Adrian Colyer */ diff --git a/spring-aspects/src/test/java/org/springframework/beans/factory/aspectj/SpringConfiguredWithAutoProxyingTests.java b/spring-aspects/src/test/java/org/springframework/beans/factory/aspectj/SpringConfiguredWithAutoProxyingTests.java index aae9ff6cd75..97ebe9140b7 100644 --- a/spring-aspects/src/test/java/org/springframework/beans/factory/aspectj/SpringConfiguredWithAutoProxyingTests.java +++ b/spring-aspects/src/test/java/org/springframework/beans/factory/aspectj/SpringConfiguredWithAutoProxyingTests.java @@ -16,10 +16,10 @@ package org.springframework.beans.factory.aspectj; -import org.springframework.context.support.ClassPathXmlApplicationContext; - import junit.framework.TestCase; +import org.springframework.context.support.ClassPathXmlApplicationContext; + public class SpringConfiguredWithAutoProxyingTests extends TestCase { @Override diff --git a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJAnnotationTests.java b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJAnnotationTests.java index 5c7bb93d082..70036f6fc40 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJAnnotationTests.java +++ b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJAnnotationTests.java @@ -16,18 +16,17 @@ package org.springframework.cache.aspectj; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; - import org.junit.Assert; import org.junit.Test; + import org.springframework.cache.Cache; import org.springframework.cache.config.AbstractAnnotationTests; import org.springframework.cache.config.CacheableService; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; +import static org.junit.Assert.*; + /** * @author Costin Leau */ diff --git a/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedJCacheableService.java b/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedJCacheableService.java index 0ca82330a62..247f10f7287 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedJCacheableService.java +++ b/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedJCacheableService.java @@ -19,7 +19,6 @@ package org.springframework.cache.config; import java.io.IOException; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; - import javax.cache.annotation.CacheDefaults; import javax.cache.annotation.CacheKey; import javax.cache.annotation.CachePut; diff --git a/spring-aspects/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java b/spring-aspects/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java index da23158c9d9..8db104f0cc4 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java +++ b/spring-aspects/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java @@ -16,10 +16,10 @@ package org.springframework.cache.config; -import org.springframework.cache.interceptor.KeyGenerator; - import java.lang.reflect.Method; +import org.springframework.cache.interceptor.KeyGenerator; + /** * A custom {@link KeyGenerator} that exposes the algorithm used to compute the key * for convenience in tests scenario. diff --git a/spring-aspects/src/test/java/org/springframework/cache/config/TestEntity.java b/spring-aspects/src/test/java/org/springframework/cache/config/TestEntity.java index f5edbf86884..a2e4c61387a 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/config/TestEntity.java +++ b/spring-aspects/src/test/java/org/springframework/cache/config/TestEntity.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java b/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java index 424fca0959c..5610d7ba157 100644 --- a/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java +++ b/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java @@ -36,7 +36,7 @@ import org.springframework.tests.Assume; import org.springframework.tests.TestGroup; import org.springframework.util.ReflectionUtils; -import static org.hamcrest.CoreMatchers.*; +import static org.hamcrest.CoreMatchers.startsWith; import static org.hamcrest.Matchers.not; import static org.junit.Assert.*; diff --git a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java index 166baebcca2..d1de2db427f 100644 --- a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java +++ b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java @@ -16,14 +16,14 @@ package org.springframework.transaction.aspectj; +import java.lang.reflect.Method; + import org.springframework.test.AbstractDependencyInjectionSpringContextTests; import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.annotation.AnnotationTransactionAttributeSource; import org.springframework.transaction.interceptor.TransactionAspectSupport; import org.springframework.transaction.interceptor.TransactionAttribute; -import java.lang.reflect.Method; - /** * @author Rod Johnson * @author Ramnivas Laddad diff --git a/spring-beans-groovy/src/main/java/org/springframework/beans/factory/groovy/package-info.java b/spring-beans-groovy/src/main/java/org/springframework/beans/factory/groovy/package-info.java index 072c4d8070d..d956cd548b2 100644 --- a/spring-beans-groovy/src/main/java/org/springframework/beans/factory/groovy/package-info.java +++ b/spring-beans-groovy/src/main/java/org/springframework/beans/factory/groovy/package-info.java @@ -1,8 +1,4 @@ - /** - * * Support package for Groovy-based bean definitions. - * */ package org.springframework.beans.factory.groovy; - diff --git a/spring-beans/src/main/java/org/springframework/beans/annotation/package-info.java b/spring-beans/src/main/java/org/springframework/beans/annotation/package-info.java index d6f93c54438..004728944be 100644 --- a/spring-beans/src/main/java/org/springframework/beans/annotation/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/annotation/package-info.java @@ -1,8 +1,4 @@ - /** - * * Support package for beans-style handling of Java 5 annotations. - * */ package org.springframework.beans.annotation; - diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java b/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java index c9536c77294..d7758bc1077 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java @@ -22,6 +22,7 @@ import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.BeansException; import org.springframework.beans.FatalBeanException; import org.springframework.beans.factory.BeanDefinitionStoreException; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/access/el/package-info.java b/spring-beans/src/main/java/org/springframework/beans/factory/access/el/package-info.java index 0854a187691..3ee63c3dce8 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/access/el/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/access/el/package-info.java @@ -1,8 +1,4 @@ - /** - * * Support classes for accessing a Spring BeanFactory from Unified EL. - * */ package org.springframework.beans.factory.access.el; - diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/access/package-info.java b/spring-beans/src/main/java/org/springframework/beans/factory/access/package-info.java index 7c4a159d5fa..4d9a88e176c 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/access/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/access/package-info.java @@ -1,12 +1,8 @@ - /** - * * Helper infrastructure to locate and access bean factories. * *

Note: This package is only relevant for special sharing of bean * factories, for example behind EJB facades. It is not used in a * typical web application or standalone application. - * */ package org.springframework.beans.factory.access; - diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/package-info.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/package-info.java index 2d6e8b13495..19c01c942e3 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/package-info.java @@ -1,8 +1,4 @@ - /** - * * Support package for annotation-driven bean configuration. - * */ package org.springframework.beans.factory.annotation; - diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/package-info.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/package-info.java index 066f967e926..81e5ad66681 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/package-info.java @@ -1,8 +1,4 @@ - /** - * * SPI interfaces and configuration-related convenience classes for bean factories. - * */ package org.springframework.beans.factory.config; - diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/package-info.java b/spring-beans/src/main/java/org/springframework/beans/factory/package-info.java index d4454c46ee6..0834baa9e5e 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/package-info.java @@ -1,16 +1,12 @@ - /** - * * The core package implementing Spring's lightweight Inversion of Control (IoC) container. - *

- * Provides an alternative to the Singleton and Prototype design + * + *

Provides an alternative to the Singleton and Prototype design * patterns, including a consistent approach to configuration management. * Builds on the org.springframework.beans package. * *

This package and related packages are discussed in Chapter 11 of * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). - * */ package org.springframework.beans.factory; - diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/package-info.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/package-info.java index bd756940b90..eae9057e60f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/package-info.java @@ -1,8 +1,4 @@ - /** - * * Support infrastructure for bean definition parsing. - * */ package org.springframework.beans.factory.parsing; - diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/serviceloader/package-info.java b/spring-beans/src/main/java/org/springframework/beans/factory/serviceloader/package-info.java index e77e212a788..793df3de8b6 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/serviceloader/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/serviceloader/package-info.java @@ -1,8 +1,4 @@ - /** - * - * Support package for the JDK 1.6 ServiceLoader facility. - * + * Support package for the Java 6 ServiceLoader facility. */ package org.springframework.beans.factory.serviceloader; - diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinitionReader.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinitionReader.java index 9a267cce00f..e90712fc26a 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinitionReader.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanDefinitionReader.java @@ -21,10 +21,11 @@ import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.factory.BeanDefinitionStoreException; -import org.springframework.core.env.StandardEnvironment; import org.springframework.core.env.Environment; import org.springframework.core.env.EnvironmentCapable; +import org.springframework.core.env.StandardEnvironment; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/package-info.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/package-info.java index 89971b330aa..2f90e25600a 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/package-info.java @@ -1,9 +1,5 @@ /** - * * Classes supporting the {@code org.springframework.beans.factory} package. * Contains abstract base classes for {@code BeanFactory} implementations. - * - * */ package org.springframework.beans.factory.support; - diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/wiring/package-info.java b/spring-beans/src/main/java/org/springframework/beans/factory/wiring/package-info.java index 0eaf647d147..5f5c9d62092 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/wiring/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/wiring/package-info.java @@ -1,9 +1,5 @@ - /** - * * Mechanism to determine bean wiring metadata from a bean instance. * Foundation for aspect-driven bean configuration. - * */ package org.springframework.beans.factory.wiring; - diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/package-info.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/package-info.java index 1d2043d258a..8b0070dafeb 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/package-info.java @@ -1,8 +1,5 @@ /** - * * Contains an abstract XML-based {@code BeanFactory} implementation, - * including a standard "spring-beans" DTD. - * + * including a standard "spring-beans" XSD. */ package org.springframework.beans.factory.xml; - diff --git a/spring-beans/src/main/java/org/springframework/beans/package-info.java b/spring-beans/src/main/java/org/springframework/beans/package-info.java index 11d8730cd96..6b4466dbea8 100644 --- a/spring-beans/src/main/java/org/springframework/beans/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/package-info.java @@ -1,6 +1,4 @@ - /** - * * This package contains interfaces and classes for manipulating Java beans. * It is used by most other Spring packages. * @@ -10,7 +8,5 @@ *

The classes in this package are discussed in Chapter 11 of * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). - * */ package org.springframework.beans; - diff --git a/spring-beans/src/main/java/org/springframework/beans/propertyeditors/package-info.java b/spring-beans/src/main/java/org/springframework/beans/propertyeditors/package-info.java index 376e3c6d3f4..755aee3ae88 100644 --- a/spring-beans/src/main/java/org/springframework/beans/propertyeditors/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/propertyeditors/package-info.java @@ -1,13 +1,9 @@ - /** - * * Properties editors used to convert from String values to object * types such as java.util.Properties. * *

Some of these editors are registered automatically by BeanWrapperImpl. * "CustomXxxEditor" classes are intended for manual registration in * specific binding processes, as they are localized or the like. - * */ package org.springframework.beans.propertyeditors; - diff --git a/spring-beans/src/main/java/org/springframework/beans/support/PropertyComparator.java b/spring-beans/src/main/java/org/springframework/beans/support/PropertyComparator.java index 299aaac4bed..585ff167cdc 100644 --- a/spring-beans/src/main/java/org/springframework/beans/support/PropertyComparator.java +++ b/spring-beans/src/main/java/org/springframework/beans/support/PropertyComparator.java @@ -23,6 +23,7 @@ import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.BeanWrapperImpl; import org.springframework.beans.BeansException; import org.springframework.util.StringUtils; diff --git a/spring-beans/src/main/java/org/springframework/beans/support/package-info.java b/spring-beans/src/main/java/org/springframework/beans/support/package-info.java index f2d334e1b75..a4679c4737f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/support/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/support/package-info.java @@ -1,9 +1,5 @@ - /** - * * Classes supporting the org.springframework.beans package, * such as utility classes for sorting and holding lists of beans. - * */ package org.springframework.beans.support; - diff --git a/spring-beans/src/test/java/org/springframework/beans/AbstractConfigurablePropertyAccessorTests.java b/spring-beans/src/test/java/org/springframework/beans/AbstractConfigurablePropertyAccessorTests.java index df70845ee84..e5d79830b34 100644 --- a/spring-beans/src/test/java/org/springframework/beans/AbstractConfigurablePropertyAccessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/AbstractConfigurablePropertyAccessorTests.java @@ -16,13 +16,13 @@ package org.springframework.beans; -import static org.hamcrest.CoreMatchers.*; -import static org.junit.Assert.*; - import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * * @author Stephane Nicoll diff --git a/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyValuesTests.java b/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyValuesTests.java index 51ea30bb548..69f3ac28871 100644 --- a/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyValuesTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyValuesTests.java @@ -16,11 +16,11 @@ package org.springframework.beans; -import static org.junit.Assert.assertTrue; - import java.util.HashMap; import java.util.Map; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperAutoGrowingTests.java b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperAutoGrowingTests.java index 06a7eb86ac1..cdf53480fe8 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperAutoGrowingTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperAutoGrowingTests.java @@ -22,7 +22,7 @@ import java.util.Map; import org.junit.Before; import org.junit.Test; -import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; /** diff --git a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java index 8c7d8da1e89..2b161c58e77 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java @@ -17,6 +17,7 @@ package org.springframework.beans; import org.junit.Test; + import org.springframework.tests.sample.beans.CustomEnum; import org.springframework.tests.sample.beans.GenericBean; diff --git a/spring-beans/src/test/java/org/springframework/beans/ConcurrentBeanWrapperTests.java b/spring-beans/src/test/java/org/springframework/beans/ConcurrentBeanWrapperTests.java index 2d98f138bae..d23c034a7b4 100644 --- a/spring-beans/src/test/java/org/springframework/beans/ConcurrentBeanWrapperTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/ConcurrentBeanWrapperTests.java @@ -16,8 +16,6 @@ package org.springframework.beans; -import static org.junit.Assert.*; - import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.Collections; @@ -30,6 +28,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.junit.Test; +import static org.junit.Assert.*; + /** * @author Guillaume Poirier * @author Juergen Hoeller diff --git a/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoFactoryTests.java index d2ee119f815..7813a8fa31b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoFactoryTests.java @@ -18,11 +18,11 @@ package org.springframework.beans; import java.beans.IntrospectionException; -import static org.hamcrest.CoreMatchers.notNullValue; -import static org.hamcrest.CoreMatchers.nullValue; -import static org.junit.Assert.assertThat; import org.junit.Test; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Unit tests for {@link ExtendedBeanInfoTests}. * diff --git a/spring-beans/src/test/java/org/springframework/beans/MutablePropertyValuesTests.java b/spring-beans/src/test/java/org/springframework/beans/MutablePropertyValuesTests.java index 20e3e3e71c2..ee23f9dfb64 100644 --- a/spring-beans/src/test/java/org/springframework/beans/MutablePropertyValuesTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/MutablePropertyValuesTests.java @@ -16,10 +16,10 @@ package org.springframework.beans; -import static org.junit.Assert.*; - import org.junit.Test; +import static org.junit.Assert.*; + /** * Tests for {@link MutablePropertyValues}. * diff --git a/spring-beans/src/test/java/org/springframework/beans/PropertyAccessorUtilsTests.java b/spring-beans/src/test/java/org/springframework/beans/PropertyAccessorUtilsTests.java index be5e8589034..4c567b5060c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/PropertyAccessorUtilsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/PropertyAccessorUtilsTests.java @@ -16,12 +16,12 @@ package org.springframework.beans; -import static org.junit.Assert.*; - import java.util.Arrays; import org.junit.Test; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Chris Beams diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java index 087f3c6e1aa..2273d0ec111 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java @@ -16,16 +16,13 @@ package org.springframework.beans.factory; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import java.util.Arrays; import java.util.List; import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -39,6 +36,9 @@ import org.springframework.tests.sample.beans.TestBean; import org.springframework.tests.sample.beans.factory.DummyFactory; import org.springframework.util.ObjectUtils; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * @author Rod Johnson * @author Juergen Hoeller diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java index 27d839a8913..e93c47ab620 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java @@ -27,7 +27,6 @@ import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; - import org.junit.Before; import org.junit.Test; @@ -41,7 +40,7 @@ import org.springframework.tests.Assume; import org.springframework.tests.TestGroup; import static org.junit.Assert.*; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.tests.TestResourceUtils.*; /** * @author Guillaume Poirier diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanLookupTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanLookupTests.java index 6f2704b1f72..e6c9d10d034 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanLookupTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanLookupTests.java @@ -16,18 +16,18 @@ package org.springframework.beans.factory; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; - import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.config.AbstractFactoryBean; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.ClassPathResource; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Written with the intention of reproducing SPR-7318. * diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/SharedBeanRegistryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/SharedBeanRegistryTests.java index 78015d18e8d..93321b43b40 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/SharedBeanRegistryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/SharedBeanRegistryTests.java @@ -16,16 +16,17 @@ package org.springframework.beans.factory; -import static org.junit.Assert.*; - import java.util.Arrays; import org.junit.Test; + import org.springframework.beans.BeansException; import org.springframework.beans.factory.support.DefaultSingletonBeanRegistry; import org.springframework.tests.sample.beans.DerivedTestBean; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Chris Beams diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/Spr5475Tests.java b/spring-beans/src/test/java/org/springframework/beans/factory/Spr5475Tests.java index 95e6269b1cf..f61119bc40f 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/Spr5475Tests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/Spr5475Tests.java @@ -1,16 +1,16 @@ package org.springframework.beans.factory; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; -import static org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition; - import org.junit.Test; + import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.ConstructorArgumentValues; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; +import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*; + /** * SPR-5475 exposed the fact that the error message displayed when incorrectly * invoking a factory method is not instructive to the user and rather misleading. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocatorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocatorTests.java index 460559b0684..6221e554bd0 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocatorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocatorTests.java @@ -16,14 +16,15 @@ package org.springframework.beans.factory.access; -import static org.junit.Assert.assertTrue; - import java.util.List; import org.junit.Test; + import org.springframework.beans.factory.BeanFactory; import org.springframework.util.ClassUtils; +import static org.junit.Assert.*; + /** * Unit tests for {@link SingletonBeanFactoryLocator}. * diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolverTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolverTests.java index b4b9ec2a288..70c2a3ee4df 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolverTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolverTests.java @@ -16,14 +16,12 @@ package org.springframework.beans.factory.annotation; -import static org.junit.Assert.*; - import org.junit.Test; -import org.springframework.beans.factory.annotation.AnnotationBeanWiringInfoResolver; -import org.springframework.beans.factory.annotation.Autowire; -import org.springframework.beans.factory.annotation.Configurable; + import org.springframework.beans.factory.wiring.BeanWiringInfo; +import static org.junit.Assert.*; + /** * @author Rick Evans * @author Chris Beams diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java index 687a9870fb2..90e08e99ed7 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java @@ -25,7 +25,6 @@ import java.util.HashMap; import java.util.Locale; import java.util.Map; -import static org.junit.Assert.*; import org.junit.Test; import org.springframework.beans.MutablePropertyValues; @@ -36,6 +35,8 @@ import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Chris Beams diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomScopeConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomScopeConfigurerTests.java index 4c6725e01ec..25a9a14a381 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomScopeConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomScopeConfigurerTests.java @@ -21,6 +21,7 @@ import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import static org.junit.Assert.*; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java index 4402696093e..07dd017da73 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java @@ -16,17 +16,18 @@ package org.springframework.beans.factory.config; -import static org.junit.Assert.assertEquals; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import java.sql.Connection; import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * Unit tests for {@link FieldRetrievingFactoryBean}. * diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java index a41a5c97bb7..5cc613d8ccd 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java @@ -17,12 +17,12 @@ package org.springframework.beans.factory.config; import java.util.Date; - import javax.inject.Provider; import org.junit.After; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.ObjectFactory; import org.springframework.beans.factory.support.DefaultListableBeanFactory; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java index cc43afb4da0..e24f36e7696 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java @@ -16,14 +16,15 @@ package org.springframework.beans.factory.config; -import static org.junit.Assert.*; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import java.util.Properties; import org.junit.Test; + import org.springframework.core.io.Resource; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * Unit tests for {@link PropertiesFactoryBean}. * diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java index e8cb71a8f05..f50cd07242d 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java @@ -16,19 +16,17 @@ package org.springframework.beans.factory.config; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * Unit tests for {@link PropertyPathFactoryBean}. * diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurerTests.java index 9bb77ce81a0..38a42d1d64e 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurerTests.java @@ -16,14 +16,6 @@ package org.springframework.beans.factory.config; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.nullValue; -import static org.junit.Assert.assertThat; -import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition; -import static org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition; -import static org.springframework.beans.factory.support.BeanDefinitionReaderUtils.registerWithGeneratedName; - import java.lang.reflect.Field; import java.util.Collections; import java.util.Map; @@ -32,12 +24,18 @@ import java.util.Properties; import org.junit.After; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.tests.sample.beans.TestBean; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; +import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*; +import static org.springframework.beans.factory.support.BeanDefinitionReaderUtils.*; + /** * Unit tests for {@link PropertyPlaceholderConfigurer}. * diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java index af139ae6093..12e570774f9 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java @@ -16,15 +16,6 @@ package org.springframework.beans.factory.config; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -38,6 +29,7 @@ import java.util.prefs.PreferencesFactory; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.BeanInitializationException; @@ -52,6 +44,10 @@ import org.springframework.core.io.Resource; import org.springframework.tests.sample.beans.IndexedTestBean; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; +import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * Unit tests for various {@link PropertyResourceConfigurer} implementations including: * {@link PropertyPlaceholderConfigurer}, {@link PropertyOverrideConfigurer} and diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBeanTests.java index 151245650e6..062f7757117 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/ServiceLocatorFactoryBeanTests.java @@ -19,6 +19,7 @@ package org.springframework.beans.factory.config; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; + import org.springframework.beans.FatalBeanException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.NoSuchBeanDefinitionException; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests-context.xml b/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests-context.xml index 1c1978456ca..69db4284cc7 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests-context.xml +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests-context.xml @@ -1,9 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java index b679c99298d..a3ac63a3090 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java @@ -16,20 +16,21 @@ package org.springframework.beans.factory.config; -import static org.junit.Assert.*; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import java.util.LinkedList; import java.util.List; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.ObjectFactory; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * Simple test to illustrate and verify scope usage. * diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/YamlMapFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/YamlMapFactoryBeanTests.java index 69ff8067fc0..313b547b457 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/YamlMapFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/YamlMapFactoryBeanTests.java @@ -16,8 +16,6 @@ package org.springframework.beans.factory.config; -import static org.junit.Assert.*; - import java.io.IOException; import java.io.InputStream; import java.util.LinkedHashMap; @@ -30,6 +28,8 @@ import org.springframework.core.io.AbstractResource; import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.FileSystemResource; +import static org.junit.Assert.*; + /** * Tests for {@link YamlMapFactoryBean}. * diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/YamlProcessorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/YamlProcessorTests.java index 49587f48ca4..02a535ea67b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/YamlProcessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/YamlProcessorTests.java @@ -15,9 +15,6 @@ */ package org.springframework.beans.factory.config; -import static org.junit.Assert.*; -import static org.springframework.beans.factory.config.YamlProcessor.*; - import java.util.Map; import java.util.Properties; @@ -29,6 +26,9 @@ import org.yaml.snakeyaml.scanner.ScannerException; import org.springframework.core.io.ByteArrayResource; +import static org.junit.Assert.*; +import static org.springframework.beans.factory.config.YamlProcessor.*; + /** * Tests for {@link YamlProcessor}. * diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/YamlPropertiesFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/YamlPropertiesFactoryBeanTests.java index 2487c4330dc..5e3d953b2c1 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/YamlPropertiesFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/YamlPropertiesFactoryBeanTests.java @@ -16,10 +16,6 @@ package org.springframework.beans.factory.config; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; -import static org.springframework.beans.factory.config.YamlProcessor.*; - import java.util.Map; import java.util.Properties; @@ -34,6 +30,10 @@ import org.yaml.snakeyaml.scanner.ScannerException; import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.ClassPathResource; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; +import static org.springframework.beans.factory.config.YamlProcessor.*; + /** * Tests for {@link YamlPropertiesFactoryBean}. * diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java index 550e87375b2..17455d785ce 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java @@ -16,19 +16,20 @@ package org.springframework.beans.factory.parsing; -import static org.junit.Assert.*; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; - import java.util.ArrayList; import java.util.List; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; +import static org.springframework.tests.TestResourceUtils.*; + /** * @author Rob Harrop * @author Chris Beams diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/FailFastProblemReporterTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/FailFastProblemReporterTests.java index 1c21525fb13..f6c5ef4175b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/FailFastProblemReporterTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/FailFastProblemReporterTests.java @@ -18,6 +18,7 @@ package org.springframework.beans.factory.parsing; import org.apache.commons.logging.Log; import org.junit.Test; + import org.springframework.core.io.DescriptiveResource; import static org.mockito.BDDMockito.*; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/NullSourceExtractorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/NullSourceExtractorTests.java index 5241e7662f2..30654711d4e 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/NullSourceExtractorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/NullSourceExtractorTests.java @@ -16,10 +16,10 @@ package org.springframework.beans.factory.parsing; -import static org.junit.Assert.*; - import org.junit.Test; +import static org.junit.Assert.*; + /** * @author Rick Evans * @author Chris Beams diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/ParseStateTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/ParseStateTests.java index 746d0c933b0..523ba431df7 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/ParseStateTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/ParseStateTests.java @@ -16,10 +16,10 @@ package org.springframework.beans.factory.parsing; -import static org.junit.Assert.*; - import org.junit.Test; +import static org.junit.Assert.*; + /** * @author Rob Harrop * @author Chris Beams diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/PassThroughSourceExtractorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/PassThroughSourceExtractorTests.java index fe85b49123f..3bf9b1808f2 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/PassThroughSourceExtractorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/PassThroughSourceExtractorTests.java @@ -16,10 +16,10 @@ package org.springframework.beans.factory.parsing; -import static org.junit.Assert.*; - import org.junit.Test; +import static org.junit.Assert.*; + /** * Unit tests for {@link PassThroughSourceExtractor}. * diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/serviceloader/ServiceLoaderTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/serviceloader/ServiceLoaderTests.java index 4e497ed0b11..bfdea719a77 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/serviceloader/ServiceLoaderTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/serviceloader/ServiceLoaderTests.java @@ -16,18 +16,18 @@ package org.springframework.beans.factory.serviceloader; -import static org.junit.Assert.assertTrue; - import java.util.List; import java.util.ServiceLoader; - import javax.xml.parsers.DocumentBuilderFactory; import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.core.JdkVersion; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Chris Beams diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java index 21c66d1d0e2..0ac52f002f6 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java @@ -17,6 +17,7 @@ package org.springframework.beans.factory.support; import junit.framework.TestCase; + import org.springframework.core.io.ClassPathResource; import org.springframework.tests.sample.beans.TestBean; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireBeanFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireBeanFactoryTests.java index cb7cf5580ba..e47dacb0218 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireBeanFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireBeanFactoryTests.java @@ -16,10 +16,6 @@ package org.springframework.beans.factory.support; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -27,6 +23,7 @@ import java.lang.annotation.Target; import org.junit.Ignore; import org.junit.Test; + import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.config.ConstructorArgumentValues; import org.springframework.beans.factory.config.DependencyDescriptor; @@ -34,6 +31,8 @@ import org.springframework.core.LocalVariableTableParameterNameDiscoverer; import org.springframework.core.MethodParameter; import org.springframework.util.ClassUtils; +import static org.junit.Assert.*; + /** * @author Mark Fisher * @author Juergen Hoeller diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java index 687b3d17ead..42bb23346b6 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java @@ -28,7 +28,6 @@ import java.security.PrivilegedExceptionAction; import java.security.ProtectionDomain; import java.util.PropertyPermission; import java.util.Set; - import javax.security.auth.AuthPermission; import javax.security.auth.Subject; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionsWithDefaultTypesTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionsWithDefaultTypesTests.java index 09e843a979f..cbbc2f760f9 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionsWithDefaultTypesTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionsWithDefaultTypesTests.java @@ -16,17 +16,17 @@ package org.springframework.beans.factory.xml; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - import java.util.List; import java.util.Map; import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * @author Rob Harrop * @author Juergen Hoeller diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java index e4ecd51ffe2..04c31efe66c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java @@ -16,15 +16,15 @@ package org.springframework.beans.factory.xml; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.fail; - import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.tests.sample.beans.TestBean; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * With Spring 3.1, bean id attributes (and all other id attributes across the * core schemas) are no longer typed as xsd:id, but as xsd:string. This allows diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests.java index 254cd828749..106e1d79b6b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests.java @@ -16,17 +16,18 @@ package org.springframework.beans.factory.xml; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.not; -import static org.hamcrest.Matchers.hasItems; -import static org.junit.Assert.assertThat; - import org.junit.Test; + import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.tests.sample.beans.TestBean; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.not; +import static org.hamcrest.Matchers.hasItems; +import static org.junit.Assert.*; + /** * Tests for propagating enclosing beans element defaults to nested beans elements. * diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementTests.java index cb780fb3e1e..3ac37c704a9 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementTests.java @@ -1,15 +1,16 @@ package org.springframework.beans.factory.xml; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.junit.Assert.assertThat; - import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.StandardEnvironment; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Tests for new nested beans element support in Spring XML * diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/ProfileXmlBeanDefinitionTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/ProfileXmlBeanDefinitionTests.java index abb935865f1..286b4062ac3 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/ProfileXmlBeanDefinitionTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/ProfileXmlBeanDefinitionTests.java @@ -16,19 +16,20 @@ package org.springframework.beans.factory.xml; -import static org.hamcrest.CoreMatchers.not; -import static org.junit.Assert.assertThat; - import org.hamcrest.Description; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; import org.junit.Test; + import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.StandardEnvironment; import org.springframework.core.io.ClassPathResource; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Tests various combinations of profile declarations against various profile * activation and profile default scenarios. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandlerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandlerTests.java index ee3a808bac5..2c3b3cec485 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandlerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandlerTests.java @@ -16,15 +16,16 @@ package org.springframework.beans.factory.xml; -import static org.junit.Assert.assertEquals; - import org.junit.Test; + import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.tests.sample.beans.DummyBean; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * @author Costin Leau */ diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerTests.java index ea763bf5cdc..f16977695bd 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerTests.java @@ -16,15 +16,16 @@ package org.springframework.beans.factory.xml; -import static org.junit.Assert.assertEquals; - import org.junit.Test; + import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * @author Rob Harrop * @author Juergen Hoeller diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java index 34ad354b14e..53c951ebf1c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java @@ -16,11 +16,6 @@ package org.springframework.beans.factory.xml; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; @@ -35,6 +30,7 @@ import java.util.TreeMap; import java.util.TreeSet; import org.junit.Test; + import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.config.ListFactoryBean; @@ -45,6 +41,8 @@ import org.springframework.core.io.ClassPathResource; import org.springframework.tests.sample.beans.HasMap; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * Tests for collections in XML bean definitions. * diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/support/DefaultNamespaceHandlerResolverTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/support/DefaultNamespaceHandlerResolverTests.java index 2b2ee692e6a..fec3ba478e7 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/support/DefaultNamespaceHandlerResolverTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/support/DefaultNamespaceHandlerResolverTests.java @@ -16,13 +16,14 @@ package org.springframework.beans.factory.xml.support; -import static org.junit.Assert.*; - import org.junit.Test; + import org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver; import org.springframework.beans.factory.xml.NamespaceHandler; import org.springframework.beans.factory.xml.UtilNamespaceHandler; +import static org.junit.Assert.*; + /** * Unit and integration tests for the {@link DefaultNamespaceHandlerResolver} class. * diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/ByteArrayPropertyEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/ByteArrayPropertyEditorTests.java index f2d77a2b684..e0e2dba8dad 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/ByteArrayPropertyEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/ByteArrayPropertyEditorTests.java @@ -16,10 +16,10 @@ package org.springframework.beans.propertyeditors; -import junit.framework.TestCase; - import java.beans.PropertyEditor; +import junit.framework.TestCase; + /** * Unit tests for the {@link ByteArrayPropertyEditor} class. * diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CharArrayPropertyEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CharArrayPropertyEditorTests.java index 3f28d1c2512..24084ddcd05 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CharArrayPropertyEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CharArrayPropertyEditorTests.java @@ -16,10 +16,10 @@ package org.springframework.beans.propertyeditors; -import junit.framework.TestCase; - import java.beans.PropertyEditor; +import junit.framework.TestCase; + /** * Unit tests for the {@link CharArrayPropertyEditor} class. * diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomCollectionEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomCollectionEditorTests.java index bd1623390ad..044dcb5708e 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomCollectionEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomCollectionEditorTests.java @@ -16,14 +16,14 @@ package org.springframework.beans.propertyeditors; -import static org.junit.Assert.*; - import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.junit.Test; +import static org.junit.Assert.*; + /** * Unit tests for the {@link CustomCollectionEditor} class. * diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java index d60dab8743b..c8372a29e4a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java @@ -16,8 +16,6 @@ package org.springframework.beans.propertyeditors; -import static org.junit.Assert.*; - import java.beans.PropertyEditor; import java.beans.PropertyEditorSupport; import java.beans.PropertyVetoException; @@ -39,6 +37,7 @@ import java.util.Vector; import java.util.regex.Pattern; import org.junit.Test; + import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeanWrapperImpl; import org.springframework.beans.BeansException; @@ -50,6 +49,8 @@ import org.springframework.tests.sample.beans.IndexedTestBean; import org.springframework.tests.sample.beans.NumberTestBean; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * Unit tests for the various PropertyEditors in Spring. * diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/FileEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/FileEditorTests.java index fc46e1ef7dd..17f6d984034 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/FileEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/FileEditorTests.java @@ -16,14 +16,15 @@ package org.springframework.beans.propertyeditors; -import static org.junit.Assert.*; - import java.beans.PropertyEditor; import java.io.File; import org.junit.Test; + import org.springframework.util.ClassUtils; +import static org.junit.Assert.*; + /** * @author Thomas Risberg * @author Chris Beams diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/InputStreamEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/InputStreamEditorTests.java index 94f8f1f387e..537be76543d 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/InputStreamEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/InputStreamEditorTests.java @@ -16,13 +16,14 @@ package org.springframework.beans.propertyeditors; -import static org.junit.Assert.*; - import java.io.InputStream; import org.junit.Test; + import org.springframework.util.ClassUtils; +import static org.junit.Assert.*; + /** * Unit tests for the {@link InputStreamEditor} class. * diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/ResourceBundleEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/ResourceBundleEditorTests.java index cf90255ed0d..c6659d113ef 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/ResourceBundleEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/ResourceBundleEditorTests.java @@ -16,12 +16,12 @@ package org.springframework.beans.propertyeditors; -import static org.junit.Assert.*; - import java.util.ResourceBundle; import org.junit.Test; +import static org.junit.Assert.*; + /** * Unit tests for the {@link ResourceBundleEditor} class. * diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URIEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URIEditorTests.java index 426ceac13cb..a347cfa86d3 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URIEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URIEditorTests.java @@ -19,11 +19,12 @@ package org.springframework.beans.propertyeditors; import java.beans.PropertyEditor; import java.net.URI; -import static org.junit.Assert.*; import org.junit.Test; import org.springframework.util.ClassUtils; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Arjen Poutsma diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URLEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URLEditorTests.java index 16c7e9353d9..36738e1b212 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URLEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/URLEditorTests.java @@ -16,14 +16,15 @@ package org.springframework.beans.propertyeditors; -import static org.junit.Assert.*; - import java.beans.PropertyEditor; import java.net.URL; import org.junit.Test; + import org.springframework.util.ClassUtils; +import static org.junit.Assert.*; + /** * @author Rick Evans * @author Chris Beams diff --git a/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java b/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java index 3e22df61f95..df307be06c9 100644 --- a/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java @@ -23,7 +23,6 @@ import org.junit.Test; import org.springframework.tests.Assume; import org.springframework.tests.TestGroup; - import org.springframework.tests.sample.beans.TestBean; import static org.junit.Assert.*; diff --git a/spring-beans/src/test/java/org/springframework/beans/support/PropertyComparatorTests.java b/spring-beans/src/test/java/org/springframework/beans/support/PropertyComparatorTests.java index ad1666fcd11..09d74c73f4b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/support/PropertyComparatorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/support/PropertyComparatorTests.java @@ -16,11 +16,12 @@ package org.springframework.beans.support; -import static org.junit.Assert.assertTrue; - import org.junit.Test; + import org.springframework.util.comparator.CompoundComparator; +import static org.junit.Assert.*; + /** * Unit tests for {@link PropertyComparator} * diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/DummyFactory.java b/spring-beans/src/test/java/org/springframework/tests/sample/beans/DummyFactory.java index 35e52d6d506..28300e7438d 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/DummyFactory.java +++ b/spring-beans/src/test/java/org/springframework/tests/sample/beans/DummyFactory.java @@ -24,7 +24,6 @@ import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.config.AutowireCapableBeanFactory; -import org.springframework.tests.sample.beans.TestBean; /** * Simple factory to allow testing of FactoryBean support in AbstractBeanFactory. diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTestsWithErrors.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTestsWithErrors.xml index 1773a1c9c61..7ffa44cd234 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTestsWithErrors.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTestsWithErrors.xml @@ -1,8 +1,7 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTests.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTests.xml index 8dd70708d3d..260168852ff 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTests.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTests.xml @@ -1,12 +1,8 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:p="http://www.springframework.org/schema/p" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTestsWithErrors.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTestsWithErrors.xml index 384171fdc03..4399b58b10d 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTestsWithErrors.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTestsWithErrors.xml @@ -1,12 +1,8 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:p="http://www.springframework.org/schema/p" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/config/package-info.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/config/package-info.java index 9924e8ca99c..280ecee2fbe 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/config/package-info.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/config/package-info.java @@ -2,7 +2,8 @@ * Support package for declarative JSR-107 caching configuration. Used * by the regular Spring's caching configuration when it detects the * JSR-107 API and Spring's JCache implementation. + * *

Provide an extension of the {@code CachingConfigurer} that exposes * the exception cache resolver to use, see {@code JCacheConfigurer}. */ -package org.springframework.cache.jcache.config; \ No newline at end of file +package org.springframework.cache.jcache.config; diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractJCacheKeyOperation.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractJCacheKeyOperation.java index facc4d37457..e06ece9300f 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractJCacheKeyOperation.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractJCacheKeyOperation.java @@ -19,7 +19,6 @@ package org.springframework.cache.jcache.interceptor; import java.lang.annotation.Annotation; import java.util.ArrayList; import java.util.List; - import javax.cache.annotation.CacheInvocationParameter; import javax.cache.annotation.CacheMethodDetails; diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractKeyCacheInterceptor.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractKeyCacheInterceptor.java index d8431a55b1c..b3870ed539c 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractKeyCacheInterceptor.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractKeyCacheInterceptor.java @@ -17,7 +17,6 @@ package org.springframework.cache.jcache.interceptor; import java.lang.annotation.Annotation; - import javax.cache.annotation.CacheKeyInvocationContext; import org.springframework.cache.interceptor.CacheErrorHandler; diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AnnotationJCacheOperationSource.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AnnotationJCacheOperationSource.java index 768879e39d9..e2146c6f667 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AnnotationJCacheOperationSource.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AnnotationJCacheOperationSource.java @@ -20,7 +20,6 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; - import javax.cache.annotation.CacheDefaults; import javax.cache.annotation.CacheKeyGenerator; import javax.cache.annotation.CacheMethodDetails; diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/CachePutOperation.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/CachePutOperation.java index 40b04ff75bf..0df04db81a7 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/CachePutOperation.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/CachePutOperation.java @@ -18,7 +18,6 @@ package org.springframework.cache.jcache.interceptor; import java.lang.reflect.Method; import java.util.List; - import javax.cache.annotation.CacheInvocationParameter; import javax.cache.annotation.CacheMethodDetails; import javax.cache.annotation.CachePut; diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/CacheResolverAdapter.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/CacheResolverAdapter.java index 83526d98702..369c6a12888 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/CacheResolverAdapter.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/CacheResolverAdapter.java @@ -3,7 +3,6 @@ package org.springframework.cache.jcache.interceptor; import java.util.Collection; import java.util.Collections; - import javax.cache.annotation.CacheInvocationContext; import org.springframework.cache.Cache; diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultCacheInvocationContext.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultCacheInvocationContext.java index 5c5cdd4e8f3..64d4d2c2ee2 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultCacheInvocationContext.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultCacheInvocationContext.java @@ -20,7 +20,6 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.util.Arrays; import java.util.Set; - import javax.cache.annotation.CacheInvocationContext; import javax.cache.annotation.CacheInvocationParameter; diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultCacheKeyInvocationContext.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultCacheKeyInvocationContext.java index 0e2235943db..28f8ea507d2 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultCacheKeyInvocationContext.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultCacheKeyInvocationContext.java @@ -17,7 +17,6 @@ package org.springframework.cache.jcache.interceptor; import java.lang.annotation.Annotation; - import javax.cache.annotation.CacheInvocationParameter; import javax.cache.annotation.CacheKeyInvocationContext; diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultCacheMethodDetails.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultCacheMethodDetails.java index 2df8b9740a1..b60fb2a59de 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultCacheMethodDetails.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/DefaultCacheMethodDetails.java @@ -16,16 +16,15 @@ package org.springframework.cache.jcache.interceptor; -import static java.util.Arrays.*; - import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.util.Collections; import java.util.LinkedHashSet; import java.util.Set; - import javax.cache.annotation.CacheMethodDetails; +import static java.util.Arrays.*; + /** * The default {@link CacheMethodDetails} implementation. * diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/JCacheOperation.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/JCacheOperation.java index 37dbddb75a8..84eba79bcde 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/JCacheOperation.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/JCacheOperation.java @@ -17,7 +17,6 @@ package org.springframework.cache.jcache.interceptor; import java.lang.annotation.Annotation; - import javax.cache.annotation.CacheInvocationParameter; import javax.cache.annotation.CacheMethodDetails; diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/KeyGeneratorAdapter.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/KeyGeneratorAdapter.java index 6e18c402776..42db86cefdb 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/KeyGeneratorAdapter.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/KeyGeneratorAdapter.java @@ -4,7 +4,6 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; - import javax.cache.annotation.CacheInvocationParameter; import javax.cache.annotation.CacheKeyGenerator; import javax.cache.annotation.CacheKeyInvocationContext; diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/package-info.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/package-info.java index 999738f1ac6..9240434b373 100644 --- a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/package-info.java +++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/package-info.java @@ -1,8 +1,10 @@ /** * AOP-based solution for declarative caching demarcation using JSR-107 annotations. + * *

Strongly based on the infrastructure in org.springframework.cache.interceptor * that deals with Spring's caching annotations. + * *

Builds on the AOP infrastructure in org.springframework.aop.framework. * Any POJO can be cache-advised with Spring. */ -package org.springframework.cache.jcache.interceptor; \ No newline at end of file +package org.springframework.cache.jcache.interceptor; diff --git a/spring-context-support/src/main/java/org/springframework/mail/SimpleMailMessage.java b/spring-context-support/src/main/java/org/springframework/mail/SimpleMailMessage.java index 65dc4d08ee1..bca30499d95 100644 --- a/spring-context-support/src/main/java/org/springframework/mail/SimpleMailMessage.java +++ b/spring-context-support/src/main/java/org/springframework/mail/SimpleMailMessage.java @@ -19,9 +19,9 @@ package org.springframework.mail; import java.io.Serializable; import java.util.Date; +import org.springframework.util.Assert; import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; -import org.springframework.util.Assert; /** * Models a simple mail message, including data such as the from, to, cc, subject, and text fields. diff --git a/spring-context-support/src/main/java/org/springframework/mail/javamail/package-info.java b/spring-context-support/src/main/java/org/springframework/mail/javamail/package-info.java index f4470758b73..44d9ed12c5a 100644 --- a/spring-context-support/src/main/java/org/springframework/mail/javamail/package-info.java +++ b/spring-context-support/src/main/java/org/springframework/mail/javamail/package-info.java @@ -1,10 +1,6 @@ - /** - * * JavaMail support for Spring's mail infrastructure. * Provides an extended JavaMailSender interface and a MimeMessageHelper * class for convenient population of a JavaMail MimeMessage. - * */ package org.springframework.mail.javamail; - diff --git a/spring-context-support/src/main/java/org/springframework/mail/package-info.java b/spring-context-support/src/main/java/org/springframework/mail/package-info.java index a714aeb950d..c9a94c5c783 100644 --- a/spring-context-support/src/main/java/org/springframework/mail/package-info.java +++ b/spring-context-support/src/main/java/org/springframework/mail/package-info.java @@ -1,9 +1,5 @@ - /** - * * Spring's generic mail infrastructure. * Concrete implementations are provided in the subpackages. - * */ package org.springframework.mail; - diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/package-info.java b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/package-info.java index 338719514e9..ad5b35f30bf 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/commonj/package-info.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/commonj/package-info.java @@ -1,9 +1,5 @@ - /** - * * Convenience classes for scheduling based on the CommonJ WorkManager/TimerManager * facility, as supported by IBM WebSphere 6.0+ and BEA WebLogic 9.0+. - * */ package org.springframework.scheduling.commonj; - diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/ResourceLoaderClassLoadHelper.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/ResourceLoaderClassLoadHelper.java index bcbaa67f90e..18ab755d561 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/ResourceLoaderClassLoadHelper.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/ResourceLoaderClassLoadHelper.java @@ -24,6 +24,7 @@ import java.net.URL; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.quartz.spi.ClassLoadHelper; + import org.springframework.core.io.DefaultResourceLoader; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerContextAware.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerContextAware.java index 9f2c48a23de..8e43f1aa79c 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerContextAware.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/SchedulerContextAware.java @@ -17,6 +17,7 @@ package org.springframework.scheduling.quartz; import org.quartz.SchedulerContext; + import org.springframework.beans.factory.Aware; /** diff --git a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/package-info.java b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/package-info.java index 4b8a70a1821..df50ca80d70 100644 --- a/spring-context-support/src/main/java/org/springframework/scheduling/quartz/package-info.java +++ b/spring-context-support/src/main/java/org/springframework/scheduling/quartz/package-info.java @@ -1,12 +1,8 @@ - /** - * * Support classes for the open source scheduler * Quartz, * allowing to set up Quartz Schedulers, JobDetails and * Triggers as beans in a Spring context. Also provides * convenience classes for implementing Quartz Jobs. - * */ package org.springframework.scheduling.quartz; - diff --git a/spring-context-support/src/main/java/org/springframework/ui/freemarker/package-info.java b/spring-context-support/src/main/java/org/springframework/ui/freemarker/package-info.java index b64940311be..28fbe3bf516 100644 --- a/spring-context-support/src/main/java/org/springframework/ui/freemarker/package-info.java +++ b/spring-context-support/src/main/java/org/springframework/ui/freemarker/package-info.java @@ -1,10 +1,6 @@ - /** - * * Support classes for setting up * FreeMarker * within a Spring application context. - * */ package org.springframework.ui.freemarker; - diff --git a/spring-context-support/src/main/java/org/springframework/ui/jasperreports/package-info.java b/spring-context-support/src/main/java/org/springframework/ui/jasperreports/package-info.java index 9a9945f8f2a..bebe019c9cb 100644 --- a/spring-context-support/src/main/java/org/springframework/ui/jasperreports/package-info.java +++ b/spring-context-support/src/main/java/org/springframework/ui/jasperreports/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support classes for * JasperReports. - * */ package org.springframework.ui.jasperreports; - diff --git a/spring-context-support/src/main/java/org/springframework/ui/velocity/package-info.java b/spring-context-support/src/main/java/org/springframework/ui/velocity/package-info.java index 5553de94639..36409cf3940 100644 --- a/spring-context-support/src/main/java/org/springframework/ui/velocity/package-info.java +++ b/spring-context-support/src/main/java/org/springframework/ui/velocity/package-info.java @@ -1,10 +1,6 @@ - /** - * * Support classes for setting up * Velocity * within a Spring application context. - * */ package org.springframework.ui.velocity; - diff --git a/spring-context-support/src/test/java/org/springframework/cache/AbstractCacheTests.java b/spring-context-support/src/test/java/org/springframework/cache/AbstractCacheTests.java index ba41bfa1800..d2430cd2a9b 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/AbstractCacheTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/AbstractCacheTests.java @@ -16,10 +16,10 @@ package org.springframework.cache; -import static org.junit.Assert.*; - import org.junit.Test; +import static org.junit.Assert.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheManagerTests.java b/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheManagerTests.java index eb75558d454..4c3e41722b9 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheManagerTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheManagerTests.java @@ -21,6 +21,7 @@ import net.sf.ehcache.config.CacheConfiguration; import net.sf.ehcache.config.Configuration; import org.junit.After; import org.junit.Before; + import org.springframework.cache.transaction.AbstractTransactionSupportingCacheManagerTests; /** diff --git a/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java b/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java index b6d58d214d1..77d7c6c3b80 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java @@ -16,8 +16,6 @@ package org.springframework.cache.ehcache; -import static org.junit.Assert.*; - import net.sf.ehcache.CacheManager; import net.sf.ehcache.Ehcache; import net.sf.ehcache.Element; @@ -26,10 +24,13 @@ import net.sf.ehcache.config.Configuration; import org.junit.After; import org.junit.Before; import org.junit.Test; + import org.springframework.cache.AbstractCacheTests; import org.springframework.tests.Assume; import org.springframework.tests.TestGroup; +import static org.junit.Assert.*; + /** * @author Costin Leau * @author Stephane Nicoll diff --git a/spring-context-support/src/test/java/org/springframework/cache/guava/GuavaCacheManagerTests.java b/spring-context-support/src/test/java/org/springframework/cache/guava/GuavaCacheManagerTests.java index 2a47a81a8d1..1fc676ddeb9 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/guava/GuavaCacheManagerTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/guava/GuavaCacheManagerTests.java @@ -24,7 +24,7 @@ import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; import static org.junit.Assert.*; -import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.*; /** * @author Juergen Hoeller diff --git a/spring-context-support/src/test/java/org/springframework/cache/guava/GuavaCacheTests.java b/spring-context-support/src/test/java/org/springframework/cache/guava/GuavaCacheTests.java index 763e56abb2b..f9964e031f6 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/guava/GuavaCacheTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/guava/GuavaCacheTests.java @@ -16,8 +16,6 @@ package org.springframework.cache.guava; -import static org.junit.Assert.*; - import com.google.common.cache.CacheBuilder; import org.junit.Before; import org.junit.Test; @@ -25,6 +23,8 @@ import org.junit.Test; import org.springframework.cache.AbstractCacheTests; import org.springframework.cache.Cache; +import static org.junit.Assert.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheCacheManagerTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheCacheManagerTests.java index 7181db9b746..b8f201e104b 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheCacheManagerTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheCacheManagerTests.java @@ -16,16 +16,17 @@ package org.springframework.cache.jcache; -import static org.mockito.BDDMockito.*; - -import javax.cache.Cache; -import javax.cache.CacheManager; import java.util.ArrayList; import java.util.List; +import javax.cache.Cache; +import javax.cache.CacheManager; import org.junit.Before; + import org.springframework.cache.transaction.AbstractTransactionSupportingCacheManagerTests; +import static org.mockito.BDDMockito.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/AbstractJCacheAnnotationTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/AbstractJCacheAnnotationTests.java index cd4eb3a23bc..4b0ec3174f4 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/AbstractJCacheAnnotationTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/AbstractJCacheAnnotationTests.java @@ -16,8 +16,6 @@ package org.springframework.cache.jcache.config; -import static org.junit.Assert.*; - import java.io.IOException; import java.util.concurrent.ConcurrentHashMap; @@ -31,6 +29,8 @@ import org.springframework.cache.CacheManager; import org.springframework.cache.interceptor.SimpleKeyGenerator; import org.springframework.context.ApplicationContext; +import static org.junit.Assert.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheCustomInterceptorTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheCustomInterceptorTests.java index 885ae943e50..2c14da4e52c 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheCustomInterceptorTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheCustomInterceptorTests.java @@ -16,8 +16,6 @@ package org.springframework.cache.jcache.config; -import static org.junit.Assert.*; - import java.io.IOException; import java.util.Arrays; import java.util.Map; @@ -40,6 +38,8 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import static org.junit.Assert.*; + /** * * @author Stephane Nicoll diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java index 29ef6c6651d..d1fb35dde34 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java @@ -16,8 +16,6 @@ package org.springframework.cache.jcache.config; -import static org.junit.Assert.*; - import java.util.Arrays; import org.junit.Test; @@ -46,6 +44,8 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import static org.junit.Assert.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheNamespaceDrivenTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheNamespaceDrivenTests.java index e5efebbc6e3..139b8feb35d 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheNamespaceDrivenTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheNamespaceDrivenTests.java @@ -16,8 +16,6 @@ package org.springframework.cache.jcache.config; -import static org.junit.Assert.*; - import org.junit.Test; import org.springframework.cache.interceptor.CacheErrorHandler; @@ -27,6 +25,8 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; +import static org.junit.Assert.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AbstractCacheOperationTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AbstractCacheOperationTests.java index 4ba8d7f807d..e784ecb1cd9 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AbstractCacheOperationTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AbstractCacheOperationTests.java @@ -16,11 +16,8 @@ package org.springframework.cache.jcache.interceptor; -import static org.junit.Assert.*; - import java.lang.annotation.Annotation; import java.lang.reflect.Method; - import javax.cache.annotation.CacheInvocationParameter; import javax.cache.annotation.CacheMethodDetails; @@ -31,6 +28,8 @@ import org.springframework.core.annotation.AnnotationUtils; import org.springframework.util.Assert; import org.springframework.util.ReflectionUtils; +import static org.junit.Assert.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotatedJCacheableService.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotatedJCacheableService.java index dc3f3b46ec0..cb93b676417 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotatedJCacheableService.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotatedJCacheableService.java @@ -19,7 +19,6 @@ package org.springframework.cache.jcache.interceptor; import java.io.IOException; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.atomic.AtomicLong; - import javax.cache.annotation.CacheDefaults; import javax.cache.annotation.CacheKey; import javax.cache.annotation.CachePut; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotationCacheOperationSourceTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotationCacheOperationSourceTests.java index 0268b57499a..b2ed17c9621 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotationCacheOperationSourceTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotationCacheOperationSourceTests.java @@ -16,12 +16,8 @@ package org.springframework.cache.jcache.interceptor; -import static org.junit.Assert.*; -import static org.mockito.BDDMockito.*; - import java.lang.reflect.Method; import java.util.Comparator; - import javax.cache.annotation.CacheDefaults; import javax.cache.annotation.CacheKeyGenerator; import javax.cache.annotation.CacheRemove; @@ -41,6 +37,9 @@ import org.springframework.context.support.StaticApplicationContext; import org.springframework.util.Assert; import org.springframework.util.ReflectionUtils; +import static org.junit.Assert.*; +import static org.mockito.BDDMockito.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CachePutOperationTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CachePutOperationTests.java index c9eaa5f67f6..6c0e1832c4b 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CachePutOperationTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CachePutOperationTests.java @@ -16,16 +16,15 @@ package org.springframework.cache.jcache.interceptor; -import static org.junit.Assert.*; - import java.io.IOException; - import javax.cache.annotation.CacheInvocationParameter; import javax.cache.annotation.CacheMethodDetails; import javax.cache.annotation.CachePut; import org.junit.Test; +import static org.junit.Assert.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheRemoveAllOperationTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheRemoveAllOperationTests.java index 7ee654ed80f..1dc263b3d34 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheRemoveAllOperationTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheRemoveAllOperationTests.java @@ -16,14 +16,14 @@ package org.springframework.cache.jcache.interceptor; -import static org.junit.Assert.*; - import javax.cache.annotation.CacheInvocationParameter; import javax.cache.annotation.CacheMethodDetails; import javax.cache.annotation.CacheRemoveAll; import org.junit.Test; +import static org.junit.Assert.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheRemoveOperationTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheRemoveOperationTests.java index 19c3963b355..668a18d0fa2 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheRemoveOperationTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheRemoveOperationTests.java @@ -16,14 +16,14 @@ package org.springframework.cache.jcache.interceptor; -import static org.junit.Assert.*; - import javax.cache.annotation.CacheInvocationParameter; import javax.cache.annotation.CacheMethodDetails; import javax.cache.annotation.CacheRemove; import org.junit.Test; +import static org.junit.Assert.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheResolverAdapterTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheResolverAdapterTests.java index 95c27ea2d99..b15c215f7e8 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheResolverAdapterTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheResolverAdapterTests.java @@ -16,13 +16,9 @@ package org.springframework.cache.jcache.interceptor; -import static org.junit.Assert.*; -import static org.mockito.BDDMockito.*; - import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.util.Collection; - import javax.cache.annotation.CacheInvocationContext; import javax.cache.annotation.CacheMethodDetails; import javax.cache.annotation.CacheResolver; @@ -37,6 +33,9 @@ import org.springframework.cache.jcache.AbstractJCacheTests; import org.springframework.util.Assert; import org.springframework.util.ReflectionUtils; +import static org.junit.Assert.*; +import static org.mockito.BDDMockito.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheResultOperationTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheResultOperationTests.java index 4cb9261d24e..09662a4f3f8 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheResultOperationTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/CacheResultOperationTests.java @@ -16,12 +16,9 @@ package org.springframework.cache.jcache.interceptor; -import static org.junit.Assert.*; - import java.io.IOException; import java.lang.annotation.Annotation; import java.util.Set; - import javax.cache.annotation.CacheInvocationParameter; import javax.cache.annotation.CacheKey; import javax.cache.annotation.CacheMethodDetails; @@ -31,6 +28,8 @@ import org.junit.Test; import org.springframework.beans.factory.annotation.Value; +import static org.junit.Assert.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/JCacheErrorHandlerTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/JCacheErrorHandlerTests.java index 69b2dd16214..54b66033a16 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/JCacheErrorHandlerTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/JCacheErrorHandlerTests.java @@ -18,7 +18,6 @@ package org.springframework.cache.jcache.interceptor; import java.util.Arrays; import java.util.concurrent.atomic.AtomicLong; - import javax.cache.annotation.CacheDefaults; import javax.cache.annotation.CachePut; import javax.cache.annotation.CacheRemove; @@ -30,6 +29,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; import org.springframework.cache.annotation.EnableCaching; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/JCacheInterceptorTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/JCacheInterceptorTests.java index 1b980c08ca2..d45e99002a5 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/JCacheInterceptorTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/JCacheInterceptorTests.java @@ -16,8 +16,6 @@ package org.springframework.cache.jcache.interceptor; -import static org.junit.Assert.*; - import java.lang.reflect.Method; import org.junit.Test; @@ -31,6 +29,8 @@ import org.springframework.cache.jcache.AbstractJCacheTests; import org.springframework.context.support.StaticApplicationContext; import org.springframework.util.ReflectionUtils; +import static org.junit.Assert.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/JCacheKeyGeneratorTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/JCacheKeyGeneratorTests.java index 3998bbd9690..0e61f73dc02 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/JCacheKeyGeneratorTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/JCacheKeyGeneratorTests.java @@ -16,12 +16,9 @@ package org.springframework.cache.jcache.interceptor; -import static org.junit.Assert.*; - import java.lang.reflect.Method; import java.util.Arrays; import java.util.concurrent.atomic.AtomicLong; - import javax.cache.annotation.CacheDefaults; import javax.cache.annotation.CacheKey; import javax.cache.annotation.CacheResult; @@ -41,6 +38,8 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import static org.junit.Assert.*; + /** * * @author Stephane Nicoll diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheKeyGenerator.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheKeyGenerator.java index f045efdef3f..98e3b3acfa7 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheKeyGenerator.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheKeyGenerator.java @@ -1,7 +1,6 @@ package org.springframework.cache.jcache.support; import java.lang.annotation.Annotation; - import javax.cache.annotation.CacheKeyGenerator; import javax.cache.annotation.CacheKeyInvocationContext; import javax.cache.annotation.GeneratedCacheKey; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheResolver.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheResolver.java index 06e5d706fb5..93013e398b4 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheResolver.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheResolver.java @@ -16,14 +16,13 @@ package org.springframework.cache.jcache.support; -import static org.mockito.BDDMockito.*; - import java.lang.annotation.Annotation; - import javax.cache.Cache; import javax.cache.annotation.CacheInvocationContext; import javax.cache.annotation.CacheResolver; +import static org.mockito.BDDMockito.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheResolverFactory.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheResolverFactory.java index 48888e59623..547497248c0 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheResolverFactory.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheResolverFactory.java @@ -17,7 +17,6 @@ package org.springframework.cache.jcache.support; import java.lang.annotation.Annotation; - import javax.cache.annotation.CacheMethodDetails; import javax.cache.annotation.CacheResolver; import javax.cache.annotation.CacheResolverFactory; diff --git a/spring-context-support/src/test/java/org/springframework/cache/transaction/AbstractTransactionSupportingCacheManagerTests.java b/spring-context-support/src/test/java/org/springframework/cache/transaction/AbstractTransactionSupportingCacheManagerTests.java index 39fb0db58d4..3adb8bbea0a 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/transaction/AbstractTransactionSupportingCacheManagerTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/transaction/AbstractTransactionSupportingCacheManagerTests.java @@ -16,15 +16,16 @@ package org.springframework.cache.transaction; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; - import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; + import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; + /** * Shared tests for {@link CacheManager} that inherit from * {@link AbstractTransactionSupportingCacheManager}. diff --git a/spring-context-support/src/test/java/org/springframework/cache/transaction/TransactionAwareCacheDecoratorTests.java b/spring-context-support/src/test/java/org/springframework/cache/transaction/TransactionAwareCacheDecoratorTests.java index 945000565dd..7b657240bd6 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/transaction/TransactionAwareCacheDecoratorTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/transaction/TransactionAwareCacheDecoratorTests.java @@ -16,11 +16,10 @@ package org.springframework.cache.transaction; -import static org.junit.Assert.*; - import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import org.springframework.cache.Cache; import org.springframework.cache.concurrent.ConcurrentMapCache; import org.springframework.tests.transaction.CallCountingTransactionManager; @@ -29,6 +28,8 @@ import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.interceptor.DefaultTransactionAttribute; +import static org.junit.Assert.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context-support/src/test/java/org/springframework/mail/SimpleMailMessageTests.java b/spring-context-support/src/test/java/org/springframework/mail/SimpleMailMessageTests.java index ad479d9d307..41f33a15995 100644 --- a/spring-context-support/src/test/java/org/springframework/mail/SimpleMailMessageTests.java +++ b/spring-context-support/src/test/java/org/springframework/mail/SimpleMailMessageTests.java @@ -16,14 +16,14 @@ package org.springframework.mail; -import static org.junit.Assert.*; - import java.util.Arrays; import java.util.Date; import java.util.List; import org.junit.Test; +import static org.junit.Assert.*; + /** * @author Dmitriy Kopylenko * @author Juergen Hoeller diff --git a/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSchedulerLifecycleTests.java b/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSchedulerLifecycleTests.java index 374a2e81d82..cd0b83d5022 100644 --- a/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSchedulerLifecycleTests.java +++ b/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSchedulerLifecycleTests.java @@ -16,15 +16,14 @@ package org.springframework.scheduling.quartz; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - import org.junit.Test; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.util.StopWatch; +import static org.junit.Assert.*; + /** * @author Mark Fisher * @since 3.0 diff --git a/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java b/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java index cc017e14df0..c66d33cff09 100644 --- a/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java +++ b/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java @@ -18,11 +18,9 @@ package org.springframework.scheduling.quartz; import java.util.HashMap; import java.util.Map; - import javax.sql.DataSource; import org.junit.Test; - import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/AbstractCachingConfiguration.java b/spring-context/src/main/java/org/springframework/cache/annotation/AbstractCachingConfiguration.java index 0449abf50de..8d25623dc57 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/AbstractCachingConfiguration.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/AbstractCachingConfiguration.java @@ -17,7 +17,6 @@ package org.springframework.cache.annotation; import java.util.Collection; - import javax.annotation.PostConstruct; import org.springframework.beans.factory.annotation.Autowired; diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/Caching.java b/spring-context/src/main/java/org/springframework/cache/annotation/Caching.java index 6bad879b76f..6802fd5d96e 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/Caching.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/Caching.java @@ -16,7 +16,12 @@ package org.springframework.cache.annotation; -import java.lang.annotation.*; +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; /** * Group annotation for multiple cache annotations (of different or the same type). diff --git a/spring-context/src/main/java/org/springframework/cache/config/CacheNamespaceHandler.java b/spring-context/src/main/java/org/springframework/cache/config/CacheNamespaceHandler.java index a02d359a201..59dcc256dfb 100644 --- a/spring-context/src/main/java/org/springframework/cache/config/CacheNamespaceHandler.java +++ b/spring-context/src/main/java/org/springframework/cache/config/CacheNamespaceHandler.java @@ -16,11 +16,12 @@ package org.springframework.cache.config; +import org.w3c.dom.Element; + import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.xml.NamespaceHandlerSupport; import org.springframework.util.StringUtils; -import org.w3c.dom.Element; /** * {@code NamespaceHandler} allowing for the configuration of declarative diff --git a/spring-context/src/main/java/org/springframework/cache/config/package-info.java b/spring-context/src/main/java/org/springframework/cache/config/package-info.java index 4e44ffa83ed..f2533d31462 100644 --- a/spring-context/src/main/java/org/springframework/cache/config/package-info.java +++ b/spring-context/src/main/java/org/springframework/cache/config/package-info.java @@ -1,4 +1,3 @@ - /** * Support package for declarative caching configuration, with XML * schema being the primary configuration format. See {@link diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java index d0080584bf4..2e450ab6618 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java @@ -27,6 +27,7 @@ import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.aop.framework.AopProxyUtils; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.BeanFactoryAnnotationUtils; diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/NameMatchCacheOperationSource.java b/spring-context/src/main/java/org/springframework/cache/interceptor/NameMatchCacheOperationSource.java index fa76db63f9b..2e26d932a12 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/NameMatchCacheOperationSource.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/NameMatchCacheOperationSource.java @@ -24,6 +24,7 @@ import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.util.ObjectUtils; import org.springframework.util.PatternMatchUtils; diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/SimpleKey.java b/spring-context/src/main/java/org/springframework/cache/interceptor/SimpleKey.java index e8fb72bc4fa..b9304539d9d 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/SimpleKey.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/SimpleKey.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/SimpleKeyGenerator.java b/spring-context/src/main/java/org/springframework/cache/interceptor/SimpleKeyGenerator.java index d6feb425654..5db54f5e75c 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/SimpleKeyGenerator.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/SimpleKeyGenerator.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/main/java/org/springframework/context/access/package-info.java b/spring-context/src/main/java/org/springframework/context/access/package-info.java index bcf7238ac6d..eb45a7288b3 100644 --- a/spring-context/src/main/java/org/springframework/context/access/package-info.java +++ b/spring-context/src/main/java/org/springframework/context/access/package-info.java @@ -1,12 +1,8 @@ - /** - * * Helper infrastructure to locate and access shared application contexts. * *

Note: This package is only relevant for special sharing of application * contexts, for example behind EJB facades. It is not used in a typical * web application or standalone application. - * */ package org.springframework.context.access; - diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConditionEvaluator.java b/spring-context/src/main/java/org/springframework/context/annotation/ConditionEvaluator.java index 86dc06eba29..917ddf9174c 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConditionEvaluator.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConditionEvaluator.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java b/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java index ec3cf117ef7..6789a6c49d0 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/Configuration.java @@ -17,7 +17,6 @@ package org.springframework.context.annotation; import java.lang.annotation.Documented; - import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationCondition.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationCondition.java index f652067f0c2..8bd3d044b35 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationCondition.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationCondition.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/main/java/org/springframework/context/annotation/DeferredImportSelector.java b/spring-context/src/main/java/org/springframework/context/annotation/DeferredImportSelector.java index 2c104126f9b..ceb7f9b6e32 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/DeferredImportSelector.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/DeferredImportSelector.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/main/java/org/springframework/context/annotation/DependsOn.java b/spring-context/src/main/java/org/springframework/context/annotation/DependsOn.java index 88d06dc6c08..121cec3aebd 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/DependsOn.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/DependsOn.java @@ -16,11 +16,11 @@ package org.springframework.context.annotation; -import java.lang.annotation.Target; +import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Documented; +import java.lang.annotation.Target; /** * Beans on which the current bean depends. Any beans specified are guaranteed to be diff --git a/spring-context/src/main/java/org/springframework/context/annotation/package-info.java b/spring-context/src/main/java/org/springframework/context/annotation/package-info.java index 53688cb9ccc..590924e7d43 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/package-info.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/package-info.java @@ -1,10 +1,6 @@ - /** - * * Annotation support for the Application Context, including JSR-250 "common" * annotations, component-scanning, and Java-based metadata for creating * Spring-managed objects. - * */ package org.springframework.context.annotation; - diff --git a/spring-context/src/main/java/org/springframework/context/config/package-info.java b/spring-context/src/main/java/org/springframework/context/config/package-info.java index 530b9cc42ec..872af52b884 100644 --- a/spring-context/src/main/java/org/springframework/context/config/package-info.java +++ b/spring-context/src/main/java/org/springframework/context/config/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support package for advanced application context configuration, * with XML schema being the primary configuration format. - * */ package org.springframework.context.config; - diff --git a/spring-context/src/main/java/org/springframework/context/event/package-info.java b/spring-context/src/main/java/org/springframework/context/event/package-info.java index 87e4b8ab996..d4dcbaa6945 100644 --- a/spring-context/src/main/java/org/springframework/context/event/package-info.java +++ b/spring-context/src/main/java/org/springframework/context/event/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support classes for application events, like standard context events. * To be supported by all major application context implementations. - * */ package org.springframework.context.event; - diff --git a/spring-context/src/main/java/org/springframework/context/expression/package-info.java b/spring-context/src/main/java/org/springframework/context/expression/package-info.java index fba74a8db0b..cb8b9b2db6e 100644 --- a/spring-context/src/main/java/org/springframework/context/expression/package-info.java +++ b/spring-context/src/main/java/org/springframework/context/expression/package-info.java @@ -1,8 +1,4 @@ - /** - * * Expression parsing support within a Spring application context. - * */ package org.springframework.context.expression; - diff --git a/spring-context/src/main/java/org/springframework/context/i18n/package-info.java b/spring-context/src/main/java/org/springframework/context/i18n/package-info.java index 1fb18ca4917..1bad27837cc 100644 --- a/spring-context/src/main/java/org/springframework/context/i18n/package-info.java +++ b/spring-context/src/main/java/org/springframework/context/i18n/package-info.java @@ -1,9 +1,5 @@ - /** - * * Abstraction for determining the current Locale, * plus global holder that exposes a thread-bound Locale. - * */ package org.springframework.context.i18n; - diff --git a/spring-context/src/main/java/org/springframework/context/package-info.java b/spring-context/src/main/java/org/springframework/context/package-info.java index 3a09bc5a584..357cee5d73a 100644 --- a/spring-context/src/main/java/org/springframework/context/package-info.java +++ b/spring-context/src/main/java/org/springframework/context/package-info.java @@ -1,6 +1,4 @@ - /** - * * This package builds on the beans package to add support for * message sources and for the Observer design pattern, and the * ability for application objects to obtain resources using a @@ -11,7 +9,5 @@ * explicitly. One of the strengths of the Spring architecture * is that application objects can often be configured without * any dependency on Spring-specific APIs. - * */ package org.springframework.context; - diff --git a/spring-context/src/main/java/org/springframework/context/support/package-info.java b/spring-context/src/main/java/org/springframework/context/support/package-info.java index 71de657faf9..da9f3cafdd0 100644 --- a/spring-context/src/main/java/org/springframework/context/support/package-info.java +++ b/spring-context/src/main/java/org/springframework/context/support/package-info.java @@ -1,10 +1,6 @@ - /** - * * Classes supporting the org.springframework.context package, * such as abstract base classes for ApplicationContext * implementations and a MessageSource implementation. - * */ package org.springframework.context.support; - diff --git a/spring-context/src/main/java/org/springframework/context/weaving/package-info.java b/spring-context/src/main/java/org/springframework/context/weaving/package-info.java index 25454c9e7f9..68b06e332b5 100644 --- a/spring-context/src/main/java/org/springframework/context/weaving/package-info.java +++ b/spring-context/src/main/java/org/springframework/context/weaving/package-info.java @@ -1,9 +1,5 @@ - /** - * * Load-time weaving support for a Spring application context, building on Spring's * {@link org.springframework.instrument.classloading.LoadTimeWeaver} abstraction. - * */ package org.springframework.context.weaving; - diff --git a/spring-context/src/main/java/org/springframework/ejb/access/AbstractRemoteSlsbInvokerInterceptor.java b/spring-context/src/main/java/org/springframework/ejb/access/AbstractRemoteSlsbInvokerInterceptor.java index b01182a184c..a15cb4052aa 100644 --- a/spring-context/src/main/java/org/springframework/ejb/access/AbstractRemoteSlsbInvokerInterceptor.java +++ b/spring-context/src/main/java/org/springframework/ejb/access/AbstractRemoteSlsbInvokerInterceptor.java @@ -19,7 +19,6 @@ package org.springframework.ejb.access; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.rmi.RemoteException; - import javax.ejb.EJBHome; import javax.ejb.EJBObject; import javax.naming.NamingException; diff --git a/spring-context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java b/spring-context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java index 77e88a8c42f..a9a770f510d 100644 --- a/spring-context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java +++ b/spring-context/src/main/java/org/springframework/ejb/access/AbstractSlsbInvokerInterceptor.java @@ -18,7 +18,6 @@ package org.springframework.ejb.access; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; - import javax.naming.Context; import javax.naming.NamingException; diff --git a/spring-context/src/main/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptor.java b/spring-context/src/main/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptor.java index 7a27feafa29..e548f8ba56e 100644 --- a/spring-context/src/main/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptor.java +++ b/spring-context/src/main/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptor.java @@ -18,7 +18,6 @@ package org.springframework.ejb.access; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; - import javax.ejb.CreateException; import javax.ejb.EJBLocalHome; import javax.ejb.EJBLocalObject; diff --git a/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor.java b/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor.java index 3c3e1a80903..33e3c8cf3d3 100644 --- a/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor.java +++ b/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptor.java @@ -18,7 +18,6 @@ package org.springframework.ejb.access; import java.lang.reflect.InvocationTargetException; import java.rmi.RemoteException; - import javax.ejb.CreateException; import javax.ejb.EJBObject; import javax.naming.NamingException; diff --git a/spring-context/src/main/java/org/springframework/ejb/access/package-info.java b/spring-context/src/main/java/org/springframework/ejb/access/package-info.java index 9615bb81469..523280e2e41 100644 --- a/spring-context/src/main/java/org/springframework/ejb/access/package-info.java +++ b/spring-context/src/main/java/org/springframework/ejb/access/package-info.java @@ -1,6 +1,4 @@ - /** - * * This package contains classes that allow easy access to EJBs. * The basis are AOP interceptors run before and after the EJB invocation. * In particular, the classes in this package allow transparent access @@ -20,7 +18,5 @@ *

However, the implementation and naming of classes in this package has changed. * It now uses FactoryBeans and AOP, rather than the custom bean definitions described in * Expert One-on-One J2EE. - * */ package org.springframework.ejb.access; - diff --git a/spring-context/src/main/java/org/springframework/ejb/config/AbstractJndiLocatingBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/ejb/config/AbstractJndiLocatingBeanDefinitionParser.java index f3b7aff7579..039d889e7bb 100644 --- a/spring-context/src/main/java/org/springframework/ejb/config/AbstractJndiLocatingBeanDefinitionParser.java +++ b/spring-context/src/main/java/org/springframework/ejb/config/AbstractJndiLocatingBeanDefinitionParser.java @@ -17,7 +17,6 @@ package org.springframework.ejb.config; import org.w3c.dom.Element; -import static org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.*; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.BeanDefinitionBuilder; @@ -25,6 +24,8 @@ import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser; import org.springframework.util.StringUtils; import org.springframework.util.xml.DomUtils; +import static org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.*; + /** * Abstract base class for BeanDefinitionParsers which build * JNDI-locating beans, supporting an optional "jndiEnvironment" diff --git a/spring-context/src/main/java/org/springframework/ejb/config/package-info.java b/spring-context/src/main/java/org/springframework/ejb/config/package-info.java index ac870286bad..de75e5fded7 100644 --- a/spring-context/src/main/java/org/springframework/ejb/config/package-info.java +++ b/spring-context/src/main/java/org/springframework/ejb/config/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support package for EJB/J2EE-related configuration, * with XML schema being the primary configuration format. - * */ package org.springframework.ejb.config; - diff --git a/spring-context/src/main/java/org/springframework/ejb/interceptor/package-info.java b/spring-context/src/main/java/org/springframework/ejb/interceptor/package-info.java index 212598c4244..d45c873ab7c 100644 --- a/spring-context/src/main/java/org/springframework/ejb/interceptor/package-info.java +++ b/spring-context/src/main/java/org/springframework/ejb/interceptor/package-info.java @@ -1,9 +1,6 @@ /** - * * Support classes for EJB 3 Session Beans and Message-Driven Beans, * performing injection of Spring beans through an EJB 3 interceptor * that processes Spring's {@code @Autowired} annotation. - * */ package org.springframework.ejb.interceptor; - diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/package-info.java b/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/package-info.java index 57fcb6e4adb..b282705390b 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/package-info.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/package-info.java @@ -1,8 +1,4 @@ - /** - * * Support for class instrumentation on GlassFish. - * */ package org.springframework.instrument.classloading.glassfish; - diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/package-info.java b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/package-info.java index 78b581c225c..e746ce5e7f5 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/package-info.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/package-info.java @@ -1,8 +1,4 @@ - /** - * * Support for class instrumentation on JBoss AS 6 and 7. - * */ package org.springframework.instrument.classloading.jboss; - diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/package-info.java b/spring-context/src/main/java/org/springframework/instrument/classloading/package-info.java index e5f16e8217a..c1b7cf3d2cb 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/package-info.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support package for load time weaving based on class loaders, * as required by JPA providers (but not JPA-specific). - * */ package org.springframework.instrument.classloading; - diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/tomcat/package-info.java b/spring-context/src/main/java/org/springframework/instrument/classloading/tomcat/package-info.java index ffe30f60513..11c70a1c6c5 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/tomcat/package-info.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/tomcat/package-info.java @@ -2,4 +2,3 @@ * Support for class instrumentation on Tomcat. */ package org.springframework.instrument.classloading.tomcat; - diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/package-info.java b/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/package-info.java index 71e7c4ac275..c767e969a38 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/package-info.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/package-info.java @@ -1,8 +1,4 @@ - /** - * - * Support for class instrumentation on BEA WebLogic 10. - * + * Support for class instrumentation on BEA WebLogic 10+. */ package org.springframework.instrument.classloading.weblogic; - diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/package-info.java b/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/package-info.java index 5b5a27519a8..11c66d85b95 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/package-info.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/package-info.java @@ -1,8 +1,4 @@ - /** - * - * Support for class instrumentation on IBM WebSphere Application Server 7. - * + * Support for class instrumentation on IBM WebSphere Application Server 7+. */ package org.springframework.instrument.classloading.websphere; - diff --git a/spring-context/src/main/java/org/springframework/jmx/access/ConnectorDelegate.java b/spring-context/src/main/java/org/springframework/jmx/access/ConnectorDelegate.java index 115d0b3d66a..bd99b693935 100644 --- a/spring-context/src/main/java/org/springframework/jmx/access/ConnectorDelegate.java +++ b/spring-context/src/main/java/org/springframework/jmx/access/ConnectorDelegate.java @@ -18,7 +18,6 @@ package org.springframework.jmx.access; import java.io.IOException; import java.util.Map; - import javax.management.MBeanServerConnection; import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; diff --git a/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java b/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java index 913136578bc..c5853aa6edb 100644 --- a/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java +++ b/spring-context/src/main/java/org/springframework/jmx/access/NotificationListenerRegistrar.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.net.MalformedURLException; import java.util.Arrays; import java.util.Map; - import javax.management.MBeanServerConnection; import javax.management.ObjectName; import javax.management.remote.JMXServiceURL; diff --git a/spring-context/src/main/java/org/springframework/jmx/access/package-info.java b/spring-context/src/main/java/org/springframework/jmx/access/package-info.java index 8998a230c7e..410e754b1a5 100644 --- a/spring-context/src/main/java/org/springframework/jmx/access/package-info.java +++ b/spring-context/src/main/java/org/springframework/jmx/access/package-info.java @@ -1,8 +1,4 @@ - /** - * - * Provides support for accessing remote MBean resources. Requires JMX 1.2 or above. - * + * Provides support for accessing remote MBean resources. */ package org.springframework.jmx.access; - diff --git a/spring-context/src/main/java/org/springframework/jmx/export/annotation/package-info.java b/spring-context/src/main/java/org/springframework/jmx/export/annotation/package-info.java index 6010e5b3939..80ac35387da 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/annotation/package-info.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/annotation/package-info.java @@ -1,10 +1,6 @@ - /** - * - * JDK 1.5+ annotations for MBean exposure. + * Java 5 annotations for MBean exposure. * Hooked into Spring's JMX export infrastructure * via a special JmxAttributeSource implementation. - * */ package org.springframework.jmx.export.annotation; - diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/package-info.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/package-info.java index d54f326538d..649b1f97b52 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/package-info.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/package-info.java @@ -1,9 +1,5 @@ - /** - * * Provides a strategy for MBeanInfo assembly. Used by MBeanExporter to * determine the attributes and operations to expose for Spring-managed beans. - * */ package org.springframework.jmx.export.assembler; - diff --git a/spring-context/src/main/java/org/springframework/jmx/export/metadata/package-info.java b/spring-context/src/main/java/org/springframework/jmx/export/metadata/package-info.java index 6016236f20a..8890cbda663 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/metadata/package-info.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/metadata/package-info.java @@ -1,9 +1,5 @@ - /** - * * Provides generic JMX metadata classes and basic support for reading * JMX metadata in a provider-agnostic manner. - * */ package org.springframework.jmx.export.metadata; - diff --git a/spring-context/src/main/java/org/springframework/jmx/export/naming/IdentityNamingStrategy.java b/spring-context/src/main/java/org/springframework/jmx/export/naming/IdentityNamingStrategy.java index 3175021f8b0..7db52fb8a0a 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/naming/IdentityNamingStrategy.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/naming/IdentityNamingStrategy.java @@ -17,7 +17,6 @@ package org.springframework.jmx.export.naming; import java.util.Hashtable; - import javax.management.MalformedObjectNameException; import javax.management.ObjectName; diff --git a/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java b/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java index fd0f36cbbab..0f4ed459911 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java @@ -18,7 +18,6 @@ package org.springframework.jmx.export.naming; import java.io.IOException; import java.util.Properties; - import javax.management.MalformedObjectNameException; import javax.management.ObjectName; diff --git a/spring-context/src/main/java/org/springframework/jmx/export/naming/package-info.java b/spring-context/src/main/java/org/springframework/jmx/export/naming/package-info.java index cfdb53e0608..f01f25f8dae 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/naming/package-info.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/naming/package-info.java @@ -1,9 +1,5 @@ - /** - * * Provides a strategy for ObjectName creation. Used by MBeanExporter * to determine the JMX names to use for exported Spring-managed beans. - * */ package org.springframework.jmx.export.naming; - diff --git a/spring-context/src/main/java/org/springframework/jmx/export/notification/package-info.java b/spring-context/src/main/java/org/springframework/jmx/export/notification/package-info.java index b1f33f0ca63..c0bd0a5b5c6 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/notification/package-info.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/notification/package-info.java @@ -1,9 +1,5 @@ - /** - * * Provides supporting infrastructure to allow Spring-created MBeans * to send JMX notifications. - * */ package org.springframework.jmx.export.notification; - diff --git a/spring-context/src/main/java/org/springframework/jmx/export/package-info.java b/spring-context/src/main/java/org/springframework/jmx/export/package-info.java index eaa8638263e..1e277306358 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/package-info.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/package-info.java @@ -1,9 +1,5 @@ - /** - * * This package provides declarative creation and registration of * Spring-managed beans as JMX MBeans. - * */ package org.springframework.jmx.export; - diff --git a/spring-context/src/main/java/org/springframework/jmx/package-info.java b/spring-context/src/main/java/org/springframework/jmx/package-info.java index 8c05a647ab5..2f95f654239 100644 --- a/spring-context/src/main/java/org/springframework/jmx/package-info.java +++ b/spring-context/src/main/java/org/springframework/jmx/package-info.java @@ -1,9 +1,5 @@ - /** - * * This package contains Spring's JMX support, which includes registration of * Spring-managed beans as JMX MBeans as well as access to remote JMX MBeans. - * */ package org.springframework.jmx; - diff --git a/spring-context/src/main/java/org/springframework/jmx/support/package-info.java b/spring-context/src/main/java/org/springframework/jmx/support/package-info.java index 81597bbf42c..56a389e6cce 100644 --- a/spring-context/src/main/java/org/springframework/jmx/support/package-info.java +++ b/spring-context/src/main/java/org/springframework/jmx/support/package-info.java @@ -1,8 +1,5 @@ /** - * * Contains support classes for connecting to local and remote {@code MBeanServer}s * and for exposing an {@code MBeanServer} to remote clients. - * */ package org.springframework.jmx.support; - diff --git a/spring-context/src/main/java/org/springframework/jndi/package-info.java b/spring-context/src/main/java/org/springframework/jndi/package-info.java index eb6ebde08a8..55bbba27ce4 100644 --- a/spring-context/src/main/java/org/springframework/jndi/package-info.java +++ b/spring-context/src/main/java/org/springframework/jndi/package-info.java @@ -1,6 +1,4 @@ - /** - * * The classes in this package make JNDI easier to use, * facilitating the accessing of configuration stored in JNDI, * and provide useful superclasses for JNDI access classes. @@ -8,7 +6,5 @@ *

The classes in this package are discussed in Chapter 11 of * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). - * */ package org.springframework.jndi; - diff --git a/spring-context/src/main/java/org/springframework/jndi/support/package-info.java b/spring-context/src/main/java/org/springframework/jndi/support/package-info.java index dfadd63e66c..079a7677ad7 100644 --- a/spring-context/src/main/java/org/springframework/jndi/support/package-info.java +++ b/spring-context/src/main/java/org/springframework/jndi/support/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support classes for JNDI usage, * including a JNDI-based BeanFactory implementation. - * */ package org.springframework.jndi.support; - diff --git a/spring-context/src/main/java/org/springframework/remoting/package-info.java b/spring-context/src/main/java/org/springframework/remoting/package-info.java index 213e7183690..34c7601a70f 100644 --- a/spring-context/src/main/java/org/springframework/remoting/package-info.java +++ b/spring-context/src/main/java/org/springframework/remoting/package-info.java @@ -1,9 +1,5 @@ - /** - * * Exception hierarchy for Spring's remoting infrastructure, * independent of any specific remote method invocation system. - * */ package org.springframework.remoting; - diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiServiceExporter.java b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiServiceExporter.java index d3e50819f19..ab034cf0331 100644 --- a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiServiceExporter.java +++ b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiServiceExporter.java @@ -20,7 +20,6 @@ import java.rmi.NoSuchObjectException; import java.rmi.Remote; import java.rmi.RemoteException; import java.util.Properties; - import javax.naming.NamingException; import javax.rmi.PortableRemoteObject; diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/package-info.java b/spring-context/src/main/java/org/springframework/remoting/rmi/package-info.java index 1eb6bd48dac..8296464c341 100644 --- a/spring-context/src/main/java/org/springframework/remoting/rmi/package-info.java +++ b/spring-context/src/main/java/org/springframework/remoting/rmi/package-info.java @@ -1,10 +1,6 @@ - /** - * * Remoting classes for conventional RMI and transparent remoting via * RMI invokers. Provides a proxy factory for accessing RMI services, * and an exporter for making beans available to RMI clients. - * */ package org.springframework.remoting.rmi; - diff --git a/spring-context/src/main/java/org/springframework/remoting/soap/package-info.java b/spring-context/src/main/java/org/springframework/remoting/soap/package-info.java index 83002420fe9..e1e11074097 100644 --- a/spring-context/src/main/java/org/springframework/remoting/soap/package-info.java +++ b/spring-context/src/main/java/org/springframework/remoting/soap/package-info.java @@ -1,8 +1,4 @@ - /** - * * SOAP-specific exceptions and support classes for Spring's remoting subsystem. - * */ package org.springframework.remoting.soap; - diff --git a/spring-context/src/main/java/org/springframework/remoting/support/package-info.java b/spring-context/src/main/java/org/springframework/remoting/support/package-info.java index 1ae35dc9118..316306149a2 100644 --- a/spring-context/src/main/java/org/springframework/remoting/support/package-info.java +++ b/spring-context/src/main/java/org/springframework/remoting/support/package-info.java @@ -1,9 +1,5 @@ - /** - * * Generic support classes for remoting implementations. * Provides abstract base classes for remote proxy factories. - * */ package org.springframework.remoting.support; - diff --git a/spring-context/src/main/java/org/springframework/scheduling/annotation/package-info.java b/spring-context/src/main/java/org/springframework/scheduling/annotation/package-info.java index d8203015c30..318c8fbee88 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/annotation/package-info.java +++ b/spring-context/src/main/java/org/springframework/scheduling/annotation/package-info.java @@ -1,8 +1,4 @@ - /** - * - * JDK 1.5+ annotation for asynchronous method execution. - * + * Java 5 annotation for asynchronous method execution. */ package org.springframework.scheduling.annotation; - diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/package-info.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/package-info.java index fb8a94108ef..40779559585 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/package-info.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/package-info.java @@ -1,11 +1,8 @@ /** - * * Scheduling convenience classes for the {@code java.util.concurrent} * and {@code javax.enterprise.concurrent} packages, allowing to set up a * ThreadPoolExecutor or ScheduledThreadPoolExecutor as a bean in a Spring * context. Provides support for the native {@code java.util.concurrent} * interfaces as well as the Spring {@code TaskExecutor} mechanism. - * */ package org.springframework.scheduling.concurrent; - diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTasksBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTasksBeanDefinitionParser.java index 8f6963614f4..0f5f810245c 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTasksBeanDefinitionParser.java +++ b/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTasksBeanDefinitionParser.java @@ -16,6 +16,10 @@ package org.springframework.scheduling.config; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; + import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.parsing.BeanComponentDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; @@ -24,10 +28,6 @@ import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.util.StringUtils; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - /** * Parser for the 'scheduled-tasks' element of the scheduling namespace. * diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/package-info.java b/spring-context/src/main/java/org/springframework/scheduling/config/package-info.java index 1f9cc08abe0..65dac8fec36 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/config/package-info.java +++ b/spring-context/src/main/java/org/springframework/scheduling/config/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support package for declarative scheduling configuration, * with XML schema being the primary configuration format. - * */ package org.springframework.scheduling.config; - diff --git a/spring-context/src/main/java/org/springframework/scheduling/package-info.java b/spring-context/src/main/java/org/springframework/scheduling/package-info.java index 985c249711f..22dd462809b 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/package-info.java +++ b/spring-context/src/main/java/org/springframework/scheduling/package-info.java @@ -1,9 +1,5 @@ - /** - * * General exceptions for Spring's scheduling support, * independent of any specific scheduling system. - * */ package org.springframework.scheduling; - diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/package-info.java b/spring-context/src/main/java/org/springframework/scheduling/support/package-info.java index d0fb042fdff..25b09fb0d7f 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/package-info.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/package-info.java @@ -1,9 +1,5 @@ - /** - * * Generic support classes for scheduling. * Provides a Runnable adapter for Spring's MethodInvoker. - * */ package org.springframework.scheduling.support; - diff --git a/spring-context/src/main/java/org/springframework/scripting/bsh/package-info.java b/spring-context/src/main/java/org/springframework/scripting/bsh/package-info.java index 2dba974b660..a8adbca6c95 100644 --- a/spring-context/src/main/java/org/springframework/scripting/bsh/package-info.java +++ b/spring-context/src/main/java/org/springframework/scripting/bsh/package-info.java @@ -1,11 +1,7 @@ - /** - * * Package providing integration of * BeanShell * (and BeanShell2) * into Spring's scripting infrastructure. - * */ package org.springframework.scripting.bsh; - diff --git a/spring-context/src/main/java/org/springframework/scripting/config/package-info.java b/spring-context/src/main/java/org/springframework/scripting/config/package-info.java index 42a919e18d7..c0747d0db38 100644 --- a/spring-context/src/main/java/org/springframework/scripting/config/package-info.java +++ b/spring-context/src/main/java/org/springframework/scripting/config/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support package for Spring's dynamic language machinery, * with XML schema being the primary configuration format. - * */ package org.springframework.scripting.config; - diff --git a/spring-context/src/main/java/org/springframework/scripting/groovy/package-info.java b/spring-context/src/main/java/org/springframework/scripting/groovy/package-info.java index 6cf9cbef985..df1bacf8c64 100644 --- a/spring-context/src/main/java/org/springframework/scripting/groovy/package-info.java +++ b/spring-context/src/main/java/org/springframework/scripting/groovy/package-info.java @@ -1,10 +1,6 @@ - /** - * * Package providing integration of * Groovy * into Spring's scripting infrastructure. - * */ package org.springframework.scripting.groovy; - diff --git a/spring-context/src/main/java/org/springframework/scripting/jruby/package-info.java b/spring-context/src/main/java/org/springframework/scripting/jruby/package-info.java index 509ff145e0f..78d470922a4 100644 --- a/spring-context/src/main/java/org/springframework/scripting/jruby/package-info.java +++ b/spring-context/src/main/java/org/springframework/scripting/jruby/package-info.java @@ -1,10 +1,6 @@ - /** - * * Package providing integration of * JRuby * into Spring's scripting infrastructure. - * */ package org.springframework.scripting.jruby; - diff --git a/spring-context/src/main/java/org/springframework/scripting/package-info.java b/spring-context/src/main/java/org/springframework/scripting/package-info.java index 403c33bda66..64d0f935e19 100644 --- a/spring-context/src/main/java/org/springframework/scripting/package-info.java +++ b/spring-context/src/main/java/org/springframework/scripting/package-info.java @@ -1,8 +1,4 @@ - /** - * * Core interfaces for Spring's scripting support. - * */ package org.springframework.scripting; - diff --git a/spring-context/src/main/java/org/springframework/scripting/support/package-info.java b/spring-context/src/main/java/org/springframework/scripting/support/package-info.java index 0e4abb40598..2c640d727fa 100644 --- a/spring-context/src/main/java/org/springframework/scripting/support/package-info.java +++ b/spring-context/src/main/java/org/springframework/scripting/support/package-info.java @@ -1,10 +1,6 @@ - /** - * * Support classes for Spring's scripting package. * Provides a ScriptFactoryPostProcessor for turning ScriptFactory * definitions into scripted objects. - * */ package org.springframework.scripting.support; - diff --git a/spring-context/src/main/java/org/springframework/stereotype/package-info.java b/spring-context/src/main/java/org/springframework/stereotype/package-info.java index 420bb190971..5bc2ecf287d 100644 --- a/spring-context/src/main/java/org/springframework/stereotype/package-info.java +++ b/spring-context/src/main/java/org/springframework/stereotype/package-info.java @@ -1,11 +1,7 @@ - /** - * * Annotations denoting the roles of types or methods in the overall architecture * (at a conceptual, rather than implementation, level). * *

Intended for use by tools and aspects (making an ideal target for pointcuts). - * */ package org.springframework.stereotype; - diff --git a/spring-context/src/main/java/org/springframework/ui/context/package-info.java b/spring-context/src/main/java/org/springframework/ui/context/package-info.java index 3651f5d7626..ffc6e3d7053 100644 --- a/spring-context/src/main/java/org/springframework/ui/context/package-info.java +++ b/spring-context/src/main/java/org/springframework/ui/context/package-info.java @@ -1,31 +1,5 @@ /** - * * Contains classes defining the application context subinterface * for UI applications. The theme feature is added here. - * - *

- * - *
Web packages add the resolution and the setting of the user current theme. - * */ package org.springframework.ui.context; - diff --git a/spring-context/src/main/java/org/springframework/ui/context/support/package-info.java b/spring-context/src/main/java/org/springframework/ui/context/support/package-info.java index 290fe97d316..f18e77c605d 100644 --- a/spring-context/src/main/java/org/springframework/ui/context/support/package-info.java +++ b/spring-context/src/main/java/org/springframework/ui/context/support/package-info.java @@ -1,9 +1,5 @@ - /** - * * Classes supporting the org.springframework.ui.context package. * Provides support classes for specialized UI contexts, e.g. for web UIs. - * */ package org.springframework.ui.context.support; - diff --git a/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-3.0.xsd b/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-3.0.xsd index 7e484d0d013..ec4dfd81eaa 100644 --- a/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-3.0.xsd +++ b/spring-context/src/main/resources/org/springframework/scheduling/config/spring-task-3.0.xsd @@ -1,12 +1,11 @@ + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tool="http://www.springframework.org/schema/tool" + targetNamespace="http://www.springframework.org/schema/task" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tool="http://www.springframework.org/schema/tool" + targetNamespace="http://www.springframework.org/schema/task" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tool="http://www.springframework.org/schema/tool" + targetNamespace="http://www.springframework.org/schema/task" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tool="http://www.springframework.org/schema/tool" + targetNamespace="http://www.springframework.org/schema/task" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:tool="http://www.springframework.org/schema/tool" + targetNamespace="http://www.springframework.org/schema/task" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:beans="http://www.springframework.org/schema/beans" + targetNamespace="http://www.springframework.org/schema/lang" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:beans="http://www.springframework.org/schema/beans" + targetNamespace="http://www.springframework.org/schema/lang" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:beans="http://www.springframework.org/schema/beans" + targetNamespace="http://www.springframework.org/schema/lang" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:beans="http://www.springframework.org/schema/beans" + targetNamespace="http://www.springframework.org/schema/lang" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:beans="http://www.springframework.org/schema/beans" + targetNamespace="http://www.springframework.org/schema/lang" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:beans="http://www.springframework.org/schema/beans" + targetNamespace="http://www.springframework.org/schema/lang" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:beans="http://www.springframework.org/schema/beans" + targetNamespace="http://www.springframework.org/schema/lang" + elementFormDefault="qualified" + attributeFormDefault="unqualified"> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorAndLazyInitTargetSourceTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorAndLazyInitTargetSourceTests.java index 7ca3e87e15a..ec76bcba317 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorAndLazyInitTargetSourceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorAndLazyInitTargetSourceTests.java @@ -16,12 +16,13 @@ package org.springframework.aop.aspectj.autoproxy; -import static org.junit.Assert.*; - import org.junit.Test; + +import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.context.support.ClassPathXmlApplicationContext; + +import static org.junit.Assert.*; /** * @author Rod Johnson diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithAbstractBean.xml b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithAbstractBean.xml index 88907c1b6c4..1ebeaa72721 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithAbstractBean.xml +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithAbstractBean.xml @@ -1,9 +1,8 @@ + xmlns:aop="http://www.springframework.org/schema/aop" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd" + default-lazy-init="true"> diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-retryAspect.xml b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-retryAspect.xml index 5c39c0186bf..61876b09387 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-retryAspect.xml +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-retryAspect.xml @@ -1,10 +1,8 @@ + xmlns:aop="http://www.springframework.org/schema/aop" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"> diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java index 2306641f0e5..d1c2e3f0dd4 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java @@ -16,12 +16,6 @@ package org.springframework.aop.aspectj.autoproxy; -import static java.lang.String.format; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import org.apache.commons.logging.Log; @@ -33,6 +27,7 @@ import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Pointcut; import org.junit.Test; + import org.springframework.aop.MethodBeforeAdvice; import org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator; import org.springframework.aop.aspectj.annotation.AspectMetadata; @@ -40,18 +35,12 @@ import org.springframework.aop.config.AopConfigUtils; import org.springframework.aop.framework.ProxyConfig; import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor; -import org.springframework.tests.sample.beans.INestedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.NestedTestBean; import org.springframework.beans.PropertyValue; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.config.MethodInvokingFactoryBean; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.tests.Assume; -import org.springframework.tests.TestGroup; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.GenericApplicationContext; @@ -59,8 +48,17 @@ import org.springframework.core.NestedRuntimeException; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; import org.springframework.core.io.ClassPathResource; +import org.springframework.tests.Assume; +import org.springframework.tests.TestGroup; +import org.springframework.tests.sample.beans.INestedTestBean; +import org.springframework.tests.sample.beans.ITestBean; +import org.springframework.tests.sample.beans.NestedTestBean; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.StopWatch; +import static java.lang.String.format; +import static org.junit.Assert.*; + /** * Integration tests for AspectJ auto-proxying. Includes mixing with Spring AOP Advisors * to demonstrate that existing autoproxying contract is honoured. diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests-context.xml b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests-context.xml index b35902d133f..a01be310d14 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests-context.xml +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests-context.xml @@ -1,8 +1,7 @@ + xmlns:aop="http://www.springframework.org/schema/aop" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests.java index b5c5b065d5f..31a81fc8a73 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests.java @@ -16,16 +16,17 @@ package org.springframework.aop.aspectj.autoproxy; -import static org.junit.Assert.*; +import java.io.IOException; import org.aspectj.lang.annotation.AfterThrowing; import org.aspectj.lang.annotation.Aspect; import org.junit.Test; -import org.springframework.tests.sample.beans.ITestBean; + import org.springframework.aop.support.AopUtils; import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.tests.sample.beans.ITestBean; -import java.io.IOException; +import static org.junit.Assert.*; /** * @author Rob Harrop diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAnnotationBindingTests-context.xml b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAnnotationBindingTests-context.xml index 28898d11fa5..34a9ba5ce34 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAnnotationBindingTests-context.xml +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAnnotationBindingTests-context.xml @@ -1,11 +1,9 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:aop="http://www.springframework.org/schema/aop" + xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd + http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAnnotationBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAnnotationBindingTests.java index 0fbf3b87d73..c7bf641d946 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAnnotationBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAnnotationBindingTests.java @@ -16,17 +16,18 @@ package org.springframework.aop.aspectj.autoproxy; -import static org.junit.Assert.assertEquals; - import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.FactoryBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.io.Resource; +import static org.junit.Assert.*; + /** * @author Adrian Colyer * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java index c750e8ae574..d6d2a83f8d3 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java @@ -16,8 +16,6 @@ package org.springframework.aop.aspectj.autoproxy.benchmark; -import static org.junit.Assert.*; - import java.lang.reflect.Method; import org.aopalliance.intercept.MethodInterceptor; @@ -26,6 +24,7 @@ import org.aspectj.lang.annotation.AfterReturning; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.junit.Test; + import org.springframework.aop.Advisor; import org.springframework.aop.AfterReturningAdvice; import org.springframework.aop.MethodBeforeAdvice; @@ -33,10 +32,12 @@ import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.aop.support.StaticMethodMatcherPointcut; -import org.springframework.tests.sample.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.tests.sample.beans.ITestBean; import org.springframework.util.StopWatch; +import static org.junit.Assert.*; + /** * Integration tests for AspectJ auto proxying. Includes mixing with Spring AOP * Advisors to demonstrate that existing autoproxying contract is honoured. diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/spr3064/SPR3064Tests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/spr3064/SPR3064Tests.java index 791132c596f..e2cf01144c3 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/spr3064/SPR3064Tests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/spr3064/SPR3064Tests.java @@ -15,8 +15,6 @@ */ package org.springframework.aop.aspectj.autoproxy.spr3064; -import static org.junit.Assert.*; - import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -24,8 +22,11 @@ import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.junit.Test; + import org.springframework.context.support.ClassPathXmlApplicationContext; +import static org.junit.Assert.*; + /** * @author Adrian Colyer * @author Chris Beams diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/generic/AfterReturningGenericTypeMatchingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/generic/AfterReturningGenericTypeMatchingTests.java index ea160ca1130..d56d75ad025 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/generic/AfterReturningGenericTypeMatchingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/generic/AfterReturningGenericTypeMatchingTests.java @@ -16,8 +16,6 @@ package org.springframework.aop.aspectj.generic; -import static org.junit.Assert.assertEquals; - import java.util.ArrayList; import java.util.Collection; @@ -26,10 +24,12 @@ import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.junit.Before; import org.junit.Test; -import org.springframework.tests.sample.beans.TestBean; -import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.tests.sample.beans.Employee; +import org.springframework.tests.sample.beans.TestBean; + +import static org.junit.Assert.*; /** * Tests ensuring that after-returning advice for generic parameters bound to diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericBridgeMethodMatchingClassProxyTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericBridgeMethodMatchingClassProxyTests.java index f1338831dd4..cd6727a3ce0 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericBridgeMethodMatchingClassProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericBridgeMethodMatchingClassProxyTests.java @@ -16,10 +16,10 @@ package org.springframework.aop.aspectj.generic; -import static org.junit.Assert.assertEquals; - import org.junit.Test; +import static org.junit.Assert.*; + /** * Tests for AspectJ pointcut expression matching when working with bridge methods. * diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericBridgeMethodMatchingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericBridgeMethodMatchingTests.java index 093a6fe69a4..6168fa1d340 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericBridgeMethodMatchingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericBridgeMethodMatchingTests.java @@ -16,13 +16,14 @@ package org.springframework.aop.aspectj.generic; -import static org.junit.Assert.*; - import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.junit.Test; + import org.springframework.context.support.ClassPathXmlApplicationContext; +import static org.junit.Assert.*; + /** * Tests for AspectJ pointcut expression matching when working with bridge methods. * diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericParameterMatchingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericParameterMatchingTests.java index f0f8d6ff04c..3feec410bb2 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericParameterMatchingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericParameterMatchingTests.java @@ -16,16 +16,17 @@ package org.springframework.aop.aspectj.generic; -import static org.junit.Assert.assertEquals; - import java.util.Collection; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.aspectj.lang.annotation.Pointcut; import org.junit.Test; + import org.springframework.context.support.ClassPathXmlApplicationContext; +import static org.junit.Assert.*; + /** * Tests that poitncut matching is correct with generic method parameter. * See SPR-3904 for more details. diff --git a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests.java b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests.java index 9a0ddffb8f9..c7a2052c2d2 100644 --- a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests.java +++ b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests.java @@ -16,12 +16,13 @@ package org.springframework.aop.config; -import static org.junit.Assert.*; - import org.junit.Test; +import org.xml.sax.SAXParseException; + import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.xml.sax.SAXParseException; + +import static org.junit.Assert.*; /** * @author Adrian Colyer diff --git a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests.java b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests.java index 45bd83f77e5..7cdae6e3ee1 100644 --- a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests.java +++ b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests.java @@ -16,12 +16,13 @@ package org.springframework.aop.config; -import static org.junit.Assert.*; - import org.junit.Test; + import org.springframework.beans.factory.BeanCreationException; import org.springframework.context.support.ClassPathXmlApplicationContext; +import static org.junit.Assert.*; + /** * @author Adrian Colyer * @author Chris Beams diff --git a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests.java b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests.java index 3632c978038..a6627eb377e 100644 --- a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests.java +++ b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests.java @@ -16,13 +16,14 @@ package org.springframework.aop.config; -import static org.junit.Assert.assertTrue; - import org.junit.Test; -import org.springframework.aop.support.AopUtils; + import org.springframework.aop.framework.Advised; +import org.springframework.aop.support.AopUtils; import org.springframework.tests.sample.beans.ITestBean; +import static org.junit.Assert.*; + /** * @author Rob Harrop * @author Chris Beams diff --git a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerReturningTests.java b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerReturningTests.java index fed5ac1eb5e..a87bed50a1f 100644 --- a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerReturningTests.java +++ b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerReturningTests.java @@ -16,12 +16,13 @@ package org.springframework.aop.config; -import static org.junit.Assert.*; - import org.junit.Test; +import org.xml.sax.SAXParseException; + import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.xml.sax.SAXParseException; + +import static org.junit.Assert.*; /** * @author Adrian Colyer diff --git a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java index 4896d143b26..ef635d71920 100644 --- a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java +++ b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java @@ -16,12 +16,10 @@ package org.springframework.aop.config; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - import org.aspectj.lang.ProceedingJoinPoint; import org.junit.Before; import org.junit.Test; + import org.springframework.aop.Advisor; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; @@ -31,6 +29,8 @@ import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; +import static org.junit.Assert.*; + /** * Unit tests for aop namespace. * diff --git a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerThrowingTests.java b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerThrowingTests.java index 4af0a3b292f..765ea3a803b 100644 --- a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerThrowingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerThrowingTests.java @@ -16,12 +16,13 @@ package org.springframework.aop.config; -import static org.junit.Assert.*; - import org.junit.Test; +import org.xml.sax.SAXParseException; + import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.xml.sax.SAXParseException; + +import static org.junit.Assert.*; /** * @author Adrian Colyer diff --git a/spring-context/src/test/java/org/springframework/aop/config/MethodLocatingFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/aop/config/MethodLocatingFactoryBeanTests.java index 7959a45b08a..ba5440ac9af 100644 --- a/spring-context/src/test/java/org/springframework/aop/config/MethodLocatingFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/aop/config/MethodLocatingFactoryBeanTests.java @@ -20,6 +20,7 @@ import java.lang.reflect.Method; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.BeanFactory; import static org.junit.Assert.*; diff --git a/spring-context/src/test/java/org/springframework/aop/config/PrototypeProxyTests.java b/spring-context/src/test/java/org/springframework/aop/config/PrototypeProxyTests.java index 9594752490e..459cea61918 100644 --- a/spring-context/src/test/java/org/springframework/aop/config/PrototypeProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/config/PrototypeProxyTests.java @@ -17,6 +17,7 @@ package org.springframework.aop.config; import org.junit.Test; + import org.springframework.context.support.ClassPathXmlApplicationContext; /** diff --git a/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java index dfb4b9224a2..e89d4727507 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java @@ -29,14 +29,16 @@ import java.util.List; import java.util.Map; import junit.framework.TestCase; - import org.aopalliance.aop.Advice; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; - import org.junit.After; import org.junit.Before; import org.junit.Test; +import test.mixin.LockMixin; +import test.mixin.LockMixinAdvisor; +import test.mixin.Lockable; +import test.mixin.LockedException; import org.springframework.aop.Advisor; import org.springframework.aop.AfterReturningAdvice; @@ -74,11 +76,6 @@ import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.SerializationTestUtils; import org.springframework.util.StopWatch; -import test.mixin.LockMixin; -import test.mixin.LockMixinAdvisor; -import test.mixin.Lockable; -import test.mixin.LockedException; - import static org.junit.Assert.*; /** diff --git a/spring-context/src/test/java/org/springframework/aop/framework/ClassWithComplexConstructor.java b/spring-context/src/test/java/org/springframework/aop/framework/ClassWithComplexConstructor.java index 09ad6bd07bc..7c4d79ca1cf 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/ClassWithComplexConstructor.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/ClassWithComplexConstructor.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/aop/framework/Dependency.java b/spring-context/src/test/java/org/springframework/aop/framework/Dependency.java index 13469772458..1f712be106d 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/Dependency.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/Dependency.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java index 95a5b9bc65f..7ed664bf506 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java @@ -20,6 +20,7 @@ import java.io.Serializable; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; + import org.springframework.aop.interceptor.ExposeInvocationInterceptor; import org.springframework.aop.support.AopUtils; import org.springframework.tests.sample.beans.IOther; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/ObjenesisProxyTests-context.xml b/spring-context/src/test/java/org/springframework/aop/framework/ObjenesisProxyTests-context.xml index c3ba5ccea7f..4b471582cf1 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/ObjenesisProxyTests-context.xml +++ b/spring-context/src/test/java/org/springframework/aop/framework/ObjenesisProxyTests-context.xml @@ -1,10 +1,11 @@ diff --git a/spring-context/src/test/java/org/springframework/aop/framework/ObjenesisProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/ObjenesisProxyTests.java index 68400dcbd06..091726adef1 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/ObjenesisProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/ObjenesisProxyTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +17,7 @@ package org.springframework.aop.framework; import org.junit.Test; + import org.springframework.aop.interceptor.DebugInterceptor; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java index f55c1a41b30..8eaaed36a15 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java @@ -16,17 +16,6 @@ package org.springframework.aop.framework; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.hamcrest.CoreMatchers.not; -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import java.io.FileNotFoundException; import java.io.IOException; import java.lang.reflect.Method; @@ -39,6 +28,9 @@ import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; import org.junit.Before; import org.junit.Test; +import test.mixin.Lockable; +import test.mixin.LockedException; + import org.springframework.aop.ClassFilter; import org.springframework.aop.IntroductionAdvisor; import org.springframework.aop.IntroductionInterceptor; @@ -68,8 +60,8 @@ import org.springframework.tests.sample.beans.SideEffectBean; import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.SerializationTestUtils; -import test.mixin.Lockable; -import test.mixin.LockedException; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; /** * @since 13.03.2003 diff --git a/spring-context/src/test/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests.java b/spring-context/src/test/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests.java index e708c9f1791..02fc5ef0cd7 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests.java @@ -16,8 +16,6 @@ package org.springframework.aop.framework.adapter; -import static org.junit.Assert.*; - import java.io.Serializable; import org.aopalliance.aop.Advice; @@ -26,11 +24,14 @@ import org.aopalliance.intercept.MethodInvocation; import org.junit.After; import org.junit.Before; import org.junit.Test; + import org.springframework.aop.Advisor; import org.springframework.aop.BeforeAdvice; import org.springframework.aop.framework.Advised; -import org.springframework.tests.sample.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.tests.sample.beans.ITestBean; + +import static org.junit.Assert.*; /** * TestCase for AdvisorAdapterRegistrationManager mechanism. diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java index 3e508dfb48d..dd8f06c09f1 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java @@ -16,13 +16,11 @@ package org.springframework.aop.framework.autoproxy; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import java.io.IOException; import org.junit.Test; +import test.mixin.Lockable; + import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.autoproxy.target.AbstractBeanFactoryBasedTargetSourceCreator; import org.springframework.aop.support.AopUtils; @@ -38,7 +36,7 @@ import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.sample.beans.CountingTestBean; import org.springframework.tests.sample.beans.ITestBean; -import test.mixin.Lockable; +import static org.junit.Assert.*; /** * Tests for auto proxy creation by advisor recognition. diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests.java index 49216292485..a52d631dd8c 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests.java @@ -16,14 +16,15 @@ package org.springframework.aop.framework.autoproxy; -import static org.junit.Assert.assertEquals; - import java.lang.reflect.Method; import org.junit.Test; + import org.springframework.aop.MethodBeforeAdvice; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.tests.sample.beans.TestBean; + +import static org.junit.Assert.*; /** * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java index c2fd75f7521..e65ea69f1e0 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java @@ -16,15 +16,13 @@ package org.springframework.aop.framework.autoproxy; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import java.io.IOException; import org.junit.Before; import org.junit.Test; +import test.mixin.Lockable; +import test.mixin.LockedException; + import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.BeanFactory; @@ -36,8 +34,7 @@ import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; -import test.mixin.Lockable; -import test.mixin.LockedException; +import static org.junit.Assert.*; /** * @author Rod Johnson diff --git a/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java b/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java index 2927d8f6077..179d061ecc6 100644 --- a/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java @@ -16,25 +16,24 @@ package org.springframework.aop.scope; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import org.junit.Test; + import org.springframework.aop.support.AopUtils; -import org.springframework.tests.context.SimpleMapScope; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.io.ClassPathResource; +import org.springframework.tests.context.SimpleMapScope; +import org.springframework.tests.sample.beans.ITestBean; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.SerializationTestUtils; +import static org.junit.Assert.*; + /** * @author Rob Harrop * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceTests.java b/spring-context/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceTests.java index 5ec8db261f8..dec2e918ed0 100644 --- a/spring-context/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceTests.java @@ -16,27 +16,24 @@ package org.springframework.aop.target; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import java.util.NoSuchElementException; import org.apache.commons.pool.impl.GenericObjectPool; import org.junit.After; import org.junit.Before; import org.junit.Test; + import org.springframework.aop.framework.Advised; -import org.springframework.tests.sample.beans.Person; -import org.springframework.tests.sample.beans.SerializablePerson; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.context.support.StaticApplicationContext; import org.springframework.core.io.ClassPathResource; +import org.springframework.tests.sample.beans.Person; +import org.springframework.tests.sample.beans.SerializablePerson; +import org.springframework.tests.sample.beans.SideEffectBean; import org.springframework.util.SerializationTestUtils; -import org.springframework.tests.sample.beans.SideEffectBean; +import static org.junit.Assert.*; /** * Tests for pooling invoker interceptor. diff --git a/spring-context/src/test/java/org/springframework/beans/factory/annotation/BridgeMethodAutowiringTests.java b/spring-context/src/test/java/org/springframework/beans/factory/annotation/BridgeMethodAutowiringTests.java index c69ab5658b1..2358ae163a2 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/annotation/BridgeMethodAutowiringTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/annotation/BridgeMethodAutowiringTests.java @@ -16,15 +16,16 @@ package org.springframework.beans.factory.annotation; -import static org.junit.Assert.assertNotNull; - import javax.inject.Inject; import javax.inject.Named; import org.junit.Test; + import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.stereotype.Component; +import static org.junit.Assert.*; + public class BridgeMethodAutowiringTests { @Test diff --git a/spring-context/src/test/java/org/springframework/beans/factory/support/InjectAnnotationAutowireContextTests.java b/spring-context/src/test/java/org/springframework/beans/factory/support/InjectAnnotationAutowireContextTests.java index 3544595d9dc..2c0be0e6bb7 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/support/InjectAnnotationAutowireContextTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/support/InjectAnnotationAutowireContextTests.java @@ -24,7 +24,6 @@ import javax.inject.Inject; import javax.inject.Named; import javax.inject.Qualifier; -import static org.junit.Assert.*; import org.junit.Test; import org.springframework.aop.scope.ScopedProxyUtils; @@ -36,6 +35,8 @@ import org.springframework.beans.factory.config.ConstructorArgumentValues; import org.springframework.context.annotation.AnnotationConfigUtils; import org.springframework.context.support.GenericApplicationContext; +import static org.junit.Assert.*; + /** * Integration tests for handling JSR-303 {@link javax.inject.Qualifier} annotations. * diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests.java index 96e2ab404a9..cd87bb5c623 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests.java @@ -16,14 +16,15 @@ package org.springframework.beans.factory.xml; -import static org.junit.Assert.assertEquals; - import org.junit.Before; import org.junit.Test; + import org.springframework.aop.interceptor.DebugInterceptor; -import org.springframework.tests.sample.beans.ITestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.tests.sample.beans.ITestBean; + +import static org.junit.Assert.*; /** * Tests lookup methods wrapped by a CGLIB proxy (see SPR-391). diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerWithExpressionLanguageTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerWithExpressionLanguageTests.java index c21ee9078fb..b77461a18a3 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerWithExpressionLanguageTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerWithExpressionLanguageTests.java @@ -16,12 +16,13 @@ package org.springframework.beans.factory.xml; -import static org.junit.Assert.assertEquals; import org.junit.Test; -import org.springframework.tests.sample.beans.ITestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.tests.sample.beans.ITestBean; + +import static org.junit.Assert.*; /** * Tests for combining the expression language and the p namespace. Due to the required EL dependency, this test is in diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java index 68accbae1d4..48efe37957b 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java @@ -16,12 +16,6 @@ package org.springframework.beans.factory.xml.support; -import static java.lang.String.format; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import java.io.IOException; import java.util.Arrays; import java.util.List; @@ -30,6 +24,11 @@ import java.util.Set; import org.junit.Before; import org.junit.Test; +import org.w3c.dom.Attr; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.xml.sax.InputSource; + import org.springframework.aop.Advisor; import org.springframework.aop.config.AbstractInterceptorDrivenBeanDefinitionDecorator; import org.springframework.aop.framework.Advised; @@ -59,10 +58,9 @@ import org.springframework.core.io.Resource; import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; -import org.w3c.dom.Attr; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.xml.sax.InputSource; + +import static java.lang.String.format; +import static org.junit.Assert.*; /** * Unit tests for custom XML namespace handler implementations. diff --git a/spring-context/src/test/java/org/springframework/cache/CacheTestUtils.java b/spring-context/src/test/java/org/springframework/cache/CacheTestUtils.java index 6749920b942..65ddd2a615f 100644 --- a/spring-context/src/test/java/org/springframework/cache/CacheTestUtils.java +++ b/spring-context/src/test/java/org/springframework/cache/CacheTestUtils.java @@ -16,14 +16,14 @@ package org.springframework.cache; -import static org.junit.Assert.*; - import java.util.ArrayList; import java.util.List; import org.springframework.cache.concurrent.ConcurrentMapCache; import org.springframework.cache.support.SimpleCacheManager; +import static org.junit.Assert.*; + /** * General cache-related test utilities. * diff --git a/spring-context/src/test/java/org/springframework/cache/NoOpCacheManagerTests.java b/spring-context/src/test/java/org/springframework/cache/NoOpCacheManagerTests.java index 0e9ecbf77ef..dc65b678271 100644 --- a/spring-context/src/test/java/org/springframework/cache/NoOpCacheManagerTests.java +++ b/spring-context/src/test/java/org/springframework/cache/NoOpCacheManagerTests.java @@ -16,14 +16,15 @@ package org.springframework.cache; -import static org.junit.Assert.*; - import java.util.UUID; import org.junit.Before; import org.junit.Test; + import org.springframework.cache.support.NoOpCacheManager; +import static org.junit.Assert.*; + public class NoOpCacheManagerTests { private CacheManager manager; diff --git a/spring-context/src/test/java/org/springframework/cache/annotation/AnnotationCacheOperationSourceTests.java b/spring-context/src/test/java/org/springframework/cache/annotation/AnnotationCacheOperationSourceTests.java index 89cf403dcc3..710b3f5b370 100644 --- a/spring-context/src/test/java/org/springframework/cache/annotation/AnnotationCacheOperationSourceTests.java +++ b/spring-context/src/test/java/org/springframework/cache/annotation/AnnotationCacheOperationSourceTests.java @@ -16,8 +16,6 @@ package org.springframework.cache.annotation; -import static org.junit.Assert.*; - import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -29,11 +27,14 @@ import java.util.Iterator; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import org.springframework.cache.interceptor.CacheEvictOperation; import org.springframework.cache.interceptor.CacheOperation; import org.springframework.cache.interceptor.CacheableOperation; import org.springframework.util.ReflectionUtils; +import static org.junit.Assert.*; + /** * @author Costin Leau * @author Stephane Nicoll diff --git a/spring-context/src/test/java/org/springframework/cache/config/AbstractAnnotationTests.java b/spring-context/src/test/java/org/springframework/cache/config/AbstractAnnotationTests.java index 76a69de0bf2..f074347af15 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/AbstractAnnotationTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/AbstractAnnotationTests.java @@ -16,21 +16,22 @@ package org.springframework.cache.config; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; - import java.util.Collection; import java.util.UUID; import org.junit.After; import org.junit.Before; import org.junit.Test; + import org.springframework.aop.framework.AopProxyUtils; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; import org.springframework.context.ConfigurableApplicationContext; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; + /** * Abstract annotation test (containing several reusable methods). * diff --git a/spring-context/src/test/java/org/springframework/cache/config/AnnotationNamespaceDrivenTests.java b/spring-context/src/test/java/org/springframework/cache/config/AnnotationNamespaceDrivenTests.java index bdf330f9ac5..6e853507de3 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/AnnotationNamespaceDrivenTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/AnnotationNamespaceDrivenTests.java @@ -16,8 +16,6 @@ package org.springframework.cache.config; -import static org.junit.Assert.*; - import org.junit.Test; import org.springframework.cache.interceptor.CacheErrorHandler; @@ -25,6 +23,8 @@ import org.springframework.cache.interceptor.CacheInterceptor; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; +import static org.junit.Assert.*; + /** * @author Costin Leau * @author Chris Beams diff --git a/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceNamespaceTests.java b/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceNamespaceTests.java index 086f8fd1e03..1c2746d653a 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceNamespaceTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceNamespaceTests.java @@ -18,6 +18,7 @@ package org.springframework.cache.config; import org.junit.Assert; import org.junit.Test; + import org.springframework.cache.interceptor.CacheInterceptor; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; diff --git a/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceParserTests.java b/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceParserTests.java index d13891a0f3c..5e624bda4ef 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceParserTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceParserTests.java @@ -16,12 +16,13 @@ package org.springframework.cache.config; -import static org.junit.Assert.*; - import org.junit.Test; + import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.context.support.GenericXmlApplicationContext; +import static org.junit.Assert.*; + /** * AOP advice specific parsing tests. * diff --git a/spring-context/src/test/java/org/springframework/cache/config/CustomInterceptorTests.java b/spring-context/src/test/java/org/springframework/cache/config/CustomInterceptorTests.java index 2384800bfc4..e1f07b9dfae 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/CustomInterceptorTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/CustomInterceptorTests.java @@ -16,8 +16,6 @@ package org.springframework.cache.config; -import static org.junit.Assert.*; - import java.util.Map; import org.junit.After; @@ -35,6 +33,8 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import static org.junit.Assert.*; + /** * * @author Stephane Nicoll diff --git a/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java b/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java index 8cf22ba580d..d51cc524606 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java @@ -1,7 +1,5 @@ package org.springframework.cache.config; -import static org.springframework.cache.CacheTestUtils.*; - import java.util.concurrent.atomic.AtomicLong; import org.junit.Test; @@ -20,6 +18,8 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import static org.springframework.cache.CacheTestUtils.*; + /** * Tests that represent real use cases with advanced configuration * @author Stephane Nicoll diff --git a/spring-context/src/test/java/org/springframework/cache/config/EnableCachingTests.java b/spring-context/src/test/java/org/springframework/cache/config/EnableCachingTests.java index 6b67b8cde13..b7974f610b3 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/EnableCachingTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/EnableCachingTests.java @@ -16,9 +16,8 @@ package org.springframework.cache.config; -import static org.junit.Assert.*; - import org.junit.Test; + import org.springframework.beans.factory.BeanCreationException; import org.springframework.cache.CacheManager; import org.springframework.cache.CacheTestUtils; @@ -37,6 +36,8 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import static org.junit.Assert.*; + /** * Integration tests for @EnableCaching and its related @Configuration classes. * diff --git a/spring-context/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java b/spring-context/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java index 4b2ec5099a8..54327160272 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java +++ b/spring-context/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java @@ -16,10 +16,10 @@ package org.springframework.cache.config; -import org.springframework.cache.interceptor.KeyGenerator; - import java.lang.reflect.Method; +import org.springframework.cache.interceptor.KeyGenerator; + /** * A custom {@link KeyGenerator} that exposes the algorithm used to compute the key * for convenience in tests scenario. diff --git a/spring-context/src/test/java/org/springframework/cache/config/TestEntity.java b/spring-context/src/test/java/org/springframework/cache/config/TestEntity.java index b0557464b83..86a9db7e625 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/TestEntity.java +++ b/spring-context/src/test/java/org/springframework/cache/config/TestEntity.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/cache/interceptor/CacheErrorHandlerTests.java b/spring-context/src/test/java/org/springframework/cache/interceptor/CacheErrorHandlerTests.java index 72ad390c639..4404d789330 100644 --- a/spring-context/src/test/java/org/springframework/cache/interceptor/CacheErrorHandlerTests.java +++ b/spring-context/src/test/java/org/springframework/cache/interceptor/CacheErrorHandlerTests.java @@ -23,6 +23,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; import org.springframework.cache.annotation.CacheConfig; diff --git a/spring-context/src/test/java/org/springframework/cache/interceptor/CachePutEvaluationTests.java b/spring-context/src/test/java/org/springframework/cache/interceptor/CachePutEvaluationTests.java index 3085bc9a453..d9236e337ab 100644 --- a/spring-context/src/test/java/org/springframework/cache/interceptor/CachePutEvaluationTests.java +++ b/spring-context/src/test/java/org/springframework/cache/interceptor/CachePutEvaluationTests.java @@ -16,8 +16,6 @@ package org.springframework.cache.interceptor; -import static org.junit.Assert.*; - import java.util.concurrent.atomic.AtomicLong; import org.junit.After; @@ -37,6 +35,8 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import static org.junit.Assert.*; + /** * Tests corner case of using {@link Cacheable} and {@link CachePut} on the * same operation. diff --git a/spring-context/src/test/java/org/springframework/cache/interceptor/DefaultKeyGeneratorTests.java b/spring-context/src/test/java/org/springframework/cache/interceptor/DefaultKeyGeneratorTests.java index 3376a617dcf..b80f6028619 100644 --- a/spring-context/src/test/java/org/springframework/cache/interceptor/DefaultKeyGeneratorTests.java +++ b/spring-context/src/test/java/org/springframework/cache/interceptor/DefaultKeyGeneratorTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/cache/interceptor/ExpressionEvaluatorTests.java b/spring-context/src/test/java/org/springframework/cache/interceptor/ExpressionEvaluatorTests.java index fe182a05a1b..e35f9c9cc8d 100644 --- a/spring-context/src/test/java/org/springframework/cache/interceptor/ExpressionEvaluatorTests.java +++ b/spring-context/src/test/java/org/springframework/cache/interceptor/ExpressionEvaluatorTests.java @@ -22,6 +22,7 @@ import java.util.Collections; import java.util.Iterator; import org.junit.Test; + import org.springframework.cache.annotation.AnnotationCacheOperationSource; import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Caching; diff --git a/spring-context/src/test/java/org/springframework/cache/interceptor/MethodCacheKeyTests.java b/spring-context/src/test/java/org/springframework/cache/interceptor/MethodCacheKeyTests.java index 19de44e84dc..c25635f82df 100644 --- a/spring-context/src/test/java/org/springframework/cache/interceptor/MethodCacheKeyTests.java +++ b/spring-context/src/test/java/org/springframework/cache/interceptor/MethodCacheKeyTests.java @@ -16,15 +16,16 @@ package org.springframework.cache.interceptor; -import static org.junit.Assert.*; - import java.lang.reflect.Method; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TestName; + import org.springframework.util.ReflectionUtils; +import static org.junit.Assert.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context/src/test/java/org/springframework/cache/interceptor/SimpleKeyGeneratorTests.java b/spring-context/src/test/java/org/springframework/cache/interceptor/SimpleKeyGeneratorTests.java index 9290bbf3526..98cb0d780d7 100644 --- a/spring-context/src/test/java/org/springframework/cache/interceptor/SimpleKeyGeneratorTests.java +++ b/spring-context/src/test/java/org/springframework/cache/interceptor/SimpleKeyGeneratorTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/context/AbstractApplicationContextTests.java b/spring-context/src/test/java/org/springframework/context/AbstractApplicationContextTests.java index d92309186e2..6fc672aab42 100644 --- a/spring-context/src/test/java/org/springframework/context/AbstractApplicationContextTests.java +++ b/spring-context/src/test/java/org/springframework/context/AbstractApplicationContextTests.java @@ -23,6 +23,7 @@ import java.io.ObjectOutputStream; import java.util.Locale; import org.junit.Test; + import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.xml.AbstractListableBeanFactoryTests; import org.springframework.tests.sample.beans.LifecycleBean; diff --git a/spring-context/src/test/java/org/springframework/context/access/ContextBeanFactoryReferenceTests.java b/spring-context/src/test/java/org/springframework/context/access/ContextBeanFactoryReferenceTests.java index f9aefe64da1..aad8df85d44 100644 --- a/spring-context/src/test/java/org/springframework/context/access/ContextBeanFactoryReferenceTests.java +++ b/spring-context/src/test/java/org/springframework/context/access/ContextBeanFactoryReferenceTests.java @@ -17,6 +17,7 @@ package org.springframework.context.access; import org.junit.Test; + import org.springframework.context.ConfigurableApplicationContext; import static org.junit.Assert.*; diff --git a/spring-context/src/test/java/org/springframework/context/access/ContextSingletonBeanFactoryLocatorTests.java b/spring-context/src/test/java/org/springframework/context/access/ContextSingletonBeanFactoryLocatorTests.java index 59137c75169..5a96b92cfe4 100644 --- a/spring-context/src/test/java/org/springframework/context/access/ContextSingletonBeanFactoryLocatorTests.java +++ b/spring-context/src/test/java/org/springframework/context/access/ContextSingletonBeanFactoryLocatorTests.java @@ -16,10 +16,8 @@ package org.springframework.context.access; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - import org.junit.Test; + import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.access.BeanFactoryLocator; import org.springframework.beans.factory.access.BeanFactoryReference; @@ -30,6 +28,8 @@ import org.springframework.context.ApplicationContext; import org.springframework.core.io.ClassPathResource; import org.springframework.util.ClassUtils; +import static org.junit.Assert.*; + /** * @author Colin Sampaleanu * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationBeanNameGeneratorTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationBeanNameGeneratorTests.java index fea356690a4..975361b492a 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationBeanNameGeneratorTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationBeanNameGeneratorTests.java @@ -21,7 +21,9 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import example.scannable.DefaultNamedComponent; import org.junit.Test; + import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition; import org.springframework.beans.factory.annotation.AnnotatedGenericBeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionRegistry; @@ -31,7 +33,6 @@ import org.springframework.stereotype.Controller; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; -import example.scannable.DefaultNamedComponent; import static org.junit.Assert.*; /** diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java index 55d08669d09..11a08cb5de1 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java @@ -22,10 +22,8 @@ import example.scannable.FooServiceImpl; import example.scannable.NamedStubDao; import example.scannable.StubFooDao; import org.aspectj.lang.annotation.Aspect; -import static org.junit.Assert.*; import org.junit.Test; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.config.BeanDefinition; @@ -38,6 +36,9 @@ import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.type.filter.AnnotationTypeFilter; import org.springframework.core.type.filter.AssignableTypeFilter; import org.springframework.stereotype.Component; +import org.springframework.tests.sample.beans.TestBean; + +import static org.junit.Assert.*; /** * @author Mark Fisher diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java index 4475d87e4a8..bbea00f17b2 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java @@ -20,14 +20,14 @@ import junit.framework.TestCase; import org.springframework.aop.scope.ScopedObject; import org.springframework.aop.support.AopUtils; -import org.springframework.tests.context.SimpleMapScope; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.annotation4.DependencyBean; import org.springframework.context.annotation4.FactoryMethodComponent; import org.springframework.context.support.GenericApplicationContext; +import org.springframework.tests.context.SimpleMapScope; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.ClassUtils; /** diff --git a/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java b/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java index e2c1cc3b57d..04a79a11594 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java @@ -25,11 +25,6 @@ import javax.ejb.EJB; import org.junit.Test; import org.springframework.beans.BeansException; -import org.springframework.tests.mock.jndi.ExpectedLookupTemplate; -import org.springframework.tests.sample.beans.INestedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.NestedTestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.NoSuchBeanDefinitionException; @@ -42,6 +37,11 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.support.GenericApplicationContext; import org.springframework.jndi.support.SimpleJndiBeanFactory; +import org.springframework.tests.mock.jndi.ExpectedLookupTemplate; +import org.springframework.tests.sample.beans.INestedTestBean; +import org.springframework.tests.sample.beans.ITestBean; +import org.springframework.tests.sample.beans.NestedTestBean; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.SerializationTestUtils; import static org.junit.Assert.*; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationRecursionTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationRecursionTests.java index 82fc59e2e96..fd878313c38 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationRecursionTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationRecursionTests.java @@ -16,15 +16,16 @@ package org.springframework.context.annotation; -import static org.hamcrest.CoreMatchers.sameInstance; -import static org.junit.Assert.assertThat; - import org.junit.Test; + import org.springframework.context.annotation.componentscan.cycle.left.LeftConfig; import org.springframework.context.annotation.componentscan.level1.Level1Config; import org.springframework.context.annotation.componentscan.level2.Level2Config; import org.springframework.context.annotation.componentscan.level3.Level3Component; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Tests ensuring that configuration classes marked with @ComponentScan * may be processed recursively diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserBeanDefinitionDefaultsTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserBeanDefinitionDefaultsTests.java index bf0baeaa53c..daad584f1ce 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserBeanDefinitionDefaultsTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserBeanDefinitionDefaultsTests.java @@ -16,14 +16,15 @@ package org.springframework.context.annotation; -import static org.junit.Assert.*; - import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.UnsatisfiedDependencyException; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.context.support.GenericApplicationContext; +import static org.junit.Assert.*; + /** * @author Mark Fisher * @author Chris Beams diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java index 31a87271caf..baa70d5ba99 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java @@ -18,7 +18,6 @@ package org.springframework.context.annotation; import example.scannable.FooService; import example.scannable.ScopedProxyTestBean; -import static org.junit.Assert.*; import org.junit.Test; import org.springframework.aop.support.AopUtils; @@ -27,6 +26,8 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.tests.context.SimpleMapScope; import org.springframework.util.SerializationTestUtils; +import static org.junit.Assert.*; + /** * @author Mark Fisher * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java index 02749a2e516..6c2984cdadd 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java @@ -16,14 +16,15 @@ package org.springframework.context.annotation; -import static org.junit.Assert.*; - import org.junit.Test; + import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; +import static org.junit.Assert.*; + /** * @author Mark Fisher */ diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassAndBFPPTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassAndBFPPTests.java index b35fc045745..b9a35de0b2c 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassAndBFPPTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassAndBFPPTests.java @@ -16,18 +16,16 @@ package org.springframework.context.annotation; -import static org.hamcrest.CoreMatchers.not; -import static org.hamcrest.CoreMatchers.notNullValue; -import static org.hamcrest.CoreMatchers.nullValue; -import static org.hamcrest.CoreMatchers.sameInstance; -import static org.junit.Assert.assertThat; - import org.junit.Test; + import org.springframework.beans.BeansException; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; +import org.springframework.tests.sample.beans.TestBean; + +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; /** * Tests semantics of declaring {@link BeanFactoryPostProcessor}-returning @Bean diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostConstructAndAutowiringTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostConstructAndAutowiringTests.java index 732d080fe1f..5a9cec8d841 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostConstructAndAutowiringTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostConstructAndAutowiringTests.java @@ -16,14 +16,15 @@ package org.springframework.context.annotation; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - import javax.annotation.PostConstruct; import org.junit.Test; -import org.springframework.tests.sample.beans.TestBean; + import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.tests.sample.beans.TestBean; + +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; /** * Tests cornering the issue reported in SPR-8080. If the product of a @Bean method diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassSpr8954Tests.java b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassSpr8954Tests.java index fe43ca204ef..114fea7c221 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassSpr8954Tests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassSpr8954Tests.java @@ -19,6 +19,7 @@ package org.springframework.context.annotation; import java.util.Map; import org.junit.Test; + import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.config.InstantiationAwareBeanPostProcessorAdapter; import org.springframework.beans.factory.support.RootBeanDefinition; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassWithConditionTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassWithConditionTests.java index 3deaf61d0ce..9d4ec039146 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassWithConditionTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassWithConditionTests.java @@ -24,6 +24,7 @@ import java.lang.annotation.Target; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.core.annotation.AnnotationAttributes; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationWithFactoryBeanAndParametersTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationWithFactoryBeanAndParametersTests.java index 246cdf3d857..89ef4505383 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationWithFactoryBeanAndParametersTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationWithFactoryBeanAndParametersTests.java @@ -16,14 +16,15 @@ package org.springframework.context.annotation; -import static org.junit.Assert.assertNotNull; - import org.junit.Test; + import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.ApplicationContext; +import static org.junit.Assert.*; + /** * Test case cornering the bug initially raised with SPR-8762, in which a * NullPointerException would be raised if a FactoryBean-returning @Bean method also diff --git a/spring-context/src/test/java/org/springframework/context/annotation/DestroyMethodInferenceTests-context.xml b/spring-context/src/test/java/org/springframework/context/annotation/DestroyMethodInferenceTests-context.xml index 7033e5517d6..08b84f7c513 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/DestroyMethodInferenceTests-context.xml +++ b/spring-context/src/test/java/org/springframework/context/annotation/DestroyMethodInferenceTests-context.xml @@ -1,11 +1,8 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> diff --git a/spring-context/src/test/java/org/springframework/context/annotation/EnableAspectJAutoProxyTests.java b/spring-context/src/test/java/org/springframework/context/annotation/EnableAspectJAutoProxyTests.java index 11e2a0f843f..b4b466d5652 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/EnableAspectJAutoProxyTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/EnableAspectJAutoProxyTests.java @@ -16,17 +16,15 @@ package org.springframework.context.annotation; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; - +import example.scannable.FooService; +import example.scannable.ServiceInvocationCounter; import org.junit.Test; + import org.springframework.aop.support.AopUtils; import org.springframework.context.ApplicationContext; -import example.scannable.FooService; -import example.scannable.ServiceInvocationCounter; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; /** * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/context/annotation/EnableLoadTimeWeavingTests.java b/spring-context/src/test/java/org/springframework/context/annotation/EnableLoadTimeWeavingTests.java index 74f96e4d7e8..87938dcfd22 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/EnableLoadTimeWeavingTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/EnableLoadTimeWeavingTests.java @@ -19,6 +19,7 @@ package org.springframework.context.annotation; import java.lang.instrument.ClassFileTransformer; import org.junit.Test; + import org.springframework.context.annotation.EnableLoadTimeWeaving.AspectJWeaving; import org.springframework.context.support.GenericXmlApplicationContext; import org.springframework.instrument.classloading.LoadTimeWeaver; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ImportSelectorTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ImportSelectorTests.java index ca05664e4ca..ef242eb55da 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ImportSelectorTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ImportSelectorTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/context/annotation/InvalidConfigurationClassDefinitionTests.java b/spring-context/src/test/java/org/springframework/context/annotation/InvalidConfigurationClassDefinitionTests.java index 2f999dd93e5..dc8c2d99d7b 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/InvalidConfigurationClassDefinitionTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/InvalidConfigurationClassDefinitionTests.java @@ -15,15 +15,14 @@ */ package org.springframework.context.annotation; -import static org.junit.Assert.*; -import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*; - import org.junit.Test; + import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.ConfigurationClassPostProcessor; + +import static org.junit.Assert.*; +import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*; /** * Unit tests covering cases where a user defines an invalid Configuration diff --git a/spring-context/src/test/java/org/springframework/context/annotation/PrimitiveBeanLookupAndAutowiringTests.java b/spring-context/src/test/java/org/springframework/context/annotation/PrimitiveBeanLookupAndAutowiringTests.java index 64b25b61b6a..be1d5ed3328 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/PrimitiveBeanLookupAndAutowiringTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/PrimitiveBeanLookupAndAutowiringTests.java @@ -16,15 +16,16 @@ package org.springframework.context.annotation; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; - import javax.annotation.Resource; import org.junit.Test; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Tests changes introduced for SPR-8874, allowing beans of primitive types to be looked * up via getBean(Class), or to be injected using @Autowired or @Injected or @Resource. diff --git a/spring-context/src/test/java/org/springframework/context/annotation/PropertySourceAnnotationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/PropertySourceAnnotationTests.java index cc4acf6dc9a..7150c4b0dc9 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/PropertySourceAnnotationTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/PropertySourceAnnotationTests.java @@ -19,12 +19,12 @@ package org.springframework.context.annotation; import java.io.FileNotFoundException; import java.util.Collections; import java.util.Iterator; - import javax.inject.Inject; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.FactoryBean; import org.springframework.core.env.Environment; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ReflectionUtilsIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ReflectionUtilsIntegrationTests.java index 8974528c715..338e0bd5515 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ReflectionUtilsIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ReflectionUtilsIntegrationTests.java @@ -16,15 +16,15 @@ package org.springframework.context.annotation; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; - import java.lang.reflect.Method; import org.junit.Test; + import org.springframework.util.ReflectionUtils; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Tests ReflectionUtils methods as used against CGLIB-generated classes created * by ConfigurationClassEnhancer. diff --git a/spring-context/src/test/java/org/springframework/context/annotation/SimpleConfigTests.java b/spring-context/src/test/java/org/springframework/context/annotation/SimpleConfigTests.java index 455cdad855c..c2853dabb22 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/SimpleConfigTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/SimpleConfigTests.java @@ -21,11 +21,12 @@ import java.util.concurrent.FutureTask; import example.scannable.FooService; import example.scannable.ServiceInvocationCounter; -import static org.junit.Assert.*; import org.junit.Test; import org.springframework.context.support.ClassPathXmlApplicationContext; +import static org.junit.Assert.*; + /** * @author Mark Fisher * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/context/annotation/SimpleScanTests.java b/spring-context/src/test/java/org/springframework/context/annotation/SimpleScanTests.java index 22c7cbc8244..8fc8d1df035 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/SimpleScanTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/SimpleScanTests.java @@ -16,13 +16,13 @@ package org.springframework.context.annotation; -import static org.junit.Assert.*; - +import example.scannable.FooService; +import example.scannable.ServiceInvocationCounter; import org.junit.Test; + import org.springframework.context.support.ClassPathXmlApplicationContext; -import example.scannable.FooService; -import example.scannable.ServiceInvocationCounter; +import static org.junit.Assert.*; /** * @author Mark Fisher diff --git a/spring-context/src/test/java/org/springframework/context/annotation/Spr11310Tests.java b/spring-context/src/test/java/org/springframework/context/annotation/Spr11310Tests.java index a11f7dc7013..5449d01588a 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/Spr11310Tests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/Spr11310Tests.java @@ -16,19 +16,16 @@ package org.springframework.context.annotation; -import static org.junit.Assert.*; - import java.util.List; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.AnnotationConfigApplicationContext; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; +import static org.junit.Assert.*; + /** * @author Stephane Nicoll */ diff --git a/spring-context/src/test/java/org/springframework/context/annotation/Spr3775InitDestroyLifecycleTests.java b/spring-context/src/test/java/org/springframework/context/annotation/Spr3775InitDestroyLifecycleTests.java index 25b2192cd8b..d2b3810b5d9 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/Spr3775InitDestroyLifecycleTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/Spr3775InitDestroyLifecycleTests.java @@ -16,24 +16,24 @@ package org.springframework.context.annotation; -import static org.junit.Assert.assertTrue; - import java.util.ArrayList; import java.util.Arrays; import java.util.List; - import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.junit.Test; + import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.util.ObjectUtils; +import static org.junit.Assert.*; + /** *

* JUnit-3.8-based unit test which verifies expected init and diff --git a/spring-context/src/test/java/org/springframework/context/annotation/Spr6602Tests.java b/spring-context/src/test/java/org/springframework/context/annotation/Spr6602Tests.java index 48780c545fe..5e7f4d60ee4 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/Spr6602Tests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/Spr6602Tests.java @@ -16,15 +16,15 @@ package org.springframework.context.annotation; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.not; -import static org.junit.Assert.assertThat; - import org.junit.Test; + import org.springframework.beans.factory.FactoryBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Tests to verify that FactoryBean semantics are the same in Configuration * classes as in XML. diff --git a/spring-context/src/test/java/org/springframework/context/annotation/componentscan/level1/Level1Config.java b/spring-context/src/test/java/org/springframework/context/annotation/componentscan/level1/Level1Config.java index 29a53ac60da..807843ef91b 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/componentscan/level1/Level1Config.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/componentscan/level1/Level1Config.java @@ -16,10 +16,10 @@ package org.springframework.context.annotation.componentscan.level1; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; +import org.springframework.tests.sample.beans.TestBean; @Configuration @ComponentScan("org.springframework.context.annotation.componentscan.level2") diff --git a/spring-context/src/test/java/org/springframework/context/annotation/componentscan/level2/Level2Config.java b/spring-context/src/test/java/org/springframework/context/annotation/componentscan/level2/Level2Config.java index 5039456d340..e58bb4529e3 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/componentscan/level2/Level2Config.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/componentscan/level2/Level2Config.java @@ -16,10 +16,10 @@ package org.springframework.context.annotation.componentscan.level2; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; +import org.springframework.tests.sample.beans.TestBean; @Configuration @ComponentScan("org.springframework.context.annotation.componentscan.level3") diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/BeanAnnotationAttributePropagationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/BeanAnnotationAttributePropagationTests.java index f063133eab3..5c6152262d0 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/BeanAnnotationAttributePropagationTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/BeanAnnotationAttributePropagationTests.java @@ -16,9 +16,8 @@ package org.springframework.context.annotation.configuration; -import static org.junit.Assert.*; - import org.junit.Test; + import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -26,9 +25,11 @@ import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ConfigurationClassPostProcessor; +import org.springframework.context.annotation.DependsOn; import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Primary; -import org.springframework.context.annotation.DependsOn; + +import static org.junit.Assert.*; /** * Unit tests proving that the various attributes available via the {@link Bean} diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationBeanNameTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationBeanNameTests.java index 39c2654d0b1..4704728434a 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationBeanNameTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationBeanNameTests.java @@ -17,6 +17,7 @@ package org.springframework.context.annotation.configuration; import org.junit.Test; + import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.context.annotation.AnnotationBeanNameGenerator; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassAspectIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassAspectIntegrationTests.java index 297946c5ea0..17138705f24 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassAspectIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassAspectIntegrationTests.java @@ -16,12 +16,10 @@ package org.springframework.context.annotation.configuration; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; - import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; @@ -30,9 +28,11 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ConfigurationClassPostProcessor; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.io.ClassPathResource; - import org.springframework.tests.sample.beans.TestBean; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * System tests covering use of AspectJ {@link Aspect}s in conjunction with {@link Configuration} classes. * {@link Bean} methods may return aspects, or Configuration classes may themselves be annotated with Aspect. diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassCglibCallbackDeregistrationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassCglibCallbackDeregistrationTests.java index c18cc981e7e..d77bab5812f 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassCglibCallbackDeregistrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassCglibCallbackDeregistrationTests.java @@ -16,15 +16,15 @@ package org.springframework.context.annotation.configuration; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - import org.junit.Test; + import org.springframework.beans.factory.DisposableBean; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Configuration; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Tests ensuring that @Configuration-related CGLIB callbacks are de-registered * at container shutdown time, allowing for proper garbage collection. See SPR-7901. diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassWithPlaceholderConfigurerBeanTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassWithPlaceholderConfigurerBeanTests.java index 960b5ee8052..43c3397bc38 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassWithPlaceholderConfigurerBeanTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassWithPlaceholderConfigurerBeanTests.java @@ -16,21 +16,20 @@ package org.springframework.context.annotation.configuration; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.nullValue; -import static org.junit.Assert.assertThat; - import org.junit.Ignore; import org.junit.Test; + import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; - import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * A configuration class that registers a placeholder configurer @Bean method * cannot also have @Value fields. Logically, the config class must be instantiated diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationMetaAnnotationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationMetaAnnotationTests.java index 00844065470..4e090efa246 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationMetaAnnotationTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationMetaAnnotationTests.java @@ -20,10 +20,10 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import org.junit.Test; + import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; - import org.springframework.tests.sample.beans.TestBean; import static org.hamcrest.CoreMatchers.*; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/DuplicateConfigurationClassPostProcessorTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/DuplicateConfigurationClassPostProcessorTests.java index a34b9fa611f..239efb71dcd 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/DuplicateConfigurationClassPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/DuplicateConfigurationClassPostProcessorTests.java @@ -17,6 +17,7 @@ package org.springframework.context.annotation.configuration; import org.junit.Test; + import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportAnnotationDetectionTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportAnnotationDetectionTests.java index 61ae62b8034..57c1140480a 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportAnnotationDetectionTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportAnnotationDetectionTests.java @@ -16,20 +16,21 @@ package org.springframework.context.annotation.configuration; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.junit.Test; -import org.springframework.tests.sample.beans.TestBean; + import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import org.springframework.tests.sample.beans.TestBean; + +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; /** * Tests that @Import may be used both as a locally declared and meta-declared diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportTests.java index fc89e709d1a..534cd886e87 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportTests.java @@ -16,11 +16,7 @@ package org.springframework.context.annotation.configuration; -import static org.hamcrest.CoreMatchers.*; -import static org.junit.Assert.*; import org.junit.Test; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -30,6 +26,11 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ConfigurationClassPostProcessor; import org.springframework.context.annotation.Import; +import org.springframework.tests.sample.beans.ITestBean; +import org.springframework.tests.sample.beans.TestBean; + +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; /** * System tests for {@link Import} annotation support. diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportedConfigurationClassEnhancementTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportedConfigurationClassEnhancementTests.java index 2bc75f1754c..334a7bad0cc 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportedConfigurationClassEnhancementTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportedConfigurationClassEnhancementTests.java @@ -16,11 +16,8 @@ package org.springframework.context.annotation.configuration; -import static org.hamcrest.CoreMatchers.sameInstance; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; - import org.junit.Test; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; import org.springframework.context.ApplicationContext; @@ -28,9 +25,11 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.ClassUtils; -import org.springframework.tests.sample.beans.TestBean; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; /** * Unit tests cornering the bug exposed in SPR-6779. diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/PackagePrivateBeanMethodInheritanceTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/PackagePrivateBeanMethodInheritanceTests.java index 3e5e7ed77e2..d2b0b099150 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/PackagePrivateBeanMethodInheritanceTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/PackagePrivateBeanMethodInheritanceTests.java @@ -16,15 +16,15 @@ package org.springframework.context.annotation.configuration; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.not; -import static org.junit.Assert.assertThat; - import org.junit.Test; + import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Reproduces SPR-8756, which has been marked as "won't fix" for reasons * described in the JIRA issue. Also demonstrates the suggested workaround. diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/Spr10668Tests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/Spr10668Tests.java index d59e4133d57..c00c2edb0fd 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/Spr10668Tests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/Spr10668Tests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +17,7 @@ package org.springframework.context.annotation.configuration; import org.junit.Test; + import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/Spr10744Tests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/Spr10744Tests.java index abc3f495a75..8e62412d0da 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/Spr10744Tests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/Spr10744Tests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/Spr7167Tests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/Spr7167Tests.java index 02f0fd8e3e6..0124e429155 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/Spr7167Tests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/Spr7167Tests.java @@ -16,11 +16,8 @@ package org.springframework.context.annotation.configuration; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; - import org.junit.Test; + import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; @@ -31,6 +28,9 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.util.ClassUtils; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + public class Spr7167Tests { @Test public void test() { diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/aspectj-autoproxy-config.xml b/spring-context/src/test/java/org/springframework/context/annotation/configuration/aspectj-autoproxy-config.xml index 09e835f0c64..6772e7af13b 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/aspectj-autoproxy-config.xml +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/aspectj-autoproxy-config.xml @@ -1,11 +1,10 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:aop="http://www.springframework.org/schema/aop" + xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd" + > diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/spr8955/Spr8955Tests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/spr8955/Spr8955Tests.java index 396c402366a..064b248499e 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/spr8955/Spr8955Tests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/spr8955/Spr8955Tests.java @@ -17,6 +17,7 @@ package org.springframework.context.annotation.configuration.spr8955; import org.junit.Test; + import org.springframework.context.annotation.AnnotationConfigApplicationContext; /** diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/spr9031/Spr9031Tests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/spr9031/Spr9031Tests.java index 201918a4329..a057104a9ef 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/spr9031/Spr9031Tests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/spr9031/Spr9031Tests.java @@ -16,11 +16,8 @@ package org.springframework.context.annotation.configuration.spr9031; -import static org.hamcrest.CoreMatchers.not; -import static org.hamcrest.CoreMatchers.nullValue; -import static org.junit.Assert.assertThat; - import org.junit.Test; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.ComponentScan; @@ -29,6 +26,9 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; import org.springframework.context.annotation.configuration.spr9031.scanpackage.Spr9031Component; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Unit tests cornering bug SPR-9031. * diff --git a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ImportedConfig.java b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ImportedConfig.java index c5aca0181ef..a065e225c7e 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ImportedConfig.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ImportedConfig.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentConfig.java b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentConfig.java index f2a1d3ff994..f5014e29507 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentConfig.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentConfig.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithComponentScanConfig.java b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithComponentScanConfig.java index ce649e709dc..6384e5a9d46 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithComponentScanConfig.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithComponentScanConfig.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithImportConfig.java b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithImportConfig.java index 4b7cde7e81b..47e70cdc8a2 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithImportConfig.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithImportConfig.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithImportResourceConfig.java b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithImportResourceConfig.java index 7dd7ed72ead..b86c81d7ced 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithImportResourceConfig.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithImportResourceConfig.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithParentConfig.java b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithParentConfig.java index 8e69103d4b4..c799a9501c5 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithParentConfig.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/ParentWithParentConfig.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/Spr10546Tests.java b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/Spr10546Tests.java index a041f8871db..d02b2ba3ba9 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/Spr10546Tests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/Spr10546Tests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,6 +18,7 @@ package org.springframework.context.annotation.spr10546; import org.junit.After; import org.junit.Test; + import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Configuration; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/scanpackage/AEnclosingConfig.java b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/scanpackage/AEnclosingConfig.java index 0b0bb64ed79..afd323a43f0 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/spr10546/scanpackage/AEnclosingConfig.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/spr10546/scanpackage/AEnclosingConfig.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/context/annotation/spr12233/Spr12233Tests.java b/spring-context/src/test/java/org/springframework/context/annotation/spr12233/Spr12233Tests.java index 3cdb7d07d06..cbf4617f517 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/spr12233/Spr12233Tests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/spr12233/Spr12233Tests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +17,7 @@ package org.springframework.context.annotation.spr12233; import org.junit.Test; + import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.ComponentScan; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/spr8761/Spr8761Tests.java b/spring-context/src/test/java/org/springframework/context/annotation/spr8761/Spr8761Tests.java index 206ac4d8bcb..47da22d3cc4 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/spr8761/Spr8761Tests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/spr8761/Spr8761Tests.java @@ -16,16 +16,17 @@ package org.springframework.context.annotation.spr8761; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import org.junit.Test; + import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.stereotype.Component; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Tests cornering the regression reported in SPR-8761. * diff --git a/spring-context/src/test/java/org/springframework/context/annotation/spr8808/Spr8808Tests.java b/spring-context/src/test/java/org/springframework/context/annotation/spr8808/Spr8808Tests.java index 7a765851f16..5ebba04c177 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/spr8808/Spr8808Tests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/spr8808/Spr8808Tests.java @@ -17,6 +17,7 @@ package org.springframework.context.annotation.spr8808; import org.junit.Test; + import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; diff --git a/spring-context/src/test/java/org/springframework/context/annotation3/StubFooDao.java b/spring-context/src/test/java/org/springframework/context/annotation3/StubFooDao.java index 5c53712e5aa..3bf3934faf2 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation3/StubFooDao.java +++ b/spring-context/src/test/java/org/springframework/context/annotation3/StubFooDao.java @@ -16,11 +16,11 @@ package org.springframework.context.annotation3; +import example.scannable.FooDao; + import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; -import example.scannable.FooDao; - /** * @author Mark Fisher */ diff --git a/spring-context/src/test/java/org/springframework/context/annotation4/FactoryMethodComponent.java b/spring-context/src/test/java/org/springframework/context/annotation4/FactoryMethodComponent.java index 6c59cf85228..5d3be6ba43f 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation4/FactoryMethodComponent.java +++ b/spring-context/src/test/java/org/springframework/context/annotation4/FactoryMethodComponent.java @@ -16,7 +16,6 @@ package org.springframework.context.annotation4; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; @@ -24,6 +23,7 @@ import org.springframework.context.annotation.BeanAge; import org.springframework.context.annotation.Scope; import org.springframework.context.annotation.ScopedProxyMode; import org.springframework.stereotype.Component; +import org.springframework.tests.sample.beans.TestBean; /** * Class used to test the functionality of factory method bean definitions diff --git a/spring-context/src/test/java/org/springframework/context/annotation4/SimpleBean.java b/spring-context/src/test/java/org/springframework/context/annotation4/SimpleBean.java index fcfe98d94ad..92fd759d225 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation4/SimpleBean.java +++ b/spring-context/src/test/java/org/springframework/context/annotation4/SimpleBean.java @@ -16,8 +16,8 @@ package org.springframework.context.annotation4; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.context.annotation.Bean; +import org.springframework.tests.sample.beans.TestBean; /** * Class to test that @FactoryMethods are detected only when inside a class with an @Component diff --git a/spring-context/src/test/java/org/springframework/context/annotation6/ConfigForScanning.java b/spring-context/src/test/java/org/springframework/context/annotation6/ConfigForScanning.java index 42098c96e79..944f3c7fbc6 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation6/ConfigForScanning.java +++ b/spring-context/src/test/java/org/springframework/context/annotation6/ConfigForScanning.java @@ -2,7 +2,6 @@ package org.springframework.context.annotation6; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; - import org.springframework.tests.sample.beans.TestBean; @Configuration diff --git a/spring-context/src/test/java/org/springframework/context/conversionservice/ConversionServiceContextConfigTests.java b/spring-context/src/test/java/org/springframework/context/conversionservice/ConversionServiceContextConfigTests.java index 1771dd7cf57..91367b8e603 100644 --- a/spring-context/src/test/java/org/springframework/context/conversionservice/ConversionServiceContextConfigTests.java +++ b/spring-context/src/test/java/org/springframework/context/conversionservice/ConversionServiceContextConfigTests.java @@ -16,11 +16,12 @@ package org.springframework.context.conversionservice; -import static org.junit.Assert.*; import org.junit.Test; import org.springframework.context.support.ClassPathXmlApplicationContext; +import static org.junit.Assert.*; + /** * @author Keith Donald */ diff --git a/spring-context/src/test/java/org/springframework/context/event/ApplicationContextEventTests.java b/spring-context/src/test/java/org/springframework/context/event/ApplicationContextEventTests.java index fa7b459bd57..16e635a60cd 100644 --- a/spring-context/src/test/java/org/springframework/context/event/ApplicationContextEventTests.java +++ b/spring-context/src/test/java/org/springframework/context/event/ApplicationContextEventTests.java @@ -22,6 +22,7 @@ import java.util.concurrent.Executor; import org.aopalliance.intercept.MethodInvocation; import org.junit.Test; + import org.springframework.aop.framework.ProxyFactory; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.RootBeanDefinition; diff --git a/spring-context/src/test/java/org/springframework/context/event/EventPublicationInterceptorTests.java b/spring-context/src/test/java/org/springframework/context/event/EventPublicationInterceptorTests.java index 128abf301dc..099dc282604 100644 --- a/spring-context/src/test/java/org/springframework/context/event/EventPublicationInterceptorTests.java +++ b/spring-context/src/test/java/org/springframework/context/event/EventPublicationInterceptorTests.java @@ -18,6 +18,7 @@ package org.springframework.context.event; import org.junit.Before; import org.junit.Test; + import org.springframework.aop.framework.ProxyFactory; import org.springframework.beans.BeansException; import org.springframework.beans.MutablePropertyValues; diff --git a/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java index 87267fab3af..4ad794f80a3 100644 --- a/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java @@ -16,18 +16,18 @@ package org.springframework.context.expression; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; -import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition; - import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.GenericApplicationContext; import org.springframework.mock.env.MockPropertySource; - import org.springframework.tests.sample.beans.TestBean; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; +import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*; + /** * Integration tests for {@link EnvironmentAccessor}, which is registered with * SpEL for all {@link AbstractApplicationContext} implementations via diff --git a/spring-context/src/test/java/org/springframework/context/support/ApplicationContextLifecycleTests.java b/spring-context/src/test/java/org/springframework/context/support/ApplicationContextLifecycleTests.java index 1f0df6abdae..9c2406130e0 100644 --- a/spring-context/src/test/java/org/springframework/context/support/ApplicationContextLifecycleTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/ApplicationContextLifecycleTests.java @@ -16,10 +16,10 @@ package org.springframework.context.support; -import static org.junit.Assert.*; - import org.junit.Test; +import static org.junit.Assert.*; + /** * @author Mark Fisher * @author Chris Beams diff --git a/spring-context/src/test/java/org/springframework/context/support/ClassPathXmlApplicationContextTests.java b/spring-context/src/test/java/org/springframework/context/support/ClassPathXmlApplicationContextTests.java index 62223519fe8..4b35c7a6338 100644 --- a/spring-context/src/test/java/org/springframework/context/support/ClassPathXmlApplicationContextTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/ClassPathXmlApplicationContextTests.java @@ -16,8 +16,6 @@ package org.springframework.context.support; -import static org.junit.Assert.*; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -29,8 +27,8 @@ import java.util.List; import java.util.Map; import org.junit.Test; + import org.springframework.aop.support.AopUtils; -import org.springframework.tests.sample.beans.ResourceTestBean; import org.springframework.beans.TypeMismatchException; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanFactoryUtils; @@ -41,9 +39,12 @@ import org.springframework.context.MessageSource; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.Resource; +import org.springframework.tests.sample.beans.ResourceTestBean; import org.springframework.util.FileCopyUtils; import org.springframework.util.ObjectUtils; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Chris Beams diff --git a/spring-context/src/test/java/org/springframework/context/support/ConversionServiceFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/context/support/ConversionServiceFactoryBeanTests.java index 396e4a1bb0c..336f89e9027 100644 --- a/spring-context/src/test/java/org/springframework/context/support/ConversionServiceFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/ConversionServiceFactoryBeanTests.java @@ -23,7 +23,6 @@ import java.util.Set; import org.junit.Test; -import org.springframework.tests.sample.beans.ResourceTestBean; import org.springframework.context.ApplicationContext; import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.TypeDescriptor; @@ -32,8 +31,9 @@ import org.springframework.core.convert.converter.ConverterFactory; import org.springframework.core.convert.converter.GenericConverter; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.FileSystemResource; +import org.springframework.tests.sample.beans.ResourceTestBean; -import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; /** diff --git a/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java b/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java index 86c960f82f6..ffc29168200 100644 --- a/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java @@ -19,6 +19,7 @@ package org.springframework.context.support; import java.util.concurrent.CopyOnWriteArrayList; import org.junit.Test; + import org.springframework.beans.DirectFieldAccessor; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.config.BeanDefinition; diff --git a/spring-context/src/test/java/org/springframework/context/support/EnvironmentIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/support/EnvironmentIntegrationTests.java index 8b153315f08..1dabca831db 100644 --- a/spring-context/src/test/java/org/springframework/context/support/EnvironmentIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/EnvironmentIntegrationTests.java @@ -17,6 +17,7 @@ package org.springframework.context.support; import org.junit.Test; + import org.springframework.context.ApplicationContext; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; diff --git a/spring-context/src/test/java/org/springframework/context/support/EnvironmentSecurityManagerIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/support/EnvironmentSecurityManagerIntegrationTests.java index 7f202aa473a..86c46871706 100644 --- a/spring-context/src/test/java/org/springframework/context/support/EnvironmentSecurityManagerIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/EnvironmentSecurityManagerIntegrationTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/context/support/GenericXmlApplicationContextTests.java b/spring-context/src/test/java/org/springframework/context/support/GenericXmlApplicationContextTests.java index c6be2f1474a..456161d9fc3 100644 --- a/spring-context/src/test/java/org/springframework/context/support/GenericXmlApplicationContextTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/GenericXmlApplicationContextTests.java @@ -1,12 +1,13 @@ package org.springframework.context.support; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - import org.junit.Test; + import org.springframework.context.ApplicationContext; import org.springframework.util.ClassUtils; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Unit tests for {@link GenericXmlApplicationContext}. * diff --git a/spring-context/src/test/java/org/springframework/context/support/PropertyResourceConfigurerIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/support/PropertyResourceConfigurerIntegrationTests.java index cb85d50d511..10696598387 100644 --- a/spring-context/src/test/java/org/springframework/context/support/PropertyResourceConfigurerIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/PropertyResourceConfigurerIntegrationTests.java @@ -16,23 +16,23 @@ package org.springframework.context.support; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import java.io.FileNotFoundException; import org.junit.Ignore; import org.junit.Test; + import org.springframework.beans.MutablePropertyValues; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.BeanInitializationException; import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; import org.springframework.beans.factory.config.PropertyResourceConfigurer; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.context.ApplicationContext; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.StringUtils; +import static org.junit.Assert.*; + /** * Integration tests for {@link PropertyResourceConfigurer} implementations requiring * interaction with an {@link ApplicationContext}. For example, a {@link PropertyPlaceholderConfigurer} diff --git a/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java b/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java index 2f3c5aff4a0..e11ae4769bb 100644 --- a/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java @@ -21,6 +21,7 @@ import java.util.Properties; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.core.env.MutablePropertySources; diff --git a/spring-context/src/test/java/org/springframework/context/support/SerializableBeanFactoryMemoryLeakTests.java b/spring-context/src/test/java/org/springframework/context/support/SerializableBeanFactoryMemoryLeakTests.java index e644e8426c6..f0d732c7187 100644 --- a/spring-context/src/test/java/org/springframework/context/support/SerializableBeanFactoryMemoryLeakTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/SerializableBeanFactoryMemoryLeakTests.java @@ -1,20 +1,21 @@ package org.springframework.context.support; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; -import static org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition; - import java.lang.reflect.Field; import java.util.Map; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; + import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.context.ConfigurableApplicationContext; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; +import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*; + /** * Unit tests cornering SPR-7502. * diff --git a/spring-context/src/test/java/org/springframework/context/support/Spr7283Tests.java b/spring-context/src/test/java/org/springframework/context/support/Spr7283Tests.java index 6d82d77d88b..82e7acc6a03 100644 --- a/spring-context/src/test/java/org/springframework/context/support/Spr7283Tests.java +++ b/spring-context/src/test/java/org/springframework/context/support/Spr7283Tests.java @@ -18,9 +18,10 @@ package org.springframework.context.support; import java.util.List; -import static org.junit.Assert.*; import org.junit.Test; +import static org.junit.Assert.*; + /** * @author Scott Andrews * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/context/support/Spr7816Tests.java b/spring-context/src/test/java/org/springframework/context/support/Spr7816Tests.java index 6fb17f353b3..e9d1da8a880 100644 --- a/spring-context/src/test/java/org/springframework/context/support/Spr7816Tests.java +++ b/spring-context/src/test/java/org/springframework/context/support/Spr7816Tests.java @@ -16,13 +16,14 @@ package org.springframework.context.support; -import static org.junit.Assert.assertEquals; - import java.util.Map; import org.junit.Test; + import org.springframework.context.ApplicationContext; +import static org.junit.Assert.*; + /** * @author Keith Donald * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java index b1f9d24ecd6..f2f74bc35d1 100644 --- a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java @@ -21,7 +21,6 @@ import java.util.Locale; import java.util.Map; import org.springframework.beans.MutablePropertyValues; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.support.PropertiesBeanDefinitionReader; import org.springframework.context.ACATester; import org.springframework.context.AbstractApplicationContextTests; @@ -32,6 +31,7 @@ import org.springframework.context.event.SimpleApplicationEventMulticaster; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.core.io.support.EncodedResource; +import org.springframework.tests.sample.beans.TestBean; /** * Tests for static application context with custom application event multicaster. diff --git a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java index bba7f776685..694985b2117 100644 --- a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java @@ -21,13 +21,13 @@ import java.util.Locale; import java.util.Map; import org.springframework.beans.MutablePropertyValues; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.support.PropertiesBeanDefinitionReader; import org.springframework.context.ACATester; import org.springframework.context.AbstractApplicationContextTests; import org.springframework.context.BeanThatListens; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.core.io.ClassPathResource; +import org.springframework.tests.sample.beans.TestBean; /** * Tests for static application context. diff --git a/spring-context/src/test/java/org/springframework/context/support/spr7283.xml b/spring-context/src/test/java/org/springframework/context/support/spr7283.xml index df0a26a773f..22da9c457e8 100644 --- a/spring-context/src/test/java/org/springframework/context/support/spr7283.xml +++ b/spring-context/src/test/java/org/springframework/context/support/spr7283.xml @@ -1,10 +1,9 @@ diff --git a/spring-context/src/test/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptorTests.java b/spring-context/src/test/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptorTests.java index a87d56eb9bd..df871192fc4 100644 --- a/spring-context/src/test/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptorTests.java +++ b/spring-context/src/test/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptorTests.java @@ -23,6 +23,7 @@ import javax.naming.Context; import javax.naming.NamingException; import org.junit.Test; + import org.springframework.aop.framework.ProxyFactory; import org.springframework.jndi.JndiTemplate; diff --git a/spring-context/src/test/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBeanTests.java index d10dce2a5ac..9fbf0bbd7de 100644 --- a/spring-context/src/test/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBeanTests.java @@ -17,13 +17,13 @@ package org.springframework.ejb.access; import java.lang.reflect.Proxy; - import javax.ejb.CreateException; import javax.ejb.EJBLocalHome; import javax.ejb.EJBLocalObject; import javax.naming.NamingException; import org.junit.Test; + import org.springframework.jndi.JndiTemplate; import static org.junit.Assert.*; diff --git a/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptorTests.java b/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptorTests.java index 0191220b1bf..4f266d4829e 100644 --- a/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptorTests.java +++ b/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteSlsbInvokerInterceptorTests.java @@ -18,7 +18,6 @@ package org.springframework.ejb.access; import java.rmi.ConnectException; import java.rmi.RemoteException; - import javax.ejb.CreateException; import javax.ejb.EJBHome; import javax.ejb.EJBObject; @@ -26,6 +25,7 @@ import javax.naming.Context; import javax.naming.NamingException; import org.junit.Test; + import org.springframework.aop.framework.ProxyFactory; import org.springframework.jndi.JndiTemplate; import org.springframework.remoting.RemoteAccessException; diff --git a/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBeanTests.java index 68af4a9b06d..8efc5b5740b 100644 --- a/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBeanTests.java @@ -18,13 +18,13 @@ package org.springframework.ejb.access; import java.lang.reflect.Proxy; import java.rmi.RemoteException; - import javax.ejb.CreateException; import javax.ejb.EJBHome; import javax.ejb.EJBObject; import javax.naming.NamingException; import org.junit.Test; + import org.springframework.jndi.JndiTemplate; import org.springframework.remoting.RemoteAccessException; diff --git a/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerEventTests.java b/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerEventTests.java index 4eea7e81555..98caf9375ca 100644 --- a/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerEventTests.java +++ b/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerEventTests.java @@ -16,10 +16,9 @@ package org.springframework.ejb.config; -import static org.junit.Assert.assertTrue; - import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.parsing.BeanComponentDefinition; import org.springframework.beans.factory.parsing.ComponentDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -27,6 +26,8 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.ClassPathResource; import org.springframework.tests.beans.CollectingReaderEventListener; +import static org.junit.Assert.*; + /** * @author Torsten Juergeleit * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerTests.java b/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerTests.java index c2430271b43..7bfe8144f42 100644 --- a/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerTests.java +++ b/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerTests.java @@ -16,11 +16,9 @@ package org.springframework.ejb.config; -import static org.junit.Assert.*; - import org.junit.Before; import org.junit.Test; -import org.springframework.tests.sample.beans.ITestBean; + import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.config.RuntimeBeanReference; @@ -30,6 +28,9 @@ import org.springframework.core.io.ClassPathResource; import org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean; import org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean; import org.springframework.jndi.JndiObjectFactoryBean; +import org.springframework.tests.sample.beans.ITestBean; + +import static org.junit.Assert.*; /** * @author Rob Harrop diff --git a/spring-context/src/test/java/org/springframework/format/datetime/DateFormatterTests.java b/spring-context/src/test/java/org/springframework/format/datetime/DateFormatterTests.java index 3df68cdd88d..a978b7b8390 100644 --- a/spring-context/src/test/java/org/springframework/format/datetime/DateFormatterTests.java +++ b/spring-context/src/test/java/org/springframework/format/datetime/DateFormatterTests.java @@ -16,10 +16,6 @@ package org.springframework.format.datetime; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; - import java.text.DateFormat; import java.text.ParseException; import java.util.Calendar; @@ -33,8 +29,12 @@ import org.joda.time.format.DateTimeFormatter; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import org.springframework.format.annotation.DateTimeFormat.ISO; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; + /** * Tests for {@link DateFormatter}. * diff --git a/spring-context/src/test/java/org/springframework/format/datetime/DateFormattingTests.java b/spring-context/src/test/java/org/springframework/format/datetime/DateFormattingTests.java index 2803f0dc9f9..91f6b2b242d 100644 --- a/spring-context/src/test/java/org/springframework/format/datetime/DateFormattingTests.java +++ b/spring-context/src/test/java/org/springframework/format/datetime/DateFormattingTests.java @@ -16,11 +16,6 @@ package org.springframework.format.datetime; -import static org.hamcrest.Matchers.equalTo; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; - import java.util.ArrayList; import java.util.Calendar; import java.util.Date; @@ -31,6 +26,7 @@ import org.junit.After; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; + import org.springframework.beans.MutablePropertyValues; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.core.convert.TypeDescriptor; @@ -40,6 +36,9 @@ import org.springframework.format.annotation.DateTimeFormat.ISO; import org.springframework.format.support.FormattingConversionService; import org.springframework.validation.DataBinder; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; + /** * @author Phillip Webb * @author Keith Donald diff --git a/spring-context/src/test/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryBeanTests.java index 232de5bb76b..6539bc45992 100644 --- a/spring-context/src/test/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryBeanTests.java @@ -16,15 +16,13 @@ package org.springframework.format.datetime.joda; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.sameInstance; -import static org.junit.Assert.*; - import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; import org.junit.Test; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; + /** * @author Phillip Webb * @author Sam Brannen diff --git a/spring-context/src/test/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryTests.java b/spring-context/src/test/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryTests.java index 0e960cb5d3c..944421af4fc 100644 --- a/spring-context/src/test/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryTests.java +++ b/spring-context/src/test/java/org/springframework/format/datetime/joda/DateTimeFormatterFactoryTests.java @@ -16,9 +16,6 @@ package org.springframework.format.datetime.joda; -import static org.hamcrest.Matchers.*; -import static org.junit.Assert.*; - import java.util.Locale; import java.util.TimeZone; @@ -27,8 +24,12 @@ import org.joda.time.DateTimeZone; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; import org.junit.Test; + import org.springframework.format.annotation.DateTimeFormat.ISO; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; + /** * @author Phillip Webb * @author Sam Brannen diff --git a/spring-context/src/test/java/org/springframework/format/number/CurrencyFormatterTests.java b/spring-context/src/test/java/org/springframework/format/number/CurrencyFormatterTests.java index 68c5b598f98..b41327a45d7 100644 --- a/spring-context/src/test/java/org/springframework/format/number/CurrencyFormatterTests.java +++ b/spring-context/src/test/java/org/springframework/format/number/CurrencyFormatterTests.java @@ -16,15 +16,14 @@ package org.springframework.format.number; -import static org.junit.Assert.assertEquals; - import java.math.BigDecimal; import java.math.RoundingMode; import java.text.ParseException; import java.util.Locale; import org.junit.Test; -import org.springframework.format.number.CurrencyFormatter; + +import static org.junit.Assert.*; /** * @author Keith Donald diff --git a/spring-context/src/test/java/org/springframework/format/number/NumberFormatterTests.java b/spring-context/src/test/java/org/springframework/format/number/NumberFormatterTests.java index bcc529544ec..73783f30294 100644 --- a/spring-context/src/test/java/org/springframework/format/number/NumberFormatterTests.java +++ b/spring-context/src/test/java/org/springframework/format/number/NumberFormatterTests.java @@ -16,14 +16,13 @@ package org.springframework.format.number; -import static org.junit.Assert.assertEquals; - import java.math.BigDecimal; import java.text.ParseException; import java.util.Locale; import org.junit.Test; -import org.springframework.format.number.NumberFormatter; + +import static org.junit.Assert.*; /** * @author Keith Donald diff --git a/spring-context/src/test/java/org/springframework/format/number/NumberFormattingTests.java b/spring-context/src/test/java/org/springframework/format/number/NumberFormattingTests.java index 9503e82067a..6cbb561e835 100644 --- a/spring-context/src/test/java/org/springframework/format/number/NumberFormattingTests.java +++ b/spring-context/src/test/java/org/springframework/format/number/NumberFormattingTests.java @@ -16,8 +16,6 @@ package org.springframework.format.number; -import static org.junit.Assert.assertEquals; - import java.math.BigDecimal; import java.util.List; import java.util.Locale; @@ -25,6 +23,7 @@ import java.util.Locale; import org.junit.After; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.MutablePropertyValues; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.core.convert.support.DefaultConversionService; @@ -34,6 +33,8 @@ import org.springframework.format.support.FormattingConversionService; import org.springframework.util.StringValueResolver; import org.springframework.validation.DataBinder; +import static org.junit.Assert.*; + /** * @author Keith Donald * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/format/number/PercentFormatterTests.java b/spring-context/src/test/java/org/springframework/format/number/PercentFormatterTests.java index a69da954c8b..1d77ca3ca4c 100644 --- a/spring-context/src/test/java/org/springframework/format/number/PercentFormatterTests.java +++ b/spring-context/src/test/java/org/springframework/format/number/PercentFormatterTests.java @@ -16,14 +16,13 @@ package org.springframework.format.number; -import static org.junit.Assert.assertEquals; - import java.math.BigDecimal; import java.text.ParseException; import java.util.Locale; import org.junit.Test; -import org.springframework.format.number.PercentFormatter; + +import static org.junit.Assert.*; /** * @author Keith Donald diff --git a/spring-context/src/test/java/org/springframework/instrument/classloading/InstrumentableClassLoaderTests.java b/spring-context/src/test/java/org/springframework/instrument/classloading/InstrumentableClassLoaderTests.java index 8d26f6af121..6f64e043a60 100644 --- a/spring-context/src/test/java/org/springframework/instrument/classloading/InstrumentableClassLoaderTests.java +++ b/spring-context/src/test/java/org/springframework/instrument/classloading/InstrumentableClassLoaderTests.java @@ -16,11 +16,12 @@ package org.springframework.instrument.classloading; -import static org.junit.Assert.assertSame; - import org.junit.Test; + import org.springframework.util.ClassUtils; +import static org.junit.Assert.*; + /** * @author Costin Leau * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/instrument/classloading/ReflectiveLoadTimeWeaverTests.java b/spring-context/src/test/java/org/springframework/instrument/classloading/ReflectiveLoadTimeWeaverTests.java index f39f28b40cf..e4dfba2ab33 100644 --- a/spring-context/src/test/java/org/springframework/instrument/classloading/ReflectiveLoadTimeWeaverTests.java +++ b/spring-context/src/test/java/org/springframework/instrument/classloading/ReflectiveLoadTimeWeaverTests.java @@ -16,13 +16,13 @@ package org.springframework.instrument.classloading; -import static org.junit.Assert.*; - import java.lang.instrument.ClassFileTransformer; import java.security.ProtectionDomain; import org.junit.Test; +import static org.junit.Assert.*; + /** * Unit tests for the {@link ReflectiveLoadTimeWeaver} class. * diff --git a/spring-context/src/test/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoaderTests.java b/spring-context/src/test/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoaderTests.java index 3cafa8950e0..81b6c8e23b4 100644 --- a/spring-context/src/test/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoaderTests.java +++ b/spring-context/src/test/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoaderTests.java @@ -16,13 +16,13 @@ package org.springframework.instrument.classloading; -import static org.junit.Assert.*; - import java.io.IOException; import java.util.Enumeration; import org.junit.Test; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-context/src/test/java/org/springframework/jmx/access/MBeanClientInterceptorTests.java b/spring-context/src/test/java/org/springframework/jmx/access/MBeanClientInterceptorTests.java index a249f6a315f..9cb588aaaa0 100644 --- a/spring-context/src/test/java/org/springframework/jmx/access/MBeanClientInterceptorTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/access/MBeanClientInterceptorTests.java @@ -22,7 +22,6 @@ import java.lang.reflect.Method; import java.net.BindException; import java.util.HashMap; import java.util.Map; - import javax.management.Descriptor; import javax.management.MBeanServerConnection; import javax.management.remote.JMXConnectorServer; @@ -30,6 +29,7 @@ import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXServiceURL; import org.junit.Test; + import org.springframework.jmx.AbstractMBeanServerTests; import org.springframework.jmx.IJmxTestBean; import org.springframework.jmx.JmxException; diff --git a/spring-context/src/test/java/org/springframework/jmx/access/RemoteMBeanClientInterceptorTests.java b/spring-context/src/test/java/org/springframework/jmx/access/RemoteMBeanClientInterceptorTests.java index 74a29b0be01..d610cf9182e 100644 --- a/spring-context/src/test/java/org/springframework/jmx/access/RemoteMBeanClientInterceptorTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/access/RemoteMBeanClientInterceptorTests.java @@ -18,7 +18,6 @@ package org.springframework.jmx.access; import java.net.BindException; import java.net.MalformedURLException; - import javax.management.MBeanServerConnection; import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/CustomEditorConfigurerTests.java b/spring-context/src/test/java/org/springframework/jmx/export/CustomEditorConfigurerTests.java index 19019011142..ff04ff43c78 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/CustomEditorConfigurerTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/CustomEditorConfigurerTests.java @@ -19,10 +19,10 @@ package org.springframework.jmx.export; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; - import javax.management.ObjectName; import org.junit.Test; + import org.springframework.jmx.AbstractJmxTests; import static org.junit.Assert.*; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterOperationsTests.java b/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterOperationsTests.java index 64981ffa384..6d538a9b410 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterOperationsTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterOperationsTests.java @@ -17,11 +17,11 @@ package org.springframework.jmx.export; import javax.management.InstanceAlreadyExistsException; -import javax.management.ObjectName; import javax.management.MBeanInfo; -import javax.management.modelmbean.RequiredModelMBean; +import javax.management.ObjectName; import javax.management.modelmbean.ModelMBeanInfo; import javax.management.modelmbean.ModelMBeanInfoSupport; +import javax.management.modelmbean.RequiredModelMBean; import org.junit.Test; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/NotificationListenerTests.java b/spring-context/src/test/java/org/springframework/jmx/export/NotificationListenerTests.java index 86edb16bf06..81dc5307706 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/NotificationListenerTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/NotificationListenerTests.java @@ -27,6 +27,7 @@ import javax.management.NotificationListener; import javax.management.ObjectName; import org.junit.Test; + import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.jmx.AbstractMBeanServerTests; import org.springframework.jmx.JmxTestBean; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/NotificationPublisherTests.java b/spring-context/src/test/java/org/springframework/jmx/export/NotificationPublisherTests.java index 2237fcc1553..d866acee1ed 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/NotificationPublisherTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/NotificationPublisherTests.java @@ -33,6 +33,7 @@ import javax.management.NotificationListener; import javax.management.ReflectionException; import org.junit.Test; + import org.springframework.context.ConfigurableApplicationContext; import org.springframework.jmx.AbstractMBeanServerTests; import org.springframework.jmx.export.notification.NotificationPublisher; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/PropertyPlaceholderConfigurerTests.java b/spring-context/src/test/java/org/springframework/jmx/export/PropertyPlaceholderConfigurerTests.java index 256372eb1bf..47091ef0cfe 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/PropertyPlaceholderConfigurerTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/PropertyPlaceholderConfigurerTests.java @@ -19,6 +19,7 @@ package org.springframework.jmx.export; import javax.management.ObjectName; import org.junit.Test; + import org.springframework.jmx.AbstractJmxTests; import org.springframework.jmx.IJmxTestBean; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/annotation/AnnotationMetadataAssemblerTests.java b/spring-context/src/test/java/org/springframework/jmx/export/annotation/AnnotationMetadataAssemblerTests.java index 11c68dcb99f..8eb3068983a 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/annotation/AnnotationMetadataAssemblerTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/annotation/AnnotationMetadataAssemblerTests.java @@ -16,11 +16,12 @@ package org.springframework.jmx.export.annotation; -import javax.management.modelmbean.ModelMBeanInfo; import javax.management.modelmbean.ModelMBeanAttributeInfo; +import javax.management.modelmbean.ModelMBeanInfo; import javax.management.modelmbean.ModelMBeanOperationInfo; import org.junit.Test; + import org.springframework.jmx.IJmxTestBean; import org.springframework.jmx.export.assembler.AbstractMetadataAssemblerTests; import org.springframework.jmx.export.metadata.JmxAttributeSource; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractJmxAssemblerTests.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractJmxAssemblerTests.java index 42962c5f642..bbb35f56ed1 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractJmxAssemblerTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractJmxAssemblerTests.java @@ -29,6 +29,7 @@ import javax.management.modelmbean.ModelMBeanInfo; import javax.management.modelmbean.ModelMBeanOperationInfo; import org.junit.Test; + import org.springframework.jmx.AbstractJmxTests; import org.springframework.jmx.IJmxTestBean; import org.springframework.jmx.support.ObjectNameManager; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractMetadataAssemblerTests.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractMetadataAssemblerTests.java index 06424ac7b34..6919ff676cc 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractMetadataAssemblerTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractMetadataAssemblerTests.java @@ -18,7 +18,6 @@ package org.springframework.jmx.export.assembler; import java.util.HashMap; import java.util.Map; - import javax.management.Descriptor; import javax.management.MBeanInfo; import javax.management.MBeanParameterInfo; @@ -27,6 +26,7 @@ import javax.management.modelmbean.ModelMBeanInfo; import javax.management.modelmbean.ModelMBeanOperationInfo; import org.junit.Test; + import org.springframework.aop.framework.ProxyFactory; import org.springframework.jmx.IJmxTestBean; import org.springframework.jmx.JmxTestBean; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssemblerMappedTests.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssemblerMappedTests.java index 1a485f377e6..c668c22d4c7 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssemblerMappedTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssemblerMappedTests.java @@ -17,7 +17,6 @@ package org.springframework.jmx.export.assembler; import java.util.Properties; - import javax.management.MBeanAttributeInfo; import javax.management.modelmbean.ModelMBeanAttributeInfo; import javax.management.modelmbean.ModelMBeanInfo; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerComboTests.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerComboTests.java index ea234b09e8c..30f5eedc1aa 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerComboTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerComboTests.java @@ -17,7 +17,6 @@ package org.springframework.jmx.export.assembler; import java.util.Properties; - import javax.management.MBeanAttributeInfo; import javax.management.modelmbean.ModelMBeanAttributeInfo; import javax.management.modelmbean.ModelMBeanInfo; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerMappedTests.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerMappedTests.java index aa1e2d57c22..dd6fb8abcac 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerMappedTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerMappedTests.java @@ -17,7 +17,6 @@ package org.springframework.jmx.export.assembler; import java.util.Properties; - import javax.management.MBeanAttributeInfo; import javax.management.modelmbean.ModelMBeanAttributeInfo; import javax.management.modelmbean.ModelMBeanInfo; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerNotMappedTests.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerNotMappedTests.java index 6b12c74d971..98e34d7002d 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerNotMappedTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerNotMappedTests.java @@ -17,7 +17,6 @@ package org.springframework.jmx.export.assembler; import java.util.Properties; - import javax.management.MBeanAttributeInfo; import javax.management.modelmbean.ModelMBeanAttributeInfo; import javax.management.modelmbean.ModelMBeanInfo; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java index 53335e50d70..9e2447f325b 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java @@ -18,11 +18,11 @@ package org.springframework.jmx.export.assembler; import java.lang.reflect.Method; import java.util.Properties; - import javax.management.modelmbean.ModelMBeanAttributeInfo; import javax.management.modelmbean.ModelMBeanInfo; import org.junit.Test; + import org.springframework.jmx.JmxTestBean; import static org.junit.Assert.*; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodNameBasedMBeanInfoAssemblerMappedTests.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodNameBasedMBeanInfoAssemblerMappedTests.java index 10b1985515b..3dd58bf546e 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodNameBasedMBeanInfoAssemblerMappedTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodNameBasedMBeanInfoAssemblerMappedTests.java @@ -17,7 +17,6 @@ package org.springframework.jmx.export.assembler; import java.util.Properties; - import javax.management.MBeanAttributeInfo; import javax.management.modelmbean.ModelMBeanAttributeInfo; import javax.management.modelmbean.ModelMBeanInfo; diff --git a/spring-context/src/test/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisherTests.java b/spring-context/src/test/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisherTests.java index 14986a19596..c196e6502e3 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisherTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisherTests.java @@ -16,8 +16,6 @@ package org.springframework.jmx.export.notification; -import static org.junit.Assert.*; - import javax.management.AttributeChangeNotification; import javax.management.MBeanException; import javax.management.MalformedObjectNameException; @@ -26,8 +24,11 @@ import javax.management.ObjectName; import javax.management.RuntimeOperationsException; import org.junit.Test; + import org.springframework.jmx.export.SpringModelMBean; +import static org.junit.Assert.*; + /** * @author Rick Evans * @author Chris Beams diff --git a/spring-context/src/test/java/org/springframework/jmx/support/ConnectorServerFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/jmx/support/ConnectorServerFactoryBeanTests.java index 6d66caa79cf..74a3015d76a 100644 --- a/spring-context/src/test/java/org/springframework/jmx/support/ConnectorServerFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/support/ConnectorServerFactoryBeanTests.java @@ -18,7 +18,6 @@ package org.springframework.jmx.support; import java.io.IOException; import java.net.MalformedURLException; - import javax.management.InstanceNotFoundException; import javax.management.MBeanServer; import javax.management.MBeanServerConnection; @@ -29,6 +28,7 @@ import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; import org.junit.Test; + import org.springframework.jmx.AbstractMBeanServerTests; import org.springframework.tests.Assume; import org.springframework.tests.TestGroup; diff --git a/spring-context/src/test/java/org/springframework/jmx/support/JmxUtilsTests.java b/spring-context/src/test/java/org/springframework/jmx/support/JmxUtilsTests.java index c006f6fab7e..df58eaf26da 100644 --- a/spring-context/src/test/java/org/springframework/jmx/support/JmxUtilsTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/support/JmxUtilsTests.java @@ -17,7 +17,6 @@ package org.springframework.jmx.support; import java.beans.PropertyDescriptor; - import javax.management.DynamicMBean; import javax.management.MBeanServer; import javax.management.MBeanServerFactory; diff --git a/spring-context/src/test/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBeanTests.java index 0ff28b40998..086ffb694eb 100644 --- a/spring-context/src/test/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/support/MBeanServerConnectionFactoryBeanTests.java @@ -17,7 +17,6 @@ package org.springframework.jmx.support; import java.net.MalformedURLException; - import javax.management.MBeanServerConnection; import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; @@ -25,6 +24,7 @@ import javax.management.remote.JMXServiceURL; import org.junit.Before; import org.junit.Test; + import org.springframework.aop.support.AopUtils; import org.springframework.jmx.AbstractMBeanServerTests; import org.springframework.tests.Assume; diff --git a/spring-context/src/test/java/org/springframework/jmx/support/MBeanServerFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/jmx/support/MBeanServerFactoryBeanTests.java index f2217bfd6ad..8d3cf156e1b 100644 --- a/spring-context/src/test/java/org/springframework/jmx/support/MBeanServerFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/support/MBeanServerFactoryBeanTests.java @@ -18,7 +18,6 @@ package org.springframework.jmx.support; import java.lang.management.ManagementFactory; import java.util.List; - import javax.management.MBeanServer; import javax.management.MBeanServerFactory; diff --git a/spring-context/src/test/java/org/springframework/jndi/JndiLocatorDelegateTests.java b/spring-context/src/test/java/org/springframework/jndi/JndiLocatorDelegateTests.java index 4e5bdeb2003..f00cd97cbc7 100644 --- a/spring-context/src/test/java/org/springframework/jndi/JndiLocatorDelegateTests.java +++ b/spring-context/src/test/java/org/springframework/jndi/JndiLocatorDelegateTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-context/src/test/java/org/springframework/jndi/JndiPropertySourceTests.java b/spring-context/src/test/java/org/springframework/jndi/JndiPropertySourceTests.java index ad6ac8871ab..a8a68cd0eba 100644 --- a/spring-context/src/test/java/org/springframework/jndi/JndiPropertySourceTests.java +++ b/spring-context/src/test/java/org/springframework/jndi/JndiPropertySourceTests.java @@ -16,16 +16,16 @@ package org.springframework.jndi; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.nullValue; -import static org.junit.Assert.assertThat; - import javax.naming.Context; import javax.naming.NamingException; import org.junit.Test; + import org.springframework.tests.mock.jndi.SimpleNamingContext; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Unit tests for {@link JndiPropertySource}. * diff --git a/spring-context/src/test/java/org/springframework/jndi/JndiTemplateEditorTests.java b/spring-context/src/test/java/org/springframework/jndi/JndiTemplateEditorTests.java index b191a7ada5b..e97b6c0fdc5 100644 --- a/spring-context/src/test/java/org/springframework/jndi/JndiTemplateEditorTests.java +++ b/spring-context/src/test/java/org/springframework/jndi/JndiTemplateEditorTests.java @@ -17,10 +17,10 @@ package org.springframework.jndi; -import static org.junit.Assert.*; - import org.junit.Test; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Chris Beams diff --git a/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableAsyncTests.java b/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableAsyncTests.java index f9a4e41da8c..b3881e0793f 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableAsyncTests.java +++ b/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableAsyncTests.java @@ -20,7 +20,6 @@ import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; - import java.lang.reflect.Method; import java.util.concurrent.ExecutionException; import java.util.concurrent.Executor; @@ -42,9 +41,10 @@ import org.springframework.core.Ordered; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.util.ReflectionUtils; -import static org.hamcrest.CoreMatchers.*; +import static org.hamcrest.CoreMatchers.anyOf; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.Matchers.startsWith; - import static org.junit.Assert.*; /** diff --git a/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableSchedulingTests.java b/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableSchedulingTests.java index 60f96bdb175..646f1cd3663 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableSchedulingTests.java +++ b/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableSchedulingTests.java @@ -22,8 +22,6 @@ import java.util.concurrent.atomic.AtomicInteger; import org.junit.Before; import org.junit.Test; -import org.springframework.tests.Assume; -import org.springframework.tests.TestGroup; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -33,9 +31,10 @@ import org.springframework.scheduling.TriggerContext; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.springframework.scheduling.config.IntervalTask; import org.springframework.scheduling.config.ScheduledTaskRegistrar; +import org.springframework.tests.Assume; +import org.springframework.tests.TestGroup; import static org.hamcrest.Matchers.*; - import static org.junit.Assert.*; /** diff --git a/spring-context/src/test/java/org/springframework/scheduling/annotation/TestableAsyncUncaughtExceptionHandler.java b/spring-context/src/test/java/org/springframework/scheduling/annotation/TestableAsyncUncaughtExceptionHandler.java index 5a9bcccd1e7..c576c110132 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/annotation/TestableAsyncUncaughtExceptionHandler.java +++ b/spring-context/src/test/java/org/springframework/scheduling/annotation/TestableAsyncUncaughtExceptionHandler.java @@ -16,14 +16,14 @@ package org.springframework.scheduling.annotation; -import static org.junit.Assert.*; - import java.lang.reflect.Method; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; +import static org.junit.Assert.*; + /** * A {@link AsyncUncaughtExceptionHandler} implementation used for testing purposes. * @author Stephane Nicoll diff --git a/spring-context/src/test/java/org/springframework/scheduling/annotation/taskNamespaceTests.xml b/spring-context/src/test/java/org/springframework/scheduling/annotation/taskNamespaceTests.xml index 231c6dce4e8..3c814dfac03 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/annotation/taskNamespaceTests.xml +++ b/spring-context/src/test/java/org/springframework/scheduling/annotation/taskNamespaceTests.xml @@ -1,10 +1,9 @@ diff --git a/spring-tx/src/main/java/org/springframework/dao/annotation/package-info.java b/spring-tx/src/main/java/org/springframework/dao/annotation/package-info.java index 068bbd2fe49..962db3dddf1 100644 --- a/spring-tx/src/main/java/org/springframework/dao/annotation/package-info.java +++ b/spring-tx/src/main/java/org/springframework/dao/annotation/package-info.java @@ -1,9 +1,5 @@ - /** - * * Annotation support for DAOs. Contains a bean post-processor for translating * persistence exceptions based on a repository stereotype annotation. - * */ package org.springframework.dao.annotation; - diff --git a/spring-tx/src/main/java/org/springframework/dao/package-info.java b/spring-tx/src/main/java/org/springframework/dao/package-info.java index dd36227a357..4e9a18651ed 100644 --- a/spring-tx/src/main/java/org/springframework/dao/package-info.java +++ b/spring-tx/src/main/java/org/springframework/dao/package-info.java @@ -1,6 +1,4 @@ - /** - * * Exception hierarchy enabling sophisticated error handling independent * of the data access approach in use. For example, when DAOs and data * access frameworks use the exceptions in this package (and custom @@ -14,7 +12,5 @@ *

The classes in this package are discussed in Chapter 9 of * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). - * */ package org.springframework.dao; - diff --git a/spring-tx/src/main/java/org/springframework/dao/support/package-info.java b/spring-tx/src/main/java/org/springframework/dao/support/package-info.java index e96a429d1d5..fee1509b043 100644 --- a/spring-tx/src/main/java/org/springframework/dao/support/package-info.java +++ b/spring-tx/src/main/java/org/springframework/dao/support/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support classes for DAO implementations, * providing miscellaneous utility methods. - * */ package org.springframework.dao.support; - diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/SingleConnectionFactory.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/SingleConnectionFactory.java index 1e62916e629..46c0fe09e91 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/SingleConnectionFactory.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/SingleConnectionFactory.java @@ -20,7 +20,6 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; - import javax.resource.NotSupportedException; import javax.resource.ResourceException; import javax.resource.cci.Connection; diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/TransactionAwareConnectionFactoryProxy.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/TransactionAwareConnectionFactoryProxy.java index 88f0cf6f02d..4c0e150cef6 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/TransactionAwareConnectionFactoryProxy.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/TransactionAwareConnectionFactoryProxy.java @@ -20,7 +20,6 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; - import javax.resource.ResourceException; import javax.resource.cci.Connection; import javax.resource.cci.ConnectionFactory; diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/package-info.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/package-info.java index c560f424d49..d53934c18b3 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/package-info.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/package-info.java @@ -1,10 +1,6 @@ - /** - * * Provides a utility class for easy ConnectionFactory access, * a PlatformTransactionManager for local CCI transactions, * and various simple ConnectionFactory proxies/adapters. - * */ package org.springframework.jca.cci.connection; - diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java index df138bdc0ae..d6dad2a2e45 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java @@ -17,7 +17,6 @@ package org.springframework.jca.cci.core; import java.sql.SQLException; - import javax.resource.ResourceException; import javax.resource.cci.Connection; import javax.resource.cci.ConnectionFactory; diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java index 7145d36b001..ace6ad0989e 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java @@ -17,7 +17,6 @@ package org.springframework.jca.cci.core; import java.sql.SQLException; - import javax.resource.ResourceException; import javax.resource.cci.ConnectionFactory; import javax.resource.cci.Interaction; diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java index 51ec87b2656..277d8a3cd18 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java @@ -17,7 +17,6 @@ package org.springframework.jca.cci.core; import java.sql.SQLException; - import javax.resource.ResourceException; import javax.resource.cci.Record; diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/package-info.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/package-info.java index d49ac82582a..2355d8e16b8 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/package-info.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/package-info.java @@ -1,9 +1,5 @@ - /** - * * Provides the core JCA CCI support, based on CciTemplate * and its associated callback interfaces. - * */ package org.springframework.jca.cci.core; - diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CommAreaRecord.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CommAreaRecord.java index b9989c945a7..a26a7756d19 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CommAreaRecord.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CommAreaRecord.java @@ -19,7 +19,6 @@ package org.springframework.jca.cci.core.support; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; - import javax.resource.cci.Record; import javax.resource.cci.Streamable; diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/support/package-info.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/support/package-info.java index 6cbf1db5f54..c32695212f9 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/support/package-info.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/support/package-info.java @@ -1,8 +1,5 @@ /** - * * Classes supporting the {@code org.springframework.jca.cci.core} package. * Contains a DAO base class for CciTemplate usage. - * */ package org.springframework.jca.cci.core.support; - diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingCommAreaOperation.java b/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingCommAreaOperation.java index 79612bea39c..c54181a51f3 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingCommAreaOperation.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingCommAreaOperation.java @@ -17,7 +17,6 @@ package org.springframework.jca.cci.object; import java.io.IOException; - import javax.resource.cci.ConnectionFactory; import javax.resource.cci.InteractionSpec; import javax.resource.cci.Record; diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java b/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java index 0220b564a65..bdd6e9b7f0c 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java @@ -17,7 +17,6 @@ package org.springframework.jca.cci.object; import java.sql.SQLException; - import javax.resource.ResourceException; import javax.resource.cci.ConnectionFactory; import javax.resource.cci.InteractionSpec; diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/object/package-info.java b/spring-tx/src/main/java/org/springframework/jca/cci/object/package-info.java index a70c792c8f9..caace5c3c5a 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/object/package-info.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/object/package-info.java @@ -1,11 +1,8 @@ /** - * * The classes in this package represent EIS operations as threadsafe, * reusable objects. This higher level of CCI abstraction depends on the * lower-level abstraction in the {@code org.springframework.jca.cci.core} package. * Exceptions thrown are as in the {@code org.springframework.dao} package, * meaning that code using this package does not need to worry about error handling. - * */ package org.springframework.jca.cci.object; - diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/package-info.java b/spring-tx/src/main/java/org/springframework/jca/cci/package-info.java index 4ad1d71989c..a47904f2356 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/package-info.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/package-info.java @@ -1,10 +1,7 @@ /** - * * This package contains Spring's support for the Common Client Interface (CCI), * as defined by the J2EE Connector Architecture. It is conceptually similar * to the {@code org.springframework.jdbc} package, providing the same * levels of data access abstraction. - * */ package org.springframework.jca.cci; - diff --git a/spring-tx/src/main/java/org/springframework/jca/context/package-info.java b/spring-tx/src/main/java/org/springframework/jca/context/package-info.java index 3bb0cabd27b..4b0061a05c7 100644 --- a/spring-tx/src/main/java/org/springframework/jca/context/package-info.java +++ b/spring-tx/src/main/java/org/springframework/jca/context/package-info.java @@ -1,9 +1,5 @@ - /** - * * Integration package that allows for deploying a Spring application context * as a JCA 1.5 compliant RAR file. - * */ package org.springframework.jca.context; - diff --git a/spring-tx/src/main/java/org/springframework/jca/endpoint/package-info.java b/spring-tx/src/main/java/org/springframework/jca/endpoint/package-info.java index 49f24753808..5a1a7cde69b 100644 --- a/spring-tx/src/main/java/org/springframework/jca/endpoint/package-info.java +++ b/spring-tx/src/main/java/org/springframework/jca/endpoint/package-info.java @@ -1,8 +1,4 @@ - /** - * * This package provides a facility for generic JCA message endpoint management. - * */ package org.springframework.jca.endpoint; - diff --git a/spring-tx/src/main/java/org/springframework/jca/support/SimpleBootstrapContext.java b/spring-tx/src/main/java/org/springframework/jca/support/SimpleBootstrapContext.java index be54bddd5ce..e94052fca8e 100644 --- a/spring-tx/src/main/java/org/springframework/jca/support/SimpleBootstrapContext.java +++ b/spring-tx/src/main/java/org/springframework/jca/support/SimpleBootstrapContext.java @@ -17,7 +17,6 @@ package org.springframework.jca.support; import java.util.Timer; - import javax.resource.spi.BootstrapContext; import javax.resource.spi.UnavailableException; import javax.resource.spi.XATerminator; diff --git a/spring-tx/src/main/java/org/springframework/jca/support/package-info.java b/spring-tx/src/main/java/org/springframework/jca/support/package-info.java index 23907a307b2..133f84dacbc 100644 --- a/spring-tx/src/main/java/org/springframework/jca/support/package-info.java +++ b/spring-tx/src/main/java/org/springframework/jca/support/package-info.java @@ -1,9 +1,5 @@ - /** - * * Provides generic support classes for JCA usage within Spring, * mainly for local setup of a JCA ResourceAdapter and/or ConnectionFactory. - * */ package org.springframework.jca.support; - diff --git a/spring-tx/src/main/java/org/springframework/jca/work/glassfish/package-info.java b/spring-tx/src/main/java/org/springframework/jca/work/glassfish/package-info.java index 42bf2f4b7ed..296b0554e8c 100644 --- a/spring-tx/src/main/java/org/springframework/jca/work/glassfish/package-info.java +++ b/spring-tx/src/main/java/org/springframework/jca/work/glassfish/package-info.java @@ -1,9 +1,5 @@ - /** - * * Convenience package for obtaining a GlassFish JCA WorkManager for use in * web applications. Provides a Spring TaskExecutor adapter for GlassFish. - * */ package org.springframework.jca.work.glassfish; - diff --git a/spring-tx/src/main/java/org/springframework/jca/work/jboss/package-info.java b/spring-tx/src/main/java/org/springframework/jca/work/jboss/package-info.java index f60787f3c54..8cb8e6b5132 100644 --- a/spring-tx/src/main/java/org/springframework/jca/work/jboss/package-info.java +++ b/spring-tx/src/main/java/org/springframework/jca/work/jboss/package-info.java @@ -1,9 +1,5 @@ - /** - * * Convenience package for obtaining a JBoss JCA WorkManager for use in * web applications. Provides a Spring TaskExecutor adapter for JBoss. - * */ package org.springframework.jca.work.jboss; - diff --git a/spring-tx/src/main/java/org/springframework/jca/work/package-info.java b/spring-tx/src/main/java/org/springframework/jca/work/package-info.java index 6c9573cd319..9fe3e89e616 100644 --- a/spring-tx/src/main/java/org/springframework/jca/work/package-info.java +++ b/spring-tx/src/main/java/org/springframework/jca/work/package-info.java @@ -1,9 +1,5 @@ - /** - * * Convenience classes for scheduling based on the JCA 1.5 WorkManager facility, * as supported within JCA 1.5 ResourceAdapters. - * */ package org.springframework.jca.work; - diff --git a/spring-tx/src/main/java/org/springframework/transaction/annotation/JtaTransactionAnnotationParser.java b/spring-tx/src/main/java/org/springframework/transaction/annotation/JtaTransactionAnnotationParser.java index 9b6a8814a23..8b05331450f 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/annotation/JtaTransactionAnnotationParser.java +++ b/spring-tx/src/main/java/org/springframework/transaction/annotation/JtaTransactionAnnotationParser.java @@ -20,9 +20,9 @@ import java.io.Serializable; import java.lang.reflect.AnnotatedElement; import java.util.ArrayList; +import org.springframework.core.annotation.AnnotatedElementUtils; import org.springframework.core.annotation.AnnotationAttributes; import org.springframework.core.annotation.AnnotationUtils; -import org.springframework.core.annotation.AnnotatedElementUtils; import org.springframework.transaction.interceptor.NoRollbackRuleAttribute; import org.springframework.transaction.interceptor.RollbackRuleAttribute; import org.springframework.transaction.interceptor.RuleBasedTransactionAttribute; diff --git a/spring-tx/src/main/java/org/springframework/transaction/annotation/SpringTransactionAnnotationParser.java b/spring-tx/src/main/java/org/springframework/transaction/annotation/SpringTransactionAnnotationParser.java index 739a4611eb3..60ae9b8fdac 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/annotation/SpringTransactionAnnotationParser.java +++ b/spring-tx/src/main/java/org/springframework/transaction/annotation/SpringTransactionAnnotationParser.java @@ -20,9 +20,9 @@ import java.io.Serializable; import java.lang.reflect.AnnotatedElement; import java.util.ArrayList; +import org.springframework.core.annotation.AnnotatedElementUtils; import org.springframework.core.annotation.AnnotationAttributes; import org.springframework.core.annotation.AnnotationUtils; -import org.springframework.core.annotation.AnnotatedElementUtils; import org.springframework.transaction.interceptor.NoRollbackRuleAttribute; import org.springframework.transaction.interceptor.RollbackRuleAttribute; import org.springframework.transaction.interceptor.RuleBasedTransactionAttribute; diff --git a/spring-tx/src/main/java/org/springframework/transaction/annotation/package-info.java b/spring-tx/src/main/java/org/springframework/transaction/annotation/package-info.java index 9d013f71a5e..7388259a91e 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/annotation/package-info.java +++ b/spring-tx/src/main/java/org/springframework/transaction/annotation/package-info.java @@ -1,10 +1,6 @@ - /** - * - * JDK 1.5+ annotation for transaction demarcation. + * Java 5 annotation for transaction demarcation. * Hooked into Spring's transaction interception infrastructure * via a special TransactionAttributeSource implementation. - * */ package org.springframework.transaction.annotation; - diff --git a/spring-tx/src/main/java/org/springframework/transaction/config/package-info.java b/spring-tx/src/main/java/org/springframework/transaction/config/package-info.java index ad4c4c9c8ca..32af9ae1ce5 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/config/package-info.java +++ b/spring-tx/src/main/java/org/springframework/transaction/config/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support package for declarative transaction configuration, * with XML schema being the primary configuration format. - * */ package org.springframework.transaction.config; - diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java index c08408ab0c3..60a5b124265 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAspectSupport.java @@ -16,8 +16,13 @@ package org.springframework.transaction.interceptor; +import java.lang.reflect.Method; +import java.util.Properties; +import java.util.concurrent.ConcurrentHashMap; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.InitializingBean; @@ -31,10 +36,6 @@ import org.springframework.transaction.support.CallbackPreferringPlatformTransac import org.springframework.transaction.support.TransactionCallback; import org.springframework.util.StringUtils; -import java.lang.reflect.Method; -import java.util.Properties; -import java.util.concurrent.ConcurrentHashMap; - /** * Base class for transactional aspects, such as the {@link TransactionInterceptor} * or an AspectJ aspect. diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java index 577f84735e0..27a7593046c 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionInterceptor.java @@ -16,18 +16,19 @@ package org.springframework.transaction.interceptor; -import org.aopalliance.intercept.MethodInterceptor; -import org.aopalliance.intercept.MethodInvocation; -import org.springframework.aop.support.AopUtils; -import org.springframework.beans.factory.BeanFactory; -import org.springframework.transaction.PlatformTransactionManager; - import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.Properties; +import org.aopalliance.intercept.MethodInterceptor; +import org.aopalliance.intercept.MethodInvocation; + +import org.springframework.aop.support.AopUtils; +import org.springframework.beans.factory.BeanFactory; +import org.springframework.transaction.PlatformTransactionManager; + /** * AOP Alliance MethodInterceptor for declarative transaction * management using the common Spring transaction infrastructure diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/package-info.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/package-info.java index 1a88634aa5b..a34f97db978 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/package-info.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/package-info.java @@ -1,6 +1,4 @@ - /** - * * AOP-based solution for declarative transaction demarcation. * Builds on the AOP infrastructure in org.springframework.aop.framework. * Any POJO can be transactionally advised with Spring. @@ -12,7 +10,5 @@ * delivers transactional advice, based on the Spring transaction abstraction. * This allows declarative transaction management in any environment, * even without JTA if an application uses only a single database. - * */ package org.springframework.transaction.interceptor; - diff --git a/spring-tx/src/main/java/org/springframework/transaction/jta/package-info.java b/spring-tx/src/main/java/org/springframework/transaction/jta/package-info.java index f18e1e13e71..10a38004990 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/jta/package-info.java +++ b/spring-tx/src/main/java/org/springframework/transaction/jta/package-info.java @@ -1,8 +1,4 @@ - /** - * * Transaction SPI implementation for JTA. - * */ package org.springframework.transaction.jta; - diff --git a/spring-tx/src/main/java/org/springframework/transaction/package-info.java b/spring-tx/src/main/java/org/springframework/transaction/package-info.java index f3438db4647..d28c7a7e5d5 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/package-info.java +++ b/spring-tx/src/main/java/org/springframework/transaction/package-info.java @@ -1,10 +1,6 @@ - /** - * * Exception hierarchy for Spring's transaction infrastructure, * independent of any specific transaction management system. * Contains transaction manager, definition, and status interfaces. - * */ package org.springframework.transaction; - diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/package-info.java b/spring-tx/src/main/java/org/springframework/transaction/support/package-info.java index 3cb841c56a6..a7d4b63107f 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/package-info.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/package-info.java @@ -1,10 +1,6 @@ - /** - * * Support classes for the org.springframework.transaction package. * Provides an abstract base class for transaction manager implementations, * and a template plus callback for transaction demarcation. - * */ package org.springframework.transaction.support; - diff --git a/spring-tx/src/test/java/org/springframework/dao/annotation/PersistenceExceptionTranslationAdvisorTests.java b/spring-tx/src/test/java/org/springframework/dao/annotation/PersistenceExceptionTranslationAdvisorTests.java index c7c1970cc35..a8e4fb544e1 100644 --- a/spring-tx/src/test/java/org/springframework/dao/annotation/PersistenceExceptionTranslationAdvisorTests.java +++ b/spring-tx/src/test/java/org/springframework/dao/annotation/PersistenceExceptionTranslationAdvisorTests.java @@ -16,10 +16,10 @@ package org.springframework.dao.annotation; -import java.lang.annotation.Target; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; import javax.persistence.PersistenceException; import junit.framework.TestCase; diff --git a/spring-tx/src/test/java/org/springframework/jca/cci/CciLocalTransactionTests.java b/spring-tx/src/test/java/org/springframework/jca/cci/CciLocalTransactionTests.java index cec222923b8..7dcc4400ec5 100644 --- a/spring-tx/src/test/java/org/springframework/jca/cci/CciLocalTransactionTests.java +++ b/spring-tx/src/test/java/org/springframework/jca/cci/CciLocalTransactionTests.java @@ -25,6 +25,7 @@ import javax.resource.cci.LocalTransaction; import javax.resource.cci.Record; import org.junit.Test; + import org.springframework.dao.DataRetrievalFailureException; import org.springframework.jca.cci.connection.CciLocalTransactionManager; import org.springframework.jca.cci.core.CciTemplate; diff --git a/spring-tx/src/test/java/org/springframework/jca/cci/CciTemplateTests.java b/spring-tx/src/test/java/org/springframework/jca/cci/CciTemplateTests.java index f934ebe7976..614cdc5a18b 100644 --- a/spring-tx/src/test/java/org/springframework/jca/cci/CciTemplateTests.java +++ b/spring-tx/src/test/java/org/springframework/jca/cci/CciTemplateTests.java @@ -17,7 +17,6 @@ package org.springframework.jca.cci; import java.sql.SQLException; - import javax.resource.NotSupportedException; import javax.resource.ResourceException; import javax.resource.cci.Connection; @@ -32,6 +31,7 @@ import javax.resource.cci.RecordFactory; import javax.resource.cci.ResultSet; import org.junit.Test; + import org.springframework.jca.cci.connection.ConnectionSpecConnectionFactoryAdapter; import org.springframework.jca.cci.connection.NotSupportedRecordFactory; import org.springframework.jca.cci.core.CciTemplate; diff --git a/spring-tx/src/test/java/org/springframework/jca/cci/EisOperationTests.java b/spring-tx/src/test/java/org/springframework/jca/cci/EisOperationTests.java index e5e2f8a6175..2a18f0bd789 100644 --- a/spring-tx/src/test/java/org/springframework/jca/cci/EisOperationTests.java +++ b/spring-tx/src/test/java/org/springframework/jca/cci/EisOperationTests.java @@ -25,6 +25,7 @@ import javax.resource.cci.Record; import javax.resource.cci.RecordFactory; import org.junit.Test; + import org.springframework.jca.cci.core.RecordCreator; import org.springframework.jca.cci.object.MappingRecordOperation; import org.springframework.jca.cci.object.SimpleRecordOperation; diff --git a/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java b/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java index 813a905e079..842c05057f6 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java @@ -21,10 +21,10 @@ import java.lang.reflect.Method; import junit.framework.TestCase; import org.springframework.aop.support.AopUtils; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.tests.sample.beans.ITestBean; +import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.interceptor.TransactionAttribute; import org.springframework.transaction.interceptor.TransactionAttributeSource; import org.springframework.transaction.interceptor.TransactionInterceptor; diff --git a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionNamespaceHandlerTests.java b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionNamespaceHandlerTests.java index 311038d750d..91abc1551e4 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionNamespaceHandlerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionNamespaceHandlerTests.java @@ -19,7 +19,6 @@ package org.springframework.transaction.annotation; import java.lang.management.ManagementFactory; import java.util.Collection; import java.util.Map; - import javax.management.MBeanServer; import javax.management.ObjectName; diff --git a/spring-tx/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementTests.java b/spring-tx/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementTests.java index 3ad212dabc1..07893433f65 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementTests.java @@ -17,6 +17,7 @@ package org.springframework.transaction.annotation; import java.util.Map; +import javax.annotation.PostConstruct; import org.junit.Test; @@ -35,8 +36,6 @@ import org.springframework.transaction.annotation.AnnotationTransactionNamespace import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.*; -import javax.annotation.PostConstruct; - /** * Tests demonstrating use of @EnableTransactionManagement @Configuration classes. * diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java index 0b59c334317..0edb902e30c 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java @@ -21,9 +21,9 @@ import java.lang.reflect.Proxy; import java.util.Map; import junit.framework.TestCase; - import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; + import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.StaticMethodMatcherPointcut; import org.springframework.aop.target.HotSwappableTargetSource; diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/RollbackRuleTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/RollbackRuleTests.java index 9d1051a0093..9f426f1d991 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/RollbackRuleTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/RollbackRuleTests.java @@ -16,15 +16,15 @@ package org.springframework.transaction.interceptor; -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; - import java.io.IOException; import junit.framework.TestCase; import org.springframework.beans.FatalBeanException; +import static org.hamcrest.CoreMatchers.*; +import static org.junit.Assert.*; + /** * Unit tests for the {@link RollbackRuleAttribute} class. * diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttributeTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttributeTests.java index be7d9c254a9..e6a3c78e072 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttributeTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttributeTests.java @@ -16,8 +16,6 @@ package org.springframework.transaction.interceptor; -import static org.junit.Assert.*; - import java.io.IOException; import java.rmi.RemoteException; import java.util.Collections; @@ -25,8 +23,11 @@ import java.util.LinkedList; import java.util.List; import org.junit.Test; + import org.springframework.transaction.TransactionDefinition; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Juergen Hoeller diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeEditorTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeEditorTests.java index 327675aaa24..dbd329e57ce 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeEditorTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeEditorTests.java @@ -17,13 +17,14 @@ package org.springframework.transaction.interceptor; -import static org.junit.Assert.*; - import java.io.IOException; import org.junit.Test; + import org.springframework.transaction.TransactionDefinition; +import static org.junit.Assert.*; + /** * Tests to check conversion from String to TransactionAttribute. * diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java index bfd9071cdc8..a47f6c2df34 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java @@ -18,10 +18,10 @@ package org.springframework.transaction.interceptor; import java.util.Properties; -import org.springframework.util.SerializationTestUtils; - import junit.framework.TestCase; +import org.springframework.util.SerializationTestUtils; + /** * * @author Rod Johnson diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceTests.java index 7871f11a903..0dce66637dd 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceTests.java @@ -16,8 +16,6 @@ package org.springframework.transaction.interceptor; -import static org.junit.Assert.*; - import java.io.IOException; import java.util.HashMap; import java.util.Map; @@ -25,8 +23,11 @@ import java.util.Properties; import org.junit.Ignore; import org.junit.Test; + import org.springframework.transaction.TransactionDefinition; +import static org.junit.Assert.*; + /** * Unit tests for the various {@link TransactionAttributeSource} implementations. * diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java index cdb8643659d..4b4c7af1691 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java @@ -16,10 +16,6 @@ package org.springframework.transaction.interceptor; -import static org.junit.Assert.*; -import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.*; - import java.io.Serializable; import java.util.Properties; @@ -36,6 +32,12 @@ import org.springframework.transaction.TransactionException; import org.springframework.transaction.TransactionStatus; import org.springframework.util.SerializationTestUtils; +import static org.junit.Assert.*; +import static org.mockito.BDDMockito.*; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + /** * Mock object based tests for TransactionInterceptor. * diff --git a/spring-tx/src/test/java/org/springframework/transaction/jta/MockUOWManager.java b/spring-tx/src/test/java/org/springframework/transaction/jta/MockUOWManager.java index 3bcfa91a878..5daf7629ac7 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/jta/MockUOWManager.java +++ b/spring-tx/src/test/java/org/springframework/transaction/jta/MockUOWManager.java @@ -20,7 +20,6 @@ import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; - import javax.transaction.Synchronization; import com.ibm.wsspi.uow.UOWAction; diff --git a/spring-tx/src/test/java/org/springframework/transaction/jta/WebSphereUowTransactionManagerTests.java b/spring-tx/src/test/java/org/springframework/transaction/jta/WebSphereUowTransactionManagerTests.java index f785e9f50d8..904e88f37ff 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/jta/WebSphereUowTransactionManagerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/jta/WebSphereUowTransactionManagerTests.java @@ -20,6 +20,9 @@ import javax.transaction.RollbackException; import javax.transaction.Status; import javax.transaction.UserTransaction; +import com.ibm.wsspi.uow.UOWAction; +import com.ibm.wsspi.uow.UOWException; +import com.ibm.wsspi.uow.UOWManager; import junit.framework.TestCase; import org.springframework.dao.OptimisticLockingFailureException; @@ -33,10 +36,6 @@ import org.springframework.transaction.support.DefaultTransactionDefinition; import org.springframework.transaction.support.TransactionCallback; import org.springframework.transaction.support.TransactionSynchronizationManager; -import com.ibm.wsspi.uow.UOWAction; -import com.ibm.wsspi.uow.UOWException; -import com.ibm.wsspi.uow.UOWManager; - import static org.mockito.BDDMockito.*; /** diff --git a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpRequest.java b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpRequest.java index 8aa1feee85c..1043ef79b37 100644 --- a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpRequest.java @@ -29,14 +29,14 @@ import org.apache.http.nio.client.HttpAsyncClient; import org.apache.http.nio.entity.NByteArrayEntity; import org.apache.http.protocol.HttpContext; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; import org.springframework.util.concurrent.FailureCallback; import org.springframework.util.concurrent.FutureAdapter; import org.springframework.util.concurrent.ListenableFuture; import org.springframework.util.concurrent.ListenableFutureCallback; import org.springframework.util.concurrent.ListenableFutureCallbackRegistry; import org.springframework.util.concurrent.SuccessCallback; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; /** diff --git a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpResponse.java b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpResponse.java index b2f2d528580..ecab469bc6d 100644 --- a/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/client/HttpComponentsAsyncClientHttpResponse.java @@ -22,6 +22,7 @@ import java.io.InputStream; import org.apache.http.Header; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; + import org.springframework.http.HttpHeaders; /** diff --git a/spring-web/src/main/java/org/springframework/http/client/package-info.java b/spring-web/src/main/java/org/springframework/http/client/package-info.java index 50c6bfa29a3..c0e1c676ec0 100644 --- a/spring-web/src/main/java/org/springframework/http/client/package-info.java +++ b/spring-web/src/main/java/org/springframework/http/client/package-info.java @@ -1,10 +1,6 @@ /** - * * Contains an abstraction over client-side HTTP. This package - * contains the {@code ClientHttpRequest} and - * {@code ClientHttpResponse}, as well as a basic implementation of these - * interfaces. - * + * contains the {@code ClientHttpRequest} and {@code ClientHttpResponse}, + * as well as a basic implementation of these interfaces. */ package org.springframework.http.client; - diff --git a/spring-web/src/main/java/org/springframework/http/client/support/AsyncHttpAccessor.java b/spring-web/src/main/java/org/springframework/http/client/support/AsyncHttpAccessor.java index cf753764627..00762139eaf 100644 --- a/spring-web/src/main/java/org/springframework/http/client/support/AsyncHttpAccessor.java +++ b/spring-web/src/main/java/org/springframework/http/client/support/AsyncHttpAccessor.java @@ -21,6 +21,7 @@ import java.net.URI; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.http.HttpMethod; import org.springframework.http.client.AsyncClientHttpRequest; import org.springframework.http.client.AsyncClientHttpRequestFactory; diff --git a/spring-web/src/main/java/org/springframework/http/client/support/HttpAccessor.java b/spring-web/src/main/java/org/springframework/http/client/support/HttpAccessor.java index 1b2ecd2b1b7..aa2eded13d8 100644 --- a/spring-web/src/main/java/org/springframework/http/client/support/HttpAccessor.java +++ b/spring-web/src/main/java/org/springframework/http/client/support/HttpAccessor.java @@ -22,11 +22,11 @@ import java.net.URI; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.util.Assert; import org.springframework.http.HttpMethod; import org.springframework.http.client.ClientHttpRequest; import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.http.client.SimpleClientHttpRequestFactory; +import org.springframework.util.Assert; /** * Base class for {@link org.springframework.web.client.RestTemplate} diff --git a/spring-web/src/main/java/org/springframework/http/client/support/package-info.java b/spring-web/src/main/java/org/springframework/http/client/support/package-info.java index 509de9e72d2..97f55aa1c21 100644 --- a/spring-web/src/main/java/org/springframework/http/client/support/package-info.java +++ b/spring-web/src/main/java/org/springframework/http/client/support/package-info.java @@ -1,9 +1,5 @@ - /** - * * This package provides generic HTTP support classes, * to be used by higher-level classes like RestTemplate. - * */ package org.springframework.http.client.support; - diff --git a/spring-web/src/main/java/org/springframework/http/converter/feed/package-info.java b/spring-web/src/main/java/org/springframework/http/converter/feed/package-info.java index 8a456b8fa0b..440db3d3778 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/feed/package-info.java +++ b/spring-web/src/main/java/org/springframework/http/converter/feed/package-info.java @@ -1,8 +1,5 @@ - /** - * * Provides HttpMessageConverter implementations for handling Atom and RSS feeds. * Based on the ROME tools project. - * */ package org.springframework.http.converter.feed; diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJacksonValue.java b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJacksonValue.java index e421b99ec76..1640f394f5a 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJacksonValue.java +++ b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJacksonValue.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/package-info.java b/spring-web/src/main/java/org/springframework/http/converter/json/package-info.java index d1ff5f5cf82..c786a6d2444 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/json/package-info.java +++ b/spring-web/src/main/java/org/springframework/http/converter/json/package-info.java @@ -1,23 +1,4 @@ -/* - * Copyright 2002-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** - * * Provides an HttpMessageConverter implementations for handling JSON. - * */ package org.springframework.http.converter.json; - diff --git a/spring-web/src/main/java/org/springframework/http/converter/package-info.java b/spring-web/src/main/java/org/springframework/http/converter/package-info.java index dd77f7466f8..0719dd82d3b 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/package-info.java +++ b/spring-web/src/main/java/org/springframework/http/converter/package-info.java @@ -1,24 +1,4 @@ - -/* - * Copyright 2002-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** - * * Provides an HttpMessageConverter abstraction to convert between Java objects and HTTP input/output messages. - * */ package org.springframework.http.converter; - diff --git a/spring-web/src/main/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverter.java index 2a0868549db..c0c1daa2738 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverter.java @@ -17,7 +17,6 @@ package org.springframework.http.converter.xml; import java.io.IOException; - import javax.xml.transform.Result; import javax.xml.transform.Source; diff --git a/spring-web/src/main/java/org/springframework/http/converter/xml/package-info.java b/spring-web/src/main/java/org/springframework/http/converter/xml/package-info.java index 9f2b5e8598c..ef2c3c95baf 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/xml/package-info.java +++ b/spring-web/src/main/java/org/springframework/http/converter/xml/package-info.java @@ -1,24 +1,4 @@ - -/* - * Copyright 2002-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** - * * Provides an HttpMessageConverter implementations for handling XML. - * */ package org.springframework.http.converter.xml; - diff --git a/spring-web/src/main/java/org/springframework/http/package-info.java b/spring-web/src/main/java/org/springframework/http/package-info.java index 753bafd0cc9..0f7cce528b0 100644 --- a/spring-web/src/main/java/org/springframework/http/package-info.java +++ b/spring-web/src/main/java/org/springframework/http/package-info.java @@ -1,8 +1,5 @@ /** - * * Contains a basic abstraction over client/server-side HTTP. This package contains * the {@code HttpInputMessage} and {@code HttpOutputMessage} interfaces. - * */ package org.springframework.http; - diff --git a/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpAsyncRequestControl.java b/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpAsyncRequestControl.java index 7df09448bfa..d21cd784d7c 100644 --- a/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpAsyncRequestControl.java +++ b/spring-web/src/main/java/org/springframework/http/server/ServletServerHttpAsyncRequestControl.java @@ -18,7 +18,6 @@ package org.springframework.http.server; import java.io.IOException; import java.util.concurrent.atomic.AtomicBoolean; - import javax.servlet.AsyncContext; import javax.servlet.AsyncEvent; import javax.servlet.AsyncListener; diff --git a/spring-web/src/main/java/org/springframework/http/server/package-info.java b/spring-web/src/main/java/org/springframework/http/server/package-info.java index 1c8d6006822..d08f8626a66 100644 --- a/spring-web/src/main/java/org/springframework/http/server/package-info.java +++ b/spring-web/src/main/java/org/springframework/http/server/package-info.java @@ -1,10 +1,6 @@ /** - * * Contains an abstraction over server-side HTTP. This package - * contains the {@code ServerHttpRequest} and - * {@code ServerHttpResponse}, as well as a Servlet-based implementation of these - * interfaces. - * + * contains the {@code ServerHttpRequest} and {@code ServerHttpResponse}, + * as well as a Servlet-based implementation of these interfaces. */ package org.springframework.http.server; - diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapServiceExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapServiceExporter.java index 13af45818f0..8f70d6ad15f 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapServiceExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/BurlapServiceExporter.java @@ -17,7 +17,6 @@ package org.springframework.remoting.caucho; import java.io.IOException; - import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java index 0bad39c30e2..0f28ebeb986 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianExporter.java @@ -33,8 +33,8 @@ import com.caucho.hessian.io.HessianOutput; import com.caucho.hessian.io.HessianRemoteResolver; import com.caucho.hessian.io.SerializerFactory; import com.caucho.hessian.server.HessianSkeleton; - import org.apache.commons.logging.Log; + import org.springframework.beans.factory.InitializingBean; import org.springframework.remoting.support.RemoteExporter; import org.springframework.util.Assert; diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/package-info.java b/spring-web/src/main/java/org/springframework/remoting/caucho/package-info.java index 68e2b0ee5bf..e630835f262 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/package-info.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/package-info.java @@ -1,18 +1,10 @@ - /** - * - * This package provides remoting classes for Caucho's Hessian and Burlap - * protocols: a proxy factory for accessing Hessian/Burlap services, - * and an exporter for making beans available to Hessian/Burlap clients. + * This package provides remoting classes for Caucho's Hessian protocol: + * a proxy factory for accessing Hessian services, and an exporter for + * making beans available to Hessian clients. * *

Hessian is a slim, binary RPC protocol over HTTP. * For information on Hessian, see the * Hessian website - * - *

Burlap is a slim, XML-based RPC protocol over HTTP. - * For information on Burlap, see the - * Burlap website - * */ package org.springframework.remoting.caucho; - diff --git a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java index 0e8136a562a..a94039aeb95 100644 --- a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java +++ b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/HttpComponentsHttpInvokerRequestExecutor.java @@ -29,6 +29,7 @@ import org.apache.http.StatusLine; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.ByteArrayEntity; + import org.springframework.context.i18n.LocaleContext; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.remoting.support.RemoteInvocationResult; diff --git a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/package-info.java b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/package-info.java index 7430dc45fe5..f6f726dc111 100644 --- a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/package-info.java +++ b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/package-info.java @@ -1,6 +1,4 @@ - /** - * * Remoting classes for transparent Java-to-Java remoting via HTTP invokers. * Uses Java serialization just like RMI, but provides the same ease of setup * as Caucho's HTTP-based Hessian and Burlap protocols. @@ -9,7 +7,5 @@ * It is more powerful and more extensible than Hessian and Burlap, at the * expense of being tied to Java. Neverthelesss, it is as easy to set up as * Hessian and Burlap, which is its main advantage compared to RMI. - * */ package org.springframework.remoting.httpinvoker; - diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxws/package-info.java b/spring-web/src/main/java/org/springframework/remoting/jaxws/package-info.java index 614d75c3947..ba98b1aa39d 100644 --- a/spring-web/src/main/java/org/springframework/remoting/jaxws/package-info.java +++ b/spring-web/src/main/java/org/springframework/remoting/jaxws/package-info.java @@ -1,10 +1,6 @@ - /** - * * Remoting classes for Web Services via JAX-WS (the successor of JAX-RPC), * as included in Java 6 and Java EE 5. This package provides proxy * factories for accessing JAX-WS services and ports. - * */ package org.springframework.remoting.jaxws; - diff --git a/spring-web/src/main/java/org/springframework/web/HttpRequestHandler.java b/spring-web/src/main/java/org/springframework/web/HttpRequestHandler.java index 6fd58199ac5..2e259e93861 100644 --- a/spring-web/src/main/java/org/springframework/web/HttpRequestHandler.java +++ b/spring-web/src/main/java/org/springframework/web/HttpRequestHandler.java @@ -17,7 +17,6 @@ package org.springframework.web; import java.io.IOException; - import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/spring-web/src/main/java/org/springframework/web/accept/FixedContentNegotiationStrategy.java b/spring-web/src/main/java/org/springframework/web/accept/FixedContentNegotiationStrategy.java index 5180154dd2c..f43668c5e8f 100644 --- a/spring-web/src/main/java/org/springframework/web/accept/FixedContentNegotiationStrategy.java +++ b/spring-web/src/main/java/org/springframework/web/accept/FixedContentNegotiationStrategy.java @@ -21,6 +21,7 @@ import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.http.MediaType; import org.springframework.web.context.request.NativeWebRequest; diff --git a/spring-web/src/main/java/org/springframework/web/accept/ParameterContentNegotiationStrategy.java b/spring-web/src/main/java/org/springframework/web/accept/ParameterContentNegotiationStrategy.java index 4e95128bdbf..cd706812768 100644 --- a/spring-web/src/main/java/org/springframework/web/accept/ParameterContentNegotiationStrategy.java +++ b/spring-web/src/main/java/org/springframework/web/accept/ParameterContentNegotiationStrategy.java @@ -20,6 +20,7 @@ import java.util.Map; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.http.MediaType; import org.springframework.util.Assert; import org.springframework.web.HttpMediaTypeNotAcceptableException; diff --git a/spring-web/src/main/java/org/springframework/web/accept/PathExtensionContentNegotiationStrategy.java b/spring-web/src/main/java/org/springframework/web/accept/PathExtensionContentNegotiationStrategy.java index 8324bcf3948..de98ae2ec37 100644 --- a/spring-web/src/main/java/org/springframework/web/accept/PathExtensionContentNegotiationStrategy.java +++ b/spring-web/src/main/java/org/springframework/web/accept/PathExtensionContentNegotiationStrategy.java @@ -20,13 +20,13 @@ import java.io.IOException; import java.io.InputStream; import java.util.Locale; import java.util.Map; - import javax.activation.FileTypeMap; import javax.activation.MimetypesFileTypeMap; import javax.servlet.http.HttpServletRequest; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.http.MediaType; diff --git a/spring-web/src/main/java/org/springframework/web/accept/ServletPathExtensionContentNegotiationStrategy.java b/spring-web/src/main/java/org/springframework/web/accept/ServletPathExtensionContentNegotiationStrategy.java index 86aa5ad75bd..01aa7cda5d0 100644 --- a/spring-web/src/main/java/org/springframework/web/accept/ServletPathExtensionContentNegotiationStrategy.java +++ b/spring-web/src/main/java/org/springframework/web/accept/ServletPathExtensionContentNegotiationStrategy.java @@ -16,7 +16,6 @@ package org.springframework.web.accept; import java.util.Map; - import javax.servlet.ServletContext; import org.springframework.http.MediaType; diff --git a/spring-web/src/main/java/org/springframework/web/accept/package-info.java b/spring-web/src/main/java/org/springframework/web/accept/package-info.java index f4061338247..d3c5ba3e16f 100644 --- a/spring-web/src/main/java/org/springframework/web/accept/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/accept/package-info.java @@ -1,4 +1,3 @@ - /** * This package contains classes used to determine the requested the media types in a request. * @@ -14,4 +13,3 @@ * ore more of the above strategies in a specific order. */ package org.springframework.web.accept; - diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/package-info.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/package-info.java index afe5c6fd6e7..a11e561eddc 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/package-info.java @@ -1,9 +1,5 @@ - /** - * * Annotations for binding requests to controllers and handler methods * as well as for binding request parameters to method arguments. - * */ package org.springframework.web.bind.annotation; - diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodInvoker.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodInvoker.java index 2929dab6975..11f98ba95e6 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodInvoker.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodInvoker.java @@ -34,6 +34,7 @@ import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.core.BridgeMethodResolver; diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/support/package-info.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/support/package-info.java index c9da51e506b..347285afe42 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/support/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/support/package-info.java @@ -1,8 +1,4 @@ - /** - * * Support classes for web annotation processing. - * */ package org.springframework.web.bind.annotation.support; - diff --git a/spring-web/src/main/java/org/springframework/web/bind/package-info.java b/spring-web/src/main/java/org/springframework/web/bind/package-info.java index c91db7c306e..fca046be7c0 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/bind/package-info.java @@ -1,8 +1,4 @@ - /** - * * Provides web-specific data binding functionality. - * */ package org.springframework.web.bind; - diff --git a/spring-web/src/main/java/org/springframework/web/bind/support/package-info.java b/spring-web/src/main/java/org/springframework/web/bind/support/package-info.java index f610613eda7..49a9e2a939f 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/support/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/bind/support/package-info.java @@ -1,8 +1,4 @@ - /** - * * Support classes for web data binding. - * */ package org.springframework.web.bind.support; - diff --git a/spring-web/src/main/java/org/springframework/web/client/package-info.java b/spring-web/src/main/java/org/springframework/web/client/package-info.java index 4c237152efc..c4de044765a 100644 --- a/spring-web/src/main/java/org/springframework/web/client/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/client/package-info.java @@ -1,9 +1,5 @@ - /** - * * Core package of the client-side web support. * Provides a RestTemplate class and various callback interfaces. - * */ package org.springframework.web.client; - diff --git a/spring-web/src/main/java/org/springframework/web/client/support/package-info.java b/spring-web/src/main/java/org/springframework/web/client/support/package-info.java index 863ae1184ed..d7fd057b314 100644 --- a/spring-web/src/main/java/org/springframework/web/client/support/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/client/support/package-info.java @@ -1,8 +1,5 @@ /** - * * Classes supporting the {@code org.springframework.web.client} package. * Contains a base class for RestTemplate usage. - * */ package org.springframework.web.client.support; - diff --git a/spring-web/src/main/java/org/springframework/web/context/package-info.java b/spring-web/src/main/java/org/springframework/web/context/package-info.java index c46b14c56d4..2cc6192a802 100644 --- a/spring-web/src/main/java/org/springframework/web/context/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/context/package-info.java @@ -1,9 +1,5 @@ - /** - * * Contains a variant of the application context interface for web applications, * and the ContextLoaderListener that bootstraps a root web application context. - * */ package org.springframework.web.context; - diff --git a/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java b/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java index cfc25e82f7d..cdc61780bda 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/Log4jNestedDiagnosticContextInterceptor.java @@ -18,6 +18,7 @@ package org.springframework.web.context.request; import org.apache.log4j.Logger; import org.apache.log4j.NDC; + import org.springframework.ui.ModelMap; /** diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/CallableInterceptorChain.java b/spring-web/src/main/java/org/springframework/web/context/request/async/CallableInterceptorChain.java index 3cf4f889f89..89138f1b891 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/async/CallableInterceptorChain.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/async/CallableInterceptorChain.java @@ -20,6 +20,7 @@ import java.util.concurrent.Callable; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.web.context.request.NativeWebRequest; /** diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResult.java b/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResult.java index 34a4ad927fd..10d73b88369 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResult.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResult.java @@ -20,6 +20,7 @@ import java.util.concurrent.Callable; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.util.Assert; import org.springframework.web.context.request.NativeWebRequest; diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResultInterceptorChain.java b/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResultInterceptorChain.java index fba37f178a0..8953344231a 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResultInterceptorChain.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/async/DeferredResultInterceptorChain.java @@ -19,6 +19,7 @@ import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.web.context.request.NativeWebRequest; /** diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java index abb8329dce2..ff94a752170 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; - import javax.servlet.AsyncContext; import javax.servlet.AsyncEvent; import javax.servlet.AsyncListener; diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/TimeoutCallableProcessingInterceptor.java b/spring-web/src/main/java/org/springframework/web/context/request/async/TimeoutCallableProcessingInterceptor.java index 67d3fdbaba8..99909298190 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/async/TimeoutCallableProcessingInterceptor.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/async/TimeoutCallableProcessingInterceptor.java @@ -16,7 +16,6 @@ package org.springframework.web.context.request.async; import java.util.concurrent.Callable; - import javax.servlet.http.HttpServletResponse; import org.springframework.http.HttpStatus; diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncUtils.java b/spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncUtils.java index 86d47850db8..7a2103f2aab 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncUtils.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/async/WebAsyncUtils.java @@ -16,7 +16,6 @@ package org.springframework.web.context.request.async; import java.lang.reflect.Constructor; - import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/package-info.java b/spring-web/src/main/java/org/springframework/web/context/request/async/package-info.java index cc58da1e6ef..775d53e0d5c 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/async/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/async/package-info.java @@ -1,10 +1,4 @@ - /** - * * Support for asynchronous request processing. - * - * @since 3.2 - * */ package org.springframework.web.context.request.async; - diff --git a/spring-web/src/main/java/org/springframework/web/context/request/package-info.java b/spring-web/src/main/java/org/springframework/web/context/request/package-info.java index a9690ca92f8..30f66417cd1 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support for generic request context holding, in particular for * scoping of application objects per HTTP request or HTTP session. - * */ package org.springframework.web.context.request; - diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ContextExposingHttpServletRequest.java b/spring-web/src/main/java/org/springframework/web/context/support/ContextExposingHttpServletRequest.java index 9f86cc92431..759d347c5f1 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/ContextExposingHttpServletRequest.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/ContextExposingHttpServletRequest.java @@ -18,7 +18,6 @@ package org.springframework.web.context.support; import java.util.HashSet; import java.util.Set; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; diff --git a/spring-web/src/main/java/org/springframework/web/context/support/HttpRequestHandlerServlet.java b/spring-web/src/main/java/org/springframework/web/context/support/HttpRequestHandlerServlet.java index 34df1b1de19..16ae988665e 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/HttpRequestHandlerServlet.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/HttpRequestHandlerServlet.java @@ -17,7 +17,6 @@ package org.springframework.web.context.support; import java.io.IOException; - import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertyPlaceholderConfigurer.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertyPlaceholderConfigurer.java index 3b3cd6ea9e3..720d26c0a98 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertyPlaceholderConfigurer.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertyPlaceholderConfigurer.java @@ -17,7 +17,6 @@ package org.springframework.web.context.support; import java.util.Properties; - import javax.servlet.ServletContext; import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; diff --git a/spring-web/src/main/java/org/springframework/web/context/support/package-info.java b/spring-web/src/main/java/org/springframework/web/context/support/package-info.java index 41100709254..6185f654c16 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/package-info.java @@ -1,8 +1,5 @@ /** - * * Classes supporting the {@code org.springframework.web.context} package, * such as WebApplicationContext implementations and various utility classes. - * */ package org.springframework.web.context.support; - diff --git a/spring-web/src/main/java/org/springframework/web/filter/GenericFilterBean.java b/spring-web/src/main/java/org/springframework/web/filter/GenericFilterBean.java index 1491a2b861a..1ba6be4f231 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/GenericFilterBean.java +++ b/spring-web/src/main/java/org/springframework/web/filter/GenericFilterBean.java @@ -19,7 +19,6 @@ package org.springframework.web.filter; import java.util.Enumeration; import java.util.HashSet; import java.util.Set; - import javax.servlet.Filter; import javax.servlet.FilterConfig; import javax.servlet.ServletContext; @@ -27,6 +26,7 @@ import javax.servlet.ServletException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeansException; import org.springframework.beans.MutablePropertyValues; @@ -44,8 +44,8 @@ import org.springframework.core.io.ResourceLoader; import org.springframework.util.Assert; import org.springframework.util.StringUtils; import org.springframework.web.context.ServletContextAware; -import org.springframework.web.context.support.StandardServletEnvironment; import org.springframework.web.context.support.ServletContextResourceLoader; +import org.springframework.web.context.support.StandardServletEnvironment; import org.springframework.web.util.NestedServletException; /** diff --git a/spring-web/src/main/java/org/springframework/web/filter/HttpPutFormContentFilter.java b/spring-web/src/main/java/org/springframework/web/filter/HttpPutFormContentFilter.java index efeab78ce19..74664a9cca0 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/HttpPutFormContentFilter.java +++ b/spring-web/src/main/java/org/springframework/web/filter/HttpPutFormContentFilter.java @@ -28,7 +28,6 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; - import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; diff --git a/spring-web/src/main/java/org/springframework/web/filter/package-info.java b/spring-web/src/main/java/org/springframework/web/filter/package-info.java index 1fe4f104d7b..1cfca2cc1ef 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/filter/package-info.java @@ -1,8 +1,4 @@ - /** - * * Provides generic filter base classes allowing for bean-style configuration. - * */ package org.springframework.web.filter; - diff --git a/spring-web/src/main/java/org/springframework/web/jsf/el/package-info.java b/spring-web/src/main/java/org/springframework/web/jsf/el/package-info.java index d4340dc7d28..955b183993e 100644 --- a/spring-web/src/main/java/org/springframework/web/jsf/el/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/jsf/el/package-info.java @@ -1,9 +1,5 @@ - /** - * - * ELResolvers for integrating a JSF web tier with a Spring middle tier + * ELResolvers for integrating a JSF web layer with a Spring service layer * which is hosted in a Spring root WebApplicationContext. - * */ package org.springframework.web.jsf.el; - diff --git a/spring-web/src/main/java/org/springframework/web/jsf/package-info.java b/spring-web/src/main/java/org/springframework/web/jsf/package-info.java index b5d645df286..6ed9b5f2126 100644 --- a/spring-web/src/main/java/org/springframework/web/jsf/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/jsf/package-info.java @@ -1,12 +1,8 @@ - /** - * - * Support classes for integrating a JSF web tier with a Spring middle tier + * Support classes for integrating a JSF web layer with a Spring service layer * which is hosted in a Spring root WebApplicationContext. * *

Supports easy access to beans in the Spring root WebApplicationContext * from JSF EL expressions, for example in property values of JSF-managed beans. - * */ package org.springframework.web.jsf; - diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractNamedValueMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractNamedValueMethodArgumentResolver.java index 6cadcec0f55..30bbfbc0a10 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractNamedValueMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractNamedValueMethodArgumentResolver.java @@ -24,7 +24,6 @@ import org.springframework.beans.factory.config.BeanExpressionContext; import org.springframework.beans.factory.config.BeanExpressionResolver; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.core.MethodParameter; -import org.springframework.util.Assert; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.ValueConstants; import org.springframework.web.bind.support.WebDataBinderFactory; diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/ModelFactory.java b/spring-web/src/main/java/org/springframework/web/method/annotation/ModelFactory.java index 623a299afba..e1774e65a7c 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/ModelFactory.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/ModelFactory.java @@ -26,6 +26,7 @@ import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.BeanUtils; import org.springframework.core.Conventions; import org.springframework.core.GenericTypeResolver; diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/package-info.java b/spring-web/src/main/java/org/springframework/web/method/annotation/package-info.java index 43712dbba53..dd12277b7bd 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/package-info.java @@ -1,8 +1,4 @@ - /** - * * Support classes for annotation-based handler method processing. - * */ package org.springframework.web.method.annotation; - diff --git a/spring-web/src/main/java/org/springframework/web/method/package-info.java b/spring-web/src/main/java/org/springframework/web/method/package-info.java index 343a2c84495..5d7b2a78c11 100644 --- a/spring-web/src/main/java/org/springframework/web/method/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/method/package-info.java @@ -1,8 +1,5 @@ /** - * * Common infrastructure for handler method processing, as used by * Spring MVC's {@code org.springframework.web.servlet.mvc.method} package. - * */ package org.springframework.web.method; - diff --git a/spring-web/src/main/java/org/springframework/web/method/support/CompositeUriComponentsContributor.java b/spring-web/src/main/java/org/springframework/web/method/support/CompositeUriComponentsContributor.java index 35957766ede..f061d86ed22 100644 --- a/spring-web/src/main/java/org/springframework/web/method/support/CompositeUriComponentsContributor.java +++ b/spring-web/src/main/java/org/springframework/web/method/support/CompositeUriComponentsContributor.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-web/src/main/java/org/springframework/web/method/support/package-info.java b/spring-web/src/main/java/org/springframework/web/method/support/package-info.java index 1de7c0ed275..3fe229ede38 100644 --- a/spring-web/src/main/java/org/springframework/web/method/support/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/method/support/package-info.java @@ -1,8 +1,4 @@ - /** - * * Generic support classes for handler method processing. - * */ package org.springframework.web.method.support; - diff --git a/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartFile.java b/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartFile.java index b649e587e06..83fc1e36213 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartFile.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/commons/CommonsMultipartFile.java @@ -21,6 +21,7 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.Serializable; + import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileUploadException; import org.apache.commons.fileupload.disk.DiskFileItem; diff --git a/spring-web/src/main/java/org/springframework/web/multipart/commons/package-info.java b/spring-web/src/main/java/org/springframework/web/multipart/commons/package-info.java index 931eaf305a4..0c5ee00f94b 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/commons/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/commons/package-info.java @@ -1,9 +1,5 @@ - /** - * * MultipartResolver implementation for * Jakarta Commons FileUpload. - * */ package org.springframework.web.multipart.commons; - diff --git a/spring-web/src/main/java/org/springframework/web/multipart/package-info.java b/spring-web/src/main/java/org/springframework/web/multipart/package-info.java index 2de262ce41d..0733fd94366 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/package-info.java @@ -1,11 +1,7 @@ - /** - * * Multipart resolution framework for handling file uploads. * Provides a MultipartResolver strategy interface, * and a generic extension of the HttpServletRequest interface * for accessing multipart files in web application code. - * */ package org.springframework.web.multipart; - diff --git a/spring-web/src/main/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequest.java b/spring-web/src/main/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequest.java index 1329c782320..152f21ef528 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequest.java @@ -19,7 +19,6 @@ package org.springframework.web.multipart.support; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; - import javax.servlet.http.HttpServletRequest; import org.springframework.http.HttpHeaders; diff --git a/spring-web/src/main/java/org/springframework/web/multipart/support/package-info.java b/spring-web/src/main/java/org/springframework/web/multipart/support/package-info.java index 5b12543c781..351cb24816c 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/support/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/support/package-info.java @@ -1,10 +1,6 @@ - /** - * * Support classes for the multipart resolution framework. - * Contains property editors for multipart files, and a - * servlet filter for multipart handling without Spring's web MVC. - * + * Contains property editors for multipart files, and a Servlet filter + * for multipart handling without Spring's Web MVC. */ package org.springframework.web.multipart.support; - diff --git a/spring-web/src/main/java/org/springframework/web/package-info.java b/spring-web/src/main/java/org/springframework/web/package-info.java index 7c8c795d550..142f096ec74 100644 --- a/spring-web/src/main/java/org/springframework/web/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/package-info.java @@ -1,9 +1,5 @@ - /** - * * Common, generic interfaces that define minimal boundary points * between Spring's web infrastructure and other framework modules. - * */ package org.springframework.web; - diff --git a/spring-web/src/main/java/org/springframework/web/util/HttpSessionMutexListener.java b/spring-web/src/main/java/org/springframework/web/util/HttpSessionMutexListener.java index c0a7f344e66..319c4b7ec94 100644 --- a/spring-web/src/main/java/org/springframework/web/util/HttpSessionMutexListener.java +++ b/spring-web/src/main/java/org/springframework/web/util/HttpSessionMutexListener.java @@ -17,7 +17,6 @@ package org.springframework.web.util; import java.io.Serializable; - import javax.servlet.http.HttpSessionEvent; import javax.servlet.http.HttpSessionListener; diff --git a/spring-web/src/main/java/org/springframework/web/util/IntrospectorCleanupListener.java b/spring-web/src/main/java/org/springframework/web/util/IntrospectorCleanupListener.java index 8a96df095a1..31542c85af5 100644 --- a/spring-web/src/main/java/org/springframework/web/util/IntrospectorCleanupListener.java +++ b/spring-web/src/main/java/org/springframework/web/util/IntrospectorCleanupListener.java @@ -17,7 +17,6 @@ package org.springframework.web.util; import java.beans.Introspector; - import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextListener; diff --git a/spring-web/src/main/java/org/springframework/web/util/package-info.java b/spring-web/src/main/java/org/springframework/web/util/package-info.java index 7bbf3fb2ae5..42edc4aebfe 100644 --- a/spring-web/src/main/java/org/springframework/web/util/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/util/package-info.java @@ -1,9 +1,5 @@ - /** - * * Miscellaneous web utility classes, such as HTML escaping, - * log4j initialization, and cookie handling. - * + * Log4j initialization, and cookie handling. */ package org.springframework.web.util; - diff --git a/spring-web/src/test/java/org/springframework/http/HttpEntityTests.java b/spring-web/src/test/java/org/springframework/http/HttpEntityTests.java index 9b70cecfb15..039396c0213 100644 --- a/spring-web/src/test/java/org/springframework/http/HttpEntityTests.java +++ b/spring-web/src/test/java/org/springframework/http/HttpEntityTests.java @@ -16,12 +16,13 @@ package org.springframework.http; -import static org.junit.Assert.*; import org.junit.Test; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +import static org.junit.Assert.*; + /** * @author Arjen Poutsma */ diff --git a/spring-web/src/test/java/org/springframework/http/MediaTypeTests.java b/spring-web/src/test/java/org/springframework/http/MediaTypeTests.java index a69ff8c46d5..99665b93eae 100644 --- a/spring-web/src/test/java/org/springframework/http/MediaTypeTests.java +++ b/spring-web/src/test/java/org/springframework/http/MediaTypeTests.java @@ -23,6 +23,7 @@ import java.util.List; import java.util.Random; import org.junit.Test; + import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.support.DefaultConversionService; diff --git a/spring-web/src/test/java/org/springframework/http/client/AbstractHttpRequestFactoryTestCase.java b/spring-web/src/test/java/org/springframework/http/client/AbstractHttpRequestFactoryTestCase.java index 95b0f7440fa..8639e1f0405 100644 --- a/spring-web/src/test/java/org/springframework/http/client/AbstractHttpRequestFactoryTestCase.java +++ b/spring-web/src/test/java/org/springframework/http/client/AbstractHttpRequestFactoryTestCase.java @@ -24,6 +24,7 @@ import java.util.Locale; import org.junit.Before; import org.junit.Test; + import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.StreamingHttpOutputMessage; diff --git a/spring-web/src/test/java/org/springframework/http/client/AbstractJettyServerTestCase.java b/spring-web/src/test/java/org/springframework/http/client/AbstractJettyServerTestCase.java index b27299d99ae..5d5ce0edac3 100644 --- a/spring-web/src/test/java/org/springframework/http/client/AbstractJettyServerTestCase.java +++ b/spring-web/src/test/java/org/springframework/http/client/AbstractJettyServerTestCase.java @@ -19,7 +19,6 @@ package org.springframework.http.client; import java.io.IOException; import java.io.InputStream; import java.util.Enumeration; - import javax.servlet.GenericServlet; import javax.servlet.ServletException; import javax.servlet.ServletRequest; @@ -31,7 +30,6 @@ import javax.servlet.http.HttpServletResponse; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; - import org.junit.AfterClass; import org.junit.BeforeClass; diff --git a/spring-web/src/test/java/org/springframework/http/client/BufferedSimpleHttpRequestFactoryTests.java b/spring-web/src/test/java/org/springframework/http/client/BufferedSimpleHttpRequestFactoryTests.java index 4904ea31910..c05fb85aebf 100644 --- a/spring-web/src/test/java/org/springframework/http/client/BufferedSimpleHttpRequestFactoryTests.java +++ b/spring-web/src/test/java/org/springframework/http/client/BufferedSimpleHttpRequestFactoryTests.java @@ -19,6 +19,7 @@ package org.springframework.http.client; import java.net.ProtocolException; import org.junit.Test; + import org.springframework.http.HttpMethod; public class BufferedSimpleHttpRequestFactoryTests extends AbstractHttpRequestFactoryTestCase { diff --git a/spring-web/src/test/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactoryTests.java b/spring-web/src/test/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactoryTests.java index 5f4442f6532..fe0a9934b8f 100644 --- a/spring-web/src/test/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactoryTests.java +++ b/spring-web/src/test/java/org/springframework/http/client/HttpComponentsClientHttpRequestFactoryTests.java @@ -16,8 +16,6 @@ package org.springframework.http.client; -import static org.junit.Assert.*; - import java.net.URI; import org.apache.http.client.HttpClient; @@ -27,8 +25,11 @@ import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.params.CoreConnectionPNames; import org.junit.Test; + import org.springframework.http.HttpMethod; +import static org.junit.Assert.*; + public class HttpComponentsClientHttpRequestFactoryTests extends AbstractHttpRequestFactoryTestCase { @Override diff --git a/spring-web/src/test/java/org/springframework/http/client/InterceptingClientHttpRequestFactoryTests.java b/spring-web/src/test/java/org/springframework/http/client/InterceptingClientHttpRequestFactoryTests.java index 6b77577b805..2df6331b8e3 100644 --- a/spring-web/src/test/java/org/springframework/http/client/InterceptingClientHttpRequestFactoryTests.java +++ b/spring-web/src/test/java/org/springframework/http/client/InterceptingClientHttpRequestFactoryTests.java @@ -28,6 +28,7 @@ import java.util.List; import org.junit.Before; import org.junit.Test; + import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpRequest; diff --git a/spring-web/src/test/java/org/springframework/http/client/StreamingSimpleHttpRequestFactoryTests.java b/spring-web/src/test/java/org/springframework/http/client/StreamingSimpleHttpRequestFactoryTests.java index 6eed7ae1be6..2c6cc6699a9 100644 --- a/spring-web/src/test/java/org/springframework/http/client/StreamingSimpleHttpRequestFactoryTests.java +++ b/spring-web/src/test/java/org/springframework/http/client/StreamingSimpleHttpRequestFactoryTests.java @@ -22,15 +22,15 @@ import java.net.URI; import java.util.Collections; import java.util.Random; +import org.junit.Ignore; +import org.junit.Test; + import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpRequest; import org.springframework.http.HttpStatus; -import org.junit.Ignore; -import org.junit.Test; - -import static org.junit.Assert.assertEquals; +import static org.junit.Assert.*; public class StreamingSimpleHttpRequestFactoryTests extends AbstractHttpRequestFactoryTestCase { diff --git a/spring-web/src/test/java/org/springframework/http/client/support/ProxyFactoryBeanTests.java b/spring-web/src/test/java/org/springframework/http/client/support/ProxyFactoryBeanTests.java index 07f383de872..625c213fd1d 100644 --- a/spring-web/src/test/java/org/springframework/http/client/support/ProxyFactoryBeanTests.java +++ b/spring-web/src/test/java/org/springframework/http/client/support/ProxyFactoryBeanTests.java @@ -19,10 +19,11 @@ package org.springframework.http.client.support; import java.net.InetSocketAddress; import java.net.Proxy; -import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; +import static org.junit.Assert.*; + /** * @author Arjen Poutsma */ diff --git a/spring-web/src/test/java/org/springframework/http/converter/BufferedImageHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/BufferedImageHttpMessageConverterTests.java index 0dcb8703bf9..5e4f33a7eae 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/BufferedImageHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/BufferedImageHttpMessageConverterTests.java @@ -21,7 +21,6 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import javax.imageio.ImageIO; -import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; @@ -32,6 +31,8 @@ import org.springframework.http.MockHttpInputMessage; import org.springframework.http.MockHttpOutputMessage; import org.springframework.util.FileCopyUtils; +import static org.junit.Assert.*; + public class BufferedImageHttpMessageConverterTests { private BufferedImageHttpMessageConverter converter; diff --git a/spring-web/src/test/java/org/springframework/http/converter/ByteArrayHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/ByteArrayHttpMessageConverterTests.java index 4b8eda8400d..7ccf5d34172 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/ByteArrayHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/ByteArrayHttpMessageConverterTests.java @@ -18,7 +18,6 @@ package org.springframework.http.converter; import java.io.IOException; -import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; @@ -26,6 +25,8 @@ import org.springframework.http.MediaType; import org.springframework.http.MockHttpInputMessage; import org.springframework.http.MockHttpOutputMessage; +import static org.junit.Assert.*; + /** @author Arjen Poutsma */ public class ByteArrayHttpMessageConverterTests { diff --git a/spring-web/src/test/java/org/springframework/http/converter/FormHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/FormHttpMessageConverterTests.java index 51349350111..b86be01e3aa 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/FormHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/FormHttpMessageConverterTests.java @@ -22,7 +22,6 @@ import java.io.InputStream; import java.io.StringReader; import java.nio.charset.Charset; import java.util.List; - import javax.xml.transform.Source; import javax.xml.transform.stream.StreamSource; @@ -33,6 +32,7 @@ import org.apache.commons.fileupload.RequestContext; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.junit.Before; import org.junit.Test; + import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.http.HttpEntity; diff --git a/spring-web/src/test/java/org/springframework/http/converter/HttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/HttpMessageConverterTests.java index 08f98a5cdf4..83c8dc91da1 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/HttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/HttpMessageConverterTests.java @@ -17,13 +17,15 @@ package org.springframework.http.converter; import java.io.IOException; -import static org.junit.Assert.*; + import org.junit.Test; import org.springframework.http.HttpInputMessage; import org.springframework.http.HttpOutputMessage; import org.springframework.http.MediaType; +import static org.junit.Assert.*; + /** * Test-case for AbstractHttpMessageConverter. * diff --git a/spring-web/src/test/java/org/springframework/http/converter/ObjectToStringHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/ObjectToStringHttpMessageConverterTests.java index 40112fcaec0..f7e05e60f43 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/ObjectToStringHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/ObjectToStringHttpMessageConverterTests.java @@ -16,13 +16,6 @@ package org.springframework.http.converter; -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - import java.io.IOException; import java.math.BigInteger; import java.nio.charset.Charset; @@ -31,6 +24,7 @@ import java.util.Locale; import org.junit.Before; import org.junit.Test; + import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.core.io.Resource; @@ -40,6 +34,8 @@ import org.springframework.http.server.ServletServerHttpResponse; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; +import static org.junit.Assert.*; + /** * Test cases for {@link ObjectToStringHttpMessageConverter} class. * diff --git a/spring-web/src/test/java/org/springframework/http/converter/ResourceHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/ResourceHttpMessageConverterTests.java index f8c60a94b4b..6e57854f2e3 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/ResourceHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/ResourceHttpMessageConverterTests.java @@ -21,6 +21,7 @@ import java.util.Arrays; import org.junit.Before; import org.junit.Test; + import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; diff --git a/spring-web/src/test/java/org/springframework/http/converter/StringHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/StringHttpMessageConverterTests.java index 2af8ea38167..6dcdb25fcf7 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/StringHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/StringHttpMessageConverterTests.java @@ -19,7 +19,6 @@ package org.springframework.http.converter; import java.io.IOException; import java.nio.charset.Charset; -import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; @@ -27,6 +26,8 @@ import org.springframework.http.MediaType; import org.springframework.http.MockHttpInputMessage; import org.springframework.http.MockHttpOutputMessage; +import static org.junit.Assert.*; + /** @author Arjen Poutsma */ public class StringHttpMessageConverterTests { diff --git a/spring-web/src/test/java/org/springframework/http/converter/json/GsonHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/json/GsonHttpMessageConverterTests.java index 04180d9ca1e..fedf6232f51 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/json/GsonHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/json/GsonHttpMessageConverterTests.java @@ -24,15 +24,15 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import com.google.gson.reflect.TypeToken; import org.junit.Test; + import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.MediaType; import org.springframework.http.MockHttpInputMessage; import org.springframework.http.MockHttpOutputMessage; import org.springframework.http.converter.HttpMessageNotReadableException; -import com.google.gson.reflect.TypeToken; - import static org.junit.Assert.*; /** diff --git a/spring-web/src/test/java/org/springframework/http/converter/protobuf/ProtobufHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/protobuf/ProtobufHttpMessageConverterTests.java index 142d4e1eebb..a80490f1ad0 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/protobuf/ProtobufHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/protobuf/ProtobufHttpMessageConverterTests.java @@ -28,13 +28,9 @@ import org.springframework.http.MockHttpOutputMessage; import org.springframework.protobuf.Msg; import org.springframework.protobuf.SecondMsg; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; import static org.mockito.Matchers.anyObject; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.*; /** diff --git a/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2CollectionHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2CollectionHttpMessageConverterTests.java index 7df8d160712..0dfcc9df4ab 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2CollectionHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2CollectionHttpMessageConverterTests.java @@ -16,14 +16,10 @@ package org.springframework.http.converter.xml; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Type; import java.util.Collection; import java.util.List; import java.util.Set; - import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @@ -32,11 +28,14 @@ import javax.xml.stream.XMLInputFactory; import org.junit.Before; import org.junit.Test; + import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.http.MockHttpInputMessage; +import static org.junit.Assert.*; + /** * Test fixture for {@link Jaxb2CollectionHttpMessageConverter}. * diff --git a/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java index c1f1ec1a8de..5d33f015b8c 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java @@ -26,11 +26,6 @@ import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import static org.custommonkey.xmlunit.XMLAssert.*; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import org.junit.Before; import org.junit.Test; @@ -43,6 +38,11 @@ import org.springframework.http.MediaType; import org.springframework.http.MockHttpInputMessage; import org.springframework.http.MockHttpOutputMessage; +import static org.custommonkey.xmlunit.XMLAssert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + /** * Tests for {@link Jaxb2RootElementHttpMessageConverter}. * diff --git a/spring-web/src/test/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverterTests.java index 756a4ae37bc..38b7fd4c0a1 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/xml/MappingJackson2XmlHttpMessageConverterTests.java @@ -21,6 +21,8 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.nio.charset.Charset; +import com.fasterxml.jackson.annotation.JsonView; +import com.fasterxml.jackson.dataformat.xml.XmlMapper; import org.junit.Test; import org.springframework.http.HttpOutputMessage; @@ -31,9 +33,6 @@ import org.springframework.http.converter.HttpMessageNotReadableException; import org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter; import org.springframework.http.converter.json.MappingJacksonValue; -import com.fasterxml.jackson.annotation.JsonView; -import com.fasterxml.jackson.dataformat.xml.XmlMapper; - import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.*; diff --git a/spring-web/src/test/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverterTests.java index 7881051af8b..074f883cb2a 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverterTests.java @@ -20,6 +20,7 @@ import javax.xml.transform.Result; import javax.xml.transform.stream.StreamSource; import org.junit.Test; + import org.springframework.beans.TypeMismatchException; import org.springframework.http.MediaType; import org.springframework.http.MockHttpInputMessage; diff --git a/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java index 6ad8746c215..e298ba7a8b8 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java @@ -16,14 +16,10 @@ package org.springframework.http.converter.xml; -import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual; -import static org.junit.Assert.*; - import java.io.IOException; import java.io.InputStreamReader; import java.io.StringReader; import java.nio.charset.Charset; - import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.stream.XMLStreamReader; import javax.xml.transform.Source; @@ -34,6 +30,12 @@ import javax.xml.transform.stream.StreamSource; import org.junit.Before; import org.junit.Test; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; +import org.xml.sax.XMLReader; +import org.xml.sax.helpers.DefaultHandler; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; @@ -42,13 +44,10 @@ import org.springframework.http.MockHttpInputMessage; import org.springframework.http.MockHttpOutputMessage; import org.springframework.util.FileCopyUtils; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.XMLReader; -import org.xml.sax.helpers.DefaultHandler; +import static org.custommonkey.xmlunit.XMLAssert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.*; +import static org.junit.Assert.assertTrue; /** * @author Arjen Poutsma diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockFilterChain.java b/spring-web/src/test/java/org/springframework/mock/web/test/MockFilterChain.java index 5b4b68b94d7..ac10e6e756d 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockFilterChain.java +++ b/spring-web/src/test/java/org/springframework/mock/web/test/MockFilterChain.java @@ -21,7 +21,6 @@ import java.util.Arrays; import java.util.Collections; import java.util.Iterator; import java.util.List; - import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockMultipartFile.java b/spring-web/src/test/java/org/springframework/mock/web/test/MockMultipartFile.java index 8cad672a2de..65ff4da656e 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockMultipartFile.java +++ b/spring-web/src/test/java/org/springframework/mock/web/test/MockMultipartFile.java @@ -20,6 +20,7 @@ import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; + import org.springframework.util.Assert; import org.springframework.util.FileCopyUtils; import org.springframework.web.multipart.MultipartFile; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockPageContext.java b/spring-web/src/test/java/org/springframework/mock/web/test/MockPageContext.java index d4d5f2011eb..54a0fc00259 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockPageContext.java +++ b/spring-web/src/test/java/org/springframework/mock/web/test/MockPageContext.java @@ -22,7 +22,6 @@ import java.util.Collections; import java.util.Enumeration; import java.util.LinkedHashMap; import java.util.Map; - import javax.el.ELContext; import javax.servlet.Servlet; import javax.servlet.ServletConfig; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockPart.java b/spring-web/src/test/java/org/springframework/mock/web/test/MockPart.java index f26dfc2b9c1..79360ef711f 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockPart.java +++ b/spring-web/src/test/java/org/springframework/mock/web/test/MockPart.java @@ -21,7 +21,6 @@ import java.io.IOException; import java.io.InputStream; import java.util.Collection; import java.util.Collections; - import javax.servlet.http.Part; import org.springframework.util.Assert; diff --git a/spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java b/spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java index d26b34565f1..f0a3e0d6385 100644 --- a/spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java +++ b/spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java @@ -20,9 +20,9 @@ import com.caucho.burlap.client.BurlapProxyFactory; import com.caucho.hessian.client.HessianProxyFactory; import junit.framework.TestCase; +import org.springframework.remoting.RemoteAccessException; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.remoting.RemoteAccessException; /** * @author Juergen Hoeller diff --git a/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java b/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java index b436e306ecd..0d117c3719a 100644 --- a/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java +++ b/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java @@ -35,8 +35,6 @@ import javax.servlet.http.HttpServletResponse; import junit.framework.TestCase; import org.aopalliance.intercept.MethodInvocation; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.BeanClassLoaderAware; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; @@ -45,6 +43,8 @@ import org.springframework.remoting.support.DefaultRemoteInvocationExecutor; import org.springframework.remoting.support.RemoteInvocation; import org.springframework.remoting.support.RemoteInvocationFactory; import org.springframework.remoting.support.RemoteInvocationResult; +import org.springframework.tests.sample.beans.ITestBean; +import org.springframework.tests.sample.beans.TestBean; /** * @author Juergen Hoeller diff --git a/spring-web/src/test/java/org/springframework/remoting/jaxws/JaxWsSupportTests.java b/spring-web/src/test/java/org/springframework/remoting/jaxws/JaxWsSupportTests.java index 66637e04b25..3a887601381 100644 --- a/spring-web/src/test/java/org/springframework/remoting/jaxws/JaxWsSupportTests.java +++ b/spring-web/src/test/java/org/springframework/remoting/jaxws/JaxWsSupportTests.java @@ -18,7 +18,6 @@ package org.springframework.remoting.jaxws; import java.net.MalformedURLException; import java.net.URL; - import javax.xml.namespace.QName; import javax.xml.ws.BindingProvider; import javax.xml.ws.Service; @@ -27,6 +26,7 @@ import javax.xml.ws.WebServiceRef; import javax.xml.ws.soap.AddressingFeature; import org.junit.Test; + import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition; diff --git a/spring-web/src/test/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBeanTests.java b/spring-web/src/test/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBeanTests.java index 7a61577f00e..195724a65ef 100644 --- a/spring-web/src/test/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBeanTests.java +++ b/spring-web/src/test/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBeanTests.java @@ -15,8 +15,6 @@ */ package org.springframework.web.accept; -import static org.junit.Assert.assertEquals; - import java.util.Arrays; import java.util.Collections; import java.util.HashMap; @@ -24,12 +22,15 @@ import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.http.MediaType; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.HttpMediaTypeNotAcceptableException; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; +import static org.junit.Assert.*; + /** * Test fixture for {@link ContentNegotiationManagerFactoryBean} tests. * @author Rossen Stoyanchev diff --git a/spring-web/src/test/java/org/springframework/web/accept/HeaderContentNegotiationStrategyTests.java b/spring-web/src/test/java/org/springframework/web/accept/HeaderContentNegotiationStrategyTests.java index d67202f197a..72f8aca94b7 100644 --- a/spring-web/src/test/java/org/springframework/web/accept/HeaderContentNegotiationStrategyTests.java +++ b/spring-web/src/test/java/org/springframework/web/accept/HeaderContentNegotiationStrategyTests.java @@ -15,18 +15,19 @@ */ package org.springframework.web.accept; -import static org.junit.Assert.assertEquals; - import java.util.List; import org.junit.Before; import org.junit.Test; + import org.springframework.http.MediaType; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.HttpMediaTypeNotAcceptableException; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; +import static org.junit.Assert.*; + /** * Test fixture for HeaderContentNegotiationStrategy tests. * diff --git a/spring-web/src/test/java/org/springframework/web/accept/MappingContentNegotiationStrategyTests.java b/spring-web/src/test/java/org/springframework/web/accept/MappingContentNegotiationStrategyTests.java index f6a72363676..67e05bbf215 100644 --- a/spring-web/src/test/java/org/springframework/web/accept/MappingContentNegotiationStrategyTests.java +++ b/spring-web/src/test/java/org/springframework/web/accept/MappingContentNegotiationStrategyTests.java @@ -16,16 +16,17 @@ package org.springframework.web.accept; -import static org.junit.Assert.assertEquals; - import java.util.Collections; import java.util.List; import java.util.Map; import org.junit.Test; + import org.springframework.http.MediaType; import org.springframework.web.context.request.NativeWebRequest; +import static org.junit.Assert.*; + /** * A test fixture with a test sub-class of AbstractMappingContentNegotiationStrategy. * diff --git a/spring-web/src/test/java/org/springframework/web/accept/MappingMediaTypeFileExtensionResolverTests.java b/spring-web/src/test/java/org/springframework/web/accept/MappingMediaTypeFileExtensionResolverTests.java index ad7680d251f..4ea37728431 100644 --- a/spring-web/src/test/java/org/springframework/web/accept/MappingMediaTypeFileExtensionResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/accept/MappingMediaTypeFileExtensionResolverTests.java @@ -15,16 +15,16 @@ */ package org.springframework.web.accept; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - import java.util.Collections; import java.util.List; import java.util.Map; import org.junit.Test; + import org.springframework.http.MediaType; +import static org.junit.Assert.*; + /** * Test fixture for {@link MappingMediaTypeFileExtensionResolver}. * diff --git a/spring-web/src/test/java/org/springframework/web/accept/PathExtensionContentNegotiationStrategyTests.java b/spring-web/src/test/java/org/springframework/web/accept/PathExtensionContentNegotiationStrategyTests.java index effb8357d0b..bc1e9858f75 100644 --- a/spring-web/src/test/java/org/springframework/web/accept/PathExtensionContentNegotiationStrategyTests.java +++ b/spring-web/src/test/java/org/springframework/web/accept/PathExtensionContentNegotiationStrategyTests.java @@ -15,24 +15,23 @@ */ package org.springframework.web.accept; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Map; - import javax.servlet.ServletContext; import org.junit.Before; import org.junit.Test; + import org.springframework.http.MediaType; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.HttpMediaTypeNotAcceptableException; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; +import static org.junit.Assert.*; + /** * A test fixture for PathExtensionContentNegotiationStrategy. * diff --git a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java index 34340bd3e16..82b6482a1ca 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java @@ -16,19 +16,20 @@ package org.springframework.web.bind; -import static org.junit.Assert.*; - import java.beans.PropertyEditorSupport; import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.Test; -import org.springframework.tests.sample.beans.ITestBean; + import org.springframework.beans.PropertyValue; import org.springframework.beans.PropertyValues; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.tests.sample.beans.ITestBean; +import org.springframework.tests.sample.beans.TestBean; + +import static org.junit.Assert.*; /** * @author Rod Johnson diff --git a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java index 334f4b0d78c..e76f3fcba96 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java @@ -16,14 +16,15 @@ package org.springframework.web.bind; -import static org.junit.Assert.*; - import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.tests.Assume; import org.springframework.tests.TestGroup; import org.springframework.util.StopWatch; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Chris Beams diff --git a/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderIntegrationTests.java b/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderIntegrationTests.java index 37be7bb915f..e6b0ed64e79 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderIntegrationTests.java @@ -18,7 +18,6 @@ package org.springframework.web.bind.support; import java.io.IOException; import java.util.List; - import javax.servlet.MultipartConfigElement; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; @@ -33,6 +32,7 @@ import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; + import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.http.MediaType; diff --git a/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java b/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java index b3e347fd5fb..c8b3a0a3772 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java @@ -21,20 +21,21 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.*; import org.junit.Test; -import org.springframework.tests.sample.beans.ITestBean; import org.springframework.beans.PropertyValue; import org.springframework.beans.PropertyValues; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockMultipartFile; import org.springframework.mock.web.test.MockMultipartHttpServletRequest; +import org.springframework.tests.sample.beans.ITestBean; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.bind.ServletRequestParameterPropertyValues; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.multipart.support.StringMultipartFileEditor; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller */ diff --git a/spring-web/src/test/java/org/springframework/web/client/AbstractJettyServerTestCase.java b/spring-web/src/test/java/org/springframework/web/client/AbstractJettyServerTestCase.java index f0d06f49d86..59c82df4907 100644 --- a/spring-web/src/test/java/org/springframework/web/client/AbstractJettyServerTestCase.java +++ b/spring-web/src/test/java/org/springframework/web/client/AbstractJettyServerTestCase.java @@ -19,7 +19,6 @@ package org.springframework.web.client; import java.io.IOException; import java.util.Collections; import java.util.List; - import javax.servlet.GenericServlet; import javax.servlet.ServletException; import javax.servlet.ServletRequest; @@ -33,11 +32,9 @@ import org.apache.commons.fileupload.FileItemFactory; import org.apache.commons.fileupload.FileUploadException; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.servlet.ServletFileUpload; - import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; - import org.junit.AfterClass; import org.junit.BeforeClass; diff --git a/spring-web/src/test/java/org/springframework/web/client/DefaultResponseErrorHandlerTests.java b/spring-web/src/test/java/org/springframework/web/client/DefaultResponseErrorHandlerTests.java index 55457d59821..26303f9ddf7 100644 --- a/spring-web/src/test/java/org/springframework/web/client/DefaultResponseErrorHandlerTests.java +++ b/spring-web/src/test/java/org/springframework/web/client/DefaultResponseErrorHandlerTests.java @@ -21,6 +21,7 @@ import java.io.IOException; import org.junit.Before; import org.junit.Test; + import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/spring-web/src/test/java/org/springframework/web/client/HttpMessageConverterExtractorTests.java b/spring-web/src/test/java/org/springframework/web/client/HttpMessageConverterExtractorTests.java index 38cbc7125fa..406adbc3e84 100644 --- a/spring-web/src/test/java/org/springframework/web/client/HttpMessageConverterExtractorTests.java +++ b/spring-web/src/test/java/org/springframework/web/client/HttpMessageConverterExtractorTests.java @@ -23,6 +23,7 @@ import java.util.List; import org.junit.Before; import org.junit.Test; + import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; diff --git a/spring-web/src/test/java/org/springframework/web/client/HttpStatusCodeExceptionTests.java b/spring-web/src/test/java/org/springframework/web/client/HttpStatusCodeExceptionTests.java index 6614227c24a..a98f0a77b84 100644 --- a/spring-web/src/test/java/org/springframework/web/client/HttpStatusCodeExceptionTests.java +++ b/spring-web/src/test/java/org/springframework/web/client/HttpStatusCodeExceptionTests.java @@ -24,10 +24,10 @@ import java.io.ObjectOutputStream; import java.nio.charset.Charset; import org.junit.Test; + import org.springframework.http.HttpStatus; import static org.hamcrest.CoreMatchers.*; - import static org.junit.Assert.*; /** diff --git a/spring-web/src/test/java/org/springframework/web/client/RestTemplateTests.java b/spring-web/src/test/java/org/springframework/web/client/RestTemplateTests.java index a46dd34f31f..becc67850b1 100644 --- a/spring-web/src/test/java/org/springframework/web/client/RestTemplateTests.java +++ b/spring-web/src/test/java/org/springframework/web/client/RestTemplateTests.java @@ -27,6 +27,7 @@ import java.util.Set; import org.junit.Before; import org.junit.Test; + import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; diff --git a/spring-web/src/test/java/org/springframework/web/context/ContextLoaderInitializerTests.java b/spring-web/src/test/java/org/springframework/web/context/ContextLoaderInitializerTests.java index cb26d860a6f..b92b9e77994 100644 --- a/spring-web/src/test/java/org/springframework/web/context/ContextLoaderInitializerTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/ContextLoaderInitializerTests.java @@ -17,7 +17,6 @@ package org.springframework.web.context; import java.util.EventListener; - import javax.servlet.ServletContextEvent; import javax.servlet.ServletException; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java b/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java index a4b7d6018ac..de7e9f7fa9e 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java @@ -18,16 +18,17 @@ package org.springframework.web.context.request; import javax.servlet.http.HttpServletRequest; -import static org.junit.Assert.*; import org.junit.Test; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.StaticWebApplicationContext; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Juergen Hoeller diff --git a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java index 6f88b6a9482..b044b8c2d68 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java @@ -18,8 +18,6 @@ package org.springframework.web.context.request; import junit.framework.TestCase; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanCurrentlyInCreationException; import org.springframework.beans.factory.FactoryBean; @@ -28,6 +26,8 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.context.expression.StandardBeanExpressionResolver; import org.springframework.core.io.ClassPathResource; import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.tests.sample.beans.DerivedTestBean; +import org.springframework.tests.sample.beans.TestBean; /** * @author Rob Harrop diff --git a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java index 4a5703f34a0..8b366ac8773 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java @@ -16,21 +16,22 @@ package org.springframework.web.context.request; -import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; import org.springframework.aop.support.AopUtils; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; -import org.springframework.tests.sample.beans.factory.DummyFactory; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.BeanDefinitionHolder; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.ClassPathResource; import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.tests.sample.beans.DerivedTestBean; +import org.springframework.tests.sample.beans.ITestBean; +import org.springframework.tests.sample.beans.TestBean; +import org.springframework.tests.sample.beans.factory.DummyFactory; + +import static org.junit.Assert.*; /** * @author Juergen Hoeller diff --git a/spring-web/src/test/java/org/springframework/web/context/request/ServletRequestAttributesTests.java b/spring-web/src/test/java/org/springframework/web/context/request/ServletRequestAttributesTests.java index 1b7bd416d16..ef1afaad9fa 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/ServletRequestAttributesTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/ServletRequestAttributesTests.java @@ -18,11 +18,11 @@ package org.springframework.web.context.request; import java.io.Serializable; import java.math.BigInteger; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpSession; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java b/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java index 4e540a7d202..ead787e9540 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java @@ -21,8 +21,6 @@ import java.io.Serializable; import junit.framework.TestCase; import org.springframework.beans.BeansException; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.config.DestructionAwareBeanPostProcessor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -30,6 +28,8 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.ClassPathResource; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpSession; +import org.springframework.tests.sample.beans.DerivedTestBean; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.SerializationTestUtils; /** diff --git a/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java b/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java index 5c2ef5823c0..e04714869e5 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java @@ -18,17 +18,18 @@ package org.springframework.web.context.request; import javax.servlet.ServletContextEvent; -import static org.junit.Assert.*; import org.junit.Test; -import org.springframework.tests.sample.beans.DerivedTestBean; import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockServletContext; +import org.springframework.tests.sample.beans.DerivedTestBean; import org.springframework.web.context.ContextCleanupListener; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.GenericWebApplicationContext; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller */ diff --git a/spring-web/src/test/java/org/springframework/web/context/request/async/DeferredResultTests.java b/spring-web/src/test/java/org/springframework/web/context/request/async/DeferredResultTests.java index 6c0854b77f7..4a60a85e297 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/async/DeferredResultTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/async/DeferredResultTests.java @@ -17,6 +17,7 @@ package org.springframework.web.context.request.async; import org.junit.Test; + import org.springframework.web.context.request.async.DeferredResult.DeferredResultHandler; import static org.junit.Assert.*; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequestTests.java b/spring-web/src/test/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequestTests.java index d378bd8edca..16355085175 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequestTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequestTests.java @@ -21,6 +21,7 @@ import javax.servlet.AsyncEvent; import org.junit.Before; import org.junit.Test; + import org.springframework.mock.web.test.MockAsyncContext; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTests.java b/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTests.java index f9ec9666ecd..c763eeec6f9 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTests.java @@ -17,11 +17,11 @@ package org.springframework.web.context.request.async; import java.util.concurrent.Callable; - import javax.servlet.http.HttpServletRequest; import org.junit.Before; import org.junit.Test; + import org.springframework.core.task.AsyncTaskExecutor; import org.springframework.core.task.SimpleAsyncTaskExecutor; import org.springframework.mock.web.test.MockHttpServletRequest; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTimeoutTests.java b/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTimeoutTests.java index adccdb11ebe..766942dc027 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTimeoutTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTimeoutTests.java @@ -17,12 +17,12 @@ package org.springframework.web.context.request.async; import java.util.concurrent.Callable; - import javax.servlet.AsyncEvent; import javax.servlet.DispatcherType; import org.junit.Before; import org.junit.Test; + import org.springframework.core.task.AsyncTaskExecutor; import org.springframework.mock.web.test.MockAsyncContext; import org.springframework.mock.web.test.MockHttpServletRequest; diff --git a/spring-web/src/test/java/org/springframework/web/context/support/ResourceTests.java b/spring-web/src/test/java/org/springframework/web/context/support/ResourceTests.java index 5310bd69350..abd3bf9964d 100644 --- a/spring-web/src/test/java/org/springframework/web/context/support/ResourceTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/support/ResourceTests.java @@ -1,13 +1,14 @@ package org.springframework.web.context.support; -import static org.junit.Assert.*; - import java.io.IOException; import org.junit.Test; + import org.springframework.core.io.Resource; import org.springframework.mock.web.test.MockServletContext; +import static org.junit.Assert.*; + /** * @author Chris Beams * @see org.springframework.core.io.ResourceTests diff --git a/spring-web/src/test/java/org/springframework/web/context/support/Spr8510Tests.java b/spring-web/src/test/java/org/springframework/web/context/support/Spr8510Tests.java index 55cb5b66919..a712e525499 100644 --- a/spring-web/src/test/java/org/springframework/web/context/support/Spr8510Tests.java +++ b/spring-web/src/test/java/org/springframework/web/context/support/Spr8510Tests.java @@ -16,17 +16,17 @@ package org.springframework.web.context.support; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import javax.servlet.ServletContextEvent; import org.junit.Test; + import org.springframework.context.annotation.ClassPathBeanDefinitionScanner; import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.ContextLoader; import org.springframework.web.context.ContextLoaderListener; +import static org.junit.Assert.*; + /** * Tests the interaction between a WebApplicationContext and ContextLoaderListener with * regard to config location precedence, overriding and defaulting in programmatic diff --git a/spring-web/src/test/java/org/springframework/web/context/support/StandardServletEnvironmentTests.java b/spring-web/src/test/java/org/springframework/web/context/support/StandardServletEnvironmentTests.java index 494af3f9b17..e36ebcc685d 100644 --- a/spring-web/src/test/java/org/springframework/web/context/support/StandardServletEnvironmentTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/support/StandardServletEnvironmentTests.java @@ -16,9 +16,8 @@ package org.springframework.web.context.support; -import javax.naming.NamingException; - import org.junit.Test; + import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.MutablePropertySources; import org.springframework.core.env.PropertySource; diff --git a/spring-web/src/test/java/org/springframework/web/filter/CompositeFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/CompositeFilterTests.java index 200546dd020..75a2eae17e6 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/CompositeFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/CompositeFilterTests.java @@ -17,13 +17,8 @@ package org.springframework.web.filter; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - import java.io.IOException; import java.util.Arrays; - import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; @@ -33,11 +28,14 @@ import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import org.junit.Test; + import org.springframework.mock.web.test.MockFilterConfig; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockServletContext; +import static org.junit.Assert.*; + /** * @author Dave Syer */ diff --git a/spring-web/src/test/java/org/springframework/web/filter/DelegatingFilterProxyTests.java b/spring-web/src/test/java/org/springframework/web/filter/DelegatingFilterProxyTests.java index 5af02f2cbe3..e68581d07b0 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/DelegatingFilterProxyTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/DelegatingFilterProxyTests.java @@ -18,7 +18,6 @@ package org.springframework.web.filter; import java.io.IOException; - import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; @@ -27,8 +26,8 @@ import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; -import static org.junit.Assert.*; import org.junit.Test; + import org.springframework.mock.web.test.MockFilterConfig; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; @@ -36,6 +35,8 @@ import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.StaticWebApplicationContext; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Chris Beams diff --git a/spring-web/src/test/java/org/springframework/web/filter/HiddenHttpMethodFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/HiddenHttpMethodFilterTests.java index c4e7e0f5e3f..219314664f4 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/HiddenHttpMethodFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/HiddenHttpMethodFilterTests.java @@ -17,7 +17,6 @@ package org.springframework.web.filter; import java.io.IOException; - import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; @@ -25,6 +24,7 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; diff --git a/spring-web/src/test/java/org/springframework/web/filter/HttpPutFormContentFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/HttpPutFormContentFilterTests.java index 4ef31fad5b0..179eb4cccac 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/HttpPutFormContentFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/HttpPutFormContentFilterTests.java @@ -16,12 +16,6 @@ package org.springframework.web.filter; -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; - import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -29,11 +23,14 @@ import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.http.HttpMethod; import org.springframework.mock.web.test.MockFilterChain; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; +import static org.junit.Assert.*; + /** * Test fixture for {@link HttpPutFormContentFilter}. * diff --git a/spring-web/src/test/java/org/springframework/web/filter/RequestContextFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/RequestContextFilterTests.java index d8c4128bf44..5e303c7e9f5 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/RequestContextFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/RequestContextFilterTests.java @@ -17,7 +17,6 @@ package org.springframework.web.filter; import java.io.IOException; - import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; diff --git a/spring-web/src/test/java/org/springframework/web/jsf/MockFacesContext.java b/spring-web/src/test/java/org/springframework/web/jsf/MockFacesContext.java index 87158284623..d75a02c3130 100644 --- a/spring-web/src/test/java/org/springframework/web/jsf/MockFacesContext.java +++ b/spring-web/src/test/java/org/springframework/web/jsf/MockFacesContext.java @@ -17,7 +17,6 @@ package org.springframework.web.jsf; import java.util.Iterator; - import javax.faces.application.Application; import javax.faces.application.FacesMessage; import javax.faces.application.FacesMessage.Severity; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/CookieValueMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/CookieValueMethodArgumentResolverTests.java index 968728154e8..0d7309654d7 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/CookieValueMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/CookieValueMethodArgumentResolverTests.java @@ -16,17 +16,12 @@ package org.springframework.web.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import java.lang.reflect.Method; - import javax.servlet.http.Cookie; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; @@ -34,7 +29,8 @@ import org.springframework.web.bind.ServletRequestBindingException; import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; -import org.springframework.web.method.annotation.AbstractCookieValueMethodArgumentResolver; + +import static org.junit.Assert.*; /** * Test fixture with {@link org.springframework.web.method.annotation.AbstractCookieValueMethodArgumentResolver}. diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ErrorsMethodHandlerArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ErrorsMethodHandlerArgumentResolverTests.java index be8ce28ce3e..0b42e2397ce 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ErrorsMethodHandlerArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ErrorsMethodHandlerArgumentResolverTests.java @@ -16,10 +16,9 @@ package org.springframework.web.method.annotation; -import static org.junit.Assert.assertSame; - import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.validation.BindingResult; @@ -27,9 +26,10 @@ import org.springframework.validation.Errors; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; -import org.springframework.web.method.annotation.ErrorsMethodArgumentResolver; import org.springframework.web.method.support.ModelAndViewContainer; +import static org.junit.Assert.*; + /** * Test fixture with {@link ErrorsMethodArgumentResolver}. * diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolverTests.java index ba216f20bf8..999178f6faa 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolverTests.java @@ -16,22 +16,21 @@ package org.springframework.web.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; - import java.io.FileNotFoundException; import java.io.IOException; import java.net.BindException; import java.net.SocketException; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.junit.Test; + import org.springframework.stereotype.Controller; import org.springframework.util.ClassUtils; import org.springframework.web.bind.annotation.ExceptionHandler; +import static org.junit.Assert.*; + /** * Test fixture for {@link ExceptionHandlerMethodResolver} tests. * diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolverTests.java index 73c34842733..cbc2ae7d15c 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolverTests.java @@ -16,15 +16,12 @@ package org.springframework.web.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import org.junit.After; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.annotation.Value; import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; @@ -33,7 +30,8 @@ import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.context.support.GenericWebApplicationContext; -import org.springframework.web.method.annotation.ExpressionValueMethodArgumentResolver; + +import static org.junit.Assert.*; /** * Test fixture with {@link ExpressionValueMethodArgumentResolver}. diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/InitBinderDataBinderFactoryTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/InitBinderDataBinderFactoryTests.java index 866fcae1add..55d92b0c498 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/InitBinderDataBinderFactoryTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/InitBinderDataBinderFactoryTests.java @@ -16,16 +16,12 @@ package org.springframework.web.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; - import java.lang.reflect.Method; import java.util.Arrays; import org.junit.Before; import org.junit.Test; + import org.springframework.core.LocalVariableTableParameterNameDiscoverer; import org.springframework.core.convert.ConversionService; import org.springframework.format.support.DefaultFormattingConversionService; @@ -38,8 +34,10 @@ import org.springframework.web.bind.support.DefaultDataBinderFactory; import org.springframework.web.bind.support.WebDataBinderFactory; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; -import org.springframework.web.method.support.InvocableHandlerMethod; import org.springframework.web.method.support.HandlerMethodArgumentResolverComposite; +import org.springframework.web.method.support.InvocableHandlerMethod; + +import static org.junit.Assert.*; /** * Test fixture with {@link InitBinderDataBinderFactory}. diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/MapMethodProcessorTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/MapMethodProcessorTests.java index 1b1e3028372..88d7521c6bb 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/MapMethodProcessorTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/MapMethodProcessorTests.java @@ -16,23 +16,21 @@ package org.springframework.web.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.ui.ModelMap; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; -import org.springframework.web.method.annotation.MapMethodProcessor; import org.springframework.web.method.support.ModelAndViewContainer; +import static org.junit.Assert.*; + /** * Test fixture with {@link org.springframework.web.method.annotation.MapMethodProcessor}. * diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java index 8345f0ae235..31f64b9d5cc 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java @@ -22,6 +22,7 @@ import java.lang.reflect.Method; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.tests.sample.beans.TestBean; @@ -42,7 +43,6 @@ import static java.lang.annotation.ElementType.*; import static java.lang.annotation.RetentionPolicy.*; import static org.junit.Assert.*; import static org.mockito.BDDMockito.*; -import static org.mockito.Mockito.*; /** * Test fixture with {@link ModelAttributeMethodProcessor}. diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryOrderingTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryOrderingTests.java index 6f4ca4664d3..a177b7e8649 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryOrderingTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryOrderingTests.java @@ -16,10 +16,18 @@ package org.springframework.web.method.annotation; +import java.io.IOException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Set; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.junit.Before; import org.junit.Test; + import org.springframework.core.annotation.AnnotationUtils; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; @@ -39,14 +47,7 @@ import org.springframework.web.method.support.HandlerMethodArgumentResolverCompo import org.springframework.web.method.support.InvocableHandlerMethod; import org.springframework.web.method.support.ModelAndViewContainer; -import java.io.IOException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Set; - -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; /** * Unit tests verifying {@code @ModelAttribute} method inter-dependencies. diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryTests.java index bfa4e49d1e2..5555feaec51 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryTests.java @@ -21,6 +21,7 @@ import java.util.Arrays; import org.junit.Before; import org.junit.Test; + import org.springframework.core.LocalVariableTableParameterNameDiscoverer; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.ui.Model; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelMethodProcessorTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelMethodProcessorTests.java index b55df929512..ff58638f538 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelMethodProcessorTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelMethodProcessorTests.java @@ -16,23 +16,21 @@ package org.springframework.web.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.ui.ExtendedModelMap; import org.springframework.ui.Model; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; -import org.springframework.web.method.annotation.ModelMethodProcessor; import org.springframework.web.method.support.ModelAndViewContainer; +import static org.junit.Assert.*; + /** * Test fixture with {@link org.springframework.web.method.annotation.ModelMethodProcessor}. * diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java index 15b5d0a5e2d..e86446ddeef 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java @@ -16,16 +16,13 @@ package org.springframework.web.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import java.util.Collections; import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.http.HttpHeaders; import org.springframework.mock.web.test.MockHttpServletRequest; @@ -35,7 +32,8 @@ import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; -import org.springframework.web.method.annotation.RequestHeaderMapMethodArgumentResolver; + +import static org.junit.Assert.*; /** * Text fixture with {@link RequestHeaderMapMethodArgumentResolver}. diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java index dfd4fe72525..0806e60e452 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java @@ -22,6 +22,7 @@ import java.util.Map; import org.junit.After; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java index ee709f04ba2..1aa9d371f84 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java @@ -16,16 +16,13 @@ package org.springframework.web.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import java.util.Collections; import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; @@ -34,7 +31,8 @@ import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; -import org.springframework.web.method.annotation.RequestParamMapMethodArgumentResolver; + +import static org.junit.Assert.*; /** * Test fixture with {@link RequestParamMapMethodArgumentResolver}. diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java index 3b2af22ef8e..23e6fbccb9d 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java @@ -21,11 +21,11 @@ import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Optional; - import javax.servlet.http.Part; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.propertyeditors.StringTrimmerEditor; import org.springframework.core.LocalVariableTableParameterNameDiscoverer; import org.springframework.core.MethodParameter; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java index 1da19343914..85f2a7527bc 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java @@ -16,19 +16,13 @@ package org.springframework.web.method.annotation; -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - import java.util.HashSet; import org.junit.Before; import org.junit.Test; -import org.springframework.tests.sample.beans.TestBean; + import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.SessionAttributes; import org.springframework.web.bind.support.DefaultSessionAttributeStore; @@ -36,6 +30,9 @@ import org.springframework.web.bind.support.SessionAttributeStore; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; +import static java.util.Arrays.*; +import static org.junit.Assert.*; + /** * Test fixture with {@link SessionAttributesHandler}. * diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/WebArgumentResolverAdapterTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/WebArgumentResolverAdapterTests.java index 4738e030e81..28ef68d49df 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/WebArgumentResolverAdapterTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/WebArgumentResolverAdapterTests.java @@ -19,6 +19,7 @@ package org.springframework.web.method.annotation; import org.junit.After; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.bind.support.WebArgumentResolver; diff --git a/spring-web/src/test/java/org/springframework/web/method/support/CompositeUriComponentsContributorTests.java b/spring-web/src/test/java/org/springframework/web/method/support/CompositeUriComponentsContributorTests.java index 5a9fe5afc14..55aa9d9f125 100644 --- a/spring-web/src/test/java/org/springframework/web/method/support/CompositeUriComponentsContributorTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/support/CompositeUriComponentsContributorTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,7 +16,12 @@ package org.springframework.web.method.support; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; + import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.util.ClassUtils; import org.springframework.web.bind.annotation.RequestHeader; @@ -24,12 +29,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.method.annotation.RequestHeaderMethodArgumentResolver; import org.springframework.web.method.annotation.RequestParamMethodArgumentResolver; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.List; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; /** * Unit tests for diff --git a/spring-web/src/test/java/org/springframework/web/method/support/HandlerMethodArgumentResolverCompositeTests.java b/spring-web/src/test/java/org/springframework/web/method/support/HandlerMethodArgumentResolverCompositeTests.java index f93d915ecab..470aaf27007 100644 --- a/spring-web/src/test/java/org/springframework/web/method/support/HandlerMethodArgumentResolverCompositeTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/support/HandlerMethodArgumentResolverCompositeTests.java @@ -16,16 +16,15 @@ package org.springframework.web.method.support; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; +import static org.junit.Assert.*; + /** * Test fixture with {@link HandlerMethodArgumentResolverComposite}. * diff --git a/spring-web/src/test/java/org/springframework/web/method/support/HandlerMethodReturnValueHandlerCompositeTests.java b/spring-web/src/test/java/org/springframework/web/method/support/HandlerMethodReturnValueHandlerCompositeTests.java index 2fcd856e62d..5fe5eaef0c8 100644 --- a/spring-web/src/test/java/org/springframework/web/method/support/HandlerMethodReturnValueHandlerCompositeTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/support/HandlerMethodReturnValueHandlerCompositeTests.java @@ -16,15 +16,13 @@ package org.springframework.web.method.support; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; +import static org.junit.Assert.*; + /** * Test fixture with {@link HandlerMethodReturnValueHandlerComposite}. * diff --git a/spring-web/src/test/java/org/springframework/web/method/support/InvocableHandlerMethodTests.java b/spring-web/src/test/java/org/springframework/web/method/support/InvocableHandlerMethodTests.java index e93dce9c424..4bd60cd5087 100644 --- a/spring-web/src/test/java/org/springframework/web/method/support/InvocableHandlerMethodTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/support/InvocableHandlerMethodTests.java @@ -16,16 +16,11 @@ package org.springframework.web.method.support; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import java.lang.reflect.Method; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.http.converter.HttpMessageNotReadableException; import org.springframework.mock.web.test.MockHttpServletRequest; @@ -34,6 +29,8 @@ import org.springframework.web.bind.support.WebDataBinderFactory; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; +import static org.junit.Assert.*; + /** * Test fixture for {@link InvocableHandlerMethod} unit tests. * diff --git a/spring-web/src/test/java/org/springframework/web/method/support/ModelAndViewContainerTests.java b/spring-web/src/test/java/org/springframework/web/method/support/ModelAndViewContainerTests.java index 3e09c5e523f..556fe1c2275 100644 --- a/spring-web/src/test/java/org/springframework/web/method/support/ModelAndViewContainerTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/support/ModelAndViewContainerTests.java @@ -16,12 +16,13 @@ package org.springframework.web.method.support; -import static org.junit.Assert.assertEquals; - import org.junit.Before; import org.junit.Test; + import org.springframework.ui.ModelMap; +import static org.junit.Assert.*; + /** * Test fixture for {@link ModelAndViewContainer}. * diff --git a/spring-web/src/test/java/org/springframework/web/multipart/commons/CommonsMultipartResolverTests.java b/spring-web/src/test/java/org/springframework/web/multipart/commons/CommonsMultipartResolverTests.java index b158e479f73..8a9a12e0a42 100644 --- a/spring-web/src/test/java/org/springframework/web/multipart/commons/CommonsMultipartResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/multipart/commons/CommonsMultipartResolverTests.java @@ -16,10 +16,6 @@ package org.springframework.web.multipart.commons; -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; @@ -34,7 +30,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; - import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; @@ -48,6 +43,7 @@ import org.apache.commons.fileupload.FileItemHeaders; import org.apache.commons.fileupload.FileUpload; import org.apache.commons.fileupload.servlet.ServletFileUpload; import org.junit.Test; + import org.springframework.beans.MutablePropertyValues; import org.springframework.mock.web.test.MockFilterConfig; import org.springframework.mock.web.test.MockHttpServletRequest; @@ -65,6 +61,8 @@ import org.springframework.web.multipart.support.MultipartFilter; import org.springframework.web.multipart.support.StringMultipartFileEditor; import org.springframework.web.util.WebUtils; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Arjen Poutsma diff --git a/spring-web/src/test/java/org/springframework/web/util/JavaScriptUtilsTests.java b/spring-web/src/test/java/org/springframework/web/util/JavaScriptUtilsTests.java index 182f18eb2db..8bd5b6fa2aa 100644 --- a/spring-web/src/test/java/org/springframework/web/util/JavaScriptUtilsTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/JavaScriptUtilsTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,12 +16,12 @@ package org.springframework.web.util; -import static org.junit.Assert.*; - import java.io.UnsupportedEncodingException; import org.junit.Test; +import static org.junit.Assert.*; + /** * Test fixture for {@link JavaScriptUtils}. * diff --git a/spring-web/src/test/java/org/springframework/web/util/Log4jWebConfigurerTests.java b/spring-web/src/test/java/org/springframework/web/util/Log4jWebConfigurerTests.java index baa11b9e441..78b587ef668 100644 --- a/spring-web/src/test/java/org/springframework/web/util/Log4jWebConfigurerTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/Log4jWebConfigurerTests.java @@ -16,19 +16,19 @@ package org.springframework.web.util; -import static org.junit.Assert.assertTrue; - import java.net.URL; - import javax.servlet.ServletContextEvent; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.junit.Ignore; import org.junit.Test; + import org.springframework.core.io.FileSystemResourceLoader; import org.springframework.mock.web.test.MockServletContext; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Sam Brannen diff --git a/spring-web/src/test/java/org/springframework/web/util/TagUtilsTests.java b/spring-web/src/test/java/org/springframework/web/util/TagUtilsTests.java index a4b56826acc..a41467612ae 100644 --- a/spring-web/src/test/java/org/springframework/web/util/TagUtilsTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/TagUtilsTests.java @@ -20,9 +20,10 @@ import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.Tag; import javax.servlet.jsp.tagext.TagSupport; -import static org.junit.Assert.*; import org.junit.Test; +import static org.junit.Assert.*; + /** * Unit tests for the {@link TagUtils} class. * diff --git a/spring-web/src/test/java/org/springframework/web/util/UriComponentsTests.java b/spring-web/src/test/java/org/springframework/web/util/UriComponentsTests.java index 32300ff8609..54406188a9f 100644 --- a/spring-web/src/test/java/org/springframework/web/util/UriComponentsTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/UriComponentsTests.java @@ -16,8 +16,6 @@ package org.springframework.web.util; -import org.junit.Test; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; @@ -25,12 +23,11 @@ import java.io.ObjectOutputStream; import java.net.URI; import java.net.URISyntaxException; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.instanceOf; -import static org.hamcrest.Matchers.not; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertThat; -import static org.springframework.web.util.UriComponentsBuilder.fromUriString; +import org.junit.Test; + +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; +import static org.springframework.web.util.UriComponentsBuilder.*; /** * @author Arjen Poutsma diff --git a/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java b/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java index c4b21053d9e..7ef440766ad 100644 --- a/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java @@ -21,6 +21,7 @@ import java.io.UnsupportedEncodingException; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import static org.junit.Assert.*; diff --git a/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java b/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java index 437e1db6042..de6ff52dc34 100644 --- a/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java @@ -20,11 +20,12 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; import org.junit.Test; + import org.springframework.util.MultiValueMap; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Arjen Poutsma diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java index 3fb7d7d29dc..bcbf08fc96c 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java @@ -19,7 +19,6 @@ package org.springframework.web.portlet; import java.util.Enumeration; import java.util.HashSet; import java.util.Set; - import javax.portlet.GenericPortlet; import javax.portlet.PortletConfig; import javax.portlet.PortletContext; @@ -27,6 +26,7 @@ import javax.portlet.PortletException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeansException; import org.springframework.beans.MutablePropertyValues; diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerInterceptor.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerInterceptor.java index d741971ca52..d0c0a311f0c 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerInterceptor.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerInterceptor.java @@ -18,12 +18,12 @@ package org.springframework.web.portlet; import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; +import javax.portlet.EventRequest; +import javax.portlet.EventResponse; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; -import javax.portlet.EventResponse; -import javax.portlet.EventRequest; -import javax.portlet.ResourceResponse; import javax.portlet.ResourceRequest; +import javax.portlet.ResourceResponse; /** * Workflow interface that allows for customized handler execution chains. diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/annotation/package-info.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/annotation/package-info.java index 878109c8c64..204d5b8674c 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/annotation/package-info.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/annotation/package-info.java @@ -1,8 +1,4 @@ - /** - * * Annotations for binding portlet requests to handler methods. - * */ package org.springframework.web.portlet.bind.annotation; - diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/package-info.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/package-info.java index 4ae9c716fd0..5527434085a 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/package-info.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/bind/package-info.java @@ -1,8 +1,4 @@ - /** - * - * Provides portlet-specific data binding functionality. - * + * Provides Portlet-specific data binding functionality. */ package org.springframework.web.portlet.bind; - diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationObjectSupport.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationObjectSupport.java index d780573c159..94f5835aca0 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationObjectSupport.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationObjectSupport.java @@ -17,7 +17,6 @@ package org.springframework.web.portlet.context; import java.io.File; - import javax.portlet.PortletContext; import org.springframework.context.support.ApplicationObjectSupport; diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResourcePatternResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResourcePatternResolver.java index 93f2b97f331..2fb36297c56 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResourcePatternResolver.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextResourcePatternResolver.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.util.HashSet; import java.util.Iterator; import java.util.Set; - import javax.portlet.PortletContext; import org.springframework.core.io.Resource; diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/package-info.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/package-info.java index d8bb4f1560c..ae77aa4ebdf 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/package-info.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support for Spring's application context concept in a portlet environment, * including ApplicationContext implementations and various utility classes. - * */ package org.springframework.web.portlet.context; - diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerExceptionResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerExceptionResolver.java index 2b7ac5ef961..74c996ffe42 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerExceptionResolver.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/AbstractHandlerExceptionResolver.java @@ -17,20 +17,20 @@ package org.springframework.web.portlet.handler; import java.util.Set; +import javax.portlet.MimeResponse; import javax.portlet.PortletRequest; -import javax.portlet.WindowState; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; import javax.portlet.ResourceRequest; import javax.portlet.ResourceResponse; -import javax.portlet.MimeResponse; +import javax.portlet.WindowState; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.springframework.core.Ordered; import org.springframework.web.portlet.HandlerExceptionResolver; import org.springframework.web.portlet.ModelAndView; -import org.springframework.core.Ordered; /** * Abstract base class for {@link HandlerExceptionResolver} implementations. diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/package-info.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/package-info.java index a31265184b7..08e03ce4fb5 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/package-info.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/package-info.java @@ -1,9 +1,5 @@ - /** - * * Provides standard HandlerMapping implementations, * including abstract base classes for custom implementations. - * */ package org.springframework.web.portlet.handler; - diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/package-info.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/package-info.java index f6c837f3916..dcaf6514a59 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/package-info.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/package-info.java @@ -1,11 +1,7 @@ - /** - * * Multipart resolution framework for handling file uploads. * Provides a PortletMultipartResolver strategy interface, * and a generic extension of the ActionRequest interface * for accessing multipart files in web application code. - * */ package org.springframework.web.portlet.multipart; - diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/DefaultAnnotationHandlerMapping.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/DefaultAnnotationHandlerMapping.java index 410b708ba20..f740c9da8c2 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/DefaultAnnotationHandlerMapping.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/DefaultAnnotationHandlerMapping.java @@ -21,7 +21,6 @@ import java.util.Arrays; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Set; - import javax.portlet.ActionRequest; import javax.portlet.ClientDataRequest; import javax.portlet.Event; diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/package-info.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/package-info.java index 37cfaadb259..eeea1da3063 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/package-info.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/annotation/package-info.java @@ -1,8 +1,4 @@ - /** - * * Support package for annotation-based Portlet MVC controllers. - * */ package org.springframework.web.portlet.mvc.annotation; - diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/package-info.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/package-info.java index 17938bf83c2..ca742a5aba7 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/package-info.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/package-info.java @@ -1,32 +1,5 @@ /** - * - *

- * Standard controller implementations for the portlet MVC framework that - * comes with Spring. Provides both abstract base classes and concrete - * implementations for often seen use cases. - *

- * - *

- * A {@code Controller} - as defined in this package - is analogous to a Struts - * {@code Action}. Usually {@code Controllers} are JavaBeans - * to allow easy configuration. Controllers define the {@code C} from so-called - * MVC paradigm and can be used in conjunction with the {@link - * org.springframework.web.portlet.ModelAndView ModelAndView} to achieve interactive - * applications. The view might be represented by a HTML interface, but, because of - * model and the controller being completely independent of the view, PDF views are - * possible, as well as for instance Excel views. - *

- * - *

- * Especially useful to read, while getting into the Spring MVC framework - * are the following: - *

- *

- * + * Standard controller implementations for the Portlet MVC framework that comes with + * Spring. Provides various controller styles, including an annotation-based model. */ package org.springframework.web.portlet.mvc; - diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/package-info.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/package-info.java index e5c367e6e21..b825239ac0a 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/package-info.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/package-info.java @@ -1,10 +1,6 @@ - /** - * - * Provides JSR-168 portlets that integrate with the application context + * Provides JSR-286 portlets that integrate with the application context * infrastructure, and the core interfaces and classes for the Portlet * variant of Spring's web MVC framework. - * */ package org.springframework.web.portlet; - diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/PortletUtils.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/PortletUtils.java index b453c5f24a0..a63754b45e2 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/PortletUtils.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/PortletUtils.java @@ -23,7 +23,6 @@ import java.util.Enumeration; import java.util.HashMap; import java.util.Map; import java.util.TreeMap; - import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.PortletContext; diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/package-info.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/package-info.java index 670a4872cf8..c91ad0532fa 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/package-info.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/package-info.java @@ -1,8 +1,4 @@ - /** - * - * Miscellaneous portlet utility classes. - * + * Miscellaneous Portlet utility classes. */ package org.springframework.web.portlet.util; - diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/context/ACATester.java b/spring-webmvc-portlet/src/test/java/org/springframework/context/ACATester.java index 7fa8a8263d8..c6a63ddb623 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/context/ACATester.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/context/ACATester.java @@ -18,11 +18,6 @@ package org.springframework.context; import java.util.Locale; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.context.ApplicationContextException; -import org.springframework.context.NoSuchMessageException; - public class ACATester implements ApplicationContextAware { private ApplicationContext ac; diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/context/BeanThatBroadcasts.java b/spring-webmvc-portlet/src/test/java/org/springframework/context/BeanThatBroadcasts.java index f3163636829..f4454c64daa 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/context/BeanThatBroadcasts.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/context/BeanThatBroadcasts.java @@ -16,9 +16,6 @@ package org.springframework.context; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; - /** * @author Juergen Hoeller */ diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/context/TestListener.java b/spring-webmvc-portlet/src/test/java/org/springframework/context/TestListener.java index 7762131ab41..0cc19790224 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/context/TestListener.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/context/TestListener.java @@ -16,9 +16,6 @@ package org.springframework.context; -import org.springframework.context.ApplicationEvent; -import org.springframework.context.ApplicationListener; - /** * Listener that maintains a global count of events. * diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletSession.java b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletSession.java index da8aa73cac6..0f3593ff30a 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletSession.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletSession.java @@ -21,7 +21,6 @@ import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.Map; - import javax.portlet.PortletContext; import javax.portlet.PortletSession; import javax.servlet.http.HttpSessionBindingEvent; diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/ComplexPortletApplicationContext.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/ComplexPortletApplicationContext.java index 564a2d5722d..e6bf78f3c8d 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/ComplexPortletApplicationContext.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/ComplexPortletApplicationContext.java @@ -23,7 +23,6 @@ import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; - import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.EventRequest; diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestDataBinderTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestDataBinderTests.java index 7bb97cda6c0..032faf3a737 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestDataBinderTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestDataBinderTests.java @@ -25,11 +25,11 @@ import java.util.Set; import junit.framework.TestCase; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.beans.propertyeditors.StringArrayPropertyEditor; import org.springframework.mock.web.portlet.MockPortletRequest; +import org.springframework.tests.sample.beans.ITestBean; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.validation.BindingResult; /** diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestParameterPropertyValuesTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestParameterPropertyValuesTests.java index a40f0d47c0e..94dfaf3f3b2 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestParameterPropertyValuesTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestParameterPropertyValuesTests.java @@ -16,10 +16,10 @@ package org.springframework.web.portlet.bind; -import org.springframework.mock.web.portlet.MockPortletRequest; - import junit.framework.TestCase; +import org.springframework.mock.web.portlet.MockPortletRequest; + /** * @author Mark Fisher */ diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestUtilsTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestUtilsTests.java index 9c3e7b045de..228eadd8997 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestUtilsTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestUtilsTests.java @@ -17,9 +17,10 @@ package org.springframework.web.portlet.bind; import org.junit.Test; + +import org.springframework.mock.web.portlet.MockPortletRequest; import org.springframework.tests.Assume; import org.springframework.tests.TestGroup; -import org.springframework.mock.web.portlet.MockPortletRequest; import org.springframework.util.StopWatch; import static org.hamcrest.Matchers.*; diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/AbstractXmlWebApplicationContextTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/AbstractXmlWebApplicationContextTests.java index 21d6e905323..79f3fb7801e 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/AbstractXmlWebApplicationContextTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/AbstractXmlWebApplicationContextTests.java @@ -18,12 +18,12 @@ package org.springframework.web.portlet.context; import javax.servlet.ServletException; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.context.AbstractApplicationContextTests; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.TestListener; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.context.ConfigurableWebApplicationContext; /** diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletApplicationContextScopeTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletApplicationContextScopeTests.java index 288b901f372..999ba33f806 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletApplicationContextScopeTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletApplicationContextScopeTests.java @@ -16,15 +16,12 @@ package org.springframework.web.portlet.context; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - import javax.portlet.PortletContext; import javax.portlet.PortletSession; import javax.servlet.ServletContextEvent; import org.junit.Test; + import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.mock.web.portlet.MockRenderRequest; import org.springframework.mock.web.portlet.ServletWrappingPortletContext; @@ -35,6 +32,8 @@ import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.support.GenericWebApplicationContext; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller */ diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletRequestAttributesTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletRequestAttributesTests.java index ee739b9831e..4875a2d6955 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletRequestAttributesTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletRequestAttributesTests.java @@ -17,10 +17,10 @@ package org.springframework.web.portlet.context; import java.io.Serializable; - import javax.portlet.PortletRequest; import org.junit.Test; + import org.springframework.mock.web.portlet.MockPortletRequest; import org.springframework.mock.web.portlet.MockPortletSession; import org.springframework.web.context.request.RequestAttributes; diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletWebRequestTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletWebRequestTests.java index da32fcfdc7a..a0cb9280b2a 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletWebRequestTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletWebRequestTests.java @@ -18,15 +18,13 @@ package org.springframework.web.portlet.context; import java.util.Locale; import java.util.Map; - import javax.portlet.PortletRequest; +import javax.portlet.PortletResponse; import javax.portlet.RenderRequest; import javax.portlet.RenderResponse; -import javax.portlet.PortletResponse; import javax.portlet.filter.PortletRequestWrapper; import javax.portlet.filter.PortletResponseWrapper; -import static org.junit.Assert.*; import org.junit.Test; import org.springframework.mock.web.portlet.MockPortletRequest; @@ -34,6 +32,8 @@ import org.springframework.mock.web.portlet.MockRenderRequest; import org.springframework.mock.web.portlet.MockRenderResponse; import org.springframework.web.multipart.MultipartRequest; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @since 26.07.2006 diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/XmlPortletApplicationContextTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/XmlPortletApplicationContextTests.java index 2df278bba00..85f90606f42 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/XmlPortletApplicationContextTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/XmlPortletApplicationContextTests.java @@ -17,12 +17,10 @@ package org.springframework.web.portlet.context; import java.util.Locale; - import javax.portlet.PortletConfig; import javax.portlet.PortletContext; import org.springframework.beans.BeansException; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; @@ -30,6 +28,7 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.NoSuchMessageException; import org.springframework.mock.web.portlet.MockPortletConfig; import org.springframework.mock.web.portlet.MockPortletContext; +import org.springframework.tests.sample.beans.TestBean; /** * @author Rod Johnson diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/PortletWrappingControllerTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/PortletWrappingControllerTests.java index 2058bbb224a..0aebb6e72bb 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/PortletWrappingControllerTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/PortletWrappingControllerTests.java @@ -16,10 +16,7 @@ package org.springframework.web.portlet.mvc; -import static org.junit.Assert.assertEquals; - import java.io.IOException; - import javax.portlet.ActionRequest; import javax.portlet.ActionResponse; import javax.portlet.Portlet; @@ -30,6 +27,7 @@ import javax.portlet.RenderResponse; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.BeansException; import org.springframework.beans.MutablePropertyValues; import org.springframework.mock.web.portlet.MockActionRequest; @@ -41,6 +39,8 @@ import org.springframework.mock.web.portlet.MockRenderResponse; import org.springframework.web.portlet.context.ConfigurablePortletApplicationContext; import org.springframework.web.portlet.context.StaticPortletApplicationContext; +import static org.junit.Assert.*; + /** * Unit tests for the {@link PortletWrappingController} class. * diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerExceptionResolverTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerExceptionResolverTests.java index eb41b5be3f9..92f2d470366 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerExceptionResolverTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/annotation/AnnotationMethodHandlerExceptionResolverTests.java @@ -16,20 +16,16 @@ package org.springframework.web.portlet.mvc.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - import java.io.FileNotFoundException; import java.io.IOException; import java.net.BindException; import java.net.SocketException; - import javax.portlet.PortletRequest; import javax.portlet.PortletResponse; import org.junit.Before; import org.junit.Test; + import org.springframework.mock.web.portlet.MockRenderRequest; import org.springframework.mock.web.portlet.MockRenderResponse; import org.springframework.stereotype.Controller; @@ -37,6 +33,8 @@ import org.springframework.util.ClassUtils; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.portlet.ModelAndView; +import static org.junit.Assert.*; + /** * @author Arjen Poutsma * @author Juergen Hoeller diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/annotation/PortletAnnotationControllerTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/annotation/PortletAnnotationControllerTests.java index 4ab35eae05d..0231edb196c 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/annotation/PortletAnnotationControllerTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/annotation/PortletAnnotationControllerTests.java @@ -38,9 +38,6 @@ import javax.servlet.http.HttpServletResponse; import junit.framework.TestCase; import org.springframework.beans.BeansException; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.propertyeditors.CustomDateEditor; @@ -54,6 +51,9 @@ import org.springframework.mock.web.portlet.MockPortletContext; import org.springframework.mock.web.portlet.MockRenderRequest; import org.springframework.mock.web.portlet.MockRenderResponse; import org.springframework.stereotype.Controller; +import org.springframework.tests.sample.beans.DerivedTestBean; +import org.springframework.tests.sample.beans.ITestBean; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.ui.ExtendedModelMap; import org.springframework.ui.Model; import org.springframework.ui.ModelMap; diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/util/PortletUtilsTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/util/PortletUtilsTests.java index ba0d45e9719..52c806652a3 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/util/PortletUtilsTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/util/PortletUtilsTests.java @@ -21,12 +21,12 @@ import java.io.FileNotFoundException; import java.util.Collections; import java.util.HashMap; import java.util.Map; - import javax.portlet.PortletContext; import javax.portlet.PortletRequest; import javax.portlet.PortletSession; import org.junit.Test; + import org.springframework.mock.web.portlet.MockActionRequest; import org.springframework.mock.web.portlet.MockActionResponse; import org.springframework.mock.web.portlet.MockPortletContext; diff --git a/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/AbstractSpringPreparerFactory.java b/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/AbstractSpringPreparerFactory.java index 06b3fdabaf6..87388904037 100644 --- a/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/AbstractSpringPreparerFactory.java +++ b/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/AbstractSpringPreparerFactory.java @@ -20,6 +20,7 @@ import org.apache.tiles.TilesException; import org.apache.tiles.context.TilesRequestContext; import org.apache.tiles.preparer.PreparerFactory; import org.apache.tiles.preparer.ViewPreparer; + import org.springframework.web.context.WebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; diff --git a/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/package-info.java b/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/package-info.java index eb695f01c49..6911a970122 100644 --- a/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/package-info.java +++ b/spring-webmvc-tiles2/src/main/java/org/springframework/web/servlet/view/tiles2/package-info.java @@ -1,11 +1,7 @@ - /** - * * Support classes for the integration of * Tiles2 * (the standalone version of Tiles) as Spring web view technology. * Contains a View implementation for Tiles definitions. - * */ package org.springframework.web.servlet.view.tiles2; - diff --git a/spring-webmvc-tiles2/src/test/java/org/springframework/web/servlet/view/tiles2/TilesConfigurerTests.java b/spring-webmvc-tiles2/src/test/java/org/springframework/web/servlet/view/tiles2/TilesConfigurerTests.java index a018949908e..459b3981d6e 100644 --- a/spring-webmvc-tiles2/src/test/java/org/springframework/web/servlet/view/tiles2/TilesConfigurerTests.java +++ b/spring-webmvc-tiles2/src/test/java/org/springframework/web/servlet/view/tiles2/TilesConfigurerTests.java @@ -20,13 +20,14 @@ import org.apache.tiles.context.TilesRequestContext; import org.apache.tiles.impl.BasicTilesContainer; import org.apache.tiles.servlet.context.ServletTilesRequestContext; import org.apache.tiles.servlet.context.ServletUtil; -import static org.junit.Assert.*; import org.junit.Test; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockServletContext; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExecutionChain.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExecutionChain.java index dbbe8946baf..06495c3b6fd 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExecutionChain.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerExecutionChain.java @@ -19,12 +19,12 @@ package org.springframework.web.servlet; import java.util.ArrayList; import java.util.Arrays; import java.util.List; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.util.CollectionUtils; /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java index cdc81cd7b3f..5460207d1b3 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java @@ -19,7 +19,6 @@ package org.springframework.web.servlet; import java.util.Enumeration; import java.util.HashSet; import java.util.Set; - import javax.servlet.ServletConfig; import javax.servlet.ServletContext; import javax.servlet.ServletException; @@ -27,6 +26,7 @@ import javax.servlet.http.HttpServlet; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeansException; import org.springframework.beans.MutablePropertyValues; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/LocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/LocaleResolver.java index 49115b55dc5..80998d0f6e7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/LocaleResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/LocaleResolver.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet; import java.util.Locale; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java index e927935005d..9905909acca 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet; import java.io.IOException; - import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/View.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/View.java index 16ea139bec2..f63658d0bf1 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/View.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/View.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet; import java.util.Map; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewRendererServlet.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewRendererServlet.java index dbc4ad5f3d0..e7574d239eb 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewRendererServlet.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewRendererServlet.java @@ -18,7 +18,6 @@ package org.springframework.web.servlet; import java.io.IOException; import java.util.Map; - import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/FreeMarkerConfigurerBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/FreeMarkerConfigurerBeanDefinitionParser.java index dac5acccba9..7ceec049bdd 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/FreeMarkerConfigurerBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/FreeMarkerConfigurerBeanDefinitionParser.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,15 +16,16 @@ package org.springframework.web.servlet.config; +import java.util.ArrayList; +import java.util.List; + +import org.w3c.dom.Element; + import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.util.xml.DomUtils; -import org.w3c.dom.Element; - -import java.util.ArrayList; -import java.util.List; /** * Parse the MVC namespace element and register diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/GroovyMarkupConfigurerBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/GroovyMarkupConfigurerBeanDefinitionParser.java index b59073312b9..2442f6cc047 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/GroovyMarkupConfigurerBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/GroovyMarkupConfigurerBeanDefinitionParser.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/InterceptorsBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/InterceptorsBeanDefinitionParser.java index 050688f0672..e6dee9825bd 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/InterceptorsBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/InterceptorsBeanDefinitionParser.java @@ -18,10 +18,10 @@ package org.springframework.web.servlet.config; import java.util.List; -import org.springframework.beans.factory.config.RuntimeBeanReference; import org.w3c.dom.Element; import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.parsing.BeanComponentDefinition; import org.springframework.beans.factory.parsing.CompositeComponentDefinition; import org.springframework.beans.factory.support.ManagedList; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ResourcesBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ResourcesBeanDefinitionParser.java index 5c4c8f8ca8a..26322bf7bc9 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ResourcesBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ResourcesBeanDefinitionParser.java @@ -19,9 +19,6 @@ package org.springframework.web.servlet.config; import java.util.Arrays; import java.util.Map; -import org.springframework.web.servlet.handler.MappedInterceptor; -import org.springframework.web.servlet.resource.ResourceUrlProvider; -import org.springframework.web.servlet.resource.ResourceUrlProviderExposingInterceptor; import org.w3c.dom.Element; import org.springframework.beans.factory.config.BeanDefinition; @@ -37,6 +34,7 @@ import org.springframework.cache.concurrent.ConcurrentMapCache; import org.springframework.core.Ordered; import org.springframework.util.StringUtils; import org.springframework.util.xml.DomUtils; +import org.springframework.web.servlet.handler.MappedInterceptor; import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; import org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter; import org.springframework.web.servlet.resource.CachingResourceResolver; @@ -48,6 +46,8 @@ import org.springframework.web.servlet.resource.PathResourceResolver; import org.springframework.web.servlet.resource.ResourceHttpRequestHandler; import org.springframework.web.servlet.resource.ResourceResolver; import org.springframework.web.servlet.resource.ResourceTransformer; +import org.springframework.web.servlet.resource.ResourceUrlProvider; +import org.springframework.web.servlet.resource.ResourceUrlProviderExposingInterceptor; import org.springframework.web.servlet.resource.VersionResourceResolver; /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/TilesConfigurerBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/TilesConfigurerBeanDefinitionParser.java index 5f0ac142dbe..4baf6f69641 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/TilesConfigurerBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/TilesConfigurerBeanDefinitionParser.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,15 +16,16 @@ package org.springframework.web.servlet.config; +import java.util.ArrayList; +import java.util.List; + +import org.w3c.dom.Element; + import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.util.xml.DomUtils; -import org.w3c.dom.Element; - -import java.util.ArrayList; -import java.util.List; /** * Parse the MVC namespace element and register diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/VelocityConfigurerBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/VelocityConfigurerBeanDefinitionParser.java index fe0c100ac11..83f708e8c8c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/VelocityConfigurerBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/VelocityConfigurerBeanDefinitionParser.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,11 +16,12 @@ package org.springframework.web.servlet.config; +import org.w3c.dom.Element; + import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.xml.AbstractSimpleBeanDefinitionParser; import org.springframework.beans.factory.xml.ParserContext; -import org.w3c.dom.Element; /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java index a145684a44a..51e63db8e32 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java @@ -18,6 +18,8 @@ package org.springframework.web.servlet.config; import java.util.Map; +import org.w3c.dom.Element; + import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.ConstructorArgumentValues; import org.springframework.beans.factory.parsing.BeanComponentDefinition; @@ -29,7 +31,6 @@ import org.springframework.http.HttpStatus; import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; import org.springframework.web.servlet.mvc.ParameterizableViewController; import org.springframework.web.servlet.view.RedirectView; -import org.w3c.dom.Element; /** * {@link org.springframework.beans.factory.xml.BeanDefinitionParser} that diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewResolversBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewResolversBeanDefinitionParser.java index 2a7fbfe1484..37ce259f926 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewResolversBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewResolversBeanDefinitionParser.java @@ -18,6 +18,8 @@ package org.springframework.web.servlet.config; import java.util.List; +import org.w3c.dom.Element; + import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.RuntimeBeanReference; @@ -32,13 +34,11 @@ import org.springframework.util.xml.DomUtils; import org.springframework.web.servlet.view.BeanNameViewResolver; import org.springframework.web.servlet.view.ContentNegotiatingViewResolver; import org.springframework.web.servlet.view.InternalResourceViewResolver; - import org.springframework.web.servlet.view.ViewResolverComposite; import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver; import org.springframework.web.servlet.view.groovy.GroovyMarkupViewResolver; import org.springframework.web.servlet.view.tiles3.TilesViewResolver; import org.springframework.web.servlet.view.velocity.VelocityViewResolver; -import org.w3c.dom.Element; /** * Parse the {@code view-resolvers} MVC namespace element and register diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/AsyncSupportConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/AsyncSupportConfigurer.java index 53e4893f99e..8a164b574c4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/AsyncSupportConfigurer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/AsyncSupportConfigurer.java @@ -23,10 +23,10 @@ import java.util.concurrent.Callable; import org.springframework.core.task.AsyncTaskExecutor; import org.springframework.core.task.SimpleAsyncTaskExecutor; import org.springframework.util.Assert; -import org.springframework.web.context.request.async.WebAsyncTask; import org.springframework.web.context.request.async.CallableProcessingInterceptor; import org.springframework.web.context.request.async.DeferredResult; import org.springframework.web.context.request.async.DeferredResultProcessingInterceptor; +import org.springframework.web.context.request.async.WebAsyncTask; /** * Helps with configuring options for asynchronous request processing. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/BeanTypeNotPresentCondition.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/BeanTypeNotPresentCondition.java index 6aa81a15993..90a90226ee5 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/BeanTypeNotPresentCondition.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/BeanTypeNotPresentCondition.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,6 +18,7 @@ package org.springframework.web.servlet.config.annotation; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.factory.BeanFactoryUtils; import org.springframework.beans.factory.ListableBeanFactory; import org.springframework.context.annotation.ConditionContext; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ContentNegotiationConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ContentNegotiationConfigurer.java index 880681ea6e3..f093dde696a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ContentNegotiationConfigurer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ContentNegotiationConfigurer.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.config.annotation; import java.util.HashMap; import java.util.Map; - import javax.servlet.ServletContext; import org.springframework.http.MediaType; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/DefaultServletHandlerConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/DefaultServletHandlerConfigurer.java index 7e85dcf956e..76db94f9700 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/DefaultServletHandlerConfigurer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/DefaultServletHandlerConfigurer.java @@ -18,7 +18,6 @@ package org.springframework.web.servlet.config.annotation; import java.util.HashMap; import java.util.Map; - import javax.servlet.ServletContext; import org.springframework.util.Assert; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/EnableWebMvc.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/EnableWebMvc.java index c3b39b7b5e4..f01d36a7510 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/EnableWebMvc.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/EnableWebMvc.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/InterceptorRegistration.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/InterceptorRegistration.java index 8fb7f5383c9..025eef884d3 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/InterceptorRegistration.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/InterceptorRegistration.java @@ -16,7 +16,9 @@ package org.springframework.web.servlet.config.annotation; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import org.springframework.util.Assert; import org.springframework.util.CollectionUtils; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceChainRegistration.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceChainRegistration.java index 4b110d353e8..7749491f94f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceChainRegistration.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceChainRegistration.java @@ -16,6 +16,9 @@ package org.springframework.web.servlet.config.annotation; +import java.util.ArrayList; +import java.util.List; + import org.springframework.cache.Cache; import org.springframework.cache.concurrent.ConcurrentMapCache; import org.springframework.util.Assert; @@ -27,9 +30,6 @@ import org.springframework.web.servlet.resource.ResourceResolver; import org.springframework.web.servlet.resource.ResourceTransformer; import org.springframework.web.servlet.resource.VersionResourceResolver; -import java.util.ArrayList; -import java.util.List; - /** * Assists with the registration of resource resolvers and transformers. * diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java index d4ab426c4e2..b99730707e5 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java @@ -16,17 +16,16 @@ package org.springframework.web.servlet.config.annotation; +import java.util.ArrayList; +import java.util.List; + import org.springframework.cache.Cache; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceLoader; import org.springframework.util.Assert; -import org.springframework.util.CollectionUtils; import org.springframework.web.servlet.resource.PathResourceResolver; import org.springframework.web.servlet.resource.ResourceHttpRequestHandler; -import java.util.ArrayList; -import java.util.List; - /** * Encapsulates information required to create a resource handlers. * diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistry.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistry.java index c3c7f65c2b6..f9145d4ae08 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistry.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistry.java @@ -21,7 +21,6 @@ import java.util.Arrays; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; - import javax.servlet.ServletContext; import org.springframework.beans.factory.BeanInitializationException; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/UrlBasedViewResolverRegistration.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/UrlBasedViewResolverRegistration.java index b63be7e8946..ee611c66324 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/UrlBasedViewResolverRegistration.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/UrlBasedViewResolverRegistration.java @@ -16,10 +16,10 @@ package org.springframework.web.servlet.config.annotation; -import org.springframework.web.servlet.view.UrlBasedViewResolver; - import java.util.Map; +import org.springframework.web.servlet.view.UrlBasedViewResolver; + /** * Assist with configuring a {@link org.springframework.web.servlet.view.UrlBasedViewResolver}. * diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewResolverRegistry.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewResolverRegistry.java index a512521966f..6af073c56d0 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewResolverRegistry.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewResolverRegistry.java @@ -16,6 +16,11 @@ package org.springframework.web.servlet.config.annotation; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + import org.springframework.beans.factory.BeanFactoryUtils; import org.springframework.beans.factory.BeanInitializationException; import org.springframework.context.ApplicationContext; @@ -37,11 +42,6 @@ import org.springframework.web.servlet.view.tiles3.TilesViewResolver; import org.springframework.web.servlet.view.velocity.VelocityConfigurer; import org.springframework.web.servlet.view.velocity.VelocityViewResolver; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - /** * Assist with the configuration of a chain of * {@link org.springframework.web.servlet.ViewResolver ViewResolver} instances. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/package-info.java index 5fe9ead6046..0ed876c41c8 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/package-info.java @@ -1,8 +1,4 @@ - /** - * * Annotation-based setup for Spring MVC. - * */ package org.springframework.web.servlet.config.annotation; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/package-info.java index 00dc5755066..5fbb39dd063 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/package-info.java @@ -1,8 +1,4 @@ - /** - * * Defines the XML configuration namespace for Spring MVC. - * */ package org.springframework.web.servlet.config; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractUrlHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractUrlHandlerMapping.java index df23203fe71..1817dae3260 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractUrlHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/AbstractUrlHandlerMapping.java @@ -22,7 +22,6 @@ import java.util.Comparator; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerExceptionResolverComposite.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerExceptionResolverComposite.java index bcf6090121c..09e6a513f67 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerExceptionResolverComposite.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerExceptionResolverComposite.java @@ -18,7 +18,6 @@ package org.springframework.web.servlet.handler; import java.util.Collections; import java.util.List; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMethodMappingNamingStrategy.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMethodMappingNamingStrategy.java index 3a023fc763c..f764b182b57 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMethodMappingNamingStrategy.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMethodMappingNamingStrategy.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/package-info.java index 51a2494d91e..3b64fa913a0 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/package-info.java @@ -1,9 +1,5 @@ - /** - * * Provides standard HandlerMapping implementations, * including abstract base classes for custom implementations. - * */ package org.springframework.web.servlet.handler; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/package-info.java index f6ea94a95ee..24539c7a12b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/package-info.java @@ -1,10 +1,6 @@ - /** - * * Locale support classes for Spring's web MVC framework. * Provides standard LocaleResolver implementations, * and a HandlerInterceptor for locale changes. - * */ package org.springframework.web.servlet.i18n; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java index 3bcec3848da..6c071af07f0 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java @@ -35,7 +35,6 @@ import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; - import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; @@ -47,6 +46,7 @@ import javax.xml.transform.Source; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java index 339b1f3bbe3..18e02fe0630 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolver.java @@ -32,7 +32,6 @@ import java.util.List; import java.util.Locale; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; - import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.java index 557992e2119..77c99cdee0f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/DefaultAnnotationHandlerMapping.java @@ -22,7 +22,6 @@ import java.util.HashMap; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; - import javax.servlet.http.HttpServletRequest; import org.springframework.context.ApplicationContext; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/package-info.java index f27cefd6e25..e24566b8164 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/annotation/package-info.java @@ -1,8 +1,4 @@ - /** - * * Support package for annotation-based Servlet MVC controllers. - * */ package org.springframework.web.servlet.mvc.annotation; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractMediaTypeExpression.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractMediaTypeExpression.java index 87866e0fb37..9203d7523ba 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractMediaTypeExpression.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractMediaTypeExpression.java @@ -20,6 +20,7 @@ import javax.servlet.http.HttpServletRequest; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.http.MediaType; import org.springframework.web.HttpMediaTypeException; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/package-info.java index b318bed079c..f6180f42264 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/package-info.java @@ -1,8 +1,4 @@ - /** - * * Common MVC logic for matching incoming requests based on conditions. - * */ package org.springframework.web.servlet.mvc.condition; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMethodMappingNamingStrategy.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMethodMappingNamingStrategy.java index 205193b0dd3..4fe3ea65413 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMethodMappingNamingStrategy.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMethodMappingNamingStrategy.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractJsonpResponseBodyAdvice.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractJsonpResponseBodyAdvice.java index 7dc43b40211..a8d983d3859 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractJsonpResponseBodyAdvice.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractJsonpResponseBodyAdvice.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,6 +16,8 @@ package org.springframework.web.servlet.mvc.method.annotation; +import javax.servlet.http.HttpServletRequest; + import org.springframework.core.MethodParameter; import org.springframework.http.MediaType; import org.springframework.http.converter.json.MappingJacksonValue; @@ -25,8 +27,6 @@ import org.springframework.http.server.ServletServerHttpRequest; import org.springframework.util.Assert; import org.springframework.util.ObjectUtils; -import javax.servlet.http.HttpServletRequest; - /** * A convenient base class for a {@code ResponseBodyAdvice} to instruct the * {@link org.springframework.http.converter.json.MappingJackson2HttpMessageConverter} diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMappingJacksonResponseBodyAdvice.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMappingJacksonResponseBodyAdvice.java index 8beb63c14c5..9a1136630de 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMappingJacksonResponseBodyAdvice.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/AbstractMappingJacksonResponseBodyAdvice.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinder.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinder.java index 061aa1437f8..ce1a1642a4b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinder.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinder.java @@ -18,7 +18,6 @@ package org.springframework.web.servlet.mvc.method.annotation; import java.util.Map; import java.util.Map.Entry; - import javax.servlet.ServletRequest; import org.springframework.beans.MutablePropertyValues; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/JsonViewResponseBodyAdvice.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/JsonViewResponseBodyAdvice.java index 170ecc0937d..63fe943d3d5 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/JsonViewResponseBodyAdvice.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/JsonViewResponseBodyAdvice.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilder.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilder.java index 85a8b6a7422..d2678abddce 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilder.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilder.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyAdviceChain.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyAdviceChain.java index 894f50e69e3..566c37b5cef 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyAdviceChain.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyAdviceChain.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,8 +16,11 @@ package org.springframework.web.servlet.mvc.method.annotation; +import java.util.List; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.core.MethodParameter; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; @@ -26,9 +29,6 @@ import org.springframework.http.server.ServerHttpResponse; import org.springframework.util.CollectionUtils; import org.springframework.web.method.ControllerAdviceBean; -import java.util.Collections; -import java.util.List; - /** * Invokes a a list of {@link ResponseBodyAdvice} beans. * diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java index 96717678866..7ac762cc20a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandler.java @@ -20,6 +20,7 @@ import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.ConversionNotSupportedException; import org.springframework.beans.TypeMismatchException; import org.springframework.http.HttpHeaders; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/package-info.java index 605d57a5527..14f90619264 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/package-info.java @@ -1,8 +1,5 @@ /** - * * Servlet-based infrastructure for handler method processing, * building on the {@code org.springframework.web.method} package. - * */ package org.springframework.web.servlet.mvc.method; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/NoSuchRequestHandlingMethodException.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/NoSuchRequestHandlingMethodException.java index a93452a5cf8..1038c80082c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/NoSuchRequestHandlingMethodException.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/NoSuchRequestHandlingMethodException.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.mvc.multiaction; import java.util.Map; - import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java index 347815c5fdc..ff1b45470ec 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.mvc.multiaction; import java.util.Properties; - import javax.servlet.http.HttpServletRequest; import org.apache.commons.logging.Log; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/package-info.java index 0659e76f918..e677ea86b1e 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/package-info.java @@ -1,6 +1,4 @@ - /** - * * Package allowing MVC Controller implementations to handle requests * at method rather than class level. This is useful when * we want to avoid having many trivial controller classes, as can @@ -11,7 +9,5 @@ * methods that will be invoked by reflection if they follow this class' * naming convention. Classes are analyzed at startup and methods cached, * so the performance overhead of reflection in this approach is negligible. - * */ package org.springframework.web.servlet.mvc.multiaction; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/package-info.java index c3380ae12aa..7217100f442 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/package-info.java @@ -1,9 +1,5 @@ - /** - * * Standard controller implementations for the Servlet MVC framework that comes with * Spring. Provides various controller styles, including an annotation-based model. - * */ package org.springframework.web.servlet.mvc; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java index 82bdda40092..26a69b16060 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java @@ -18,12 +18,12 @@ package org.springframework.web.servlet.mvc.support; import java.io.IOException; import java.util.List; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.ConversionNotSupportedException; import org.springframework.beans.TypeMismatchException; import org.springframework.core.Ordered; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/package-info.java index 4103eb09ff9..4958b2b3c3b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support package for MVC controllers. * Contains a special HandlerMapping for controller conventions. - * */ package org.springframework.web.servlet.mvc.support; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/package-info.java index 117cbb726ed..19b495821b2 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/package-info.java @@ -1,6 +1,4 @@ - /** - * * Provides servlets that integrate with the application context * infrastructure, and the core interfaces and classes for the * Spring web MVC framework. @@ -8,7 +6,5 @@ *

This package and related packages are discussed in Chapters 12 and 13 of * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). - * */ package org.springframework.web.servlet; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AbstractResourceResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AbstractResourceResolver.java index 405760c38af..2713daeea40 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AbstractResourceResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AbstractResourceResolver.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,12 +16,13 @@ package org.springframework.web.servlet.resource; +import java.util.List; +import javax.servlet.http.HttpServletRequest; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.springframework.core.io.Resource; -import javax.servlet.http.HttpServletRequest; -import java.util.List; +import org.springframework.core.io.Resource; /** * Base class for {@link org.springframework.web.servlet.resource.ResourceResolver} diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java index ae0666ab540..8ea9cc759c4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/AppCacheManifestTransformer.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,7 +24,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.Map; import java.util.Scanner; - import javax.servlet.http.HttpServletRequest; import org.apache.commons.logging.Log; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CachingResourceResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CachingResourceResolver.java index f36ae9fbfcf..2acd51cbde5 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CachingResourceResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CachingResourceResolver.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,14 +16,14 @@ package org.springframework.web.servlet.resource; +import java.util.List; +import javax.servlet.http.HttpServletRequest; + import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; import org.springframework.core.io.Resource; import org.springframework.util.Assert; -import javax.servlet.http.HttpServletRequest; -import java.util.List; - /** * A {@link org.springframework.web.servlet.resource.ResourceResolver} that * resolves resources from a {@link org.springframework.cache.Cache} or otherwise diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CachingResourceTransformer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CachingResourceTransformer.java index 722d2c606de..5c2545a64b5 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CachingResourceTransformer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CachingResourceTransformer.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,16 +16,17 @@ package org.springframework.web.servlet.resource; +import java.io.IOException; +import javax.servlet.http.HttpServletRequest; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; import org.springframework.core.io.Resource; import org.springframework.util.Assert; -import javax.servlet.http.HttpServletRequest; -import java.io.IOException; - /** * A {@link org.springframework.web.servlet.resource.ResourceTransformer} that * checks a {@link org.springframework.cache.Cache} to see if a previously diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CssLinkResourceTransformer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CssLinkResourceTransformer.java index 7fd4be40a58..d35fe16ba86 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CssLinkResourceTransformer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/CssLinkResourceTransformer.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,13 +16,6 @@ package org.springframework.web.servlet.resource; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.springframework.core.io.Resource; -import org.springframework.util.FileCopyUtils; -import org.springframework.util.StringUtils; - -import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.io.StringWriter; import java.nio.charset.Charset; @@ -31,6 +24,14 @@ import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; +import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import org.springframework.core.io.Resource; +import org.springframework.util.FileCopyUtils; +import org.springframework.util.StringUtils; /** * A {@link ResourceTransformer} implementation that modifies links in a CSS diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultResourceResolverChain.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultResourceResolverChain.java index 4d44acfb237..52445e7b389 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultResourceResolverChain.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultResourceResolverChain.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,7 +18,6 @@ package org.springframework.web.servlet.resource; import java.util.ArrayList; import java.util.List; - import javax.servlet.http.HttpServletRequest; import org.springframework.core.io.Resource; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultResourceTransformerChain.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultResourceTransformerChain.java index eb9473e691b..c8e56cf97be 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultResourceTransformerChain.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultResourceTransformerChain.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,13 +16,13 @@ package org.springframework.web.servlet.resource; -import org.springframework.core.io.Resource; -import org.springframework.util.Assert; - -import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.util.ArrayList; import java.util.List; +import javax.servlet.http.HttpServletRequest; + +import org.springframework.core.io.Resource; +import org.springframework.util.Assert; /** * A default implementation of {@link ResourceTransformerChain} for invoking a list diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/EncodedResource.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/EncodedResource.java index 04996ad4cda..d3ceb17829d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/EncodedResource.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/EncodedResource.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/GzipResourceResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/GzipResourceResolver.java index bc0b83e2255..08cc241fa2a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/GzipResourceResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/GzipResourceResolver.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,7 +22,6 @@ import java.io.InputStream; import java.net.URI; import java.net.URL; import java.util.List; - import javax.servlet.http.HttpServletRequest; import org.springframework.core.io.AbstractResource; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/PathResourceResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/PathResourceResolver.java index 0522cc3d8d2..213fbe2465d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/PathResourceResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/PathResourceResolver.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,7 +18,6 @@ package org.springframework.web.servlet.resource; import java.io.IOException; import java.util.List; - import javax.servlet.http.HttpServletRequest; import org.springframework.core.io.Resource; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceResolver.java index 70e13e45fc3..3d5241b3e30 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceResolver.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,6 @@ package org.springframework.web.servlet.resource; import java.util.List; - import javax.servlet.http.HttpServletRequest; import org.springframework.core.io.Resource; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceResolverChain.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceResolverChain.java index ac57de820c1..a260f26216c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceResolverChain.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceResolverChain.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,6 @@ package org.springframework.web.servlet.resource; import java.util.List; - import javax.servlet.http.HttpServletRequest; import org.springframework.core.io.Resource; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformer.java index 40868018172..a477ec51baa 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformer.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,10 +16,10 @@ package org.springframework.web.servlet.resource; -import org.springframework.core.io.Resource; - -import javax.servlet.http.HttpServletRequest; import java.io.IOException; +import javax.servlet.http.HttpServletRequest; + +import org.springframework.core.io.Resource; /** * An abstraction for transforming the content of a resource. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformerChain.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformerChain.java index d040c067348..69a22b74edf 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformerChain.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformerChain.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,10 +16,10 @@ package org.springframework.web.servlet.resource; -import org.springframework.core.io.Resource; - -import javax.servlet.http.HttpServletRequest; import java.io.IOException; +import javax.servlet.http.HttpServletRequest; + +import org.springframework.core.io.Resource; /** * A contract for invoking a chain of {@link ResourceTransformer}s where each resolver diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformerSupport.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformerSupport.java index 1dc2f4cfaf0..4cdb2deff25 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformerSupport.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceTransformerSupport.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,7 +16,6 @@ package org.springframework.web.servlet.resource; import java.util.Arrays; - import javax.servlet.http.HttpServletRequest; import org.springframework.core.io.Resource; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlEncodingFilter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlEncodingFilter.java index a9c864dc50a..b84c64d9f90 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlEncodingFilter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlEncodingFilter.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,6 @@ package org.springframework.web.servlet.resource; import java.io.IOException; - import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProvider.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProvider.java index 871772bf247..978e2456253 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProvider.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProvider.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,26 +16,25 @@ package org.springframework.web.servlet.resource; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import javax.servlet.http.HttpServletRequest; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationListener; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.core.OrderComparator; import org.springframework.util.AntPathMatcher; -import org.springframework.util.Assert; import org.springframework.util.PathMatcher; -import org.springframework.web.servlet.HandlerMapping; import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; import org.springframework.web.util.UrlPathHelper; -import javax.servlet.http.HttpServletRequest; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - /** * A central component to use to obtain the public URL path that clients should diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProviderExposingInterceptor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProviderExposingInterceptor.java index fab9df339fe..0c69345e3fe 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProviderExposingInterceptor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProviderExposingInterceptor.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,12 +16,12 @@ package org.springframework.web.servlet.resource; -import org.springframework.util.Assert; -import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.springframework.util.Assert; +import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; + /** * An interceptor that exposes the {@link ResourceUrlProvider} instance it * is configured with as a request attribute. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/TransformedResource.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/TransformedResource.java index 1f083ea6108..c094c671359 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/TransformedResource.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/TransformedResource.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,11 +16,11 @@ package org.springframework.web.servlet.resource; +import java.io.IOException; + import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.Resource; -import java.io.IOException; - /** * An extension of {@link org.springframework.core.io.ByteArrayResource} that a * {@link ResourceTransformer} can use to represent an original resource diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/package-info.java index d554c4e251f..04c78d3e50f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/resource/package-info.java @@ -1,6 +1,4 @@ - /** * Support classes for serving static resources. */ package org.springframework.web.servlet.resource; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestDataValueProcessor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestDataValueProcessor.java index 2ce8a207393..d78c80015f3 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestDataValueProcessor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestDataValueProcessor.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.support; import java.util.Map; - import javax.servlet.http.HttpServletRequest; /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/package-info.java index bea2cac64c1..66deafef017 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/package-info.java @@ -1,10 +1,6 @@ - /** - * * Support classes for Spring's web MVC framework. * Provides easy evaluation of the request context in views, * and miscellaneous HandlerInterceptor implementations. - * */ package org.springframework.web.servlet.support; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EditorAwareTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EditorAwareTag.java index 290c70f2a91..384e75f6dcc 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EditorAwareTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EditorAwareTag.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.tags; import java.beans.PropertyEditor; - import javax.servlet.jsp.JspException; /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EvalTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EvalTag.java index 25e6019420e..82407b50573 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EvalTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EvalTag.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.tags; import java.io.IOException; - import javax.servlet.jsp.JspException; import javax.servlet.jsp.PageContext; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/MessageTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/MessageTag.java index f513af29d5b..ba9f5aa51bf 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/MessageTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/MessageTag.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.util.Collection; import java.util.LinkedList; import java.util.List; - import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspTagException; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java index 0bbc79ba6f6..98bb8c37d5b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.tags.form; import java.io.IOException; - import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.BodyContent; import javax.servlet.jsp.tagext.BodyTag; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractMultiCheckedElementTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractMultiCheckedElementTag.java index 25350df652d..cb9c6963ca1 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractMultiCheckedElementTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractMultiCheckedElementTag.java @@ -19,7 +19,6 @@ package org.springframework.web.servlet.tags.form; import java.util.Collection; import java.util.Iterator; import java.util.Map; - import javax.servlet.jsp.JspException; import org.springframework.beans.BeanWrapper; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxTag.java index 23cb3fa0055..c7abcaa49a5 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/CheckboxTag.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.tags.form; import java.util.Collection; - import javax.servlet.jsp.JspException; import org.springframework.web.bind.WebDataBinder; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionWriter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionWriter.java index db968cdf2ef..2a57fe73bda 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionWriter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionWriter.java @@ -19,8 +19,8 @@ package org.springframework.web.servlet.tags.form; import java.beans.PropertyEditor; import java.util.Collection; import java.util.Map; - import javax.servlet.jsp.JspException; + import org.springframework.beans.BeanWrapper; import org.springframework.beans.PropertyAccessorFactory; import org.springframework.util.Assert; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionsTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionsTag.java index 518722fdd29..d643773dcb1 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionsTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionsTag.java @@ -17,6 +17,7 @@ package org.springframework.web.servlet.tags.form; import javax.servlet.jsp.JspException; + import org.springframework.util.Assert; import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagWriter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagWriter.java index 5c6d94f1a32..ac52381d9c0 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagWriter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/TagWriter.java @@ -19,7 +19,6 @@ package org.springframework.web.servlet.tags.form; import java.io.IOException; import java.io.Writer; import java.util.Stack; - import javax.servlet.jsp.JspException; import javax.servlet.jsp.PageContext; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/package-info.java index 9f8a9422749..051fc65c38b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/package-info.java @@ -1,9 +1,6 @@ /** - * * Spring's form tag library for JSP 2.0+. * Supports JSP view implementations for Spring's web MVC framework. * See {@code spring-form.tld} for descriptions of the various tags. - * */ package org.springframework.web.servlet.tags.form; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/package-info.java index 56d5853cc08..e132e7070e5 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/package-info.java @@ -1,9 +1,6 @@ /** - * * Spring's JSP standard tag library for JSP 2.0+. * Supports JSP view implementations within Spring's web MVC framework. * See {@code spring.tld} for descriptions of the various tags. - * */ package org.springframework.web.servlet.tags; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/package-info.java index c9735e5c75b..d3f409797be 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/package-info.java @@ -1,23 +1,20 @@ /** - * * Theme support classes for Spring's web MVC framework. * Provides standard ThemeResolver implementations, * and a HandlerInterceptor for theme changes. * *

*

    - *
  • If you don't provide a bean of one of these classes as {@code themeResolver}, + *
  • If you don't provide a bean of one of these classes as {@code themeResolver}, * a {@code FixedThemeResolver} will be provided with the default theme name 'theme'.
  • - *
  • If you use a defined {@code FixedThemeResolver}, you will able to use another theme + *
  • If you use a defined {@code FixedThemeResolver}, you will able to use another theme * name for default, but the users will stick on this theme.
  • - *
  • With a {@code CookieThemeResolver} or {@code SessionThemeResolver}, you can allow + *
  • With a {@code CookieThemeResolver} or {@code SessionThemeResolver}, you can allow * the user to change his current theme.
  • - *
  • Generally, you will put in the themes resource bundles the paths of CSS files, images and HTML constructs.
  • - *
  • For retrieving themes data, you can either use the spring:theme tag in JSP or access via the + *
  • Generally, you will put in the themes resource bundles the paths of CSS files, images and HTML constructs.
  • + *
  • For retrieving themes data, you can either use the spring:theme tag in JSP or access via the * {@code RequestContext} for other view technologies.
  • - *
  • The {@code pagedlist} demo application uses themes
  • + *
  • The {@code pagedlist} demo application uses themes
  • *
- * */ package org.springframework.web.servlet.theme; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ContentNegotiatingViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ContentNegotiatingViewResolver.java index c3dd93694e9..42302afbe78 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ContentNegotiatingViewResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ContentNegotiatingViewResolver.java @@ -25,7 +25,6 @@ import java.util.Locale; import java.util.Map; import java.util.Properties; import java.util.Set; - import javax.activation.FileTypeMap; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; @@ -33,6 +32,7 @@ import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.factory.BeanFactoryUtils; import org.springframework.beans.factory.InitializingBean; import org.springframework.core.OrderComparator; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/InternalResourceView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/InternalResourceView.java index 8863a905f92..0c88f21ac20 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/InternalResourceView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/InternalResourceView.java @@ -16,17 +16,13 @@ package org.springframework.web.servlet.view; -import java.util.Arrays; -import java.util.HashSet; import java.util.Map; -import java.util.Set; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.util.StringUtils; -import org.springframework.web.context.support.ContextExposingHttpServletRequest; import org.springframework.web.util.WebUtils; /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfStamperView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfStamperView.java index 56fc6dca6ae..d7e8705545a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfStamperView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfStamperView.java @@ -19,7 +19,6 @@ package org.springframework.web.servlet.view.document; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.Map; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/package-info.java index 348b02a7a94..7e4a4b40dc1 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support classes for document generation, * providing View implementations for PDF and Excel. - * */ package org.springframework.web.servlet.view.document; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/feed/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/feed/package-info.java index 37990dc9b6c..802c2e9afd1 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/feed/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/feed/package-info.java @@ -1,8 +1,5 @@ - /** - * * Support classes for feed generation, providing View implementations for Atom and RSS. * Based on the ROME tools project. - * */ package org.springframework.web.servlet.view.feed; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerConfig.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerConfig.java index 595a3bea3f3..b6a6bb7ed7c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerConfig.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/FreeMarkerConfig.java @@ -16,8 +16,8 @@ package org.springframework.web.servlet.view.freemarker; -import freemarker.template.Configuration; import freemarker.ext.jsp.TaglibFactory; +import freemarker.template.Configuration; /** * Interface to be implemented by objects that configure and manage a diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/package-info.java index 900b137ad85..415eef0b202 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/freemarker/package-info.java @@ -1,11 +1,7 @@ - /** - * * Support classes for the integration of * FreeMarker * as Spring web view technology. * Contains a View implementation for FreeMarker templates. - * */ package org.springframework.web.servlet.view.freemarker; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/groovy/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/groovy/package-info.java index 5323cc0ce3d..0853ca12176 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/groovy/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/groovy/package-info.java @@ -1,4 +1,3 @@ - /** * Support classes for the integration of * @@ -6,4 +5,3 @@ * Contains a View implementation for Groovy templates. */ package org.springframework.web.servlet.view.groovy; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/package-info.java index 7b190a31373..909976af72a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/package-info.java @@ -1,11 +1,7 @@ - /** - * * Support classes for the integration of * JasperReports * as Spring web view technology. * Contains various View implementations for JasperReports. - * */ package org.springframework.web.servlet.view.jasperreports; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/AbstractJackson2View.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/AbstractJackson2View.java index 7542601ce28..3ce9ecdfb16 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/AbstractJackson2View.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/AbstractJackson2View.java @@ -20,7 +20,6 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.util.Map; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/package-info.java index 1a33e528573..53c24b52e2e 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/package-info.java @@ -1,23 +1,4 @@ -/* - * Copyright 2002-2009 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** - * * Support classes for providing a View implementation based on JSON serialization. - * */ package org.springframework.web.servlet.view.json; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/package-info.java index c6250f65dfd..27f4fc9d4dc 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/package-info.java @@ -1,6 +1,4 @@ - /** - * * Provides standard View and ViewResolver implementations, * including abstract base classes for custom implementations. * @@ -9,7 +7,5 @@ * XSLT, etc. However, the ability to implement custom views easily * by subclassing the AbstractView class in this package can be * very helpful if an application has unusual view requirements. - * */ package org.springframework.web.servlet.view; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/AbstractSpringPreparerFactory.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/AbstractSpringPreparerFactory.java index ff342df173a..93103388cd3 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/AbstractSpringPreparerFactory.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/AbstractSpringPreparerFactory.java @@ -20,6 +20,7 @@ import org.apache.tiles.TilesException; import org.apache.tiles.preparer.ViewPreparer; import org.apache.tiles.preparer.factory.PreparerFactory; import org.apache.tiles.request.Request; + import org.springframework.web.context.WebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/SimpleSpringPreparerFactory.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/SimpleSpringPreparerFactory.java index eb382c1dd50..457ace344ba 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/SimpleSpringPreparerFactory.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/SimpleSpringPreparerFactory.java @@ -23,6 +23,7 @@ import org.apache.tiles.TilesException; import org.apache.tiles.preparer.PreparerException; import org.apache.tiles.preparer.ViewPreparer; import org.apache.tiles.preparer.factory.NoSuchPreparerException; + import org.springframework.web.context.WebApplicationContext; /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/SpringLocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/SpringLocaleResolver.java index 69cb716de28..e432ae9a6c6 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/SpringLocaleResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/SpringLocaleResolver.java @@ -17,10 +17,12 @@ package org.springframework.web.servlet.view.tiles3; import java.util.Locale; import javax.servlet.http.HttpServletRequest; + import org.apache.tiles.locale.impl.DefaultLocaleResolver; import org.apache.tiles.request.Request; import org.apache.tiles.request.servlet.NotAServletEnvironmentException; import org.apache.tiles.request.servlet.ServletUtil; + import org.springframework.web.servlet.support.RequestContextUtils; /** diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/package-info.java index 52c94c61fa2..845ac01667d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/tiles3/package-info.java @@ -1,11 +1,7 @@ - /** - * * Support classes for the integration of * Tiles3 * (the standalone version of Tiles) as Spring web view technology. * Contains a View implementation for Tiles definitions. - * */ package org.springframework.web.servlet.view.tiles3; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfigurer.java index d5394519af0..1dbd8a20fc6 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfigurer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfigurer.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.view.velocity; import java.io.IOException; - import javax.servlet.ServletContext; import org.apache.velocity.app.VelocityEngine; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/package-info.java index 8541cb13bb3..e6fbf81b51c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/package-info.java @@ -1,11 +1,7 @@ - /** - * * Support classes for the integration of * Velocity * as Spring web view technology. * Contains a View implementation for Velocity templates. - * */ package org.springframework.web.servlet.view.velocity; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/package-info.java index dbe04c8e6d8..d6cb9c7f3d2 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xml/package-info.java @@ -1,8 +1,4 @@ - /** - * * Support classes for providing a View implementation based on XML Marshalling. - * */ package org.springframework.web.servlet.view.xml; - diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/package-info.java index 24196a7c9b2..4203e0f9893 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/package-info.java @@ -1,9 +1,5 @@ - /** - * * Support classes for XSLT, * providing a View implementation for XSLT stylesheets. - * */ package org.springframework.web.servlet.view.xslt; - diff --git a/spring-webmvc/src/test/java/org/springframework/context/ACATester.java b/spring-webmvc/src/test/java/org/springframework/context/ACATester.java index 7fa8a8263d8..c6a63ddb623 100644 --- a/spring-webmvc/src/test/java/org/springframework/context/ACATester.java +++ b/spring-webmvc/src/test/java/org/springframework/context/ACATester.java @@ -18,11 +18,6 @@ package org.springframework.context; import java.util.Locale; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.context.ApplicationContextException; -import org.springframework.context.NoSuchMessageException; - public class ACATester implements ApplicationContextAware { private ApplicationContext ac; diff --git a/spring-webmvc/src/test/java/org/springframework/context/BeanThatBroadcasts.java b/spring-webmvc/src/test/java/org/springframework/context/BeanThatBroadcasts.java index f3163636829..f4454c64daa 100644 --- a/spring-webmvc/src/test/java/org/springframework/context/BeanThatBroadcasts.java +++ b/spring-webmvc/src/test/java/org/springframework/context/BeanThatBroadcasts.java @@ -16,9 +16,6 @@ package org.springframework.context; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; - /** * @author Juergen Hoeller */ diff --git a/spring-webmvc/src/test/java/org/springframework/context/TestListener.java b/spring-webmvc/src/test/java/org/springframework/context/TestListener.java index 739222190fa..9020b436bb9 100644 --- a/spring-webmvc/src/test/java/org/springframework/context/TestListener.java +++ b/spring-webmvc/src/test/java/org/springframework/context/TestListener.java @@ -1,8 +1,5 @@ package org.springframework.context; -import org.springframework.context.ApplicationEvent; -import org.springframework.context.ApplicationListener; - /** * Listener that maintains a global count of events. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java index 3d1d0b203eb..e526ffad9d5 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java @@ -17,11 +17,9 @@ package org.springframework.web.context; import java.util.Locale; - import javax.servlet.ServletException; import org.springframework.beans.BeansException; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; @@ -32,10 +30,10 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.NoSuchMessageException; import org.springframework.context.TestListener; import org.springframework.mock.web.test.MockServletContext; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.context.support.XmlWebApplicationContext; import static org.hamcrest.CoreMatchers.*; - import static org.junit.Assert.*; /** diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/support/HttpRequestHandlerTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/support/HttpRequestHandlerTests.java index c6a5025c137..6ff120aa808 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/support/HttpRequestHandlerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/support/HttpRequestHandlerTests.java @@ -16,16 +16,14 @@ package org.springframework.web.context.support; -import static org.junit.Assert.*; - import java.io.IOException; - import javax.servlet.Servlet; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockServletConfig; @@ -33,6 +31,8 @@ import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.HttpRequestHandler; import org.springframework.web.context.WebApplicationContext; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Chris Beams diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java index 0aade97ca6a..e36afe98b30 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java @@ -16,11 +16,6 @@ package org.springframework.web.context.support; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import java.io.IOException; import java.util.Collections; import java.util.HashMap; @@ -30,8 +25,8 @@ import java.util.Map; import java.util.Set; import org.junit.Test; + import org.springframework.beans.MutablePropertyValues; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.config.BeanDefinitionHolder; import org.springframework.beans.factory.config.ConstructorArgumentValues; @@ -43,6 +38,9 @@ import org.springframework.beans.factory.support.ManagedSet; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.core.io.Resource; import org.springframework.mock.web.test.MockServletContext; +import org.springframework.tests.sample.beans.TestBean; + +import static org.junit.Assert.*; /** * Tests for various ServletContext-related support classes. diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/support/WebApplicationObjectSupportTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/support/WebApplicationObjectSupportTests.java index 391f464d035..08d885396d9 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/support/WebApplicationObjectSupportTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/support/WebApplicationObjectSupportTests.java @@ -16,16 +16,17 @@ package org.springframework.web.context.support; -import static org.junit.Assert.*; - import java.io.File; import org.junit.Test; + import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.support.StaticApplicationContext; import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.util.WebUtils; +import static org.junit.Assert.*; + /** * @author Juergen Hoeller * @author Chris Beams diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/FlashMapTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/FlashMapTests.java index f9ad57ba052..4b23da89ed8 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/FlashMapTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/FlashMapTests.java @@ -16,14 +16,13 @@ package org.springframework.web.servlet; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import org.junit.Test; + import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +import static org.junit.Assert.*; + /** * Test fixture for {@link FlashMap} tests. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/HandlerExecutionChainTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/HandlerExecutionChainTests.java index a4f9572dc15..9d408be3105 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/HandlerExecutionChainTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/HandlerExecutionChainTests.java @@ -18,6 +18,7 @@ package org.springframework.web.servlet; import org.junit.Before; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/SimpleWebApplicationContext.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/SimpleWebApplicationContext.java index 3855b6cd57f..337168beaa1 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/SimpleWebApplicationContext.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/SimpleWebApplicationContext.java @@ -18,7 +18,6 @@ package org.springframework.web.servlet; import java.io.IOException; import java.util.Locale; - import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -31,6 +30,7 @@ import org.springframework.ui.context.ThemeSource; import org.springframework.ui.context.support.SimpleTheme; import org.springframework.ui.context.support.UiApplicationContextUtils; import org.springframework.web.context.support.StaticWebApplicationContext; +import org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping; import org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver; import org.springframework.web.servlet.mvc.Controller; import org.springframework.web.servlet.mvc.LastModified; @@ -38,7 +38,6 @@ import org.springframework.web.servlet.support.RequestContextUtils; import org.springframework.web.servlet.theme.AbstractThemeResolver; import org.springframework.web.servlet.view.InternalResourceViewResolver; import org.springframework.web.servlet.view.XmlViewResolver; -import org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping; /** * @author Juergen Hoeller diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParserTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParserTests.java index 85f5cbf426e..d87a2022662 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParserTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParserTests.java @@ -20,6 +20,7 @@ import java.util.List; import org.hamcrest.Matchers; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.DirectFieldAccessor; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.MethodParameter; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java index f9348deb2d5..551bf6aa244 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/MvcNamespaceTests.java @@ -16,23 +16,28 @@ package org.springframework.web.servlet.config; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.MapperFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.dataformat.xml.XmlMapper; -import static org.junit.Assert.*; - import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.reflect.Method; -import java.util.*; - +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.List; +import java.util.Locale; +import java.util.Map; import javax.servlet.RequestDispatcher; import javax.validation.constraints.NotNull; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.dataformat.xml.XmlMapper; import org.hamcrest.Matchers; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.DirectFieldAccessor; import org.springframework.beans.TypeMismatchException; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; @@ -62,7 +67,7 @@ import org.springframework.validation.Errors; import org.springframework.validation.Validator; import org.springframework.validation.annotation.Validated; import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; -import org.springframework.web.accept.*; +import org.springframework.web.accept.ContentNegotiationManager; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.context.WebApplicationContext; @@ -80,13 +85,18 @@ import org.springframework.web.servlet.HandlerExecutionChain; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ViewResolver; -import org.springframework.web.servlet.handler.*; +import org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping; +import org.springframework.web.servlet.handler.ConversionServiceExposingInterceptor; +import org.springframework.web.servlet.handler.MappedInterceptor; +import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; +import org.springframework.web.servlet.handler.UserRoleAuthorizationInterceptor; +import org.springframework.web.servlet.handler.WebRequestHandlerInterceptorAdapter; import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; import org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter; import org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter; +import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder; import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter; import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; -import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder; import org.springframework.web.servlet.resource.AppCacheManifestTransformer; import org.springframework.web.servlet.resource.CachingResourceResolver; import org.springframework.web.servlet.resource.CachingResourceTransformer; @@ -103,16 +113,23 @@ import org.springframework.web.servlet.resource.ResourceUrlProvider; import org.springframework.web.servlet.resource.ResourceUrlProviderExposingInterceptor; import org.springframework.web.servlet.resource.VersionResourceResolver; import org.springframework.web.servlet.theme.ThemeChangeInterceptor; -import org.springframework.web.servlet.view.groovy.GroovyMarkupConfigurer; -import org.springframework.web.servlet.view.groovy.GroovyMarkupViewResolver; -import org.springframework.web.util.UrlPathHelper; -import org.springframework.web.servlet.view.*; +import org.springframework.web.servlet.view.BeanNameViewResolver; +import org.springframework.web.servlet.view.ContentNegotiatingViewResolver; +import org.springframework.web.servlet.view.InternalResourceView; +import org.springframework.web.servlet.view.InternalResourceViewResolver; +import org.springframework.web.servlet.view.RedirectView; +import org.springframework.web.servlet.view.ViewResolverComposite; import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer; import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver; +import org.springframework.web.servlet.view.groovy.GroovyMarkupConfigurer; +import org.springframework.web.servlet.view.groovy.GroovyMarkupViewResolver; import org.springframework.web.servlet.view.tiles3.TilesConfigurer; import org.springframework.web.servlet.view.tiles3.TilesViewResolver; import org.springframework.web.servlet.view.velocity.VelocityConfigurer; import org.springframework.web.servlet.view.velocity.VelocityViewResolver; +import org.springframework.web.util.UrlPathHelper; + +import static org.junit.Assert.*; /** * Tests loading actual MVC namespace configuration. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ContentNegotiationConfigurerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ContentNegotiationConfigurerTests.java index 2210a7d9819..d504f3a2fed 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ContentNegotiationConfigurerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ContentNegotiationConfigurerTests.java @@ -15,19 +15,20 @@ */ package org.springframework.web.servlet.config.annotation; -import static org.junit.Assert.assertEquals; - import java.util.Arrays; import java.util.Collections; import org.junit.Before; import org.junit.Test; + import org.springframework.http.MediaType; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.accept.ContentNegotiationManager; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; +import static org.junit.Assert.*; + /** * Test fixture for {@link ContentNegotiationConfigurer} tests. * @author Rossen Stoyanchev diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/DefaultServletHandlerConfigurerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/DefaultServletHandlerConfigurerTests.java index 9b7dfb8ea2f..e9c45776d5e 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/DefaultServletHandlerConfigurerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/DefaultServletHandlerConfigurerTests.java @@ -16,14 +16,11 @@ package org.springframework.web.servlet.config.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; - import javax.servlet.RequestDispatcher; import org.junit.Before; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockRequestDispatcher; @@ -31,6 +28,8 @@ import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; import org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler; +import static org.junit.Assert.*; + /** * Test fixture with a {@link DefaultServletHandlerConfigurer}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfigurationTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfigurationTests.java index 205ace6240f..d3ecd600038 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfigurationTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfigurationTests.java @@ -26,6 +26,7 @@ import org.mockito.ArgumentCaptor; import org.mockito.Captor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; + import org.springframework.core.convert.ConversionService; import org.springframework.format.support.FormattingConversionService; import org.springframework.http.converter.HttpMessageConverter; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/InterceptorRegistryTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/InterceptorRegistryTests.java index 6ff3b107524..e927d94ebf5 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/InterceptorRegistryTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/InterceptorRegistryTests.java @@ -24,6 +24,7 @@ import java.util.List; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.ui.ModelMap; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistryTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistryTests.java index ebc7736f3f3..1ccb422f16e 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistryTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistryTests.java @@ -16,17 +16,12 @@ package org.springframework.web.servlet.config.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - import java.util.Collections; import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.http.HttpStatus; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; @@ -34,6 +29,8 @@ import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; import org.springframework.web.servlet.mvc.ParameterizableViewController; import org.springframework.web.servlet.view.RedirectView; +import static org.junit.Assert.*; + /** * Test fixture with a {@link ViewControllerRegistry}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewResolutionIntegrationTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewResolutionIntegrationTests.java index d350fc982fc..5bb2493f5db 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewResolutionIntegrationTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewResolutionIntegrationTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,9 +16,13 @@ package org.springframework.web.servlet.config.annotation; +import java.io.IOException; +import javax.servlet.ServletException; + import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.mock.web.test.MockHttpServletRequest; @@ -37,10 +41,7 @@ import org.springframework.web.servlet.view.groovy.GroovyMarkupConfigurer; import org.springframework.web.servlet.view.tiles3.TilesConfigurer; import org.springframework.web.servlet.view.velocity.VelocityConfigurer; -import javax.servlet.ServletException; -import java.io.IOException; - -import static org.junit.Assert.assertEquals; +import static org.junit.Assert.*; /** * Integration tests for view resolution with {@code @EnableWebMvc}. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewResolverRegistryTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewResolverRegistryTests.java index 89fb60f0fd6..c90b5fded2f 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewResolverRegistryTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewResolverRegistryTests.java @@ -16,8 +16,11 @@ package org.springframework.web.servlet.config.annotation; +import java.util.Arrays; + import org.junit.Before; import org.junit.Test; + import org.springframework.beans.DirectFieldAccessor; import org.springframework.core.Ordered; import org.springframework.web.accept.ContentNegotiationManager; @@ -37,10 +40,7 @@ import org.springframework.web.servlet.view.velocity.VelocityConfigurer; import org.springframework.web.servlet.view.velocity.VelocityViewResolver; import org.springframework.web.servlet.view.xml.MarshallingView; -import java.util.Arrays; - import static org.junit.Assert.*; -import static org.junit.Assert.assertEquals; /** * Test fixture with a {@link ViewResolverRegistry}. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java index 8b3ec60ef08..0ea7f16d585 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java @@ -16,22 +16,21 @@ package org.springframework.web.servlet.config.annotation; -import com.fasterxml.jackson.databind.DeserializationFeature; - import java.util.Arrays; import java.util.List; -import org.junit.Before; -import org.junit.Test; +import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; +import org.junit.Before; +import org.junit.Test; + import org.springframework.beans.DirectFieldAccessor; import org.springframework.core.Ordered; -import org.springframework.http.HttpStatus; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.core.convert.converter.Converter; import org.springframework.core.io.FileSystemResourceLoader; import org.springframework.format.FormatterRegistry; +import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; @@ -39,6 +38,7 @@ import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockServletContext; import org.springframework.scheduling.concurrent.ConcurrentTaskExecutor; import org.springframework.stereotype.Controller; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.AntPathMatcher; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.DefaultMessageCodesResolver; @@ -58,7 +58,10 @@ import org.springframework.web.context.support.StaticWebApplicationContext; import org.springframework.web.method.annotation.ModelAttributeMethodProcessor; import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.method.support.HandlerMethodReturnValueHandler; -import org.springframework.web.servlet.*; +import org.springframework.web.servlet.HandlerExceptionResolver; +import org.springframework.web.servlet.HandlerExecutionChain; +import org.springframework.web.servlet.View; +import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.handler.AbstractHandlerMapping; import org.springframework.web.servlet.handler.ConversionServiceExposingInterceptor; import org.springframework.web.servlet.handler.HandlerExceptionResolverComposite; @@ -67,11 +70,11 @@ import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter; import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; import org.springframework.web.servlet.resource.ResourceUrlProviderExposingInterceptor; -import org.springframework.web.servlet.view.ViewResolverComposite; -import org.springframework.web.util.UrlPathHelper; import org.springframework.web.servlet.view.ContentNegotiatingViewResolver; import org.springframework.web.servlet.view.InternalResourceViewResolver; +import org.springframework.web.servlet.view.ViewResolverComposite; import org.springframework.web.servlet.view.json.MappingJackson2JsonView; +import org.springframework.web.util.UrlPathHelper; import static org.junit.Assert.*; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportTests.java index 4e08fcb677a..90ca9742439 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportTests.java @@ -27,14 +27,15 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.dataformat.xml.XmlMapper; import org.joda.time.DateTime; import org.junit.Test; + import org.springframework.beans.DirectFieldAccessor; import org.springframework.beans.factory.BeanFactoryUtils; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Scope; -import org.springframework.core.Ordered; import org.springframework.context.annotation.ScopedProxyMode; +import org.springframework.core.Ordered; import org.springframework.core.convert.ConversionService; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat.ISO; @@ -58,9 +59,6 @@ import org.springframework.web.method.support.CompositeUriComponentsContributor; import org.springframework.web.servlet.HandlerExceptionResolver; import org.springframework.web.servlet.HandlerExecutionChain; import org.springframework.web.servlet.ViewResolver; -import org.springframework.web.servlet.view.BeanNameViewResolver; -import org.springframework.web.servlet.view.InternalResourceViewResolver; -import org.springframework.web.servlet.view.ViewResolverComposite; import org.springframework.web.servlet.handler.AbstractHandlerMapping; import org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping; import org.springframework.web.servlet.handler.ConversionServiceExposingInterceptor; @@ -73,10 +71,12 @@ import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandl import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping; import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver; import org.springframework.web.servlet.resource.ResourceUrlProviderExposingInterceptor; +import org.springframework.web.servlet.view.BeanNameViewResolver; +import org.springframework.web.servlet.view.InternalResourceViewResolver; +import org.springframework.web.servlet.view.ViewResolverComposite; import org.springframework.web.util.UrlPathHelper; import static org.junit.Assert.*; -import static org.junit.Assert.assertEquals; /** * A test fixture with an {@link WebMvcConfigurationSupport} instance. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/HandlerMethodMappingTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/HandlerMethodMappingTests.java index a96fe8a3c8a..cf265a4528b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/HandlerMethodMappingTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/HandlerMethodMappingTests.java @@ -16,17 +16,15 @@ package org.springframework.web.servlet.handler; -import static org.junit.Assert.assertEquals; - import java.lang.reflect.Method; import java.util.Comparator; import java.util.HashSet; import java.util.Set; - import javax.servlet.http.HttpServletRequest; import org.junit.Before; import org.junit.Test; + import org.springframework.context.support.StaticApplicationContext; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.stereotype.Controller; @@ -36,6 +34,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.method.HandlerMethod; import org.springframework.web.util.UrlPathHelper; +import static org.junit.Assert.*; + /** * Test for {@link AbstractHandlerMethodMapping}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/MappedInterceptorTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/MappedInterceptorTests.java index 6b9b26169cc..480b984e7c1 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/MappedInterceptorTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/MappedInterceptorTests.java @@ -15,16 +15,17 @@ */ package org.springframework.web.servlet.handler; -import static org.junit.Assert.*; +import java.util.Comparator; +import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.util.AntPathMatcher; import org.springframework.util.PathMatcher; import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; -import java.util.Comparator; -import java.util.Map; +import static org.junit.Assert.*; /** * Test fixture for {@link MappedInterceptor} tests. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/PathMatchingUrlHandlerMappingTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/PathMatchingUrlHandlerMappingTests.java index 25b8d4a7ded..323f6aa402a 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/PathMatchingUrlHandlerMappingTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/PathMatchingUrlHandlerMappingTests.java @@ -16,6 +16,9 @@ package org.springframework.web.servlet.handler; +import org.junit.Before; +import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.ConfigurableWebApplicationContext; @@ -24,8 +27,6 @@ import org.springframework.web.servlet.HandlerExecutionChain; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.HandlerMapping; -import org.junit.Before; -import org.junit.Test; import static org.junit.Assert.*; /** diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolverTests.java index a931bab954a..31dfc5bdb7a 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/SimpleMappingExceptionResolverTests.java @@ -16,21 +16,20 @@ package org.springframework.web.servlet.handler; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; - import java.util.Collections; import java.util.Properties; - import javax.servlet.http.HttpServletResponse; import org.junit.Before; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.util.WebUtils; +import static org.junit.Assert.*; + /** * @author Seth Ladd * @author Juergen Hoeller diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMappingTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMappingTests.java index e2d2e695a3d..27a782788bb 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMappingTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMappingTests.java @@ -16,11 +16,14 @@ package org.springframework.web.servlet.handler; -import java.util.Map; import java.util.LinkedHashMap; +import java.util.Map; + +import org.junit.Test; import org.springframework.beans.FatalBeanException; import org.springframework.beans.factory.NoSuchBeanDefinitionException; +import org.springframework.context.support.StaticApplicationContext; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.support.XmlWebApplicationContext; @@ -28,9 +31,7 @@ import org.springframework.web.servlet.HandlerExecutionChain; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.HandlerMapping; import org.springframework.web.util.WebUtils; -import org.springframework.context.support.StaticApplicationContext; -import org.junit.Test; import static org.junit.Assert.*; /** diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/ControllerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/ControllerTests.java index b7628eb630e..2d7dbf00a92 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/ControllerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/ControllerTests.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.mvc; import java.util.Properties; - import javax.servlet.RequestDispatcher; import javax.servlet.Servlet; import javax.servlet.ServletConfig; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/ParameterizableViewControllerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/ParameterizableViewControllerTests.java index 6afd4b9b7ba..f7d416e5d51 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/ParameterizableViewControllerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/ParameterizableViewControllerTests.java @@ -16,18 +16,17 @@ package org.springframework.web.servlet.mvc; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - import org.junit.Before; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.ui.ModelMap; import org.springframework.web.servlet.DispatcherServlet; import org.springframework.web.servlet.ModelAndView; +import static org.junit.Assert.*; + /** * Test fixture with a ParameterizableViewController. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/WebContentInterceptorTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/WebContentInterceptorTests.java index 8a4c04f77f6..c9251ac6426 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/WebContentInterceptorTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/WebContentInterceptorTests.java @@ -19,13 +19,13 @@ package org.springframework.web.servlet.mvc; import java.util.List; import java.util.Properties; +import org.junit.Before; +import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.web.servlet.support.WebContentGenerator; -import org.junit.Before; -import org.junit.Test; - import static org.junit.Assert.*; /** diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolverTests.java index 62ac0171a6d..35dd4368e85 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerExceptionResolverTests.java @@ -25,7 +25,6 @@ import java.net.SocketException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; @@ -39,6 +38,8 @@ import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.servlet.ModelAndView; +import static org.junit.Assert.*; + /** * @author Arjen Poutsma * @author Juergen Hoeller diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/CgLibProxyServletAnnotationTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/CgLibProxyServletAnnotationTests.java index 3b1b46c6b4d..8a121dd8430 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/CgLibProxyServletAnnotationTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/CgLibProxyServletAnnotationTests.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.io.Writer; import javax.servlet.ServletException; -import static org.junit.Assert.*; import org.junit.Test; import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator; @@ -37,6 +36,8 @@ import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.GenericWebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; +import static org.junit.Assert.*; + /** * @author Arjen Poutsma * @since 3.0 diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/JdkProxyServletAnnotationTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/JdkProxyServletAnnotationTests.java index 45249d3e4b1..18ffe68f7f7 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/JdkProxyServletAnnotationTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/JdkProxyServletAnnotationTests.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.io.Writer; import javax.servlet.ServletException; -import static org.junit.Assert.*; import org.junit.Test; import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator; @@ -37,6 +36,8 @@ import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.GenericWebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; +import static org.junit.Assert.*; + /** * @author Arjen Poutsma * @since 3.0 diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/MethodNameDispatchingController.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/MethodNameDispatchingController.java index e8f97c1f220..79fb383c4a6 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/MethodNameDispatchingController.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/MethodNameDispatchingController.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.mvc.annotation; import java.io.IOException; - import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/RequestSpecificMappingInfoComparatorTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/RequestSpecificMappingInfoComparatorTests.java index 1b941da624b..b20e3fe5a61 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/RequestSpecificMappingInfoComparatorTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/RequestSpecificMappingInfoComparatorTests.java @@ -21,13 +21,14 @@ import java.util.Collections; import java.util.Comparator; import java.util.List; -import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.bind.annotation.RequestMethod; +import static org.junit.Assert.*; + /** * @author Arjen Poutsma */ diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolverTests.java index 8c08804f14a..961114c831b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolverTests.java @@ -16,8 +16,6 @@ package org.springframework.web.servlet.mvc.annotation; -import static org.junit.Assert.*; - import java.util.Locale; import org.junit.Before; @@ -31,6 +29,8 @@ import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.servlet.ModelAndView; +import static org.junit.Assert.*; + /** @author Arjen Poutsma */ public class ResponseStatusExceptionResolverTests { diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationMappingUtilsTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationMappingUtilsTests.java index c0c7fce7588..e3c8ff7e4e1 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationMappingUtilsTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationMappingUtilsTests.java @@ -16,12 +16,13 @@ package org.springframework.web.servlet.mvc.annotation; -import static org.junit.Assert.*; import org.junit.Test; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.bind.annotation.RequestMethod; +import static org.junit.Assert.*; + /** * @author Arjen Poutsma */ diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7766Tests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7766Tests.java index b48a1465011..7feeb186c00 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7766Tests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7766Tests.java @@ -19,6 +19,7 @@ package org.springframework.web.servlet.mvc.annotation; import java.awt.Color; import org.junit.Test; + import org.springframework.core.convert.converter.Converter; import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.core.convert.support.GenericConversionService; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7839Tests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7839Tests.java index c963438df2c..1cc9ff91ba7 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7839Tests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7839Tests.java @@ -16,14 +16,13 @@ package org.springframework.web.servlet.mvc.annotation; -import static org.junit.Assert.assertEquals; - import java.util.List; import java.util.Map; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; + import org.springframework.core.convert.converter.Converter; import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.core.convert.support.GenericConversionService; @@ -33,6 +32,8 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.support.ConfigurableWebBindingInitializer; +import static org.junit.Assert.*; + @Deprecated public class Spr7839Tests { diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/UriTemplateServletAnnotationControllerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/UriTemplateServletAnnotationControllerTests.java index 13adf5287cb..ca2df2ca23f 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/UriTemplateServletAnnotationControllerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/UriTemplateServletAnnotationControllerTests.java @@ -21,7 +21,6 @@ import java.io.Writer; import java.text.SimpleDateFormat; import java.util.Date; import java.util.GregorianCalendar; - import javax.servlet.ServletException; import javax.servlet.http.HttpServletResponse; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/CompositeRequestConditionTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/CompositeRequestConditionTests.java index 0261cca9d8b..5bd2b73c65a 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/CompositeRequestConditionTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/CompositeRequestConditionTests.java @@ -16,17 +16,16 @@ package org.springframework.web.servlet.mvc.condition; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; - import javax.servlet.http.HttpServletRequest; import org.junit.Before; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.bind.annotation.RequestMethod; +import static org.junit.Assert.*; + /** * A test fixture for {@link CompositeRequestCondition} tests. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/ConsumesRequestConditionTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/ConsumesRequestConditionTests.java index 11d5b7e23b6..4756df48fd9 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/ConsumesRequestConditionTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/ConsumesRequestConditionTests.java @@ -16,20 +16,16 @@ package org.springframework.web.servlet.mvc.condition; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import java.util.Collection; import java.util.Collections; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.web.servlet.mvc.condition.ConsumesRequestCondition; import org.springframework.web.servlet.mvc.condition.ConsumesRequestCondition.ConsumeMediaTypeExpression; +import static org.junit.Assert.*; + /** * @author Arjen Poutsma */ diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/HeadersRequestConditionTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/HeadersRequestConditionTests.java index 0d8642b9c5d..d7420db69a8 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/HeadersRequestConditionTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/HeadersRequestConditionTests.java @@ -16,19 +16,15 @@ package org.springframework.web.servlet.mvc.condition; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - import java.util.Collection; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.web.servlet.mvc.condition.HeadersRequestCondition; import org.springframework.web.servlet.mvc.condition.HeadersRequestCondition.HeaderExpression; +import static org.junit.Assert.*; + /** * @author Arjen Poutsma */ diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/ParamsRequestConditionTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/ParamsRequestConditionTests.java index 87e77f753e9..afbc3aa5aa7 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/ParamsRequestConditionTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/ParamsRequestConditionTests.java @@ -16,19 +16,15 @@ package org.springframework.web.servlet.mvc.condition; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - import java.util.Collection; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.web.servlet.mvc.condition.ParamsRequestCondition; import org.springframework.web.servlet.mvc.condition.ParamsRequestCondition.ParamExpression; +import static org.junit.Assert.*; + /** * @author Arjen Poutsma */ diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/PatternsRequestConditionTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/PatternsRequestConditionTests.java index 749d6314aaf..091daed7550 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/PatternsRequestConditionTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/PatternsRequestConditionTests.java @@ -18,10 +18,10 @@ package org.springframework.web.servlet.mvc.condition; import java.util.Arrays; import java.util.List; - import javax.servlet.http.HttpServletRequest; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import static org.junit.Assert.*; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/ProducesRequestConditionTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/ProducesRequestConditionTests.java index 23d1ae8f99a..57d43e7e0d4 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/ProducesRequestConditionTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/ProducesRequestConditionTests.java @@ -16,19 +16,16 @@ package org.springframework.web.servlet.mvc.condition; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import java.util.Collection; import java.util.Collections; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.servlet.mvc.condition.ProducesRequestCondition.ProduceMediaTypeExpression; +import static org.junit.Assert.*; + /** * @author Arjen Poutsma * @author Rossen Stoyanchev diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/RequestConditionHolderTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/RequestConditionHolderTests.java index ad38868972c..a7dab0d3932 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/RequestConditionHolderTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/RequestConditionHolderTests.java @@ -16,16 +16,15 @@ package org.springframework.web.servlet.mvc.condition; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; - import javax.servlet.http.HttpServletRequest; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.bind.annotation.RequestMethod; +import static org.junit.Assert.*; + /** * A test fixture for {@link RequestConditionHolder} tests. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/RequestMethodsRequestConditionTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/RequestMethodsRequestConditionTests.java index d198523e85b..e0430306df2 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/RequestMethodsRequestConditionTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/RequestMethodsRequestConditionTests.java @@ -16,11 +16,13 @@ package org.springframework.web.servlet.mvc.condition; -import static org.junit.Assert.*; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.bind.annotation.RequestMethod; +import static org.junit.Assert.*; + /** * @author Arjen Poutsma */ diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMappingTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMappingTests.java index 6abeb2917b9..b9c893a4c2b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMappingTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMappingTests.java @@ -22,11 +22,11 @@ import java.util.Collections; import java.util.HashSet; import java.util.Map; import java.util.Set; - import javax.servlet.http.HttpServletRequest; import org.junit.Before; import org.junit.Test; + import org.springframework.core.annotation.AnnotationUtils; import org.springframework.http.MediaType; import org.springframework.mock.web.test.MockHttpServletRequest; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMethodMappingNamingStrategyTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMethodMappingNamingStrategyTests.java index 4e1565faabe..fb3b4a67b98 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMethodMappingNamingStrategyTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMethodMappingNamingStrategyTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,15 +16,16 @@ package org.springframework.web.servlet.mvc.method; +import java.lang.reflect.Method; + import org.junit.Test; + import org.springframework.util.ClassUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.handler.HandlerMethodMappingNamingStrategy; -import java.lang.reflect.Method; - -import static org.junit.Assert.assertEquals; +import static org.junit.Assert.*; /** * Unit tests for diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/AbstractServletHandlerMethodTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/AbstractServletHandlerMethodTests.java index 3bf7e5e0290..e26353afa8b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/AbstractServletHandlerMethodTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/AbstractServletHandlerMethodTests.java @@ -16,11 +16,10 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertNotNull; - import javax.servlet.ServletException; import org.junit.After; + import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.ApplicationContextInitializer; import org.springframework.mock.web.test.MockServletConfig; @@ -30,6 +29,8 @@ import org.springframework.web.servlet.DispatcherServlet; import org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver; import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver; +import static org.junit.Assert.*; + /** * Base class for tests using on the DispatcherServlet and HandlerMethod infrastructure classes: *
    diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolverTests.java index 4fab4071029..7de8773bf61 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExceptionHandlerExceptionResolverTests.java @@ -16,12 +16,6 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - import java.io.IOException; import java.io.UnsupportedEncodingException; import java.io.Writer; @@ -30,6 +24,7 @@ import java.util.Arrays; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; + import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -47,6 +42,8 @@ import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.method.support.HandlerMethodReturnValueHandler; import org.springframework.web.servlet.ModelAndView; +import static org.junit.Assert.*; + /** * Test fixture with {@link ExceptionHandlerExceptionResolver}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinderTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinderTests.java index 33307032e58..0b6fe464e8b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinderTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinderTests.java @@ -16,19 +16,20 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; - import java.util.HashMap; import java.util.Map; import org.junit.Before; import org.junit.Test; -import org.springframework.tests.sample.beans.TestBean; + import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.bind.ServletRequestDataBinder; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.servlet.HandlerMapping; +import static org.junit.Assert.*; + /** * Test fixture for {@link ExtendedServletRequestDataBinder}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HandlerMethodAnnotationDetectionTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HandlerMethodAnnotationDetectionTests.java index fa7a9f81303..60dda2a0afe 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HandlerMethodAnnotationDetectionTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HandlerMethodAnnotationDetectionTests.java @@ -16,9 +16,6 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - import java.lang.reflect.Method; import java.text.SimpleDateFormat; import java.util.Arrays; @@ -29,6 +26,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; + import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator; import org.springframework.aop.interceptor.SimpleTraceInterceptor; import org.springframework.aop.support.DefaultPointcutAdvisor; @@ -53,6 +51,8 @@ import org.springframework.web.context.support.GenericWebApplicationContext; import org.springframework.web.servlet.HandlerExecutionChain; import org.springframework.web.servlet.ModelAndView; +import static org.junit.Assert.*; + /** * Test various scenarios for detecting method-level and method parameter annotations depending * on where they are located -- on interfaces, parent classes, in parameterized methods, or in diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorMockTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorMockTests.java index a1c6c928ae8..273283fdbca 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorMockTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/HttpEntityMethodProcessorMockTests.java @@ -45,7 +45,9 @@ import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.support.ModelAndViewContainer; import static org.junit.Assert.*; +import static org.mockito.BDDMockito.any; import static org.mockito.BDDMockito.*; +import static org.mockito.BDDMockito.isA; import static org.mockito.Matchers.eq; import static org.springframework.web.servlet.HandlerMapping.*; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariablesMapMethodArgumentResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariablesMapMethodArgumentResolverTests.java index 73747866217..6dabf427163 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariablesMapMethodArgumentResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariablesMapMethodArgumentResolverTests.java @@ -16,10 +16,6 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import java.util.Arrays; import java.util.Collections; @@ -28,6 +24,7 @@ import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; @@ -38,6 +35,8 @@ import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.support.ModelAndViewContainer; import org.springframework.web.servlet.HandlerMapping; +import static org.junit.Assert.*; + /** * Test fixture with {@link MatrixVariableMethodArgumentResolver}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariablesMethodArgumentResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariablesMethodArgumentResolverTests.java index 7da3b80ad90..e4d09585412 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariablesMethodArgumentResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MatrixVariablesMethodArgumentResolverTests.java @@ -16,10 +16,6 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import java.util.Arrays; import java.util.LinkedHashMap; @@ -28,6 +24,7 @@ import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.core.LocalVariableTableParameterNameDiscoverer; import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; @@ -40,6 +37,8 @@ import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.support.ModelAndViewContainer; import org.springframework.web.servlet.HandlerMapping; +import static org.junit.Assert.*; + /** * Test fixture with {@link MatrixVariableMethodArgumentResolver}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewMethodReturnValueHandlerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewMethodReturnValueHandlerTests.java index b03160d1278..38807604aaf 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewMethodReturnValueHandlerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewMethodReturnValueHandlerTests.java @@ -16,16 +16,11 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.ui.ModelMap; @@ -35,6 +30,8 @@ import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.support.RedirectAttributesModelMap; import org.springframework.web.servlet.view.RedirectView; +import static org.junit.Assert.*; + /** * Test fixture with {@link ModelAndViewMethodReturnValueHandler}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java index e0a515c3b05..febaff9135f 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java @@ -16,28 +16,24 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import org.junit.Before; import org.junit.Test; -import org.springframework.tests.sample.beans.TestBean; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.ui.ExtendedModelMap; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.support.ModelAndViewContainer; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.annotation.ModelAndViewResolver; -import org.springframework.web.servlet.mvc.method.annotation.ModelAndViewResolverMethodReturnValueHandler; + +import static org.junit.Assert.*; /** * Test fixture with {@link ModelAndViewResolverMethodReturnValueHandler}. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilderTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilderTests.java index 0a7a90b8394..c98a58d16df 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilderTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/MvcUriComponentsBuilderTests.java @@ -16,12 +16,16 @@ package org.springframework.web.servlet.mvc.method.annotation; +import java.util.Arrays; +import java.util.List; + import org.hamcrest.Matchers; import org.joda.time.DateTime; import org.joda.time.format.ISODateTimeFormat; import org.junit.After; import org.junit.Before; import org.junit.Test; + import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat.ISO; import org.springframework.http.HttpEntity; @@ -35,11 +39,8 @@ import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.util.UriComponents; -import java.util.Arrays; -import java.util.List; - import static org.hamcrest.Matchers.*; -import static org.junit.Assert.assertThat; +import static org.junit.Assert.*; import static org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder.*; /** diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMapMethodArgumentResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMapMethodArgumentResolverTests.java index 9a5bc84a6e5..fab29a4cec6 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMapMethodArgumentResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMapMethodArgumentResolverTests.java @@ -16,10 +16,6 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import java.util.Collections; import java.util.HashMap; @@ -27,6 +23,7 @@ import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; @@ -35,6 +32,8 @@ import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.support.ModelAndViewContainer; import org.springframework.web.servlet.HandlerMapping; +import static org.junit.Assert.*; + /** * Test fixture with {@link PathVariableMapMethodArgumentResolver}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMethodArgumentResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMethodArgumentResolverTests.java index 4deb2412e71..b60976dba7e 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMethodArgumentResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMethodArgumentResolverTests.java @@ -16,18 +16,13 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; @@ -37,7 +32,8 @@ import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.support.ModelAndViewContainer; import org.springframework.web.servlet.HandlerMapping; import org.springframework.web.servlet.View; -import org.springframework.web.servlet.mvc.method.annotation.PathVariableMethodArgumentResolver; + +import static org.junit.Assert.*; /** * Test fixture with {@link PathVariableMethodArgumentResolver}. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java index caa7fbcea66..dc90c0da2e5 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java @@ -16,13 +16,6 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - import java.awt.Color; import java.lang.reflect.Method; import java.net.URI; @@ -35,7 +28,6 @@ import java.util.GregorianCalendar; import java.util.HashMap; import java.util.List; import java.util.Map; - import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -44,7 +36,7 @@ import javax.validation.Valid; import org.junit.After; import org.junit.Before; import org.junit.Test; -import org.springframework.tests.sample.beans.TestBean; + import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.core.MethodParameter; @@ -56,6 +48,7 @@ import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockMultipartFile; import org.springframework.mock.web.test.MockMultipartHttpServletRequest; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.ui.Model; import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; @@ -87,6 +80,8 @@ import org.springframework.web.servlet.HandlerMapping; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.util.UriComponentsBuilder; +import static org.junit.Assert.*; + /** * A test fixture with a controller with all supported method signature styles * and arguments. A convenient place to test or confirm a problem with a diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartIntegrationTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartIntegrationTests.java index 6b8d8830719..c69c14011e3 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartIntegrationTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartIntegrationTests.java @@ -18,7 +18,6 @@ package org.springframework.web.servlet.mvc.method.annotation; import java.net.URI; import java.util.Arrays; - import javax.servlet.MultipartConfigElement; import org.eclipse.jetty.server.Server; @@ -28,6 +27,7 @@ import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; + import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.ClassPathResource; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolverTests.java index 8f4c20d00b1..1fd3b01facb 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolverTests.java @@ -21,7 +21,6 @@ import java.lang.reflect.Method; import java.util.Arrays; import java.util.Collections; import java.util.List; - import javax.servlet.http.Part; import javax.validation.Valid; import javax.validation.constraints.NotNull; @@ -29,6 +28,7 @@ import javax.validation.constraints.NotNull; import org.hamcrest.Matchers; import org.junit.Before; import org.junit.Test; + import org.springframework.core.LocalVariableTableParameterNameDiscoverer; import org.springframework.core.MethodParameter; import org.springframework.http.MediaType; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorMockTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorMockTests.java index 9411ec146de..59ed692a13c 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorMockTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestResponseBodyMethodProcessorMockTests.java @@ -22,12 +22,12 @@ import java.nio.charset.Charset; import java.util.Arrays; import java.util.Collections; import java.util.List; - import javax.validation.Valid; import javax.validation.constraints.NotNull; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.http.HttpInputMessage; import org.springframework.http.HttpOutputMessage; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyAdviceChainTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyAdviceChainTests.java index 97f5b83381e..bc8a2a8e26d 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyAdviceChainTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyAdviceChainTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import java.util.Arrays; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; + import org.springframework.core.MethodParameter; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageConverter; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandlerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandlerTests.java index cd1b66c59a8..b4383e34e8d 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandlerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ResponseEntityExceptionHandlerTests.java @@ -15,19 +15,15 @@ */ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import java.util.Arrays; import java.util.EnumSet; import java.util.List; - import javax.servlet.http.HttpServletRequest; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.ConversionNotSupportedException; import org.springframework.beans.TypeMismatchException; import org.springframework.http.HttpHeaders; @@ -57,6 +53,8 @@ import org.springframework.web.servlet.NoHandlerFoundException; import org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMethodException; import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver; +import static org.junit.Assert.*; + /** * Test fixture for {@link ResponseEntityExceptionHandler}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java index 1716b32d890..737408a083e 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java @@ -42,7 +42,6 @@ import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; - import javax.servlet.ServletConfig; import javax.servlet.ServletContext; import javax.servlet.ServletException; @@ -55,6 +54,7 @@ import javax.validation.constraints.NotNull; import javax.xml.bind.annotation.XmlRootElement; import org.junit.Test; + import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator; import org.springframework.aop.interceptor.SimpleTraceInterceptor; import org.springframework.aop.support.DefaultPointcutAdvisor; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletCookieValueMethodArgumentResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletCookieValueMethodArgumentResolverTests.java index b1118f4c46f..427066408cf 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletCookieValueMethodArgumentResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletCookieValueMethodArgumentResolverTests.java @@ -16,20 +16,19 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; - import java.lang.reflect.Method; - import javax.servlet.http.Cookie; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.context.request.ServletWebRequest; -import org.springframework.web.servlet.mvc.method.annotation.ServletCookieValueMethodArgumentResolver; + +import static org.junit.Assert.*; /** * Test fixture with {@link ServletCookieValueMethodArgumentResolver}. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletInvocableHandlerMethodTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletInvocableHandlerMethodTests.java index e064a81a9df..3079f8d228f 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletInvocableHandlerMethodTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletInvocableHandlerMethodTests.java @@ -15,15 +15,16 @@ */ package org.springframework.web.servlet.mvc.method.annotation; + import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; import java.util.List; - import javax.servlet.http.HttpServletResponse; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -46,7 +47,7 @@ import org.springframework.web.method.support.ModelAndViewContainer; import org.springframework.web.servlet.view.RedirectView; import static org.junit.Assert.*; -import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.*; /** * Test fixture with {@link ServletInvocableHandlerMethod}. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolverTests.java index e29bb77226d..0b15b6ce7e8 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolverTests.java @@ -29,7 +29,6 @@ import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.support.ModelAndViewContainer; -import org.springframework.web.servlet.mvc.method.annotation.ServletResponseMethodArgumentResolver; import static org.junit.Assert.*; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/UriComponentsBuilderMethodArgumentResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/UriComponentsBuilderMethodArgumentResolverTests.java index 043467e47a9..79d580d32a8 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/UriComponentsBuilderMethodArgumentResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/UriComponentsBuilderMethodArgumentResolverTests.java @@ -16,23 +16,20 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.support.ModelAndViewContainer; -import org.springframework.web.servlet.mvc.method.annotation.UriComponentsBuilderMethodArgumentResolver; import org.springframework.web.servlet.support.ServletUriComponentsBuilder; import org.springframework.web.util.UriComponentsBuilder; +import static org.junit.Assert.*; + /** * Test fixture with {@link UriComponentsBuilderMethodArgumentResolver}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/UriTemplateServletAnnotationControllerHandlerMethodTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/UriTemplateServletAnnotationControllerHandlerMethodTests.java index 3739046c597..2718d61f6bc 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/UriTemplateServletAnnotationControllerHandlerMethodTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/UriTemplateServletAnnotationControllerHandlerMethodTests.java @@ -16,9 +16,6 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - import java.io.IOException; import java.io.Writer; import java.text.SimpleDateFormat; @@ -29,11 +26,11 @@ import java.util.HashMap; import java.util.List; import java.util.Locale; import java.util.Map; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.junit.Test; + import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.context.ApplicationContextInitializer; @@ -55,6 +52,8 @@ import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.mvc.annotation.UriTemplateServletAnnotationControllerTests; import org.springframework.web.servlet.view.AbstractView; +import static org.junit.Assert.*; + /** * The origin of this test class is {@link UriTemplateServletAnnotationControllerTests}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewMethodReturnValueHandlerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewMethodReturnValueHandlerTests.java index 21c9c76c7a8..293f9c6449f 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewMethodReturnValueHandlerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewMethodReturnValueHandlerTests.java @@ -16,24 +16,23 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Method; import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.ui.ModelMap; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.support.ModelAndViewContainer; import org.springframework.web.servlet.View; -import org.springframework.web.servlet.mvc.method.annotation.ViewMethodReturnValueHandler; import org.springframework.web.servlet.mvc.support.RedirectAttributesModelMap; import org.springframework.web.servlet.view.InternalResourceView; import org.springframework.web.servlet.view.RedirectView; +import static org.junit.Assert.*; + /** * Test fixture with {@link ViewMethodReturnValueHandler}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewNameMethodReturnValueHandlerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewNameMethodReturnValueHandlerTests.java index 29fcbcfede8..fba25796cc9 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewNameMethodReturnValueHandlerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewNameMethodReturnValueHandlerTests.java @@ -16,13 +16,9 @@ package org.springframework.web.servlet.mvc.method.annotation; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - - import org.junit.Before; import org.junit.Test; + import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.ui.ModelMap; @@ -30,6 +26,8 @@ import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.support.ModelAndViewContainer; import org.springframework.web.servlet.mvc.support.RedirectAttributesModelMap; +import static org.junit.Assert.*; + /** * Test fixture with {@link ViewNameMethodReturnValueHandler}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/multiaction/MultiActionControllerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/multiaction/MultiActionControllerTests.java index de40940d0d2..0aa2f8f6424 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/multiaction/MultiActionControllerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/multiaction/MultiActionControllerTests.java @@ -21,7 +21,6 @@ import java.sql.SQLException; import java.util.HashMap; import java.util.Map; import java.util.Properties; - import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -30,11 +29,11 @@ import javax.servlet.http.HttpSession; import junit.framework.TestCase; import org.springframework.beans.FatalBeanException; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.context.ApplicationContextException; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockHttpSession; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.HttpSessionRequiredException; import org.springframework.web.bind.ServletRequestBindingException; import org.springframework.web.servlet.ModelAndView; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java index 3ce1db1bbfe..deecd40afbf 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java @@ -16,25 +16,21 @@ package org.springframework.web.servlet.mvc.support; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; - import java.util.Collections; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.ConversionNotSupportedException; -import org.springframework.http.server.ServletServerHttpRequest; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.TypeMismatchException; import org.springframework.core.MethodParameter; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageNotReadableException; import org.springframework.http.converter.HttpMessageNotWritableException; +import org.springframework.http.server.ServletServerHttpRequest; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindException; import org.springframework.web.HttpMediaTypeNotSupportedException; @@ -47,6 +43,8 @@ import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.NoHandlerFoundException; import org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMethodException; +import static org.junit.Assert.*; + /** @author Arjen Poutsma */ public class DefaultHandlerExceptionResolverTests { diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/ParameterizableViewControllerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/ParameterizableViewControllerTests.java index 190e7b264bb..2192fa236f1 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/ParameterizableViewControllerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/ParameterizableViewControllerTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,6 +18,7 @@ package org.springframework.web.servlet.mvc.support; import org.junit.Before; import org.junit.Test; + import org.springframework.http.HttpStatus; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; @@ -26,9 +27,7 @@ import org.springframework.web.servlet.View; import org.springframework.web.servlet.mvc.ParameterizableViewController; import org.springframework.web.servlet.view.RedirectView; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; +import static org.junit.Assert.*; /** * Unit tests for diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java index cb7b41e9d69..1e6d8250ada 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java @@ -16,20 +16,21 @@ package org.springframework.web.servlet.mvc.support; -import static org.junit.Assert.assertEquals; - import java.util.Arrays; import java.util.HashMap; import java.util.Map; import org.junit.Before; import org.junit.Test; -import org.springframework.tests.sample.beans.TestBean; + import org.springframework.core.convert.converter.Converter; import org.springframework.format.support.DefaultFormattingConversionService; import org.springframework.format.support.FormattingConversionService; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.validation.DataBinder; +import static org.junit.Assert.*; + /** * * Test fixture for {@link RedirectAttributesModelMap} tests. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/AppCacheManifestTransformerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/AppCacheManifestTransformerTests.java index a8406b5c107..f9590c22d4d 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/AppCacheManifestTransformerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/AppCacheManifestTransformerTests.java @@ -19,12 +19,12 @@ package org.springframework.web.servlet.resource; import java.util.ArrayList; import java.util.Collections; import java.util.List; - import javax.servlet.http.HttpServletRequest; import org.hamcrest.Matchers; import org.junit.Before; import org.junit.Test; + import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.util.FileCopyUtils; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/CachingResourceResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/CachingResourceResolverTests.java index 5cae125b60d..5e89e7ea968 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/CachingResourceResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/CachingResourceResolverTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,20 +16,19 @@ package org.springframework.web.servlet.resource; +import java.util.ArrayList; +import java.util.List; + import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; + import org.springframework.cache.Cache; import org.springframework.cache.concurrent.ConcurrentMapCache; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import java.util.ArrayList; -import java.util.List; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; +import static org.junit.Assert.*; /** * Unit tests for diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/CssLinkResourceTransformerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/CssLinkResourceTransformerTests.java index 60dbe80ec24..e59249e9c64 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/CssLinkResourceTransformerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/CssLinkResourceTransformerTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/GzipResourceResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/GzipResourceResolverTests.java index b322f21c3a7..a5e06f469fc 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/GzipResourceResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/GzipResourceResolverTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,6 +27,7 @@ import java.util.zip.GZIPOutputStream; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; + import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.Resource; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/PathResourceResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/PathResourceResolverTests.java index e119fde68b1..f0404e30058 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/PathResourceResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/PathResourceResolverTests.java @@ -1,7 +1,5 @@ package org.springframework.web.servlet.resource; -import static org.junit.Assert.*; - import java.util.ArrayList; import java.util.List; @@ -11,6 +9,8 @@ import org.junit.Test; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; +import static org.junit.Assert.*; + /** * Unit tests for * {@link org.springframework.web.servlet.resource.PathResourceResolver}. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandlerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandlerTests.java index ebfa6bb29f1..07268a3e6a0 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandlerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceHttpRequestHandlerTests.java @@ -20,11 +20,11 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; - import javax.servlet.http.HttpServletResponse; import org.junit.Before; import org.junit.Test; + import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.mock.web.test.MockHttpServletRequest; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceTransformerSupportTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceTransformerSupportTests.java index d546047c87e..3ed6209cfef 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceTransformerSupportTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceTransformerSupportTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -15,11 +15,10 @@ */ package org.springframework.web.servlet.resource; -import static org.junit.Assert.assertEquals; - import java.util.Arrays; import java.util.Collections; import java.util.List; +import javax.servlet.http.HttpServletRequest; import org.junit.Before; import org.junit.Test; @@ -27,9 +26,8 @@ import org.junit.Test; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.web.servlet.HandlerMapping; -import javax.servlet.http.HttpServletRequest; +import static org.junit.Assert.*; /** * Unit tests for {@code ResourceTransformerSupport}. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderJavaConfigTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderJavaConfigTests.java index 6e9a46bdcb6..9ad2f6aa4d0 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderJavaConfigTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderJavaConfigTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,13 +22,15 @@ import javax.servlet.http.HttpServletResponse; import org.junit.Before; import org.junit.Test; + import org.springframework.context.annotation.Configuration; import org.springframework.mock.web.test.MockFilterChain; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; -import org.springframework.web.servlet.config.annotation.*; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; import static org.junit.Assert.*; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderTests.java index 870b3055749..beb043d113b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/ResourceUrlProviderTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,7 @@ import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/VersionResourceResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/VersionResourceResolverTests.java index f222f420f37..c6808f320b9 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/VersionResourceResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/resource/VersionResourceResolverTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,7 @@ import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/DispatcherServletInitializerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/DispatcherServletInitializerTests.java index 96cca6d8699..568c8b619b9 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/DispatcherServletInitializerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/DispatcherServletInitializerTests.java @@ -23,7 +23,6 @@ import javax.servlet.Servlet; import javax.servlet.ServletException; import javax.servlet.ServletRegistration; -import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; @@ -32,6 +31,8 @@ import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.StaticWebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; +import static org.junit.Assert.*; + /** * Test case for {@link AbstractDispatcherServletInitializer}. * diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/MockFilterRegistration.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/MockFilterRegistration.java index d3d0547fba8..55c20261678 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/MockFilterRegistration.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/MockFilterRegistration.java @@ -20,7 +20,6 @@ import java.util.EnumSet; import java.util.HashMap; import java.util.Map; import java.util.Set; - import javax.servlet.DispatcherType; import javax.servlet.FilterRegistration.Dynamic; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/MockServletRegistration.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/MockServletRegistration.java index 958f1755b49..54076069807 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/MockServletRegistration.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/MockServletRegistration.java @@ -21,7 +21,6 @@ import java.util.Collection; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; - import javax.servlet.MultipartConfigElement; import javax.servlet.ServletRegistration; import javax.servlet.ServletSecurityElement; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/RequestDataValueProcessorWrapper.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/RequestDataValueProcessorWrapper.java index f760ed262ad..dcd8bca0618 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/RequestDataValueProcessorWrapper.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/RequestDataValueProcessorWrapper.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.support; import java.util.Map; - import javax.servlet.http.HttpServletRequest; public class RequestDataValueProcessorWrapper implements RequestDataValueProcessor { diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/ServletUriComponentsBuilderTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/ServletUriComponentsBuilderTests.java index 2bc7dacfd30..b3da135eff2 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/ServletUriComponentsBuilderTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/ServletUriComponentsBuilderTests.java @@ -18,13 +18,13 @@ package org.springframework.web.servlet.support; import org.junit.Before; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.util.UriComponents; import static org.junit.Assert.*; -import static org.junit.Assert.assertEquals; /** * Unit tests for diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/EvalTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/EvalTagTests.java index 12fe6662673..796ada5053f 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/EvalTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/EvalTagTests.java @@ -20,7 +20,6 @@ import java.math.BigDecimal; import java.util.HashMap; import java.util.Locale; import java.util.Map; - import javax.servlet.jsp.tagext.Tag; import org.springframework.context.support.GenericApplicationContext; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ThemeTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ThemeTagTests.java index b7d0dc49e37..c120f6b3dd3 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ThemeTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ThemeTagTests.java @@ -18,7 +18,6 @@ package org.springframework.web.servlet.tags; import java.util.Arrays; import java.util.List; - import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.jsp.JspException; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/UrlTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/UrlTagTests.java index db5ee2cf296..0ce1d6adc33 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/UrlTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/UrlTagTests.java @@ -16,15 +16,11 @@ package org.springframework.web.servlet.tags; -import static org.hamcrest.Matchers.instanceOf; -import static org.junit.Assert.assertThat; - import java.lang.reflect.Method; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; - import javax.servlet.jsp.JspException; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.Tag; @@ -33,6 +29,9 @@ import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockPageContext; import org.springframework.util.ReflectionUtils; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; + /** * @author Scott Andrews */ diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractFormTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractFormTagTests.java index f1b27c493ed..16ef21e7c1b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractFormTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractFormTagTests.java @@ -18,9 +18,9 @@ package org.springframework.web.servlet.tags.form; import javax.servlet.jsp.JspException; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockPageContext; +import org.springframework.tests.sample.beans.TestBean; /** * @author Rob Harrop diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTagTests.java index 3f00bf14527..49f7f0bd5cd 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTagTests.java @@ -20,7 +20,6 @@ import java.io.StringWriter; import java.io.Writer; import java.util.HashMap; import java.util.Map; - import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; import javax.servlet.jsp.JspException; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java index 4d20139ede0..270e8561c83 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.tags.form; import java.io.Writer; - import javax.servlet.jsp.tagext.Tag; import org.springframework.tests.sample.beans.TestBean; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java index 895188b7f6c..b577c4c2ef3 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java @@ -24,7 +24,6 @@ import java.util.Date; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; - import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; @@ -32,10 +31,10 @@ import org.dom4j.Document; import org.dom4j.Element; import org.dom4j.io.SAXReader; +import org.springframework.beans.propertyeditors.StringTrimmerEditor; import org.springframework.tests.sample.beans.Colour; import org.springframework.tests.sample.beans.Pet; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.beans.propertyeditors.StringTrimmerEditor; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java index a0835d6ef8c..bb63f8b5724 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java @@ -28,7 +28,6 @@ import java.util.List; import java.util.Locale; import java.util.Map; import java.util.Set; - import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; @@ -36,12 +35,12 @@ import org.dom4j.Document; import org.dom4j.Element; import org.dom4j.io.SAXReader; -import org.springframework.tests.sample.beans.Colour; -import org.springframework.tests.sample.beans.Pet; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.propertyeditors.StringTrimmerEditor; import org.springframework.format.Formatter; import org.springframework.format.support.FormattingConversionService; +import org.springframework.tests.sample.beans.Colour; +import org.springframework.tests.sample.beans.Pet; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.ObjectUtils; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ErrorsTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ErrorsTagTests.java index ae7dbe67b68..0d4f2a64f4b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ErrorsTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ErrorsTagTests.java @@ -25,9 +25,9 @@ import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.BodyTag; import javax.servlet.jsp.tagext.Tag; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.mock.web.test.MockBodyContent; import org.springframework.mock.web.test.MockPageContext; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; import org.springframework.validation.Errors; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/FormTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/FormTagTests.java index 2612761a2b9..7d8d9d53517 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/FormTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/FormTagTests.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.tags.form; import java.util.Collections; - import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.Tag; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java index aeef9bb96fa..25a92081388 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.tags.form; import java.io.Writer; - import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/LabelTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/LabelTagTests.java index 23b9016c747..67ec7aed581 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/LabelTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/LabelTagTests.java @@ -19,8 +19,8 @@ package org.springframework.web.servlet.tags.form; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.mock.web.test.MockPageContext; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.servlet.tags.NestedPathTag; /** diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/PasswordInputTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/PasswordInputTagTests.java index c4787c01058..8bca618fdf0 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/PasswordInputTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/PasswordInputTagTests.java @@ -17,7 +17,6 @@ package org.springframework.web.servlet.tags.form; import java.io.Writer; - import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonTagTests.java index 42190d39f82..55767149865 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonTagTests.java @@ -19,7 +19,6 @@ package org.springframework.web.servlet.tags.form; import java.beans.PropertyEditorSupport; import java.io.StringReader; import java.util.Collections; - import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java index 738d5cddf9b..a8c46292ff5 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java @@ -26,7 +26,6 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; - import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; @@ -34,10 +33,11 @@ import org.dom4j.Document; import org.dom4j.Element; import org.dom4j.Node; import org.dom4j.io.SAXReader; + +import org.springframework.beans.propertyeditors.StringTrimmerEditor; import org.springframework.tests.sample.beans.Colour; import org.springframework.tests.sample.beans.Pet; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.beans.propertyeditors.StringTrimmerEditor; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TagIdGeneratorTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TagIdGeneratorTests.java index c1646c2dab9..6442bcdbee1 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TagIdGeneratorTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TagIdGeneratorTests.java @@ -16,10 +16,10 @@ package org.springframework.web.servlet.tags.form; -import junit.framework.TestCase; - import javax.servlet.jsp.PageContext; +import junit.framework.TestCase; + import org.springframework.mock.web.test.MockPageContext; /** diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/BaseViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/BaseViewTests.java index ad0a6cdae6c..67946cf8b41 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/BaseViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/BaseViewTests.java @@ -15,13 +15,13 @@ */ package org.springframework.web.servlet.view; + import java.io.IOException; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Properties; import java.util.Set; - import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslatorTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslatorTests.java index 42f5274a2c4..dc882e4c50b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslatorTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/DefaultRequestToViewNameTranslatorTests.java @@ -16,12 +16,13 @@ package org.springframework.web.servlet.view; -import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; import org.springframework.mock.web.test.MockHttpServletRequest; +import static org.junit.Assert.*; + /** * @author Rick Evans * @author Juergen Hoeller diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java index 3b142aca481..13ff3ed4315 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java @@ -20,7 +20,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewUriTemplateTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewUriTemplateTests.java index a95173f91c6..ed32bd6cace 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewUriTemplateTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewUriTemplateTests.java @@ -16,13 +16,12 @@ package org.springframework.web.servlet.view; -import static org.junit.Assert.assertEquals; - import java.util.HashMap; import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.ui.ModelMap; @@ -31,6 +30,8 @@ import org.springframework.web.servlet.FlashMap; import org.springframework.web.servlet.HandlerMapping; import org.springframework.web.servlet.support.SessionFlashMapManager; +import static org.junit.Assert.*; + public class RedirectViewUriTemplateTests { private MockHttpServletRequest request; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ResourceBundleViewResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ResourceBundleViewResolverTests.java index 19e4551fb3d..304e5dab16e 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ResourceBundleViewResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ResourceBundleViewResolverTests.java @@ -19,7 +19,6 @@ package org.springframework.web.servlet.view; import java.util.Locale; import java.util.Map; import java.util.MissingResourceException; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ViewResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ViewResolverTests.java index a7e0ac0c38e..2a30b5afb90 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ViewResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ViewResolverTests.java @@ -35,7 +35,6 @@ import org.junit.Test; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.PropertyValue; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.context.ApplicationContextException; import org.springframework.core.io.ClassPathResource; @@ -44,6 +43,7 @@ import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockRequestDispatcher; import org.springframework.mock.web.test.MockServletContext; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.context.support.ServletContextResource; import org.springframework.web.context.support.StaticWebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/document/ExcelViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/document/ExcelViewTests.java index a95bf6217c9..d6cfc81b3aa 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/document/ExcelViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/document/ExcelViewTests.java @@ -21,7 +21,6 @@ import java.lang.reflect.Field; import java.util.HashMap; import java.util.Locale; import java.util.Map; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -33,7 +32,6 @@ import jxl.read.biff.WorkbookParser; import jxl.write.Label; import jxl.write.WritableSheet; import jxl.write.WritableWorkbook; - import org.apache.poi.hssf.usermodel.HSSFCell; import org.apache.poi.hssf.usermodel.HSSFRow; import org.apache.poi.hssf.usermodel.HSSFSheet; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerConfigurerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerConfigurerTests.java index f926aac0463..2dc012de420 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerConfigurerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerConfigurerTests.java @@ -20,6 +20,8 @@ import java.io.IOException; import java.util.HashMap; import java.util.Properties; +import freemarker.template.Configuration; +import freemarker.template.Template; import org.junit.Test; import org.springframework.core.io.ByteArrayResource; @@ -30,9 +32,6 @@ import org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean; import org.springframework.ui.freemarker.FreeMarkerTemplateUtils; import org.springframework.ui.freemarker.SpringTemplateLoader; -import freemarker.template.Configuration; -import freemarker.template.Template; - import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerViewTests.java index 0131151f0e9..98346c83eef 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerViewTests.java @@ -23,10 +23,14 @@ import java.io.Writer; import java.util.HashMap; import java.util.Locale; import java.util.Map; - import javax.servlet.http.HttpServletResponse; +import freemarker.ext.servlet.AllHttpScopesHashModel; +import freemarker.template.Configuration; +import freemarker.template.Template; +import freemarker.template.TemplateException; import org.junit.Test; + import org.springframework.context.ApplicationContextException; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; @@ -40,11 +44,6 @@ import org.springframework.web.servlet.view.AbstractView; import org.springframework.web.servlet.view.InternalResourceView; import org.springframework.web.servlet.view.RedirectView; -import freemarker.ext.servlet.AllHttpScopesHashModel; -import freemarker.template.Configuration; -import freemarker.template.Template; -import freemarker.template.TemplateException; - import static org.junit.Assert.*; import static org.mockito.BDDMockito.*; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/groovy/GroovyMarkupConfigurerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/groovy/GroovyMarkupConfigurerTests.java index ca3fa329415..e20888d0c7a 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/groovy/GroovyMarkupConfigurerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/groovy/GroovyMarkupConfigurerTests.java @@ -15,8 +15,6 @@ */ package org.springframework.web.servlet.view.groovy; -import static org.junit.Assert.*; - import java.io.IOException; import java.net.URL; import java.net.URLClassLoader; @@ -34,6 +32,8 @@ import org.junit.Test; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.context.support.StaticApplicationContext; +import static org.junit.Assert.*; + /** * Unit tests for * {@link org.springframework.web.servlet.view.groovy.GroovyMarkupConfigurer}. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/groovy/GroovyMarkupViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/groovy/GroovyMarkupViewTests.java index dafeae4a678..3ad516583b8 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/groovy/GroovyMarkupViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/groovy/GroovyMarkupViewTests.java @@ -15,17 +15,12 @@ */ package org.springframework.web.servlet.view.groovy; -import static org.junit.Assert.*; -import static org.mockito.BDDMockito.*; -import static org.mockito.Mockito.mock; - import java.io.IOException; import java.io.Reader; import java.util.Arrays; import java.util.HashMap; import java.util.Locale; import java.util.Map; - import javax.servlet.ServletContext; import groovy.text.Template; @@ -48,6 +43,10 @@ import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.WebApplicationContext; +import static org.junit.Assert.*; +import static org.mockito.BDDMockito.*; +import static org.mockito.Mockito.mock; + /** * @author Brian Clozel */ diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractConfigurableJasperReportsViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractConfigurableJasperReportsViewTests.java index 64e9a702082..740b5c76553 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractConfigurableJasperReportsViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractConfigurableJasperReportsViewTests.java @@ -17,6 +17,7 @@ package org.springframework.web.servlet.view.jasperreports; import org.junit.Test; + import org.springframework.context.support.StaticApplicationContext; import static org.junit.Assert.*; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsTests.java index 77ca0de8b1c..14aac2eb006 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsTests.java @@ -23,7 +23,6 @@ import java.util.Locale; import java.util.Map; import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; - import org.junit.Before; import org.junit.BeforeClass; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsViewTests.java index 102d1e6f23e..5c93192e70c 100755 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/AbstractJasperReportsViewTests.java @@ -22,7 +22,6 @@ import java.util.LinkedList; import java.util.Locale; import java.util.Map; import java.util.Properties; - import javax.servlet.http.HttpServletResponse; import javax.sql.DataSource; @@ -32,7 +31,6 @@ import net.sf.jasperreports.engine.JRExporterParameter; import net.sf.jasperreports.engine.JasperReport; import net.sf.jasperreports.engine.data.JRAbstractBeanDataSourceProvider; import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; - import org.junit.Ignore; import org.junit.Test; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/ExporterParameterTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/ExporterParameterTests.java index 19f50595a50..ef4e9f2f37c 100755 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/ExporterParameterTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/ExporterParameterTests.java @@ -19,14 +19,13 @@ package org.springframework.web.servlet.view.jasperreports; import java.util.HashMap; import java.util.Locale; import java.util.Map; - import javax.servlet.http.HttpServletResponse; import net.sf.jasperreports.engine.JRExporterParameter; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.export.JRHtmlExporterParameter; - import org.junit.Test; + import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.support.StaticWebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/JasperReportsHtmlViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/JasperReportsHtmlViewTests.java index 3e67afa988c..ccf7d9f2853 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/JasperReportsHtmlViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/JasperReportsHtmlViewTests.java @@ -17,8 +17,8 @@ package org.springframework.web.servlet.view.jasperreports; import net.sf.jasperreports.engine.export.JRHtmlExporterParameter; - import org.junit.Test; + import org.springframework.beans.factory.support.BeanDefinitionReader; import org.springframework.beans.factory.support.PropertiesBeanDefinitionReader; import org.springframework.core.io.ClassPathResource; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/JasperReportsMultiFormatViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/JasperReportsMultiFormatViewTests.java index 699ba574b6c..ec5f958504b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/JasperReportsMultiFormatViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/jasperreports/JasperReportsMultiFormatViewTests.java @@ -19,12 +19,11 @@ package org.springframework.web.servlet.view.jasperreports; import java.util.HashMap; import java.util.Map; import java.util.Properties; - import javax.servlet.http.HttpServletResponse; import net.sf.jasperreports.engine.JasperPrint; - import org.junit.Test; + import org.springframework.tests.Assume; import org.springframework.tests.TestGroup; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/json/MappingJackson2JsonViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/json/MappingJackson2JsonViewTests.java index 8fe4ab5dc5b..94604f73313 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/json/MappingJackson2JsonViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/json/MappingJackson2JsonViewTests.java @@ -17,14 +17,31 @@ package org.springframework.web.servlet.view.json; import java.io.IOException; -import java.util.*; +import java.util.Arrays; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Set; import com.fasterxml.jackson.annotation.JsonView; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; +import com.fasterxml.jackson.databind.ser.BeanSerializerFactory; +import com.fasterxml.jackson.databind.ser.SerializerFactory; import org.junit.Before; import org.junit.Test; import org.mozilla.javascript.Context; import org.mozilla.javascript.ContextFactory; import org.mozilla.javascript.ScriptableObject; + import org.springframework.http.MediaType; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; @@ -32,17 +49,6 @@ import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; import org.springframework.web.servlet.View; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.JavaType; -import com.fasterxml.jackson.databind.JsonMappingException; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.SerializerProvider; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; -import com.fasterxml.jackson.databind.ser.BeanSerializerFactory; -import com.fasterxml.jackson.databind.ser.SerializerFactory; - import static org.junit.Assert.*; import static org.mockito.Mockito.*; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/tiles3/TilesViewResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/tiles3/TilesViewResolverTests.java index a3c14a01931..020b981034c 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/tiles3/TilesViewResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/tiles3/TilesViewResolverTests.java @@ -21,6 +21,7 @@ import org.apache.tiles.request.Request; import org.apache.tiles.request.render.Renderer; import org.junit.Before; import org.junit.Test; + import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.support.StaticWebApplicationContext; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/tiles3/TilesViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/tiles3/TilesViewTests.java index b0f1b49c3c0..592f1782178 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/tiles3/TilesViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/tiles3/TilesViewTests.java @@ -22,6 +22,7 @@ import org.apache.tiles.request.Request; import org.apache.tiles.request.render.Renderer; import org.junit.Before; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockServletContext; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityConfigurerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityConfigurerTests.java index 64750505975..22429158802 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityConfigurerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityConfigurerTests.java @@ -16,9 +16,6 @@ package org.springframework.web.servlet.view.velocity; -import static org.hamcrest.Matchers.instanceOf; -import static org.junit.Assert.assertThat; - import java.io.File; import java.io.IOException; import java.net.MalformedURLException; @@ -28,9 +25,9 @@ import java.util.Properties; import java.util.Vector; import junit.framework.TestCase; - import org.apache.velocity.app.VelocityEngine; import org.apache.velocity.exception.VelocityException; + import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.DescriptiveResource; import org.springframework.core.io.FileSystemResource; @@ -40,6 +37,9 @@ import org.springframework.core.io.UrlResource; import org.springframework.ui.velocity.VelocityEngineFactoryBean; import org.springframework.ui.velocity.VelocityEngineUtils; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Juergen Hoeller diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityRenderTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityRenderTests.java index b07a53716ea..2927257bf36 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityRenderTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityRenderTests.java @@ -16,8 +16,6 @@ package org.springframework.web.servlet.view.velocity; -import static org.junit.Assert.assertEquals; - import java.io.IOException; import java.util.Collections; import java.util.HashMap; @@ -33,16 +31,19 @@ import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.springframework.tests.sample.beans.TestBean; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockServletContext; +import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.context.support.StaticWebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; import org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver; import org.springframework.web.servlet.theme.FixedThemeResolver; import org.springframework.web.util.NestedServletException; +import static org.junit.Assert.*; + /** * @author Dave Syer */ diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityToolboxViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityToolboxViewTests.java index c4debab1f33..f4d2d8be695 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityToolboxViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityToolboxViewTests.java @@ -1,12 +1,7 @@ package org.springframework.web.servlet.view.velocity; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - import java.util.HashMap; import java.util.Map; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -18,11 +13,14 @@ import org.apache.velocity.tools.generic.MathTool; import org.apache.velocity.tools.view.context.ChainedContext; import org.apache.velocity.tools.view.tools.LinkTool; import org.junit.Test; + import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.support.StaticWebApplicationContext; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Juergen Hoeller diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityViewResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityViewResolverTests.java index 54a7d016ce4..38d29dbf33b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityViewResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityViewResolverTests.java @@ -1,18 +1,18 @@ package org.springframework.web.servlet.view.velocity; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; - import java.util.Locale; import org.apache.velocity.Template; import org.apache.velocity.app.VelocityEngine; import org.junit.Test; + import org.springframework.web.context.support.StaticWebApplicationContext; import org.springframework.web.servlet.View; import org.springframework.web.servlet.view.InternalResourceView; import org.springframework.web.servlet.view.RedirectView; +import static org.junit.Assert.*; + /** * @author Rod Johnson * @author Juergen Hoeller diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityViewTests.java index 95f2aef1ffe..73a577f45a6 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/velocity/VelocityViewTests.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.util.HashMap; import java.util.Locale; import java.util.Map; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -33,6 +32,7 @@ import org.apache.velocity.tools.generic.DateTool; import org.apache.velocity.tools.generic.MathTool; import org.apache.velocity.tools.generic.NumberTool; import org.junit.Test; + import org.springframework.context.ApplicationContextException; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/xml/MappingJackson2XmlViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/xml/MappingJackson2XmlViewTests.java index 24d8406b641..c5965d0e656 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/xml/MappingJackson2XmlViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/xml/MappingJackson2XmlViewTests.java @@ -33,10 +33,8 @@ import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; import com.fasterxml.jackson.databind.ser.BeanSerializerFactory; import com.fasterxml.jackson.databind.ser.SerializerFactory; import com.fasterxml.jackson.dataformat.xml.XmlMapper; -import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; -import static org.mockito.Mockito.mock; import org.mozilla.javascript.Context; import org.mozilla.javascript.ContextFactory; import org.mozilla.javascript.ScriptableObject; @@ -47,6 +45,9 @@ import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.validation.BindingResult; import org.springframework.web.servlet.View; +import static org.junit.Assert.*; +import static org.mockito.Mockito.*; + /** * @author Sebastien Deleuze */ diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/xslt/XsltViewResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/xslt/XsltViewResolverTests.java index 7ed5c597a69..c61641ccfeb 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/xslt/XsltViewResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/xslt/XsltViewResolverTests.java @@ -16,12 +16,13 @@ package org.springframework.web.servlet.view.xslt; +import java.util.Locale; + import junit.framework.TestCase; + import org.springframework.context.support.StaticApplicationContext; import org.springframework.util.ClassUtils; -import java.util.Locale; - /** * @author Rob Harrop * @since 2.0 diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/xslt/XsltViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/xslt/XsltViewTests.java index 23766d7f4cd..6d08af5b789 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/xslt/XsltViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/xslt/XsltViewTests.java @@ -31,8 +31,6 @@ import javax.xml.transform.stream.StreamSource; import org.dom4j.Document; import org.dom4j.Element; import org.dom4j.io.SAXReader; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; import org.junit.Before; import org.junit.Test; import org.xml.sax.SAXException; @@ -44,6 +42,8 @@ import org.springframework.core.io.Resource; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; +import static org.junit.Assert.*; + /** * @author Rob Harrop * @author Juergen Hoeller diff --git a/spring-webmvc/src/test/java/org/springframework/web/util/NestedServletExceptionTests.java b/spring-webmvc/src/test/java/org/springframework/web/util/NestedServletExceptionTests.java index 9f2acd57d47..db3027ab6bd 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/util/NestedServletExceptionTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/util/NestedServletExceptionTests.java @@ -1,10 +1,11 @@ package org.springframework.web.util; -import static org.junit.Assert.*; - import org.junit.Test; + import org.springframework.core.NestedExceptionUtils; +import static org.junit.Assert.*; + public class NestedServletExceptionTests { @Test diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/CloseStatus.java b/spring-websocket/src/main/java/org/springframework/web/socket/CloseStatus.java index 9ea0dc5652b..11b1984d38f 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/CloseStatus.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/CloseStatus.java @@ -17,6 +17,7 @@ package org.springframework.web.socket; import org.eclipse.jetty.websocket.api.StatusCode; + import org.springframework.util.Assert; import org.springframework.util.ObjectUtils; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/SubProtocolCapable.java b/spring-websocket/src/main/java/org/springframework/web/socket/SubProtocolCapable.java index ef907cad3bd..dbabada0fa7 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/SubProtocolCapable.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/SubProtocolCapable.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketHandler.java index 51c0c6ee706..6349763ab9c 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketHandler.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketHttpHeaders.java b/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketHttpHeaders.java index c21fd301e1e..8efb5fab95f 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketHttpHeaders.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketHttpHeaders.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketSession.java b/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketSession.java index 9a2d06b11dd..30f914ef24c 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketSession.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/WebSocketSession.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/AbstractWebSocketSession.java b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/AbstractWebSocketSession.java index ff3a6827ddd..5b49d3bb787 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/AbstractWebSocketSession.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/AbstractWebSocketSession.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/NativeWebSocketSession.java b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/NativeWebSocketSession.java index 525d0bdcd7b..ef703279129 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/NativeWebSocketSession.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/NativeWebSocketSession.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketHandlerAdapter.java b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketHandlerAdapter.java index ba746bf5c16..6eb73264255 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketHandlerAdapter.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketHandlerAdapter.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,6 +27,7 @@ import org.eclipse.jetty.websocket.api.annotations.OnWebSocketMessage; import org.eclipse.jetty.websocket.api.annotations.WebSocket; import org.eclipse.jetty.websocket.api.extensions.Frame; import org.eclipse.jetty.websocket.common.OpCode; + import org.springframework.util.Assert; import org.springframework.web.socket.BinaryMessage; import org.springframework.web.socket.CloseStatus; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSession.java b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSession.java index 1ce3fdd2be5..cfb0aec6d90 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSession.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSession.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -26,6 +26,7 @@ import java.util.Map; import org.eclipse.jetty.websocket.api.Session; import org.eclipse.jetty.websocket.api.extensions.ExtensionConfig; + import org.springframework.http.HttpHeaders; import org.springframework.util.ObjectUtils; import org.springframework.web.socket.BinaryMessage; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/package-info.java index ad6c9639620..bd8564d6579 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/package-info.java @@ -1,21 +1,4 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Adapter classes for the Jetty WebSocket API. */ package org.springframework.web.socket.adapter.jetty; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/package-info.java index 551828030af..338750e1ef5 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/package-info.java @@ -1,21 +1,4 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Classes adapting Spring's WebSocket API to and from WebSocket providers. */ package org.springframework.web.socket.adapter; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/ConvertingEncoderDecoderSupport.java b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/ConvertingEncoderDecoderSupport.java index 45ccddfbfb3..5eded3e3755 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/ConvertingEncoderDecoderSupport.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/ConvertingEncoderDecoderSupport.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardToWebSocketExtensionAdapter.java b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardToWebSocketExtensionAdapter.java index 8cc9f805767..2b1837f4c0b 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardToWebSocketExtensionAdapter.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardToWebSocketExtensionAdapter.java @@ -16,15 +16,14 @@ package org.springframework.web.socket.adapter.standard; +import java.util.List; +import java.util.Locale; +import java.util.Map; import javax.websocket.Extension; import org.springframework.util.LinkedCaseInsensitiveMap; import org.springframework.web.socket.WebSocketExtension; -import java.util.List; -import java.util.Locale; -import java.util.Map; - /** * A sub-class of {@link org.springframework.web.socket.WebSocketExtension} that * can be constructed from an {@link javax.websocket.Extension}. diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardWebSocketHandlerAdapter.java b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardWebSocketHandlerAdapter.java index 31c5941d60b..dfbc58575e8 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardWebSocketHandlerAdapter.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardWebSocketHandlerAdapter.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,6 @@ package org.springframework.web.socket.adapter.standard; import java.nio.ByteBuffer; - import javax.websocket.CloseReason; import javax.websocket.Endpoint; import javax.websocket.EndpointConfig; @@ -25,6 +24,7 @@ import javax.websocket.MessageHandler; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.util.Assert; import org.springframework.web.socket.BinaryMessage; import org.springframework.web.socket.CloseStatus; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardWebSocketSession.java b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardWebSocketSession.java index 95d30f9122d..fbd3de4db70 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardWebSocketSession.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardWebSocketSession.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,7 +23,6 @@ import java.security.Principal; import java.util.ArrayList; import java.util.List; import java.util.Map; - import javax.websocket.CloseReason; import javax.websocket.CloseReason.CloseCodes; import javax.websocket.Extension; @@ -35,8 +34,8 @@ import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.PingMessage; import org.springframework.web.socket.PongMessage; import org.springframework.web.socket.TextMessage; -import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.WebSocketExtension; +import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.adapter.AbstractWebSocketSession; /** diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/package-info.java index 81a1fcf8488..b8c121ae866 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/package-info.java @@ -1,21 +1,4 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Adapter classes for the standard Java WebSocket API. */ package org.springframework.web.socket.adapter.standard; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/AbstractWebSocketClient.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/AbstractWebSocketClient.java index 59c61df7069..92577e1cbae 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/client/AbstractWebSocketClient.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/AbstractWebSocketClient.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,13 +25,14 @@ import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.http.HttpHeaders; import org.springframework.util.Assert; import org.springframework.util.concurrent.ListenableFuture; -import org.springframework.web.socket.WebSocketHandler; -import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.WebSocketExtension; +import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.WebSocketHttpHeaders; +import org.springframework.web.socket.WebSocketSession; import org.springframework.web.util.UriComponentsBuilder; /** diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/ConnectionManagerSupport.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/ConnectionManagerSupport.java index 3f65e0bece8..7fca9edb34c 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/client/ConnectionManagerSupport.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/ConnectionManagerSupport.java @@ -20,6 +20,7 @@ import java.net.URI; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.context.SmartLifecycle; import org.springframework.web.util.UriComponentsBuilder; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketClient.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketClient.java index beffb6c9056..b106f643314 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketClient.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/WebSocketClient.java @@ -20,8 +20,8 @@ import java.net.URI; import org.springframework.util.concurrent.ListenableFuture; import org.springframework.web.socket.WebSocketHandler; -import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.WebSocketHttpHeaders; +import org.springframework.web.socket.WebSocketSession; /** * Contract for initiating a WebSocket request. As an alternative considering using the diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/JettyWebSocketClient.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/JettyWebSocketClient.java index 67aec6a3152..65c240bda0e 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/JettyWebSocketClient.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/JettyWebSocketClient.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -26,6 +26,7 @@ import java.util.concurrent.Future; import org.eclipse.jetty.websocket.api.Session; import org.eclipse.jetty.websocket.client.ClientUpgradeRequest; import org.eclipse.jetty.websocket.client.WebSocketClient; + import org.springframework.context.Lifecycle; import org.springframework.core.task.AsyncListenableTaskExecutor; import org.springframework.core.task.SimpleAsyncTaskExecutor; @@ -33,13 +34,13 @@ import org.springframework.core.task.TaskExecutor; import org.springframework.http.HttpHeaders; import org.springframework.util.concurrent.ListenableFuture; import org.springframework.util.concurrent.ListenableFutureTask; +import org.springframework.web.socket.WebSocketExtension; import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.adapter.jetty.JettyWebSocketHandlerAdapter; import org.springframework.web.socket.adapter.jetty.JettyWebSocketSession; import org.springframework.web.socket.adapter.jetty.WebSocketToJettyExtensionConfigAdapter; import org.springframework.web.socket.client.AbstractWebSocketClient; -import org.springframework.web.socket.WebSocketExtension; import org.springframework.web.util.UriComponents; import org.springframework.web.util.UriComponentsBuilder; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/package-info.java index 64361f34e9a..04d236c6c51 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/package-info.java @@ -1,21 +1,4 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Client-side support for the Jetty WebSocket API. */ package org.springframework.web.socket.client.jetty; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/package-info.java index a0f1c49e4e2..c8cea9f47fd 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/client/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/package-info.java @@ -1,21 +1,4 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Client-side abstractions for WebSocket applications. */ package org.springframework.web.socket.client; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/AnnotatedEndpointConnectionManager.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/AnnotatedEndpointConnectionManager.java index c8c0e0070ba..aa4c16910ac 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/AnnotatedEndpointConnectionManager.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/AnnotatedEndpointConnectionManager.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/EndpointConnectionManager.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/EndpointConnectionManager.java index 88da2a7f30b..fd7fef157e9 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/EndpointConnectionManager.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/EndpointConnectionManager.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,7 +18,6 @@ package org.springframework.web.socket.client.standard; import java.util.Arrays; import java.util.List; - import javax.websocket.ClientEndpointConfig; import javax.websocket.ClientEndpointConfig.Configurator; import javax.websocket.ContainerProvider; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/package-info.java index abe0c4509c4..8682f9067bb 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/client/standard/package-info.java @@ -1,21 +1,4 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Client-side classes for use with standard Java WebSocket endpoints. */ package org.springframework.web.socket.client.standard; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/HandlersBeanDefinitionParser.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/HandlersBeanDefinitionParser.java index e187beeb739..dd8dbd9e3c7 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/HandlersBeanDefinitionParser.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/HandlersBeanDefinitionParser.java @@ -19,7 +19,6 @@ package org.springframework.web.socket.config; import java.util.Arrays; import java.util.List; -import org.springframework.util.StringUtils; import org.w3c.dom.Element; import org.springframework.beans.factory.config.BeanDefinition; @@ -32,6 +31,7 @@ import org.springframework.beans.factory.support.ManagedMap; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.xml.BeanDefinitionParser; import org.springframework.beans.factory.xml.ParserContext; +import org.springframework.util.StringUtils; import org.springframework.util.xml.DomUtils; import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; import org.springframework.web.socket.server.support.WebSocketHttpRequestHandler; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParser.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParser.java index 46575c71971..22b55cdf562 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParser.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParser.java @@ -21,12 +21,10 @@ import java.util.Collections; import java.util.List; import java.util.Map; -import org.springframework.beans.factory.FactoryBean; -import org.springframework.web.socket.WebSocketHandler; -import org.springframework.web.socket.handler.WebSocketHandlerDecoratorFactory; import org.w3c.dom.Element; import org.springframework.beans.MutablePropertyValues; +import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.ConstructorArgumentValues; import org.springframework.beans.factory.config.CustomScopeConfigurer; @@ -59,6 +57,8 @@ import org.springframework.util.MimeTypeUtils; import org.springframework.util.StringUtils; import org.springframework.util.xml.DomUtils; import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; +import org.springframework.web.socket.WebSocketHandler; +import org.springframework.web.socket.handler.WebSocketHandlerDecoratorFactory; import org.springframework.web.socket.messaging.StompSubProtocolHandler; import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler; import org.springframework.web.socket.server.support.WebSocketHttpRequestHandler; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketMessageBrokerStats.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketMessageBrokerStats.java index 55eaa4bc5db..b3b446e6d7b 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketMessageBrokerStats.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketMessageBrokerStats.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,8 +16,15 @@ package org.springframework.web.socket.config; +import java.util.concurrent.Executor; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.ScheduledThreadPoolExecutor; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; @@ -25,12 +32,6 @@ import org.springframework.web.socket.messaging.StompSubProtocolHandler; import org.springframework.web.socket.messaging.SubProtocolHandler; import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler; -import java.util.concurrent.Executor; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.ScheduledThreadPoolExecutor; -import java.util.concurrent.ThreadPoolExecutor; -import java.util.concurrent.TimeUnit; - /** * A central class for aggregating information about internal state and counters diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketNamespaceUtils.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketNamespaceUtils.java index 6d56216ec5a..a4761a6969f 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketNamespaceUtils.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/WebSocketNamespaceUtils.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,7 +16,6 @@ package org.springframework.web.socket.config; -import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.w3c.dom.Element; import org.springframework.beans.factory.config.BeanDefinition; @@ -25,6 +24,7 @@ import org.springframework.beans.factory.parsing.BeanComponentDefinition; import org.springframework.beans.factory.support.ManagedList; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.xml.ParserContext; +import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.springframework.util.xml.DomUtils; import org.springframework.web.socket.server.support.DefaultHandshakeHandler; import org.springframework.web.socket.sockjs.transport.TransportHandlingSockJsService; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/AbstractWebSocketHandlerRegistration.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/AbstractWebSocketHandlerRegistration.java index ef84ed883b0..89b244ee162 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/AbstractWebSocketHandlerRegistration.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/AbstractWebSocketHandlerRegistration.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,9 +23,9 @@ import org.springframework.util.Assert; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.socket.WebSocketHandler; -import org.springframework.web.socket.server.support.DefaultHandshakeHandler; import org.springframework.web.socket.server.HandshakeHandler; import org.springframework.web.socket.server.HandshakeInterceptor; +import org.springframework.web.socket.server.support.DefaultHandshakeHandler; import org.springframework.web.socket.sockjs.SockJsService; import org.springframework.web.socket.sockjs.transport.handler.WebSocketTransportHandler; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/AbstractWebSocketMessageBrokerConfigurer.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/AbstractWebSocketMessageBrokerConfigurer.java index f744e468206..cce19e37e4f 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/AbstractWebSocketMessageBrokerConfigurer.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/AbstractWebSocketMessageBrokerConfigurer.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,14 +16,14 @@ package org.springframework.web.socket.config.annotation; +import java.util.List; + import org.springframework.messaging.converter.MessageConverter; import org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver; import org.springframework.messaging.handler.invocation.HandlerMethodReturnValueHandler; import org.springframework.messaging.simp.config.ChannelRegistration; import org.springframework.messaging.simp.config.MessageBrokerRegistry; -import java.util.List; - /** * A convenient abstract base class for {@link WebSocketMessageBrokerConfigurer} * implementations providing empty method implementations for optional methods. diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/DelegatingWebSocketConfiguration.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/DelegatingWebSocketConfiguration.java index 3ab769d0b39..a8c72ed7136 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/DelegatingWebSocketConfiguration.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/DelegatingWebSocketConfiguration.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/DelegatingWebSocketMessageBrokerConfiguration.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/DelegatingWebSocketMessageBrokerConfiguration.java index 53ad7edd55d..8edcccc95c4 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/DelegatingWebSocketMessageBrokerConfiguration.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/DelegatingWebSocketMessageBrokerConfiguration.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/EnableWebSocket.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/EnableWebSocket.java index 15722bdf2e1..d695cfad8fd 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/EnableWebSocket.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/EnableWebSocket.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/EnableWebSocketMessageBroker.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/EnableWebSocketMessageBroker.java index f9de1c9d769..e9f908711a4 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/EnableWebSocketMessageBroker.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/EnableWebSocketMessageBroker.java @@ -4,7 +4,7 @@ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistration.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistration.java index 5905510e7d5..f806b45d0ea 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistration.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistration.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,8 +27,8 @@ import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.server.HandshakeHandler; import org.springframework.web.socket.server.HandshakeInterceptor; import org.springframework.web.socket.server.support.WebSocketHttpRequestHandler; -import org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler; import org.springframework.web.socket.sockjs.SockJsService; +import org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler; /** * A helper class for configuring {@link WebSocketHandler} request handling diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistry.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistry.java index e512af1f889..0485f9ce1c8 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistry.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistry.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/SockJsServiceRegistration.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/SockJsServiceRegistration.java index c37b66a3f34..17b5597afe8 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/SockJsServiceRegistration.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/SockJsServiceRegistration.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,8 +27,8 @@ import org.springframework.web.socket.server.HandshakeInterceptor; import org.springframework.web.socket.sockjs.SockJsService; import org.springframework.web.socket.sockjs.frame.SockJsMessageCodec; import org.springframework.web.socket.sockjs.transport.TransportHandler; -import org.springframework.web.socket.sockjs.transport.handler.DefaultSockJsService; import org.springframework.web.socket.sockjs.transport.TransportHandlingSockJsService; +import org.springframework.web.socket.sockjs.transport.handler.DefaultSockJsService; /** * A helper class for configuring SockJS fallback options, typically used indirectly, in diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/StompEndpointRegistry.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/StompEndpointRegistry.java index 89ff6719dad..b1c4deffce8 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/StompEndpointRegistry.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/StompEndpointRegistry.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/StompWebSocketEndpointRegistration.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/StompWebSocketEndpointRegistration.java index 4229e6efb36..4260cca4171 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/StompWebSocketEndpointRegistration.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/StompWebSocketEndpointRegistration.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistry.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistry.java index c68dbcfedca..22c9f724949 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistry.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistry.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -30,9 +30,9 @@ import org.springframework.web.HttpRequestHandler; import org.springframework.web.servlet.handler.AbstractHandlerMapping; import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; import org.springframework.web.socket.WebSocketHandler; +import org.springframework.web.socket.handler.WebSocketHandlerDecorator; import org.springframework.web.socket.messaging.StompSubProtocolHandler; import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler; -import org.springframework.web.socket.handler.WebSocketHandlerDecorator; import org.springframework.web.util.UrlPathHelper; /** diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistration.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistration.java index a9e24920a43..6d1f42f078d 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistration.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistration.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,6 +16,8 @@ package org.springframework.web.socket.config.annotation; +import java.util.Arrays; + import org.springframework.scheduling.TaskScheduler; import org.springframework.util.Assert; import org.springframework.util.LinkedMultiValueMap; @@ -25,12 +27,10 @@ import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.server.HandshakeHandler; import org.springframework.web.socket.server.HandshakeInterceptor; import org.springframework.web.socket.server.support.WebSocketHttpRequestHandler; -import org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler; import org.springframework.web.socket.sockjs.SockJsService; +import org.springframework.web.socket.sockjs.support.SockJsHttpRequestHandler; import org.springframework.web.socket.sockjs.transport.handler.WebSocketTransportHandler; -import java.util.Arrays; - /** * An abstract base class class for configuring STOMP over WebSocket/SockJS endpoints. * diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationSupport.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationSupport.java index a48b2538d8f..35cd1565228 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationSupport.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationSupport.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketConfigurer.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketConfigurer.java index 99a44ab4cae..d02117d00d1 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketConfigurer.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketConfigurer.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistration.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistration.java index 622b1e73bde..b960c0f2a0d 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistration.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistration.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistry.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistry.java index 0cc06d67bee..47e42d3c1e7 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistry.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistry.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupport.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupport.java index 0ddedb95cf1..809d8f64349 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupport.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupport.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketTransportRegistration.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketTransportRegistration.java index ab90d7e6317..0e9c2ec2f37 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketTransportRegistration.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebSocketTransportRegistration.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,12 +16,12 @@ package org.springframework.web.socket.config.annotation; -import org.springframework.web.socket.handler.WebSocketHandlerDecoratorFactory; - import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import org.springframework.web.socket.handler.WebSocketHandlerDecoratorFactory; + /** * Configure the processing of messages received from and sent to WebSocket clients. * diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/package-info.java index 9e291a5f9e8..806ea6812d2 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/package-info.java @@ -1,21 +1,4 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Support for annotation-based WebSocket setup in configuration classes. */ package org.springframework.web.socket.config.annotation; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/package-info.java index f4e7fe82a20..cc601c99a07 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/package-info.java @@ -1,21 +1,4 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Configuration support for WebSocket request handling. */ package org.springframework.web.socket.config; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/AbstractWebSocketHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/AbstractWebSocketHandler.java index fd35fd907ec..1de00f22c74 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/AbstractWebSocketHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/AbstractWebSocketHandler.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/BeanCreatingHandlerProvider.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/BeanCreatingHandlerProvider.java index ed2661abd5e..7169c253e94 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/BeanCreatingHandlerProvider.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/BeanCreatingHandlerProvider.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/BinaryWebSocketHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/BinaryWebSocketHandler.java index 880e0754540..c03dc54dcdc 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/BinaryWebSocketHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/BinaryWebSocketHandler.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecorator.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecorator.java index 1945dee2fa1..f64072b2c33 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecorator.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecorator.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/ExceptionWebSocketHandlerDecorator.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/ExceptionWebSocketHandlerDecorator.java index aa7e7b0cf06..916ab025ff9 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/ExceptionWebSocketHandlerDecorator.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/ExceptionWebSocketHandlerDecorator.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,6 +18,7 @@ package org.springframework.web.socket.handler; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.WebSocketMessage; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/LoggingWebSocketHandlerDecorator.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/LoggingWebSocketHandlerDecorator.java index b34072e4af1..5a05b385842 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/LoggingWebSocketHandlerDecorator.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/LoggingWebSocketHandlerDecorator.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,6 +18,7 @@ package org.springframework.web.socket.handler; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.WebSocketMessage; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/PerConnectionWebSocketHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/PerConnectionWebSocketHandler.java index 557d76853ef..b55cd1d24fb 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/PerConnectionWebSocketHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/PerConnectionWebSocketHandler.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/SessionLimitExceededException.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/SessionLimitExceededException.java index 04470f84938..d749c54c6ce 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/SessionLimitExceededException.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/SessionLimitExceededException.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/TextWebSocketHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/TextWebSocketHandler.java index 4001c122019..60faa8bfb4d 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/TextWebSocketHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/TextWebSocketHandler.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/WebSocketHandlerDecorator.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/WebSocketHandlerDecorator.java index 538c3b61db1..4c9b1e99334 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/WebSocketHandlerDecorator.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/WebSocketHandlerDecorator.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/WebSocketHandlerDecoratorFactory.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/WebSocketHandlerDecoratorFactory.java index 20a2090e2b3..cbf13d1740f 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/WebSocketHandlerDecoratorFactory.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/WebSocketHandlerDecoratorFactory.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/WebSocketSessionDecorator.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/WebSocketSessionDecorator.java index 1f81925d068..d66a74de010 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/WebSocketSessionDecorator.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/WebSocketSessionDecorator.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,13 +16,6 @@ package org.springframework.web.socket.handler; -import org.springframework.http.HttpHeaders; -import org.springframework.util.Assert; -import org.springframework.web.socket.CloseStatus; -import org.springframework.web.socket.WebSocketExtension; -import org.springframework.web.socket.WebSocketMessage; -import org.springframework.web.socket.WebSocketSession; - import java.io.IOException; import java.net.InetSocketAddress; import java.net.URI; @@ -30,6 +23,13 @@ import java.security.Principal; import java.util.List; import java.util.Map; +import org.springframework.http.HttpHeaders; +import org.springframework.util.Assert; +import org.springframework.web.socket.CloseStatus; +import org.springframework.web.socket.WebSocketExtension; +import org.springframework.web.socket.WebSocketMessage; +import org.springframework.web.socket.WebSocketSession; + /** * Wraps another {@link org.springframework.web.socket.WebSocketSession} instance * and delegates to it. diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/handler/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/handler/package-info.java index 1eb223dead1..329f2d4df30 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/handler/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/handler/package-info.java @@ -1,22 +1,5 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Convenient {@link org.springframework.web.socket.WebSocketHandler} * implementations and decorators. */ package org.springframework.web.socket.handler; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/AbstractSubProtocolEvent.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/AbstractSubProtocolEvent.java index 4825485b1cd..900c07ce46c 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/AbstractSubProtocolEvent.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/AbstractSubProtocolEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionConnectEvent.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionConnectEvent.java index aeb229ae4ab..fbc4d34d3ab 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionConnectEvent.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionConnectEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionConnectedEvent.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionConnectedEvent.java index b6b467b85db..06ef4c8cfc1 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionConnectedEvent.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionConnectedEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionDisconnectEvent.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionDisconnectEvent.java index 6fe228f81a4..eed87ef06ed 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionDisconnectEvent.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionDisconnectEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionSubscribeEvent.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionSubscribeEvent.java index 9e2129bd6e2..8d18c50abbc 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionSubscribeEvent.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionSubscribeEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionUnsubscribeEvent.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionUnsubscribeEvent.java index a0cdaca447a..62e0540698a 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionUnsubscribeEvent.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SessionUnsubscribeEvent.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java index d9032871539..6fe70058839 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/StompSubProtocolHandler.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolHandler.java index 76fe925545c..1324a40878f 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolHandler.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandler.java index fe934dc2482..21bc2fd1833 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandler.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/package-info.java index e4e2e569592..4bb6b141c4f 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/messaging/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/messaging/package-info.java @@ -1,21 +1,4 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * WebSocket integration for Spring's messaging module. */ package org.springframework.web.socket.messaging; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/package-info.java index e5f39989c2c..2b723940e42 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/package-info.java @@ -1,21 +1,4 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Common abstractions and Spring configuration support for WebSocket applications. */ package org.springframework.web.socket; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsException.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsException.java index 27b0a0ccdb2..f30786db263 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsException.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsException.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsMessageDeliveryException.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsMessageDeliveryException.java index 8d7016093e7..486d1d6c24d 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsMessageDeliveryException.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsMessageDeliveryException.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsService.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsService.java index f54b2c0fd6b..c5679ef9d1d 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsService.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsService.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsTransportFailureException.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsTransportFailureException.java index 0e003a6aa13..5151e837948 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsTransportFailureException.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/SockJsTransportFailureException.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/AbstractClientSockJsSession.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/AbstractClientSockJsSession.java index 825cdb95947..c554b7d1662 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/AbstractClientSockJsSession.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/AbstractClientSockJsSession.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,8 +16,15 @@ package org.springframework.web.socket.sockjs.client; +import java.io.IOException; +import java.net.URI; +import java.security.Principal; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.http.HttpHeaders; import org.springframework.util.Assert; import org.springframework.util.concurrent.SettableListenableFuture; @@ -30,12 +37,6 @@ import org.springframework.web.socket.sockjs.frame.SockJsFrame; import org.springframework.web.socket.sockjs.frame.SockJsFrameType; import org.springframework.web.socket.sockjs.frame.SockJsMessageCodec; -import java.io.IOException; -import java.net.URI; -import java.security.Principal; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - /** * Base class for SockJS client implementations of {@link WebSocketSession}. * Provides processing of incoming SockJS message frames and delegates lifecycle diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/AbstractXhrTransport.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/AbstractXhrTransport.java index ac9a2874fb4..87f53cec202 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/AbstractXhrTransport.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/AbstractXhrTransport.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,8 +16,13 @@ package org.springframework.web.socket.sockjs.client; +import java.net.URI; +import java.util.Arrays; +import java.util.List; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -31,10 +36,6 @@ import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.sockjs.frame.SockJsFrame; import org.springframework.web.socket.sockjs.transport.TransportType; -import java.net.URI; -import java.util.Arrays; -import java.util.List; - /** * Abstract base class for XHR transport implementations to extend. * diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequest.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequest.java index aae134e1355..f641288fc91 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequest.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequest.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/JettyXhrTransport.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/JettyXhrTransport.java index e995a34e403..dc148a106cf 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/JettyXhrTransport.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/JettyXhrTransport.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,6 +16,11 @@ package org.springframework.web.socket.sockjs.client; +import java.io.ByteArrayOutputStream; +import java.net.URI; +import java.nio.ByteBuffer; +import java.util.Enumeration; + import org.eclipse.jetty.client.HttpClient; import org.eclipse.jetty.client.api.ContentResponse; import org.eclipse.jetty.client.api.Request; @@ -23,6 +28,7 @@ import org.eclipse.jetty.client.api.Response; import org.eclipse.jetty.client.util.StringContentProvider; import org.eclipse.jetty.http.HttpFields; import org.eclipse.jetty.http.HttpMethod; + import org.springframework.context.Lifecycle; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; @@ -38,11 +44,6 @@ import org.springframework.web.socket.sockjs.SockJsException; import org.springframework.web.socket.sockjs.SockJsTransportFailureException; import org.springframework.web.socket.sockjs.frame.SockJsFrame; -import java.io.ByteArrayOutputStream; -import java.net.URI; -import java.nio.ByteBuffer; -import java.util.Enumeration; - /** * An XHR transport based on Jetty's {@link org.eclipse.jetty.client.HttpClient}. diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransport.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransport.java index 8ef087b5a13..75b688d2cde 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransport.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransport.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsClient.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsClient.java index 0035a9db241..72271ddc04a 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsClient.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsClient.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,8 +16,16 @@ package org.springframework.web.socket.sockjs.client; +import java.net.URI; +import java.security.Principal; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.context.Lifecycle; import org.springframework.http.HttpHeaders; import org.springframework.scheduling.TaskScheduler; @@ -34,13 +42,6 @@ import org.springframework.web.socket.sockjs.frame.SockJsMessageCodec; import org.springframework.web.socket.sockjs.transport.TransportType; import org.springframework.web.util.UriComponentsBuilder; -import java.net.URI; -import java.security.Principal; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; - /** * A SockJS implementation of * {@link org.springframework.web.socket.client.WebSocketClient WebSocketClient} diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfo.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfo.java index 6530f0a62ba..371b695dfa4 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfo.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfo.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,14 +16,14 @@ package org.springframework.web.socket.sockjs.client; +import java.net.URI; +import java.util.UUID; + import org.springframework.util.AlternativeJdkIdGenerator; import org.springframework.util.IdGenerator; import org.springframework.web.socket.sockjs.transport.TransportType; import org.springframework.web.util.UriComponentsBuilder; -import java.net.URI; -import java.util.UUID; - /** * Given the base URL to a SockJS server endpoint, also provides methods to * generate and obtain session and a server id used for construct a transport URL. diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/Transport.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/Transport.java index 6d8c7d9490b..840858d85fa 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/Transport.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/Transport.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,13 +16,13 @@ package org.springframework.web.socket.sockjs.client; +import java.util.List; + import org.springframework.util.concurrent.ListenableFuture; import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.sockjs.transport.TransportType; -import java.util.List; - /** * A client-side implementation for a SockJS transport. * diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/TransportRequest.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/TransportRequest.java index 0e7424f3502..36b6a534dbe 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/TransportRequest.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/TransportRequest.java @@ -1,11 +1,11 @@ package org.springframework.web.socket.sockjs.client; -import org.springframework.http.HttpHeaders; -import org.springframework.web.socket.sockjs.frame.SockJsMessageCodec; - import java.net.URI; import java.security.Principal; +import org.springframework.http.HttpHeaders; +import org.springframework.web.socket.sockjs.frame.SockJsMessageCodec; + /** * Represents a request to connect to a SockJS service using a specific * Transport. A single SockJS request however may require falling back diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/UndertowXhrTransport.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/UndertowXhrTransport.java index 8000c23ab96..24006a1b0c6 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/UndertowXhrTransport.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/UndertowXhrTransport.java @@ -25,7 +25,6 @@ import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CountDownLatch; - import io.undertow.client.ClientCallback; import io.undertow.client.ClientConnection; import io.undertow.client.ClientExchange; diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/WebSocketClientSockJsSession.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/WebSocketClientSockJsSession.java index 543a6a2c73e..9d03c1fd16f 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/WebSocketClientSockJsSession.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/WebSocketClientSockJsSession.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +17,10 @@ package org.springframework.web.socket.sockjs.client; +import java.io.IOException; +import java.net.InetSocketAddress; +import java.util.List; + import org.springframework.util.Assert; import org.springframework.util.concurrent.SettableListenableFuture; import org.springframework.web.socket.CloseStatus; @@ -26,10 +30,6 @@ import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.adapter.NativeWebSocketSession; -import java.io.IOException; -import java.net.InetSocketAddress; -import java.util.List; - /** * An extension of {@link AbstractClientSockJsSession} wrapping and delegating * to an actual WebSocket session. diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/WebSocketTransport.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/WebSocketTransport.java index 6846099ffbf..35f01befd17 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/WebSocketTransport.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/WebSocketTransport.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/XhrClientSockJsSession.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/XhrClientSockJsSession.java index 92de51cea75..1381f33ee4f 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/XhrClientSockJsSession.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/XhrClientSockJsSession.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,6 +16,10 @@ package org.springframework.web.socket.sockjs.client; +import java.net.InetSocketAddress; +import java.net.URI; +import java.util.List; + import org.springframework.util.Assert; import org.springframework.util.concurrent.SettableListenableFuture; import org.springframework.web.socket.CloseStatus; @@ -25,10 +29,6 @@ import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.sockjs.transport.TransportType; -import java.net.InetSocketAddress; -import java.net.URI; -import java.util.List; - /** * An extension of {@link AbstractClientSockJsSession} for use with HTTP diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/XhrTransport.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/XhrTransport.java index 4a192bffb6f..955ed8899b9 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/XhrTransport.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/XhrTransport.java @@ -1,9 +1,9 @@ package org.springframework.web.socket.sockjs.client; -import org.springframework.web.socket.TextMessage; - import java.net.URI; +import org.springframework.web.socket.TextMessage; + /** * A SockJS {@link Transport} that uses HTTP requests to simulate a WebSocket * interaction. The {@code connect} method of the base {@code Transport} interface diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/package-info.java index 6ec13fd08ee..ce5ad42edd9 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/package-info.java @@ -1,22 +1,5 @@ -/* - * Copyright 2002-2014 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * SockJS client implementation of * {@link org.springframework.web.socket.client.WebSocketClient}. */ package org.springframework.web.socket.sockjs.client; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/AbstractSockJsMessageCodec.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/AbstractSockJsMessageCodec.java index d53b43fce8f..a7481fe7688 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/AbstractSockJsMessageCodec.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/AbstractSockJsMessageCodec.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/Jackson2SockJsMessageCodec.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/Jackson2SockJsMessageCodec.java index 7c105710049..089e7ccc067 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/Jackson2SockJsMessageCodec.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/Jackson2SockJsMessageCodec.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/SockJsMessageCodec.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/SockJsMessageCodec.java index 33a7da916b6..ce55b16980f 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/SockJsMessageCodec.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/SockJsMessageCodec.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/package-info.java index 2a3a8d95a05..c11a9fa88ae 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/frame/package-info.java @@ -1,22 +1,5 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Support classes for creating SockJS frames including the encoding and decoding * of SockJS message frames. */ package org.springframework.web.socket.sockjs.frame; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/package-info.java index 0b29a729376..93674d72715 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/package-info.java @@ -1,21 +1,4 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Top-level SockJS types. */ package org.springframework.web.socket.sockjs; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/SockJsHttpRequestHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/SockJsHttpRequestHandler.java index e5da6f91826..01ab07449ba 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/SockJsHttpRequestHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/SockJsHttpRequestHandler.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/package-info.java index 452287e3640..68b6ec394c9 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/support/package-info.java @@ -1,23 +1,6 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Support classes for SockJS including an * {@link org.springframework.web.socket.sockjs.support.AbstractSockJsService} * implementation. */ package org.springframework.web.socket.sockjs.support; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/SockJsSession.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/SockJsSession.java index c600795cf47..080b2ea1e35 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/SockJsSession.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/SockJsSession.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/SockJsSessionFactory.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/SockJsSessionFactory.java index e1fbc79bcca..f252c1d6d8c 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/SockJsSessionFactory.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/SockJsSessionFactory.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandlingSockJsService.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandlingSockJsService.java index d6212ebe62d..66d504e73d8 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandlingSockJsService.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/TransportHandlingSockJsService.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/AbstractTransportHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/AbstractTransportHandler.java index 6baa4a967a7..9072d2e5c15 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/AbstractTransportHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/AbstractTransportHandler.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/SockJsWebSocketHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/SockJsWebSocketHandler.java index f1b5b254f7e..41a90c2363a 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/SockJsWebSocketHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/SockJsWebSocketHandler.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/WebSocketTransportHandler.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/WebSocketTransportHandler.java index a37c9a3874a..7f6594bb761 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/WebSocketTransportHandler.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/WebSocketTransportHandler.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/package-info.java index 09a3ba4599a..0dca99d9306 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/package-info.java @@ -1,23 +1,6 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * {@link org.springframework.web.socket.sockjs.transport.TransportHandler} * implementation classes as well as a concrete * {@link org.springframework.web.socket.sockjs.SockJsService}. */ package org.springframework.web.socket.sockjs.transport.handler; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/package-info.java index 4dd87fef92c..be76b009dac 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/package-info.java @@ -1,26 +1,9 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * Server-side support for SockJS transports including * {@link org.springframework.web.socket.sockjs.transport.TransportHandler} implementations * for processing incoming requests, their - * {@link org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession session} counterparts for - * sending messages over the various transports, and + * {@link org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession session} + * counterparts for sending messages over the various transports, and * {@link org.springframework.web.socket.sockjs.transport.handler.DefaultSockJsService}. */ package org.springframework.web.socket.sockjs.transport; - diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSession.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSession.java index da3adeac65f..becb1b701d2 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSession.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSession.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/WebSocketServerSockJsSession.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/WebSocketServerSockJsSession.java index 276afa39541..403b8609f1d 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/WebSocketServerSockJsSession.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/WebSocketServerSockJsSession.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/package-info.java b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/package-info.java index 7e20e9a6bb0..d35363ca1ad 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/package-info.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/package-info.java @@ -1,22 +1,5 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - /** * SockJS specific implementations of * {@link org.springframework.web.socket.WebSocketSession}. */ package org.springframework.web.socket.sockjs.transport.session; - diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/AbstractHttpRequestTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/AbstractHttpRequestTests.java index dfe4aa2c3c7..94b6b36d922 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/AbstractHttpRequestTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/AbstractHttpRequestTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +17,7 @@ package org.springframework.web.socket; import org.junit.Before; + import org.springframework.http.server.ServerHttpAsyncRequestControl; import org.springframework.http.server.ServerHttpRequest; import org.springframework.http.server.ServerHttpResponse; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/AbstractWebSocketIntegrationTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/AbstractWebSocketIntegrationTests.java index d06f64fd731..e202d5dfa8b 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/AbstractWebSocketIntegrationTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/AbstractWebSocketIntegrationTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -26,17 +26,18 @@ import org.junit.Before; import org.junit.Rule; import org.junit.rules.TestName; import org.junit.runners.Parameterized.Parameter; + import org.springframework.context.Lifecycle; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.util.concurrent.ListenableFuture; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.socket.client.WebSocketClient; -import org.springframework.web.socket.server.standard.UndertowRequestUpgradeStrategy; -import org.springframework.web.socket.server.support.DefaultHandshakeHandler; import org.springframework.web.socket.server.RequestUpgradeStrategy; import org.springframework.web.socket.server.jetty.JettyRequestUpgradeStrategy; import org.springframework.web.socket.server.standard.TomcatRequestUpgradeStrategy; +import org.springframework.web.socket.server.standard.UndertowRequestUpgradeStrategy; +import org.springframework.web.socket.server.support.DefaultHandshakeHandler; /** * Base class for WebSocket integration tests. diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/ContextLoaderTestUtils.java b/spring-websocket/src/test/java/org/springframework/web/socket/ContextLoaderTestUtils.java index d0024dbbb14..f149e093537 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/ContextLoaderTestUtils.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/ContextLoaderTestUtils.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/JettyWebSocketTestServer.java b/spring-websocket/src/test/java/org/springframework/web/socket/JettyWebSocketTestServer.java index 272a88dc6a6..5641a8c77bb 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/JettyWebSocketTestServer.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/JettyWebSocketTestServer.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,19 +16,20 @@ package org.springframework.web.socket; +import java.util.EnumSet; +import javax.servlet.DispatcherType; +import javax.servlet.Filter; + import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.FilterHolder; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; + import org.springframework.util.Assert; import org.springframework.util.SocketUtils; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; -import javax.servlet.DispatcherType; -import javax.servlet.Filter; -import java.util.EnumSet; - /** * Jetty based {@link WebSocketTestServer}. * diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/TomcatWebSocketTestServer.java b/spring-websocket/src/test/java/org/springframework/web/socket/TomcatWebSocketTestServer.java index 755e92d34a5..ef46ed47e82 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/TomcatWebSocketTestServer.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/TomcatWebSocketTestServer.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/UndertowTestServer.java b/spring-websocket/src/test/java/org/springframework/web/socket/UndertowTestServer.java index 381163fabcd..d7caa7874e3 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/UndertowTestServer.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/UndertowTestServer.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,6 @@ package org.springframework.web.socket; import java.io.IOException; - import javax.servlet.DispatcherType; import javax.servlet.Filter; import javax.servlet.Servlet; @@ -31,14 +30,14 @@ import io.undertow.servlet.api.FilterInfo; import io.undertow.servlet.api.InstanceFactory; import io.undertow.servlet.api.InstanceHandle; import io.undertow.websockets.jsr.WebSocketDeploymentInfo; +import org.xnio.ByteBufferSlicePool; +import org.xnio.OptionMap; +import org.xnio.Xnio; import org.springframework.util.Assert; import org.springframework.util.SocketUtils; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; -import org.xnio.ByteBufferSlicePool; -import org.xnio.OptionMap; -import org.xnio.Xnio; import static io.undertow.servlet.Servlets.*; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/WebSocketTestServer.java b/spring-websocket/src/test/java/org/springframework/web/socket/WebSocketTestServer.java index bf53e9361cc..5711168a621 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/WebSocketTestServer.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/WebSocketTestServer.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,10 +16,10 @@ package org.springframework.web.socket; -import org.springframework.web.context.WebApplicationContext; - import javax.servlet.Filter; +import org.springframework.web.context.WebApplicationContext; + /** * Contract for a test server to use for WebSocket integration tests. * diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketHandlerAdapterTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketHandlerAdapterTests.java index 93a78d8bb47..220f1041a7c 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketHandlerAdapterTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketHandlerAdapterTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import org.eclipse.jetty.websocket.api.UpgradeResponse; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; + import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.WebSocketHandler; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSessionTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSessionTests.java index 727e48d38a7..594f0828505 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSessionTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSessionTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,6 +25,7 @@ import org.eclipse.jetty.websocket.api.UpgradeResponse; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; + import org.springframework.web.socket.handler.TestPrincipal; import static org.junit.Assert.*; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/ConvertingEncoderDecoderSupportTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/ConvertingEncoderDecoderSupportTests.java index 24a4ddc151d..dcc524e9e04 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/ConvertingEncoderDecoderSupportTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/ConvertingEncoderDecoderSupportTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -39,7 +39,6 @@ import org.springframework.core.convert.support.GenericConversionService; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.socket.ContextLoaderTestUtils; -import org.springframework.web.socket.adapter.standard.ConvertingEncoderDecoderSupport; import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/StandardWebSocketHandlerAdapterTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/StandardWebSocketHandlerAdapterTests.java index 6f2fdb6debc..c3951516f91 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/StandardWebSocketHandlerAdapterTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/StandardWebSocketHandlerAdapterTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,7 @@ import javax.websocket.Session; import org.junit.Before; import org.junit.Test; + import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.WebSocketHandler; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/StandardWebSocketSessionTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/StandardWebSocketSessionTests.java index 682fc0ba80c..edd17640a65 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/StandardWebSocketSessionTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/StandardWebSocketSessionTests.java @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,12 +17,12 @@ package org.springframework.web.socket.adapter.standard; import java.util.HashMap; import java.util.Map; - import javax.websocket.Session; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; + import org.springframework.http.HttpHeaders; import org.springframework.web.socket.handler.TestPrincipal; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/client/WebSocketConnectionManagerTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/client/WebSocketConnectionManagerTests.java index fb580a4e959..04326a02164 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/client/WebSocketConnectionManagerTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/client/WebSocketConnectionManagerTests.java @@ -21,16 +21,17 @@ import java.util.Arrays; import java.util.List; import org.junit.Test; + import org.springframework.context.Lifecycle; import org.springframework.http.HttpHeaders; import org.springframework.util.concurrent.ListenableFuture; import org.springframework.util.concurrent.ListenableFutureTask; import org.springframework.web.socket.WebSocketHandler; +import org.springframework.web.socket.WebSocketHttpHeaders; import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator; import org.springframework.web.socket.handler.TextWebSocketHandler; import org.springframework.web.socket.handler.WebSocketHandlerDecorator; -import org.springframework.web.socket.WebSocketHttpHeaders; import org.springframework.web.util.UriComponentsBuilder; import static org.junit.Assert.*; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/client/jetty/JettyWebSocketClientTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/client/jetty/JettyWebSocketClientTests.java index 3335dda08e2..ae62beafb17 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/client/jetty/JettyWebSocketClientTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/client/jetty/JettyWebSocketClientTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -28,15 +28,16 @@ import org.eclipse.jetty.websocket.servlet.WebSocketServletFactory; import org.junit.After; import org.junit.Before; import org.junit.Test; + import org.springframework.core.task.SimpleAsyncTaskExecutor; import org.springframework.util.CollectionUtils; import org.springframework.util.SocketUtils; import org.springframework.web.socket.WebSocketHandler; +import org.springframework.web.socket.WebSocketHttpHeaders; import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.adapter.jetty.JettyWebSocketHandlerAdapter; import org.springframework.web.socket.adapter.jetty.JettyWebSocketSession; import org.springframework.web.socket.handler.TextWebSocketHandler; -import org.springframework.web.socket.WebSocketHttpHeaders; import static org.junit.Assert.*; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/client/standard/StandardWebSocketClientTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/client/standard/StandardWebSocketClientTests.java index 98ec4035dac..db5fb74ea1b 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/client/standard/StandardWebSocketClientTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/client/standard/StandardWebSocketClientTests.java @@ -32,9 +32,9 @@ import org.mockito.ArgumentCaptor; import org.springframework.core.task.SimpleAsyncTaskExecutor; import org.springframework.web.socket.WebSocketHandler; +import org.springframework.web.socket.WebSocketHttpHeaders; import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.handler.AbstractWebSocketHandler; -import org.springframework.web.socket.WebSocketHttpHeaders; import static org.junit.Assert.*; import static org.mockito.Mockito.*; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java index 82a3549bc68..88904ea2c99 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/config/MessageBrokerBeanDefinitionParserTests.java @@ -16,10 +16,6 @@ package org.springframework.web.socket.config; -import static org.hamcrest.Matchers.contains; -import static org.hamcrest.Matchers.instanceOf; -import static org.junit.Assert.*; - import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -76,6 +72,9 @@ import org.springframework.web.socket.sockjs.transport.TransportType; import org.springframework.web.socket.sockjs.transport.handler.DefaultSockJsService; import org.springframework.web.socket.sockjs.transport.handler.WebSocketTransportHandler; +import static org.hamcrest.Matchers.*; +import static org.junit.Assert.*; + /** * Test fixture for MessageBrokerBeanDefinitionParser. * See test configuration files websocket-config-broker-*.xml. diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistryTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistryTests.java index 82be51df93f..77f93e0730b 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistryTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistryTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistrationTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistrationTests.java index af9ab6da75b..90905e47721 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistrationTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebMvcStompWebSocketEndpointRegistrationTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -39,7 +39,7 @@ import org.springframework.web.socket.sockjs.transport.handler.DefaultSockJsServ import org.springframework.web.socket.sockjs.transport.handler.WebSocketTransportHandler; import static org.junit.Assert.*; -import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.*; /** * Test fixture for diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationTests.java index 4559712b286..88d407b42c6 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketConfigurationTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -28,7 +28,11 @@ import org.junit.runners.Parameterized.Parameters; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.web.socket.*; +import org.springframework.web.socket.AbstractWebSocketIntegrationTests; +import org.springframework.web.socket.JettyWebSocketTestServer; +import org.springframework.web.socket.TomcatWebSocketTestServer; +import org.springframework.web.socket.UndertowTestServer; +import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.client.jetty.JettyWebSocketClient; import org.springframework.web.socket.client.standard.StandardWebSocketClient; import org.springframework.web.socket.handler.AbstractWebSocketHandler; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistrationTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistrationTests.java index 64d1be83ffb..b05382582e7 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistrationTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketHandlerRegistrationTests.java @@ -23,12 +23,13 @@ import java.util.List; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; + import org.springframework.scheduling.TaskScheduler; import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.handler.TextWebSocketHandler; -import org.springframework.web.socket.server.support.DefaultHandshakeHandler; import org.springframework.web.socket.server.HandshakeHandler; import org.springframework.web.socket.server.HandshakeInterceptor; +import org.springframework.web.socket.server.support.DefaultHandshakeHandler; import org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor; import org.springframework.web.socket.sockjs.SockJsService; import org.springframework.web.socket.sockjs.transport.TransportType; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupportTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupportTests.java index 4fa86890c07..66a23e1de42 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupportTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/config/annotation/WebSocketMessageBrokerConfigurationSupportTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -30,14 +30,14 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.messaging.Message; import org.springframework.messaging.MessageHandler; -import org.springframework.messaging.support.AbstractSubscribableChannel; -import org.springframework.messaging.support.ExecutorSubscribableChannel; import org.springframework.messaging.handler.annotation.MessageMapping; import org.springframework.messaging.handler.annotation.SendTo; import org.springframework.messaging.simp.SimpMessageType; import org.springframework.messaging.simp.annotation.SubscribeMapping; import org.springframework.messaging.simp.stomp.StompCommand; import org.springframework.messaging.simp.stomp.StompHeaderAccessor; +import org.springframework.messaging.support.AbstractSubscribableChannel; +import org.springframework.messaging.support.ExecutorSubscribableChannel; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.springframework.stereotype.Controller; import org.springframework.web.servlet.HandlerMapping; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/handler/BeanCreatingHandlerProviderTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/handler/BeanCreatingHandlerProviderTests.java index a252ec8df05..553e191438f 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/handler/BeanCreatingHandlerProviderTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/handler/BeanCreatingHandlerProviderTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +17,7 @@ package org.springframework.web.socket.handler; import org.junit.Test; + import org.springframework.beans.BeanInstantiationException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ConfigurableApplicationContext; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecoratorTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecoratorTests.java index 5648b2736b2..4347d974401 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecoratorTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/handler/ConcurrentWebSocketSessionDecoratorTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,20 +16,19 @@ package org.springframework.web.socket.handler; -import org.junit.Test; -import org.springframework.web.socket.CloseStatus; -import org.springframework.web.socket.TextMessage; -import org.springframework.web.socket.WebSocketMessage; - import java.io.IOException; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import org.junit.Test; + +import org.springframework.web.socket.CloseStatus; +import org.springframework.web.socket.TextMessage; +import org.springframework.web.socket.WebSocketMessage; + +import static org.junit.Assert.*; /** * Unit tests for diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/handler/ExceptionWebSocketHandlerDecoratorTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/handler/ExceptionWebSocketHandlerDecoratorTests.java index c331f325755..12cf02ca630 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/handler/ExceptionWebSocketHandlerDecoratorTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/handler/ExceptionWebSocketHandlerDecoratorTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,6 +18,7 @@ package org.springframework.web.socket.handler; import org.junit.Before; import org.junit.Test; + import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.WebSocketHandler; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/handler/PerConnectionWebSocketHandlerTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/handler/PerConnectionWebSocketHandlerTests.java index 4a6550d8dec..0b84f8fa5ab 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/handler/PerConnectionWebSocketHandlerTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/handler/PerConnectionWebSocketHandlerTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +17,7 @@ package org.springframework.web.socket.handler; import org.junit.Test; + import org.springframework.beans.factory.DisposableBean; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.web.socket.CloseStatus; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/handler/TestPrincipal.java b/spring-websocket/src/test/java/org/springframework/web/socket/handler/TestPrincipal.java index 5f159d9334b..5e52647f405 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/handler/TestPrincipal.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/handler/TestPrincipal.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/handler/TestWebSocketSession.java b/spring-websocket/src/test/java/org/springframework/web/socket/handler/TestWebSocketSession.java index 59eb45bf62b..cee12e85aae 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/handler/TestWebSocketSession.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/handler/TestWebSocketSession.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/handler/WebSocketHandlerDecoratorTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/handler/WebSocketHandlerDecoratorTests.java index 78949645f28..103daa04a09 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/handler/WebSocketHandlerDecoratorTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/handler/WebSocketHandlerDecoratorTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/handler/WebSocketHttpHeadersTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/handler/WebSocketHttpHeadersTests.java index 4297fa0f441..e219072d63a 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/handler/WebSocketHttpHeadersTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/handler/WebSocketHttpHeadersTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import java.util.List; import org.hamcrest.Matchers; import org.junit.Before; import org.junit.Test; + import org.springframework.web.socket.WebSocketExtension; import org.springframework.web.socket.WebSocketHttpHeaders; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompSubProtocolHandlerTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompSubProtocolHandlerTests.java index 27e42fe85b9..fbe71560705 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompSubProtocolHandlerTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompSubProtocolHandlerTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -27,6 +27,7 @@ import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.Mockito; + import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEventPublisher; import org.springframework.messaging.Message; @@ -50,7 +51,7 @@ import org.springframework.web.socket.WebSocketMessage; import org.springframework.web.socket.handler.TestWebSocketSession; import org.springframework.web.socket.sockjs.transport.SockJsSession; -import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.*; import static org.junit.Assert.*; import static org.mockito.Mockito.*; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompTextMessageBuilder.java b/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompTextMessageBuilder.java index d382a76590c..c65ba91df37 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompTextMessageBuilder.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompTextMessageBuilder.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompWebSocketIntegrationTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompWebSocketIntegrationTests.java index 26ddac122b5..55d9003829d 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompWebSocketIntegrationTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompWebSocketIntegrationTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -30,6 +30,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; @@ -45,13 +46,18 @@ import org.springframework.messaging.simp.stomp.StompCommand; import org.springframework.messaging.support.AbstractSubscribableChannel; import org.springframework.messaging.support.ExecutorSubscribableChannel; import org.springframework.stereotype.Controller; -import org.springframework.web.socket.*; -import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer; -import org.springframework.web.socket.handler.TextWebSocketHandler; -import org.springframework.web.socket.client.standard.StandardWebSocketClient; +import org.springframework.web.socket.AbstractWebSocketIntegrationTests; +import org.springframework.web.socket.JettyWebSocketTestServer; +import org.springframework.web.socket.TextMessage; +import org.springframework.web.socket.TomcatWebSocketTestServer; +import org.springframework.web.socket.UndertowTestServer; +import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.client.jetty.JettyWebSocketClient; +import org.springframework.web.socket.client.standard.StandardWebSocketClient; +import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer; import org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration; import org.springframework.web.socket.config.annotation.StompEndpointRegistry; +import org.springframework.web.socket.handler.TextWebSocketHandler; import org.springframework.web.socket.server.HandshakeHandler; import static org.junit.Assert.*; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandlerTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandlerTests.java index e6c0bc48972..fa6f3f68d48 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandlerTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/messaging/SubProtocolWebSocketHandlerTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,7 @@ import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; + import org.springframework.beans.DirectFieldAccessor; import org.springframework.messaging.MessageChannel; import org.springframework.messaging.SubscribableChannel; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/server/DefaultHandshakeHandlerTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/server/DefaultHandshakeHandlerTests.java index 2eb08785b01..254ff68061a 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/server/DefaultHandshakeHandlerTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/server/DefaultHandshakeHandlerTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,6 +25,7 @@ import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; + import org.springframework.web.socket.AbstractHttpRequestTests; import org.springframework.web.socket.SubProtocolCapable; import org.springframework.web.socket.WebSocketExtension; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/server/standard/ServerEndpointExporterTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/server/standard/ServerEndpointExporterTests.java index 0a32d8ea03d..9f8b61acb6c 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/server/standard/ServerEndpointExporterTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/server/standard/ServerEndpointExporterTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/server/standard/ServerEndpointRegistrationTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/server/standard/ServerEndpointRegistrationTests.java index 0ace6121eff..52368b887e3 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/server/standard/ServerEndpointRegistrationTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/server/standard/ServerEndpointRegistrationTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import javax.websocket.EndpointConfig; import javax.websocket.Session; import org.junit.Test; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/server/standard/SpringConfiguratorTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/server/standard/SpringConfiguratorTests.java index 548825e7711..f17d3f99918 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/server/standard/SpringConfiguratorTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/server/standard/SpringConfiguratorTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -21,6 +21,7 @@ import javax.websocket.server.ServerEndpoint; import org.junit.After; import org.junit.Before; import org.junit.Test; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/server/support/HandshakeInterceptorChainTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/server/support/HandshakeInterceptorChainTests.java index 912b14bf32b..157815dad34 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/server/support/HandshakeInterceptorChainTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/server/support/HandshakeInterceptorChainTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,7 @@ import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.web.socket.AbstractHttpRequestTests; import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.server.HandshakeInterceptor; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/server/support/HttpSessionHandshakeInterceptorTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/server/support/HttpSessionHandshakeInterceptorTests.java index c52a8f879cc..3533d2fdd5c 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/server/support/HttpSessionHandshakeInterceptorTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/server/support/HttpSessionHandshakeInterceptorTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,8 +23,8 @@ import java.util.Set; import org.junit.Test; import org.mockito.Mockito; + import org.springframework.mock.web.test.MockHttpSession; -import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.socket.AbstractHttpRequestTests; import org.springframework.web.socket.WebSocketHandler; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.java index 5c75aa0f524..3846578355d 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/ClientSockJsSessionTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/ClientSockJsSessionTests.java index 6fb97fb7dbb..8e153335bcd 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/ClientSockJsSessionTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/ClientSockJsSessionTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,6 +25,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; + import org.springframework.util.concurrent.SettableListenableFuture; import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.TextMessage; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequestTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequestTests.java index 6d1eeda6318..f9e5a2a31e3 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequestTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequestTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,11 +16,17 @@ package org.springframework.web.socket.sockjs.client; +import java.io.IOException; +import java.net.URI; +import java.util.Date; +import java.util.concurrent.ExecutionException; + import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.mockito.ArgumentCaptor; + import org.springframework.http.HttpHeaders; import org.springframework.scheduling.TaskScheduler; import org.springframework.util.concurrent.ListenableFutureCallback; @@ -29,19 +35,9 @@ import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.sockjs.frame.Jackson2SockJsMessageCodec; import org.springframework.web.socket.sockjs.transport.TransportType; -import java.io.IOException; -import java.net.URI; -import java.util.Date; -import java.util.concurrent.ExecutionException; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertSame; - -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; import static org.mockito.Matchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.*; /** * Unit tests for {@link DefaultTransportRequest}. diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/JettySockJsIntegrationTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/JettySockJsIntegrationTests.java index 2ff405edf7e..9a30a8020aa 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/JettySockJsIntegrationTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/JettySockJsIntegrationTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransportTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransportTests.java index f4cd4785a62..74fa763d5c9 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransportTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/RestTemplateXhrTransportTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsClientTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsClientTests.java index 21933e9af67..042cafe1f35 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsClientTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsClientTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -22,6 +22,7 @@ import java.util.List; import org.junit.Before; import org.junit.Test; + import org.springframework.http.HttpStatus; import org.springframework.util.concurrent.ListenableFutureCallback; import org.springframework.web.client.HttpServerErrorException; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfoTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfoTests.java index a0f9acf4d50..c615745f0a4 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfoTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/SockJsUrlInfoTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,18 +16,16 @@ package org.springframework.web.socket.sockjs.client; +import java.net.URI; + import org.junit.Assert; import org.junit.Test; import org.springframework.web.socket.sockjs.transport.TransportType; -import java.net.URI; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.*; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.Assert.*; /** * Unit tests for {@code SockJsUrlInfo}. diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/TestTransport.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/TestTransport.java index bea84d99a8e..210702dd455 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/TestTransport.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/TestTransport.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -16,7 +16,12 @@ package org.springframework.web.socket.sockjs.client; +import java.net.URI; +import java.util.Arrays; +import java.util.List; + import org.mockito.ArgumentCaptor; + import org.springframework.util.concurrent.ListenableFuture; import org.springframework.util.concurrent.ListenableFutureCallback; import org.springframework.web.socket.TextMessage; @@ -24,12 +29,7 @@ import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.WebSocketSession; import org.springframework.web.socket.sockjs.transport.TransportType; -import java.net.URI; -import java.util.Arrays; -import java.util.List; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.*; /** * Test SockJS Transport. diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/XhrTransportTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/XhrTransportTests.java index ea78728d2a1..b54c93079a0 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/XhrTransportTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/XhrTransportTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -20,6 +20,7 @@ import java.net.URI; import org.junit.Test; import org.mockito.ArgumentCaptor; + import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/frame/SockJsFrameTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/frame/SockJsFrameTests.java index d32b49d51da..e5e17b946a2 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/frame/SockJsFrameTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/frame/SockJsFrameTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,8 +18,7 @@ package org.springframework.web.socket.sockjs.frame; import org.junit.Test; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.Assert.*; /** * Unit tests for {@link org.springframework.web.socket.sockjs.frame.SockJsFrame}. diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/TransportTypeTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/TransportTypeTests.java index 82c118d4df0..92ea0e1c79a 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/TransportTypeTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/TransportTypeTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,7 +17,6 @@ package org.springframework.web.socket.sockjs.transport; import org.junit.Test; -import org.springframework.web.socket.sockjs.transport.TransportType; import static org.junit.Assert.*; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsServiceTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsServiceTests.java index 86d1e386d3a..1e1251805a1 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsServiceTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsServiceTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,7 @@ import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; + import org.springframework.scheduling.TaskScheduler; import org.springframework.web.socket.AbstractHttpRequestTests; import org.springframework.web.socket.WebSocketHandler; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/HttpReceivingTransportHandlerTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/HttpReceivingTransportHandlerTests.java index 0ae63df5d2e..c85a6cf4b9b 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/HttpReceivingTransportHandlerTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/HttpReceivingTransportHandlerTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,6 +18,7 @@ package org.springframework.web.socket.sockjs.transport.handler; import org.junit.Before; import org.junit.Test; + import org.springframework.http.MediaType; import org.springframework.web.socket.AbstractHttpRequestTests; import org.springframework.web.socket.TextMessage; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/HttpSendingTransportHandlerTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/HttpSendingTransportHandlerTests.java index fe308d24b10..8fc40a7d734 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/HttpSendingTransportHandlerTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/HttpSendingTransportHandlerTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -24,8 +24,8 @@ import org.junit.Test; import org.springframework.scheduling.TaskScheduler; import org.springframework.web.socket.AbstractHttpRequestTests; import org.springframework.web.socket.WebSocketHandler; -import org.springframework.web.socket.sockjs.frame.SockJsFrameFormat; import org.springframework.web.socket.sockjs.frame.SockJsFrame; +import org.springframework.web.socket.sockjs.frame.SockJsFrameFormat; import org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession; import org.springframework.web.socket.sockjs.transport.session.PollingSockJsSession; import org.springframework.web.socket.sockjs.transport.session.StreamingSockJsSession; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/SockJsWebSocketHandlerTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/SockJsWebSocketHandlerTests.java index ee2e521a66a..8bc7bc679d0 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/SockJsWebSocketHandlerTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/SockJsWebSocketHandlerTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,6 +17,7 @@ package org.springframework.web.socket.sockjs.transport.handler; import org.junit.Test; + import org.springframework.messaging.SubscribableChannel; import org.springframework.scheduling.TaskScheduler; import org.springframework.web.socket.WebSocketHandler; @@ -25,9 +26,8 @@ import org.springframework.web.socket.messaging.StompSubProtocolHandler; import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler; import org.springframework.web.socket.sockjs.transport.session.WebSocketServerSockJsSession; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.mockito.Mockito.mock; +import static org.junit.Assert.*; +import static org.mockito.Mockito.*; /** * Unit tests for {@link SockJsWebSocketHandler}. diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSessionTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSessionTests.java index f80e249dca6..cd3cf1a8f6a 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSessionTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/AbstractSockJsSessionTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -17,9 +17,9 @@ package org.springframework.web.socket.sockjs.transport.session; import org.junit.Before; + import org.springframework.scheduling.TaskScheduler; import org.springframework.web.socket.WebSocketHandler; -import org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession; import static org.junit.Assert.*; import static org.mockito.Mockito.*; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/HttpSockJsSessionTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/HttpSockJsSessionTests.java index b2ec62daea1..80313e24f94 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/HttpSockJsSessionTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/HttpSockJsSessionTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -30,8 +30,8 @@ import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.sockjs.frame.DefaultSockJsFrameFormat; -import org.springframework.web.socket.sockjs.frame.SockJsFrameFormat; import org.springframework.web.socket.sockjs.frame.SockJsFrame; +import org.springframework.web.socket.sockjs.frame.SockJsFrameFormat; import org.springframework.web.socket.sockjs.transport.SockJsServiceConfig; import org.springframework.web.socket.sockjs.transport.session.HttpSockJsSessionTests.TestAbstractHttpSockJsSession; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/SockJsSessionTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/SockJsSessionTests.java index 5f25f10e081..9b699b40896 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/SockJsSessionTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/SockJsSessionTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.concurrent.ScheduledFuture; import org.junit.Test; + import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.WebSocketHandler; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/StubSockJsServiceConfig.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/StubSockJsServiceConfig.java index a96f527856f..b74f7b74b9c 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/StubSockJsServiceConfig.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/StubSockJsServiceConfig.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -18,9 +18,9 @@ package org.springframework.web.socket.sockjs.transport.session; import org.springframework.scheduling.TaskScheduler; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; -import org.springframework.web.socket.sockjs.transport.SockJsServiceConfig; import org.springframework.web.socket.sockjs.frame.Jackson2SockJsMessageCodec; import org.springframework.web.socket.sockjs.frame.SockJsMessageCodec; +import org.springframework.web.socket.sockjs.transport.SockJsServiceConfig; /** * @author Rossen Stoyanchev diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/TestHttpSockJsSession.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/TestHttpSockJsSession.java index 96518a23287..bbae2b49e38 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/TestHttpSockJsSession.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/TestHttpSockJsSession.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -23,9 +23,9 @@ import java.util.Map; import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.WebSocketHandler; -import org.springframework.web.socket.sockjs.transport.SockJsServiceConfig; import org.springframework.web.socket.sockjs.SockJsTransportFailureException; import org.springframework.web.socket.sockjs.frame.SockJsFrame; +import org.springframework.web.socket.sockjs.transport.SockJsServiceConfig; /** * @author Rossen Stoyanchev diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/TestSockJsSession.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/TestSockJsSession.java index 175b9b294cf..8910acd3740 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/TestSockJsSession.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/TestSockJsSession.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -28,8 +28,8 @@ import org.springframework.http.HttpHeaders; import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.WebSocketExtension; import org.springframework.web.socket.WebSocketHandler; -import org.springframework.web.socket.sockjs.transport.SockJsServiceConfig; import org.springframework.web.socket.sockjs.frame.SockJsFrame; +import org.springframework.web.socket.sockjs.transport.SockJsServiceConfig; /** * @author Rossen Stoyanchev diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/WebSocketServerSockJsSessionTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/WebSocketServerSockJsSessionTests.java index 615244da28d..ed3ddad1153 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/WebSocketServerSockJsSessionTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/WebSocketServerSockJsSessionTests.java @@ -5,7 +5,7 @@ * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -25,14 +25,15 @@ import java.util.Map; import org.junit.Before; import org.junit.Test; + import org.springframework.web.socket.CloseStatus; import org.springframework.web.socket.TextMessage; import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.WebSocketSession; +import org.springframework.web.socket.handler.TestWebSocketSession; import org.springframework.web.socket.handler.TextWebSocketHandler; import org.springframework.web.socket.sockjs.transport.SockJsServiceConfig; import org.springframework.web.socket.sockjs.transport.session.WebSocketServerSockJsSessionTests.TestWebSocketServerSockJsSession; -import org.springframework.web.socket.handler.TestWebSocketSession; import static org.junit.Assert.*; import static org.mockito.Mockito.*;