From e03dea1d64ad1e17f8cbe4a879cd8c9e0ebae8db Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 26 Jul 2016 17:15:15 +0200 Subject: [PATCH] Polishing --- ...eParameterNameDiscoverAnnotationTests.java | 2 +- .../AspectJExpressionPointcutTests.java | 2 +- .../BeanNamePointcutMatchingTests.java | 2 +- ...hodInvocationProceedingJoinPointTests.java | 2 +- ...ctJAdviceParameterNameDiscovererTests.java | 2 +- .../aspectj/TypePatternClassFilterTests.java | 8 +++--- .../AbstractAspectJAdvisorFactoryTests.java | 2 +- .../annotation/ArgumentBindingTests.java | 4 +-- .../annotation/AspectMetadataTests.java | 4 +-- .../ReflectiveAspectJAdvisorFactoryTests.java | 2 +- .../AspectJNamespaceHandlerTests.java | 2 +- .../config/AopNamespaceHandlerEventTests.java | 2 +- ...AopNamespaceHandlerPointcutErrorTests.java | 2 +- .../aop/config/TopLevelAopTagTests.java | 2 +- .../framework/IntroductionBenchmarkTests.java | 2 +- .../aop/framework/MethodInvocationTests.java | 2 +- .../aop/framework/PrototypeTargetTests.java | 2 +- .../ConcurrencyThrottleInterceptorTests.java | 2 +- .../CustomizableTraceInterceptorTests.java | 18 ++++++------ .../interceptor/DebugInterceptorTests.java | 2 +- .../ExposeBeanNameAdvisorsTests.java | 2 +- .../ExposeInvocationInterceptorTests.java | 2 +- .../PerformanceMonitorInterceptorTests.java | 2 +- .../SimpleTraceInterceptorTests.java | 2 +- .../aop/scope/DefaultScopedObjectTests.java | 10 +++---- .../aop/scope/ScopedProxyAutowireTests.java | 2 +- .../aop/support/AopUtilsTests.java | 2 +- .../aop/support/ClassFiltersTests.java | 2 +- .../aop/support/ControlFlowPointcutTests.java | 2 +- ...elegatingIntroductionInterceptorTests.java | 4 +-- .../support/JdkRegexpMethodPointcutTests.java | 2 +- .../support/NameMatchMethodPointcutTests.java | 2 +- ...MethodPointcutAdvisorIntegrationTests.java | 2 +- .../CommonsPool2TargetSourceProxyTests.java | 2 +- .../target/HotSwappableTargetSourceTests.java | 2 +- .../target/LazyCreationTargetSourceTests.java | 2 +- .../aop/target/LazyInitTargetSourceTests.java | 2 +- .../PrototypeBasedTargetSourceTests.java | 2 +- .../target/PrototypeTargetSourceTests.java | 2 +- .../dynamic/RefreshableTargetSourceTests.java | 2 +- .../cache/config/SomeCustomKeyGenerator.java | 2 +- .../springframework/beans/BeanUtilsTests.java | 2 +- .../beans/BeanWrapperEnumTests.java | 2 +- .../beans/ConcurrentBeanWrapperTests.java | 2 +- .../beans/MutablePropertyValuesTests.java | 2 +- .../beans/PropertyAccessorUtilsTests.java | 2 +- .../beans/factory/BeanFactoryUtilsTests.java | 2 +- .../factory/ConcurrentBeanFactoryTests.java | 2 +- ...AnnotationBeanWiringInfoResolverTests.java | 2 +- .../CustomAutowireConfigurerTests.java | 2 +- ...uiredAnnotationBeanPostProcessorTests.java | 2 +- .../config/CustomEditorConfigurerTests.java | 2 +- .../config/CustomScopeConfigurerTests.java | 8 +++--- .../FieldRetrievingFactoryBeanTests.java | 2 +- .../config/PropertiesFactoryBeanTests.java | 2 +- .../ServiceLocatorFactoryBeanTests.java | 12 ++++---- .../factory/config/SimpleScopeTests.java | 2 +- .../ConstructorArgumentEntryTests.java | 4 +-- .../parsing/CustomProblemReporterTests.java | 2 +- .../parsing/FailFastProblemReporterTests.java | 4 +-- .../parsing/NullSourceExtractorTests.java | 2 +- .../PassThroughSourceExtractorTests.java | 2 +- .../factory/parsing/PropertyEntryTests.java | 8 +++--- .../factory/wiring/BeanWiringInfoTests.java | 2 +- .../ClassNameBeanWiringInfoResolverTests.java | 2 +- .../xml/DelegatingEntityResolverTests.java | 8 +++--- .../xml/ProfileXmlBeanDefinitionTests.java | 2 +- .../DefaultNamespaceHandlerResolverTests.java | 2 +- .../ByteArrayPropertyEditorTests.java | 2 +- .../CharArrayPropertyEditorTests.java | 2 +- .../CustomCollectionEditorTests.java | 8 +++--- .../mail/SimpleMailMessageTests.java | 6 ++-- .../aop/aspectj/AfterAdviceBindingTests.java | 2 +- .../AfterReturningAdviceBindingTests.java | 2 +- .../AfterThrowingAdviceBindingTests.java | 14 +++++----- .../aspectj/AroundAdviceCircularTests.java | 2 +- .../AspectAndAdvicePrecedenceTests.java | 2 +- ...AspectJExpressionPointcutAdvisorTests.java | 2 +- .../aop/aspectj/BeanNamePointcutTests.java | 2 +- .../aop/aspectj/BeforeAdviceBindingTests.java | 2 +- .../DeclarationOrderIndependenceTests.java | 2 +- .../aop/aspectj/DeclareParentsTests.java | 2 +- ...licitJPArgumentMatchingAtAspectJTests.java | 2 +- .../ImplicitJPArgumentMatchingTests.java | 2 +- .../aop/aspectj/OverloadedAdviceTests.java | 2 +- .../aop/aspectj/ProceedTests.java | 2 +- .../aspectj/PropertyDependentAspectTests.java | 2 +- .../SharedPointcutWithArgsMismatchTests.java | 2 +- .../SubtypeSensitiveMatchingTests.java | 2 +- .../aspectj/TargetPointcutSelectionTests.java | 2 +- ...tSelectionOnlyPointcutsAtAspectJTests.java | 2 +- ...sAndTargetSelectionOnlyPointcutsTests.java | 2 +- .../autoproxy/AnnotationPointcutTests.java | 2 +- .../AspectImplementingInterfaceTests.java | 2 +- ...xyCreatorAndLazyInitTargetSourceTests.java | 2 +- .../AspectJAutoProxyCreatorTests.java | 2 +- .../AtAspectJAfterThrowingTests.java | 2 +- .../AtAspectJAnnotationBindingTests.java | 2 +- .../autoproxy/benchmark/BenchmarkTests.java | 2 +- .../autoproxy/spr3064/SPR3064Tests.java | 2 +- ...fterReturningGenericTypeMatchingTests.java | 2 +- ...icBridgeMethodMatchingClassProxyTests.java | 2 +- .../GenericParameterMatchingTests.java | 2 +- .../AopNamespaceHandlerAdviceTypeTests.java | 2 +- .../AopNamespaceHandlerArgNamesTests.java | 2 +- ...NamespaceHandlerProxyTargetClassTests.java | 2 +- .../AopNamespaceHandlerReturningTests.java | 2 +- .../AopNamespaceHandlerThrowingTests.java | 2 +- .../MethodLocatingFactoryBeanTests.java | 14 +++++----- .../aop/config/PrototypeProxyTests.java | 2 +- .../aop/framework/ProxyFactoryBeanTests.java | 2 +- .../AdvisorAdapterRegistrationTests.java | 2 +- .../BeanNameAutoProxyCreatorInitTests.java | 4 +-- .../LookupMethodWrappedByCglibProxyTests.java | 2 +- .../factory/xml/QualifierAnnotationTests.java | 2 +- .../cache/config/SomeCustomKeyGenerator.java | 2 +- .../ContextJndiBeanFactoryLocatorTests.java | 2 +- .../ConfigurationClassProcessingTests.java | 2 +- .../annotation4/FactoryMethodComponent.java | 2 +- .../EventPublicationInterceptorTests.java | 8 +++--- .../ConversionServiceFactoryBeanTests.java | 2 +- .../number/CurrencyStyleFormatterTests.java | 2 +- .../FormattingConversionServiceTests.java | 4 +-- .../ReflectiveLoadTimeWeaverTests.java | 8 +++--- .../jmx/export/MBeanExporterTests.java | 2 +- .../ModelMBeanNotificationPublisherTests.java | 10 +++---- .../scripting/MessengerScrambler.java | 2 +- .../support/StaticScriptSourceTests.java | 2 +- .../scripting/support/StubMessenger.java | 2 +- .../tests/sample/beans/FactoryMethods.java | 2 +- .../org/springframework/ui/ModelMapTests.java | 8 +++--- .../validation/ValidationUtilsTests.java | 4 +-- .../core/OrderComparatorTests.java | 2 +- .../converter/ConvertingComparatorTests.java | 8 +++--- .../PropertySourcesPropertyResolverTests.java | 6 ++-- .../env/SimpleCommandLineParserTests.java | 12 ++++---- .../core/env/StandardEnvironmentTests.java | 28 +++++++++---------- .../core/io/ResourceEditorTests.java | 4 +-- .../core/io/ResourceTests.java | 2 +- .../ResourceArrayPropertyEditorTests.java | 2 +- .../task/SimpleAsyncTaskExecutorTests.java | 2 +- .../util/PropertyPlaceholderHelperTests.java | 2 +- .../util/SystemPropertyUtilsTests.java | 2 +- .../comparator/InvertibleComparatorTests.java | 4 +-- .../MapSqlParameterSourceTests.java | 2 +- .../lookup/JndiDataSourceLookupTests.java | 4 +-- .../lookup/MapDataSourceLookupTests.java | 2 +- .../SQLStateSQLExceptionTranslatorTests.java | 2 +- ...AbstractMessageListenerContainerTests.java | 4 +-- .../SimpleMessageListenerContainerTests.java | 4 +-- .../jms/support/JmsAccessorTests.java | 6 ++-- .../HeadersMethodArgumentResolverTests.java | 2 +- .../invocation/MethodMessageHandlerTests.java | 2 +- .../messaging/simp/stomp/StompCodecTests.java | 4 +-- .../mock/web/MockFilterChainTests.java | 4 +-- .../ExpectedExceptionSpringRunnerTests.java | 2 +- .../match/XpathRequestMatchersTests.java | 14 +++++----- .../result/ContentResultMatchersTests.java | 14 +++++----- .../FlashAttributeResultMatchersTests.java | 4 +-- .../result/ModelResultMatchersTests.java | 20 ++++++------- .../LocalConnectionFactoryBeanTests.java | 4 +-- .../TransactionAttributeEditorTests.java | 4 +-- .../TransactionAttributeSourceTests.java | 2 +- .../HeaderContentTypeResolverTests.java | 2 +- .../CompositeRequestConditionTests.java | 4 +-- .../RequestConditionHolderTests.java | 4 +-- .../MappingJackson2HttpMessageConverter.java | 1 + .../springframework/protobuf/OuterSample.java | 2 +- .../DefaultResponseErrorHandlerTests.java | 2 +- .../StandardServletAsyncWebRequestTests.java | 2 +- .../request/async/WebAsyncManagerTests.java | 2 +- .../filter/DelegatingFilterProxyTests.java | 2 +- ...orsMethodHandlerArgumentResolverTests.java | 4 +-- .../InitBinderDataBinderFactoryTests.java | 2 +- ...rMethodArgumentResolverCompositeTests.java | 2 +- ...ethodReturnValueHandlerCompositeTests.java | 2 +- .../ByteArrayMultipartFileEditorTests.java | 2 +- .../web/util/TagUtilsTests.java | 2 +- .../CompositeRequestConditionTests.java | 4 +-- .../RequestConditionHolderTests.java | 4 +-- ...RequestMappingInfoHandlerMappingTests.java | 2 +- .../HttpEntityMethodProcessorMockTests.java | 2 +- ...xVariablesMethodArgumentResolverTests.java | 4 +-- .../servlet/tags/form/OptionsTagTests.java | 2 +- .../tags/form/RadioButtonsTagTests.java | 2 +- ...faultRequestToViewNameTranslatorTests.java | 2 +- .../view/RedirectViewUriTemplateTests.java | 2 +- .../StandardWebSocketClientTests.java | 2 +- .../BeanCreatingHandlerProviderTests.java | 2 +- .../SubProtocolWebSocketHandlerTests.java | 6 ++-- .../HttpReceivingTransportHandlerTests.java | 2 +- ...NamespaceHandlerScopeIntegrationTests.java | 2 +- ...visorAutoProxyCreatorIntegrationTests.java | 2 +- 193 files changed, 324 insertions(+), 323 deletions(-) diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverAnnotationTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverAnnotationTests.java index 955feeb7c5..30fa349082 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverAnnotationTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverAnnotationTests.java @@ -30,7 +30,7 @@ import org.junit.Test; * @author Adrian Colyer * @author Chris Beams */ -public final class AspectJAdviceParameterNameDiscoverAnnotationTests +public class AspectJAdviceParameterNameDiscoverAnnotationTests extends AspectJAdviceParameterNameDiscovererTests { @Retention(RetentionPolicy.RUNTIME) 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 28622ba8d2..e657653f11 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 @@ -43,7 +43,7 @@ import static org.junit.Assert.*; * @author Rod Johnson * @author Chris Beams */ -public final class AspectJExpressionPointcutTests { +public class AspectJExpressionPointcutTests { public static final String MATCH_ALL_METHODS = "execution(* *(..))"; 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 d6835aa1b0..a4d48507a9 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 @@ -28,7 +28,7 @@ import static org.junit.Assert.*; * @author Ramnivas Laddad * @author Chris Beams */ -public final class BeanNamePointcutMatchingTests { +public class BeanNamePointcutMatchingTests { @Test public void testMatchingPointcuts() { 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 f8c39e7b44..ee772ee776 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 @@ -44,7 +44,7 @@ import static org.junit.Assert.*; * @author Ramnivas Laddad * @since 2.0 */ -public final class MethodInvocationProceedingJoinPointTests { +public class MethodInvocationProceedingJoinPointTests { @Test public void testingBindingWithJoinPoint() { 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 ac44fb9f39..efb35e62c1 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 @@ -27,7 +27,7 @@ import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer.Ambi * @author Adrian Colyer * @author Chris Beams */ -public final class TigerAspectJAdviceParameterNameDiscovererTests +public class TigerAspectJAdviceParameterNameDiscovererTests extends AspectJAdviceParameterNameDiscovererTests { @Test 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 87470d708b..3362ad2956 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 @@ -35,9 +35,9 @@ import static org.junit.Assert.*; * @author Rick Evans * @author Chris Beams */ -public final class TypePatternClassFilterTests { +public class TypePatternClassFilterTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testInvalidPattern() { // should throw - pattern must be recognized as invalid new TypePatternClassFilter("-"); @@ -78,12 +78,12 @@ public final class TypePatternClassFilterTests { assertTrue("matches Double",tpcf.matches(Double.class)); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSetTypePatternWithNullArgument() throws Exception { new TypePatternClassFilter(null); } - @Test(expected=IllegalStateException.class) + @Test(expected = IllegalStateException.class) public void testInvocationOfMatchesMethodBlowsUpWhenNoTypePatternHasBeenSet() throws Exception { new TypePatternClassFilter().matches(String.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 64b484f7a4..43cc76aa8c 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 @@ -586,7 +586,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests { itb.getAge(); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testDeclarePrecedenceNotSupported() { TestBean target = new TestBean(); MetadataAwareAspectInstanceFactory aspectInstanceFactory = new SingletonMetadataAwareAspectInstanceFactory( 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 000bf63d76..08740b5ade 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 @@ -39,7 +39,7 @@ import static org.junit.Assert.*; */ public class ArgumentBindingTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testBindingInPointcutUsedByAdvice() { TestBean tb = new TestBean(); AspectJProxyFactory proxyFactory = new AspectJProxyFactory(tb); @@ -49,7 +49,7 @@ public class ArgumentBindingTests { proxiedTestBean.setName("Supercalifragalisticexpialidocious"); } - @Test(expected=IllegalStateException.class) + @Test(expected = IllegalStateException.class) public void testAnnotationArgumentNameBinding() { TransactionalBean tb = new TransactionalBean(); AspectJProxyFactory proxyFactory = new AspectJProxyFactory(tb); 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 8a12bdb51f..d6fa549d80 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 @@ -30,9 +30,9 @@ import static org.junit.Assert.*; * @author Rod Johnson * @author Chris Beams */ -public final class AspectMetadataTests { +public class AspectMetadataTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testNotAnAspect() { new AspectMetadata(String.class,"someBean"); } diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactoryTests.java index f01d1bb9c6..d89e34bea4 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactoryTests.java @@ -23,7 +23,7 @@ package org.springframework.aop.aspectj.annotation; * @author Rod Johnson * @since 2.0 */ -public final class ReflectiveAspectJAdvisorFactoryTests extends AbstractAspectJAdvisorFactoryTests { +public class ReflectiveAspectJAdvisorFactoryTests extends AbstractAspectJAdvisorFactoryTests { @Override protected AspectJAdvisorFactory getFixture() { 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 c5a3574e8a..f334aec7a1 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 @@ -37,7 +37,7 @@ import static org.junit.Assert.*; * @author Rob Harrop * @author Chris Beams */ -public final class AspectJNamespaceHandlerTests { +public class AspectJNamespaceHandlerTests { private ParserContext parserContext; 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 348e619b0d..8f9fb6beb8 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 @@ -40,7 +40,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class AopNamespaceHandlerEventTests { +public class AopNamespaceHandlerEventTests { private static final Class CLASS = AopNamespaceHandlerEventTests.class; 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 b46c057e6a..91c1607d0f 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 @@ -30,7 +30,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Mark Fisher * @author Chris Beams */ -public final class AopNamespaceHandlerPointcutErrorTests { +public class AopNamespaceHandlerPointcutErrorTests { @Test public void testDuplicatePointcutConfig() { 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 e1b6b22bd2..a0c220d079 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 @@ -31,7 +31,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Rob Harrop * @author Chris Beams */ -public final class TopLevelAopTagTests { +public class TopLevelAopTagTests { private static final Resource CONTEXT = qualifiedResource(TopLevelAopTagTests.class, "context.xml"); 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 e3337cd7fe..46ff6077c4 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 @@ -32,7 +32,7 @@ import org.springframework.util.StopWatch; * @author Chris Beams * @since 2.0 */ -public final class IntroductionBenchmarkTests { +public class IntroductionBenchmarkTests { private static final int EXPECTED_COMPARE = 13; 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 9293d087d5..a85cc95ab4 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 @@ -33,7 +33,7 @@ import static org.junit.Assert.*; * @author Chris Beams * @since 14.03.2003 */ -public final class MethodInvocationTests { +public class MethodInvocationTests { @Test public void testValidInvocation() throws Throwable { 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 e0c765e580..455778c83e 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 @@ -32,7 +32,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Chris Beams * @since 03.09.2004 */ -public final class PrototypeTargetTests { +public class PrototypeTargetTests { private static final Resource CONTEXT = qualifiedResource(PrototypeTargetTests.class, "context.xml"); 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 8d4c43a6e7..c4011acd6a 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 @@ -34,7 +34,7 @@ import static org.junit.Assert.*; * @author Chris Beams * @since 06.04.2004 */ -public final class ConcurrencyThrottleInterceptorTests { +public class ConcurrencyThrottleInterceptorTests { protected static final Log logger = LogFactory.getLog(ConcurrencyThrottleInterceptorTests.class); diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java index 6146571fa6..c78a02c487 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java @@ -29,51 +29,51 @@ import static org.mockito.BDDMockito.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class CustomizableTraceInterceptorTests { +public class CustomizableTraceInterceptorTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSetEmptyEnterMessage() { // Must not be able to set empty enter message new CustomizableTraceInterceptor().setEnterMessage(""); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSetEnterMessageWithReturnValuePlaceholder() { // Must not be able to set enter message with return value placeholder new CustomizableTraceInterceptor().setEnterMessage(CustomizableTraceInterceptor.PLACEHOLDER_RETURN_VALUE); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSetEnterMessageWithExceptionPlaceholder() { // Must not be able to set enter message with exception placeholder new CustomizableTraceInterceptor().setEnterMessage(CustomizableTraceInterceptor.PLACEHOLDER_EXCEPTION); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSetEnterMessageWithInvocationTimePlaceholder() { // Must not be able to set enter message with invocation time placeholder new CustomizableTraceInterceptor().setEnterMessage(CustomizableTraceInterceptor.PLACEHOLDER_INVOCATION_TIME); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSetEmptyExitMessage() { // Must not be able to set empty exit message new CustomizableTraceInterceptor().setExitMessage(""); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSetExitMessageWithExceptionPlaceholder() { // Must not be able to set exit message with exception placeholder new CustomizableTraceInterceptor().setExitMessage(CustomizableTraceInterceptor.PLACEHOLDER_EXCEPTION); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSetEmptyExceptionMessage() { // Must not be able to set empty exception message new CustomizableTraceInterceptor().setExceptionMessage(""); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSetExceptionMethodWithReturnValuePlaceholder() { // Must not be able to set exception message with return value placeholder new CustomizableTraceInterceptor().setExceptionMessage(CustomizableTraceInterceptor.PLACEHOLDER_RETURN_VALUE); diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/DebugInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/DebugInterceptorTests.java index a824083968..4d09708cdb 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/DebugInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/DebugInterceptorTests.java @@ -29,7 +29,7 @@ import static org.mockito.BDDMockito.*; * @author Rick Evans * @author Chris Beams */ -public final class DebugInterceptorTests { +public class DebugInterceptorTests { @Test public void testSunnyDayPathLogsCorrectly() throws Throwable { 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 8ce6962b0e..26ddf28ce6 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 @@ -29,7 +29,7 @@ import static org.junit.Assert.*; * @author Rod Johnson * @author Chris Beams */ -public final class ExposeBeanNameAdvisorsTests { +public class ExposeBeanNameAdvisorsTests { private class RequiresBeanNameBoundTestBean extends TestBean { private final String beanName; 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 8a13f376e8..38f0bd9501 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 @@ -34,7 +34,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Rod Johnson * @author Chris Beams */ -public final class ExposeInvocationInterceptorTests { +public class ExposeInvocationInterceptorTests { private static final Resource CONTEXT = qualifiedResource(ExposeInvocationInterceptorTests.class, "context.xml"); diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptorTests.java index a08b03064a..cb14a4db70 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptorTests.java @@ -28,7 +28,7 @@ import static org.mockito.BDDMockito.*; * @author Rick Evans * @author Chris Beams */ -public final class PerformanceMonitorInterceptorTests { +public class PerformanceMonitorInterceptorTests { @Test public void testSuffixAndPrefixAssignment() { diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java index 3b811b2443..7504bee5eb 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java @@ -29,7 +29,7 @@ import static org.mockito.BDDMockito.*; * @author Rick Evans * @author Chris Beams */ -public final class SimpleTraceInterceptorTests { +public class SimpleTraceInterceptorTests { @Test public void testSunnyDayPathLogsCorrectly() throws Throwable { 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 129917637a..88eee11983 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 @@ -28,27 +28,27 @@ import static org.mockito.BDDMockito.*; * @author Rick Evans * @author Chris Beams */ -public final class DefaultScopedObjectTests { +public class DefaultScopedObjectTests { private static final String GOOD_BEAN_NAME = "foo"; - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorWithNullBeanFactory() throws Exception { new DefaultScopedObject(null, GOOD_BEAN_NAME); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorWithNullTargetBeanName() throws Exception { testBadTargetBeanName(null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorWithEmptyTargetBeanName() throws Exception { testBadTargetBeanName(""); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorWithJustWhitespacedTargetBeanName() throws Exception { testBadTargetBeanName(" "); } 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 9886a0a145..6723103f89 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 @@ -29,7 +29,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Mark Fisher * @author Chris Beams */ -public final class ScopedProxyAutowireTests { +public class ScopedProxyAutowireTests { private static final Class CLASS = ScopedProxyAutowireTests.class; 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 0c4ccf7581..670845229c 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 @@ -35,7 +35,7 @@ import static org.junit.Assert.*; * @author Rod Johnson * @author Chris Beams */ -public final class AopUtilsTests { +public class AopUtilsTests { @Test public void testPointcutCanNeverApply() { 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 a62be0bcf0..964136c7e9 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 @@ -29,7 +29,7 @@ import static org.junit.Assert.*; * @author Rod Johnson * @author Chris Beams */ -public final class ClassFiltersTests { +public class ClassFiltersTests { private ClassFilter exceptionFilter = new RootClassFilter(Exception.class); 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 b7ea4caf2c..73677e3465 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 @@ -30,7 +30,7 @@ import static org.junit.Assert.*; * @author Rod Johnson * @author Chris Beams */ -public final class ControlFlowPointcutTests { +public class ControlFlowPointcutTests { @Test public void testMatches() { 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 2be7fe8a1b..fa90846d9b 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 @@ -43,9 +43,9 @@ import static org.mockito.BDDMockito.*; * @author Chris Beams * @since 13.05.2003 */ -public final class DelegatingIntroductionInterceptorTests { +public class DelegatingIntroductionInterceptorTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testNullTarget() throws Exception { // Shouldn't accept null target new DelegatingIntroductionInterceptor(null); diff --git a/spring-aop/src/test/java/org/springframework/aop/support/JdkRegexpMethodPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/JdkRegexpMethodPointcutTests.java index 0848ab58a9..643f55e21f 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/JdkRegexpMethodPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/JdkRegexpMethodPointcutTests.java @@ -19,7 +19,7 @@ package org.springframework.aop.support; /** * @author Dmitriy Kopylenko */ -public final class JdkRegexpMethodPointcutTests extends AbstractRegexpMethodPointcutTests { +public class JdkRegexpMethodPointcutTests extends AbstractRegexpMethodPointcutTests { @Override protected AbstractRegexpMethodPointcut getRegexpMethodPointcut() { 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 a96e61cdca..2bfa7e6a03 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 @@ -33,7 +33,7 @@ import static org.junit.Assert.*; * @author Rod Johnson * @author Chris Beams */ -public final class NameMatchMethodPointcutTests { +public class NameMatchMethodPointcutTests { protected NameMatchMethodPointcut pc; 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 d652f472b0..68b9d26b9c 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 @@ -36,7 +36,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Rod Johnson * @author Chris Beams */ -public final class RegexpMethodPointcutAdvisorIntegrationTests { +public class RegexpMethodPointcutAdvisorIntegrationTests { private static final Resource CONTEXT = qualifiedResource(RegexpMethodPointcutAdvisorIntegrationTests.class, "context.xml"); diff --git a/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java b/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java index 9229760aff..f88dc88112 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java @@ -30,7 +30,7 @@ import static org.springframework.tests.TestResourceUtils.*; /** * @author Stephane Nicoll */ -public final class CommonsPool2TargetSourceProxyTests { +public class CommonsPool2TargetSourceProxyTests { private static final Resource CONTEXT = qualifiedResource(CommonsPool2TargetSourceProxyTests.class, "context.xml"); 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 47005c5d23..0012a9cb49 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 @@ -39,7 +39,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Rod Johnson * @author Chris Beams */ -public final class HotSwappableTargetSourceTests { +public class HotSwappableTargetSourceTests { private static final Resource CONTEXT = qualifiedResource(HotSwappableTargetSourceTests.class, "context.xml"); 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 08e1f885ab..ddda8ce918 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 @@ -28,7 +28,7 @@ import static org.junit.Assert.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class LazyCreationTargetSourceTests { +public class LazyCreationTargetSourceTests { @Test public void testCreateLazy() { 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 7419018e65..127206fc6d 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 @@ -34,7 +34,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Chris Beams * @since 07.01.2005 */ -public final class LazyInitTargetSourceTests { +public class LazyInitTargetSourceTests { private static final Class CLASS = LazyInitTargetSourceTests.class; 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 7d1fa2c965..026029b4cc 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 @@ -35,7 +35,7 @@ import static org.junit.Assert.*; * @author Rod Johnson * @author Chris Beams */ -public final class PrototypeBasedTargetSourceTests { +public class PrototypeBasedTargetSourceTests { @Test public void testSerializability() throws Exception { 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 164eeab3b6..f7b1200351 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 @@ -33,7 +33,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Rod Johnson * @author Chris Beams */ -public final class PrototypeTargetSourceTests { +public class PrototypeTargetSourceTests { private static final Resource CONTEXT = qualifiedResource(PrototypeTargetSourceTests.class, "context.xml"); 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 68e68e519f..7dce8a44f2 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 @@ -27,7 +27,7 @@ import static org.junit.Assert.*; * @author Rob Harrop * @author Chris Beams */ -public final class RefreshableTargetSourceTests { +public class RefreshableTargetSourceTests { /** * Test what happens when checking for refresh but not refreshing object. 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 d817b205d3..854240e17d 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 @@ -26,7 +26,7 @@ import org.springframework.cache.interceptor.KeyGenerator; * * @author Stephane Nicoll */ -public final class SomeCustomKeyGenerator implements KeyGenerator { +public class SomeCustomKeyGenerator implements KeyGenerator { @Override public Object generate(Object target, Method method, Object... params) { diff --git a/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java b/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java index 246421c634..f8f7e858ee 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java @@ -42,7 +42,7 @@ import static org.junit.Assert.*; * @author Chris Beams * @since 19.05.2003 */ -public final class BeanUtilsTests { +public class BeanUtilsTests { @Test public void testInstantiateClass() { 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 e6633f0d18..a06bad4780 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java @@ -31,7 +31,7 @@ import static org.junit.Assert.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class BeanWrapperEnumTests { +public class BeanWrapperEnumTests { @Test public void testCustomEnum() { 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 d23c034a7b..fcace7d25a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/ConcurrentBeanWrapperTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/ConcurrentBeanWrapperTests.java @@ -36,7 +36,7 @@ import static org.junit.Assert.*; * @author Chris Beams * @since 08.03.2004 */ -public final class ConcurrentBeanWrapperTests { +public class ConcurrentBeanWrapperTests { private final Log logger = LogFactory.getLog(getClass()); 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 ee23f9dfb6..54db575086 100644 --- a/spring-beans/src/test/java/org/springframework/beans/MutablePropertyValuesTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/MutablePropertyValuesTests.java @@ -26,7 +26,7 @@ import static org.junit.Assert.*; * @author Rod Johnson * @author Chris Beams */ -public final class MutablePropertyValuesTests extends AbstractPropertyValuesTests { +public class MutablePropertyValuesTests extends AbstractPropertyValuesTests { @Test public void testValid() throws Exception { 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 4c567b5060..1b15a43d9e 100644 --- a/spring-beans/src/test/java/org/springframework/beans/PropertyAccessorUtilsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/PropertyAccessorUtilsTests.java @@ -26,7 +26,7 @@ import static org.junit.Assert.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class PropertyAccessorUtilsTests { +public class PropertyAccessorUtilsTests { @Test public void testCanonicalPropertyName() { 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 5ab0e9c8d8..a5eced11ce 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 @@ -43,7 +43,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Chris Beams * @since 04.07.2003 */ -public final class BeanFactoryUtilsTests { +public class BeanFactoryUtilsTests { private static final Class CLASS = BeanFactoryUtilsTests.class; private static final Resource ROOT_CONTEXT = qualifiedResource(CLASS, "root.xml"); 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 444b16c853..b24b5db907 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 @@ -48,7 +48,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Chris Beams * @since 10.03.2004 */ -public final class ConcurrentBeanFactoryTests { +public class ConcurrentBeanFactoryTests { private static final Log logger = LogFactory.getLog(ConcurrentBeanFactoryTests.class); private static final Resource CONTEXT = qualifiedResource(ConcurrentBeanFactoryTests.class, "context.xml"); 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 70c2a3ee4d..7b0d3cbcbb 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 @@ -26,7 +26,7 @@ import static org.junit.Assert.*; * @author Rick Evans * @author Chris Beams */ -public final class AnnotationBeanWiringInfoResolverTests { +public class AnnotationBeanWiringInfoResolverTests { @Test public void testResolveWiringInfo() throws Exception { diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java index 228201fadf..83dd5af5c5 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java @@ -36,7 +36,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class CustomAutowireConfigurerTests { +public class CustomAutowireConfigurerTests { private static final Resource CONTEXT = qualifiedResource(CustomAutowireConfigurerTests.class, "context.xml"); diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessorTests.java index 9daf638373..7ca7861dc4 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessorTests.java @@ -39,7 +39,7 @@ import static org.junit.Assert.*; * @author Chris Beams * @since 2.0 */ -public final class RequiredAnnotationBeanPostProcessorTests { +public class RequiredAnnotationBeanPostProcessorTests { @Test public void testWithRequiredPropertyOmitted() { 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 c85d7b2850..46e497e8a6 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 @@ -42,7 +42,7 @@ import static org.junit.Assert.*; * @author Chris Beams * @since 31.07.2004 */ -public final class CustomEditorConfigurerTests { +public class CustomEditorConfigurerTests { @Test public void testCustomEditorConfigurerWithPropertyEditorRegistrar() throws ParseException { 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 62a93b9c4f..f27e7cd53e 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 @@ -34,7 +34,7 @@ import static org.mockito.BDDMockito.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class CustomScopeConfigurerTests { +public class CustomScopeConfigurerTests { private static final String FOO_SCOPE = "fooScope"; private ConfigurableListableBeanFactory factory; @@ -81,7 +81,7 @@ public final class CustomScopeConfigurerTests { assertTrue(factory.getRegisteredScope(FOO_SCOPE) instanceof NoOpScope); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testWhereScopeMapHasNullScopeValueInEntrySet() throws Exception { Map scopes = new HashMap<>(); scopes.put(FOO_SCOPE, null); @@ -90,7 +90,7 @@ public final class CustomScopeConfigurerTests { figurer.postProcessBeanFactory(factory); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testWhereScopeMapHasNonScopeInstanceInEntrySet() throws Exception { Map scopes = new HashMap<>(); scopes.put(FOO_SCOPE, this); // <-- not a valid value... @@ -100,7 +100,7 @@ public final class CustomScopeConfigurerTests { } @SuppressWarnings("unchecked") - @Test(expected=ClassCastException.class) + @Test(expected = ClassCastException.class) public void testWhereScopeMapHasNonStringTypedScopeNameInKeySet() throws Exception { Map scopes = new HashMap(); scopes.put(this, new NoOpScope()); // <-- not a valid value (the key)... 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 07dd017da7..2f432e33be 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 @@ -35,7 +35,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Chris Beams * @since 31.07.2004 */ -public final class FieldRetrievingFactoryBeanTests { +public class FieldRetrievingFactoryBeanTests { private static final Resource CONTEXT = qualifiedResource(FieldRetrievingFactoryBeanTests.class, "context.xml"); 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 e24f36e769..4e78d1b347 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 @@ -32,7 +32,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Chris Beams * @since 01.11.2003 */ -public final class PropertiesFactoryBeanTests { +public class PropertiesFactoryBeanTests { private static final Class CLASS = PropertiesFactoryBeanTests.class; private static final Resource TEST_PROPS = qualifiedResource(CLASS, "test.properties"); 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 e360a669fe..0b704b8df6 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 @@ -38,7 +38,7 @@ import static org.springframework.beans.factory.support.BeanDefinitionBuilder.*; * @author Rick Evans * @author Chris Beams */ -public final class ServiceLocatorFactoryBeanTests { +public class ServiceLocatorFactoryBeanTests { private DefaultListableBeanFactory bf; @@ -237,12 +237,12 @@ public final class ServiceLocatorFactoryBeanTests { assertTrue(testBean4 instanceof ExtendedTestService); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testNoServiceLocatorInterfaceSupplied() throws Exception { new ServiceLocatorFactoryBean().afterPropertiesSet(); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testWhenServiceLocatorInterfaceIsNotAnInterfaceType() throws Exception { ServiceLocatorFactoryBean factory = new ServiceLocatorFactoryBean(); factory.setServiceLocatorInterface(getClass()); @@ -250,14 +250,14 @@ public final class ServiceLocatorFactoryBeanTests { // should throw, bad (non-interface-type) serviceLocator interface supplied } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testWhenServiceLocatorExceptionClassToExceptionTypeWithOnlyNoArgCtor() throws Exception { ServiceLocatorFactoryBean factory = new ServiceLocatorFactoryBean(); factory.setServiceLocatorExceptionClass(ExceptionClassWithOnlyZeroArgCtor.class); // should throw, bad (invalid-Exception-type) serviceLocatorException class supplied } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) @SuppressWarnings("unchecked") public void testWhenServiceLocatorExceptionClassIsNotAnExceptionSubclass() throws Exception { ServiceLocatorFactoryBean factory = new ServiceLocatorFactoryBean(); @@ -265,7 +265,7 @@ public final class ServiceLocatorFactoryBeanTests { // should throw, bad (non-Exception-type) serviceLocatorException class supplied } - @Test(expected=UnsupportedOperationException.class) + @Test(expected = UnsupportedOperationException.class) public void testWhenServiceLocatorMethodCalledWithTooManyParameters() throws Exception { ServiceLocatorFactoryBean factory = new ServiceLocatorFactoryBean(); factory.setServiceLocatorInterface(ServiceLocatorInterfaceWithExtraNonCompliantMethod.class); 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 64405f25a1..2a81acb06f 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 @@ -38,7 +38,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class SimpleScopeTests { +public class SimpleScopeTests { private static final Resource CONTEXT = qualifiedResource(SimpleScopeTests.class, "context.xml"); diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/ConstructorArgumentEntryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/ConstructorArgumentEntryTests.java index b15728e669..430e6ef074 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/ConstructorArgumentEntryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/ConstructorArgumentEntryTests.java @@ -24,9 +24,9 @@ import org.junit.Test; * @author Rick Evans * @author Chris Beams */ -public final class ConstructorArgumentEntryTests { +public class ConstructorArgumentEntryTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorBailsOnNegativeCtorIndexArgument() { new ConstructorArgumentEntry(-1); } 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 65bfd42962..d2eae53b83 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 @@ -35,7 +35,7 @@ import static org.springframework.tests.TestResourceUtils.*; * @author Chris Beams * @since 2.0 */ -public final class CustomProblemReporterTests { +public class CustomProblemReporterTests { private static final Resource CONTEXT = qualifiedResource(CustomProblemReporterTests.class, "context.xml"); 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 f6c5ef4175..19180d4156 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 @@ -28,9 +28,9 @@ import static org.mockito.BDDMockito.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class FailFastProblemReporterTests { +public class FailFastProblemReporterTests { - @Test(expected=BeanDefinitionParsingException.class) + @Test(expected = BeanDefinitionParsingException.class) public void testError() throws Exception { FailFastProblemReporter reporter = new FailFastProblemReporter(); reporter.error(new Problem("VGER", new Location(new DescriptiveResource("here")), 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 30654711d4..24b11fd955 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 @@ -24,7 +24,7 @@ import static org.junit.Assert.*; * @author Rick Evans * @author Chris Beams */ -public final class NullSourceExtractorTests { +public class NullSourceExtractorTests { @Test public void testPassThroughContract() throws Exception { 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 3bf9b1808f..3928797158 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 @@ -26,7 +26,7 @@ import static org.junit.Assert.*; * @author Rick Evans * @author Chris Beams */ -public final class PassThroughSourceExtractorTests { +public class PassThroughSourceExtractorTests { @Test public void testPassThroughContract() throws Exception { diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/PropertyEntryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/PropertyEntryTests.java index 6a807d313a..11e1db26fa 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/PropertyEntryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/PropertyEntryTests.java @@ -24,19 +24,19 @@ import org.junit.Test; * @author Rick Evans * @author Chris Beams */ -public final class PropertyEntryTests { +public class PropertyEntryTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorBailsOnNullPropertyNameArgument() throws Exception { new PropertyEntry(null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorBailsOnEmptyPropertyNameArgument() throws Exception { new PropertyEntry(""); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorBailsOnWhitespacedPropertyNameArgument() throws Exception { new PropertyEntry("\t "); } diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanWiringInfoTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanWiringInfoTests.java index 59f9566e88..639b868b59 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanWiringInfoTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanWiringInfoTests.java @@ -26,7 +26,7 @@ import static org.junit.Assert.*; * @author Rick Evans * @author Sam Brannen */ -public final class BeanWiringInfoTests { +public class BeanWiringInfoTests { @Test(expected = IllegalArgumentException.class) public void ctorWithNullBeanName() throws Exception { diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/wiring/ClassNameBeanWiringInfoResolverTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/wiring/ClassNameBeanWiringInfoResolverTests.java index cec8d1f766..60d4645e91 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/wiring/ClassNameBeanWiringInfoResolverTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/wiring/ClassNameBeanWiringInfoResolverTests.java @@ -25,7 +25,7 @@ import static org.junit.Assert.*; * * @author Rick Evans */ -public final class ClassNameBeanWiringInfoResolverTests { +public class ClassNameBeanWiringInfoResolverTests { @Test(expected = IllegalArgumentException.class) public void resolveWiringInfoWithNullBeanInstance() throws Exception { diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DelegatingEntityResolverTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DelegatingEntityResolverTests.java index 6b396933ae..68a917b13c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DelegatingEntityResolverTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DelegatingEntityResolverTests.java @@ -26,19 +26,19 @@ import org.xml.sax.InputSource; * @author Rick Evans * @author Chris Beams */ -public final class DelegatingEntityResolverTests { +public class DelegatingEntityResolverTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorWhereDtdEntityResolverIsNull() throws Exception { new DelegatingEntityResolver(null, new NoOpEntityResolver()); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorWhereSchemaEntityResolverIsNull() throws Exception { new DelegatingEntityResolver(new NoOpEntityResolver(), null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorWhereEntityResolversAreBothNull() throws Exception { new DelegatingEntityResolver(null, null); } 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 286b4062ac..de061a780c 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 @@ -61,7 +61,7 @@ public class ProfileXmlBeanDefinitionTests { private static final String TARGET_BEAN = "foo"; - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testProfileValidation() { beanFactoryFor(PROD_ELIGIBLE_XML, NULL_ACTIVE); } 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 fec3ba478e..b2e9a9c472 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 @@ -77,7 +77,7 @@ public class DefaultNamespaceHandlerResolverTests { new DefaultNamespaceHandlerResolver(null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorWithNullClassLoaderArgumentAndNullMappingLocationArgument() throws Exception { new DefaultNamespaceHandlerResolver(null, null); } 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 a6d268610c..29db9143b2 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 @@ -27,7 +27,7 @@ import static org.junit.Assert.*; * * @author Rick Evans */ -public final class ByteArrayPropertyEditorTests { +public class ByteArrayPropertyEditorTests { private final PropertyEditor byteEditor = new ByteArrayPropertyEditor(); 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 5b7b47105c..42f6789ca5 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 @@ -27,7 +27,7 @@ import static org.junit.Assert.*; * * @author Rick Evans */ -public final class CharArrayPropertyEditorTests { +public class CharArrayPropertyEditorTests { private final PropertyEditor charEditor = new CharArrayPropertyEditor(); 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 044dcb5708..55579c96cf 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 @@ -30,20 +30,20 @@ import static org.junit.Assert.*; * @author Rick Evans * @author Chris Beams */ -public final class CustomCollectionEditorTests { +public class CustomCollectionEditorTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorWithNullCollectionType() throws Exception { new CustomCollectionEditor(null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) @SuppressWarnings("unchecked") public void testCtorWithNonCollectionType() throws Exception { new CustomCollectionEditor((Class) String.class); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testWithCollectionTypeThatDoesNotExposeAPublicNoArgCtor() throws Exception { CustomCollectionEditor editor = new CustomCollectionEditor(CollectionTypeWithNoNoArgCtor.class); editor.setValue("1"); 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 41f33a1599..1172c7afe2 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 @@ -31,7 +31,7 @@ import static org.junit.Assert.*; * @author Chris Beams * @since 10.09.2003 */ -public final class SimpleMailMessageTests { +public class SimpleMailMessageTests { @Test public void testSimpleMessageCopyCtor() { @@ -155,12 +155,12 @@ public final class SimpleMailMessageTests { assertTrue(message1.equals(message2)); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCopyCtorChokesOnNullOriginalMessage() throws Exception { new SimpleMailMessage(null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCopyToChokesOnNullTargetMessage() throws Exception { new SimpleMailMessage().copyTo(null); } diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java index fca8b83017..bbf0dfcb8a 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java @@ -36,7 +36,7 @@ import static org.mockito.BDDMockito.*; * @author Rod Johnson * @author Chris Beams */ -public final class AfterAdviceBindingTests { +public class AfterAdviceBindingTests { private AdviceBindingCollaborator mockCollaborator; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.java index fccefbdec2..d811a87994 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.java @@ -37,7 +37,7 @@ import static org.mockito.BDDMockito.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class AfterReturningAdviceBindingTests { +public class AfterReturningAdviceBindingTests { private AfterReturningAdviceBindingTestAspect afterAdviceAspect; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java index 64fd7ff410..997162274f 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java @@ -31,7 +31,7 @@ import static org.mockito.BDDMockito.*; * @author Adrian Colyer * @author Chris Beams */ -public final class AfterThrowingAdviceBindingTests { +public class AfterThrowingAdviceBindingTests { private ITestBean testBean; @@ -51,20 +51,20 @@ public final class AfterThrowingAdviceBindingTests { afterThrowingAdviceAspect.setCollaborator(mockCollaborator); } - @Test(expected=Throwable.class) + @Test(expected = Throwable.class) public void testSimpleAfterThrowing() throws Throwable { this.testBean.exceptional(new Throwable()); verify(mockCollaborator).noArgs(); } - @Test(expected=Throwable.class) + @Test(expected = Throwable.class) public void testAfterThrowingWithBinding() throws Throwable { Throwable t = new Throwable(); this.testBean.exceptional(t); verify(mockCollaborator).oneThrowable(t); } - @Test(expected=Throwable.class) + @Test(expected = Throwable.class) public void testAfterThrowingWithNamedTypeRestriction() throws Throwable { Throwable t = new Throwable(); this.testBean.exceptional(t); @@ -73,20 +73,20 @@ public final class AfterThrowingAdviceBindingTests { verify(mockCollaborator).noArgsOnThrowableMatch(); } - @Test(expected=Throwable.class) + @Test(expected = Throwable.class) public void testAfterThrowingWithRuntimeExceptionBinding() throws Throwable { RuntimeException ex = new RuntimeException(); this.testBean.exceptional(ex); verify(mockCollaborator).oneRuntimeException(ex); } - @Test(expected=Throwable.class) + @Test(expected = Throwable.class) public void testAfterThrowingWithTypeSpecified() throws Throwable { this.testBean.exceptional(new Throwable()); verify(mockCollaborator).noArgsOnThrowableMatch(); } - @Test(expected=Throwable.class) + @Test(expected = Throwable.class) public void testAfterThrowingWithRuntimeTypeSpecified() throws Throwable { this.testBean.exceptional(new RuntimeException()); verify(mockCollaborator).noArgsOnRuntimeExceptionMatch(); diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceCircularTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceCircularTests.java index 811e4990e1..f05196a729 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceCircularTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceCircularTests.java @@ -26,7 +26,7 @@ import static org.junit.Assert.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class AroundAdviceCircularTests extends AroundAdviceBindingTests { +public class AroundAdviceCircularTests extends AroundAdviceBindingTests { @Test public void testBothBeansAreProxies() { diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.java index 99bde98e65..8ab66af077 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.java @@ -34,7 +34,7 @@ import static org.junit.Assert.*; * @author Adrian Colyer * @author Chris Beams */ -public final class AspectAndAdvicePrecedenceTests { +public class AspectAndAdvicePrecedenceTests { private PrecedenceTestAspect highPrecedenceAspect; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.java index e8fa642a94..457110bb28 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.java @@ -31,7 +31,7 @@ import static org.junit.Assert.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class AspectJExpressionPointcutAdvisorTests { +public class AspectJExpressionPointcutAdvisorTests { private ITestBean testBean; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutTests.java index c1d31727b3..15dc0f8d32 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutTests.java @@ -37,7 +37,7 @@ import static org.junit.Assert.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class BeanNamePointcutTests { +public class BeanNamePointcutTests { private ITestBean testBean1; private ITestBean testBean2; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/BeforeAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/BeforeAdviceBindingTests.java index 48cd434111..9121ab34f0 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/BeforeAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/BeforeAdviceBindingTests.java @@ -36,7 +36,7 @@ import static org.mockito.BDDMockito.*; * @author Rod Johnson * @author Chris Beams */ -public final class BeforeAdviceBindingTests { +public class BeforeAdviceBindingTests { private AdviceBindingCollaborator mockCollaborator; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/DeclarationOrderIndependenceTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/DeclarationOrderIndependenceTests.java index 2260f62ef5..bafc712494 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/DeclarationOrderIndependenceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/DeclarationOrderIndependenceTests.java @@ -31,7 +31,7 @@ import static org.junit.Assert.*; * @author Adrian Colyer * @author Chris Beams */ -public final class DeclarationOrderIndependenceTests { +public class DeclarationOrderIndependenceTests { private TopsyTurvyAspect aspect; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsTests.java index 30010119ed..43373cd42e 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsTests.java @@ -33,7 +33,7 @@ import static org.junit.Assert.*; * @author Rod Johnson * @author Chris Beams */ -public final class DeclareParentsTests { +public class DeclareParentsTests { private ITestBean testBeanProxy; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.java index 8d1e69ab99..08b02b83b9 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.java @@ -30,7 +30,7 @@ import org.springframework.tests.sample.beans.TestBean; * @author Ramnivas Laddad * @author Chris Beams */ -public final class ImplicitJPArgumentMatchingAtAspectJTests { +public class ImplicitJPArgumentMatchingAtAspectJTests { @Test public void testAspect() { diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingTests.java index eab579053a..d391f70145 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingTests.java @@ -27,7 +27,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; * @author Ramnivas Laddad * @author Chris Beams */ -public final class ImplicitJPArgumentMatchingTests { +public class ImplicitJPArgumentMatchingTests { @Test public void testAspect() { diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/OverloadedAdviceTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/OverloadedAdviceTests.java index a22c9fd6aa..411180d13d 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/OverloadedAdviceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/OverloadedAdviceTests.java @@ -29,7 +29,7 @@ import static org.junit.Assert.*; * @author Adrian Colyer * @author Chris Beams */ -public final class OverloadedAdviceTests { +public class OverloadedAdviceTests { @Test public void testExceptionOnConfigParsingWithMismatchedAdviceMethod() { diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/ProceedTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/ProceedTests.java index 186a02810b..10ef204df2 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/ProceedTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/ProceedTests.java @@ -33,7 +33,7 @@ import static org.junit.Assert.*; * @author Adrian Colyer * @author Chris Beams */ -public final class ProceedTests { +public class ProceedTests { private SimpleBean testBean; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/PropertyDependentAspectTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/PropertyDependentAspectTests.java index 07a1d71c3e..b16f844df9 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/PropertyDependentAspectTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/PropertyDependentAspectTests.java @@ -36,7 +36,7 @@ import static org.junit.Assert.*; * @author Chris Beams */ @SuppressWarnings("resource") -public final class PropertyDependentAspectTests { +public class PropertyDependentAspectTests { @Test public void propertyDependentAspectWithPropertyDeclaredBeforeAdvice() diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/SharedPointcutWithArgsMismatchTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/SharedPointcutWithArgsMismatchTests.java index eb0c82bbe7..7ed664f8fc 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/SharedPointcutWithArgsMismatchTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/SharedPointcutWithArgsMismatchTests.java @@ -27,7 +27,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; * @author Adrian Colyer * @author Chris Beams */ -public final class SharedPointcutWithArgsMismatchTests { +public class SharedPointcutWithArgsMismatchTests { private ToBeAdvised toBeAdvised; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/SubtypeSensitiveMatchingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/SubtypeSensitiveMatchingTests.java index 7f1e35ce2b..b1107b19e8 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/SubtypeSensitiveMatchingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/SubtypeSensitiveMatchingTests.java @@ -30,7 +30,7 @@ import static org.junit.Assert.*; * @author Adrian Colyer * @author Chris Beams */ -public final class SubtypeSensitiveMatchingTests { +public class SubtypeSensitiveMatchingTests { private NonSerializableFoo nonSerializableBean; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/TargetPointcutSelectionTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/TargetPointcutSelectionTests.java index 693e9a219d..6e84778a35 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/TargetPointcutSelectionTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/TargetPointcutSelectionTests.java @@ -33,7 +33,7 @@ import static org.junit.Assert.*; * @author Ramnivas Laddad * @author Chris Beams */ -public final class TargetPointcutSelectionTests { +public class TargetPointcutSelectionTests { public TestInterface testImpl1; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/ThisAndTargetSelectionOnlyPointcutsAtAspectJTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/ThisAndTargetSelectionOnlyPointcutsAtAspectJTests.java index 764c39fad2..65efa67ed9 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/ThisAndTargetSelectionOnlyPointcutsAtAspectJTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/ThisAndTargetSelectionOnlyPointcutsAtAspectJTests.java @@ -30,7 +30,7 @@ import static org.junit.Assert.*; * @author Ramnivas Laddad * @author Chris Beams */ -public final class ThisAndTargetSelectionOnlyPointcutsAtAspectJTests { +public class ThisAndTargetSelectionOnlyPointcutsAtAspectJTests { private TestInterface testBean; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/ThisAndTargetSelectionOnlyPointcutsTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/ThisAndTargetSelectionOnlyPointcutsTests.java index 63adf25c8d..d19d3c66dd 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/ThisAndTargetSelectionOnlyPointcutsTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/ThisAndTargetSelectionOnlyPointcutsTests.java @@ -27,7 +27,7 @@ import static org.junit.Assert.*; * @author Ramnivas Laddad * @author Chris Beams */ -public final class ThisAndTargetSelectionOnlyPointcutsTests { +public class ThisAndTargetSelectionOnlyPointcutsTests { private TestInterface testBean; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AnnotationPointcutTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AnnotationPointcutTests.java index 0969dee49d..85578d5ffa 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AnnotationPointcutTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AnnotationPointcutTests.java @@ -29,7 +29,7 @@ import static org.junit.Assert.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class AnnotationPointcutTests { +public class AnnotationPointcutTests { private AnnotatedTestBean testBean; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests.java index e1401b781a..d1f4f45d1e 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests.java @@ -31,7 +31,7 @@ import static org.junit.Assert.*; * @author Ramnivas Laddad * @author Chris Beams */ -public final class AspectImplementingInterfaceTests { +public class AspectImplementingInterfaceTests { @Test public void testProxyCreation() { 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 ec76bcba31..dccee01357 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 @@ -29,7 +29,7 @@ import static org.junit.Assert.*; * @author Rob Harrop * @author Chris Beams */ -public final class AspectJAutoProxyCreatorAndLazyInitTargetSourceTests { +public class AspectJAutoProxyCreatorAndLazyInitTargetSourceTests { @Test public void testAdrian() { 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 c753fd9f1b..180840f4e4 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 @@ -68,7 +68,7 @@ import static org.junit.Assert.*; * @author Chris Beams * @author Sam Brannen */ -public final class AspectJAutoProxyCreatorTests { +public class AspectJAutoProxyCreatorTests { private static final Log factoryLog = LogFactory.getLog(DefaultListableBeanFactory.class); 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 31a81fc8a7..da2636d65a 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 @@ -33,7 +33,7 @@ import static org.junit.Assert.*; * @author Chris Beams * @since 2.0 */ -public final class AtAspectJAfterThrowingTests { +public class AtAspectJAfterThrowingTests { @Test public void testAccessThrowable() throws Exception { 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 c7bf641d94..08ff456fb2 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 @@ -33,7 +33,7 @@ import static org.junit.Assert.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class AtAspectJAnnotationBindingTests { +public class AtAspectJAnnotationBindingTests { private AnnotatedTestBean testBean; private ClassPathXmlApplicationContext ctx; 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 853c0a8432..d829d6c158 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 @@ -45,7 +45,7 @@ import static org.junit.Assert.*; * @author Rod Johnson * @author Chris Beams */ -public final class BenchmarkTests { +public class BenchmarkTests { private static final Class CLASS = BenchmarkTests.class; 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 b4229d15ed..fabc1e96ff 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 @@ -32,7 +32,7 @@ import static org.junit.Assert.*; * @author Adrian Colyer * @author Chris Beams */ -public final class SPR3064Tests { +public class SPR3064Tests { private Service service; 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 017401f3cf..d64913d61c 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 @@ -40,7 +40,7 @@ import static org.junit.Assert.*; * @author Ramnivas Laddad * @author Chris Beams */ -public final class AfterReturningGenericTypeMatchingTests { +public class AfterReturningGenericTypeMatchingTests { private GenericReturnTypeVariationClass testBean; 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 cd6727a3ce..a3e301b147 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 @@ -30,7 +30,7 @@ import static org.junit.Assert.*; * @author Ramnivas Laddad * @author Chris Beams */ -public final class GenericBridgeMethodMatchingClassProxyTests extends GenericBridgeMethodMatchingTests { +public class GenericBridgeMethodMatchingClassProxyTests extends GenericBridgeMethodMatchingTests { @Test public void testGenericDerivedInterfaceMethodThroughClass() { 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 3feec410bb..2bea833ec1 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 @@ -34,7 +34,7 @@ import static org.junit.Assert.*; * @author Ramnivas Laddad * @author Chris Beams */ -public final class GenericParameterMatchingTests { +public class GenericParameterMatchingTests { private CounterAspect counterAspect; 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 c7a2052c2d..d5c9cf1f29 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 @@ -28,7 +28,7 @@ import static org.junit.Assert.*; * @author Adrian Colyer * @author Chris Beams */ -public final class AopNamespaceHandlerAdviceTypeTests { +public class AopNamespaceHandlerAdviceTypeTests { @Test public void testParsingOfAdviceTypes() { 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 7cdae6e3ee..bc46b50171 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 @@ -27,7 +27,7 @@ import static org.junit.Assert.*; * @author Adrian Colyer * @author Chris Beams */ -public final class AopNamespaceHandlerArgNamesTests { +public class AopNamespaceHandlerArgNamesTests { @Test public void testArgNamesOK() { 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 66a54b2e3c..dc4460cc1f 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 @@ -28,7 +28,7 @@ import static org.junit.Assert.*; * @author Rob Harrop * @author Chris Beams */ -public final class AopNamespaceHandlerProxyTargetClassTests extends AopNamespaceHandlerTests { +public class AopNamespaceHandlerProxyTargetClassTests extends AopNamespaceHandlerTests { @Test public void testIsClassProxy() { 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 a87bed50a1..9874114451 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 @@ -28,7 +28,7 @@ import static org.junit.Assert.*; * @author Adrian Colyer * @author Chris Beams */ -public final class AopNamespaceHandlerReturningTests { +public class AopNamespaceHandlerReturningTests { @Test public void testReturningOnReturningAdvice() { 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 765ea3a803..c71917fa8a 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 @@ -28,7 +28,7 @@ import static org.junit.Assert.*; * @author Adrian Colyer * @author Chris Beams */ -public final class AopNamespaceHandlerThrowingTests { +public class AopNamespaceHandlerThrowingTests { @Test public void testThrowingOnThrowingAdvice() { 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 ba5440ac9a..32329dc517 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 @@ -30,7 +30,7 @@ import static org.mockito.BDDMockito.*; * @author Rick Evans * @author Chris Beams */ -public final class MethodLocatingFactoryBeanTests { +public class MethodLocatingFactoryBeanTests { private static final String BEAN_NAME = "string"; private MethodLocatingFactoryBean factory; @@ -52,33 +52,33 @@ public final class MethodLocatingFactoryBeanTests { assertEquals(Method.class, factory.getObjectType()); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testWithNullTargetBeanName() { factory.setMethodName("toString()"); factory.setBeanFactory(beanFactory); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testWithEmptyTargetBeanName() { factory.setTargetBeanName(""); factory.setMethodName("toString()"); factory.setBeanFactory(beanFactory); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testWithNullTargetMethodName() { factory.setTargetBeanName(BEAN_NAME); factory.setBeanFactory(beanFactory); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testWithEmptyTargetMethodName() { factory.setTargetBeanName(BEAN_NAME); factory.setMethodName(""); factory.setBeanFactory(beanFactory); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testWhenTargetBeanClassCannotBeResolved() { factory.setTargetBeanName(BEAN_NAME); factory.setMethodName("toString()"); @@ -100,7 +100,7 @@ public final class MethodLocatingFactoryBeanTests { assertEquals("Bingo", method.invoke("Bingo")); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) @SuppressWarnings("unchecked") public void testWhereMethodCannotBeResolved() { given(beanFactory.getType(BEAN_NAME)).willReturn((Class)String.class); 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 459cea6191..df9f133a4d 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 @@ -24,7 +24,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; * @author Juergen Hoeller * @author Chris Beams */ -public final class PrototypeProxyTests { +public class PrototypeProxyTests { @Test public void testInjectionBeforeWrappingCheckDoesNotKickInForPrototypeProxy() { 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 721820714a..3a30ff9a84 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 @@ -69,7 +69,7 @@ import static org.junit.Assert.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class ProxyFactoryBeanTests { +public class ProxyFactoryBeanTests { private static final Class CLASS = ProxyFactoryBeanTests.class; private static final String CLASSNAME = CLASS.getSimpleName(); 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 02fc5ef0cd..ef6b2b6ae0 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 @@ -39,7 +39,7 @@ import static org.junit.Assert.*; * @author Dmitriy Kopylenko * @author Chris Beams */ -public final class AdvisorAdapterRegistrationTests { +public class AdvisorAdapterRegistrationTests { @Before @After 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 a52d631dd8..cdce70b33e 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 @@ -31,9 +31,9 @@ import static org.junit.Assert.*; * @author Dave Syer * @author Chris Beams */ -public final class BeanNameAutoProxyCreatorInitTests { +public class BeanNameAutoProxyCreatorInitTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testIgnoreAdvisorThatIsCurrentlyCreation() { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-context.xml", getClass()); 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 cd87bb5c62..1a627a4b23 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 @@ -33,7 +33,7 @@ import static org.junit.Assert.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class LookupMethodWrappedByCglibProxyTests { +public class LookupMethodWrappedByCglibProxyTests { private static final Class CLASS = LookupMethodWrappedByCglibProxyTests.class; private static final String CLASSNAME = CLASS.getSimpleName(); diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/QualifierAnnotationTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/QualifierAnnotationTests.java index ea06af9573..789c239128 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/QualifierAnnotationTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/QualifierAnnotationTests.java @@ -43,7 +43,7 @@ import static org.springframework.util.ClassUtils.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class QualifierAnnotationTests { +public class QualifierAnnotationTests { private static final String CLASSNAME = QualifierAnnotationTests.class.getName(); private static final String CONFIG_LOCATION = 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 5432716027..30c1c53466 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 @@ -26,7 +26,7 @@ import org.springframework.cache.interceptor.KeyGenerator; * * @author Stephane Nicoll */ -public final class SomeCustomKeyGenerator implements KeyGenerator { +public class SomeCustomKeyGenerator implements KeyGenerator { @Override public Object generate(Object target, Method method, Object... params) { diff --git a/spring-context/src/test/java/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests.java b/spring-context/src/test/java/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests.java index 6cdeeeb681..a9b09aa3b9 100644 --- a/spring-context/src/test/java/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests.java +++ b/spring-context/src/test/java/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests.java @@ -34,7 +34,7 @@ import static org.junit.Assert.*; * @author Colin Sampaleanu * @author Chris Beams */ -public final class ContextJndiBeanFactoryLocatorTests { +public class ContextJndiBeanFactoryLocatorTests { private static final String BEAN_FACTORY_PATH_ENVIRONMENT_KEY = "java:comp/env/ejb/BeanFactoryPath"; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassProcessingTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassProcessingTests.java index bf4c9e6a9e..1bf46027c1 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassProcessingTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassProcessingTests.java @@ -146,7 +146,7 @@ public class ConfigurationClassProcessingTests { assertSame(ac.getBean("customName"), ConfigWithSetWithProviderImplementation.set); } - @Test(expected=BeanDefinitionParsingException.class) + @Test(expected = BeanDefinitionParsingException.class) public void testFinalBeanMethod() { initBeanFactory(ConfigWithFinalBean.class); } 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 5d3be6ba43..d998242c9c 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 @@ -33,7 +33,7 @@ import org.springframework.tests.sample.beans.TestBean; * @author Juergen Hoeller */ @Component -public final class FactoryMethodComponent { +public class FactoryMethodComponent { private int i; 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 6437ac5773..772472dd11 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 @@ -49,14 +49,14 @@ public class EventPublicationInterceptorTests { this.publisher = mock(ApplicationEventPublisher.class); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testWithNoApplicationEventClassSupplied() throws Exception { EventPublicationInterceptor interceptor = new EventPublicationInterceptor(); interceptor.setApplicationEventPublisher(this.publisher); interceptor.afterPropertiesSet(); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testWithNonApplicationEventClassSupplied() throws Exception { EventPublicationInterceptor interceptor = new EventPublicationInterceptor(); interceptor.setApplicationEventPublisher(this.publisher); @@ -64,7 +64,7 @@ public class EventPublicationInterceptorTests { interceptor.afterPropertiesSet(); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testWithAbstractStraightApplicationEventClassSupplied() throws Exception { EventPublicationInterceptor interceptor = new EventPublicationInterceptor(); interceptor.setApplicationEventPublisher(this.publisher); @@ -72,7 +72,7 @@ public class EventPublicationInterceptorTests { interceptor.afterPropertiesSet(); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testWithApplicationEventClassThatDoesntExposeAValidCtor() throws Exception { EventPublicationInterceptor interceptor = new EventPublicationInterceptor(); interceptor.setApplicationEventPublisher(this.publisher); 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 cc3efcfc58..e93d33165d 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 @@ -91,7 +91,7 @@ public class ConversionServiceFactoryBeanTests { assertTrue(service.canConvert(String.class, Baz.class)); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void createDefaultConversionServiceWithInvalidSupplements() { ConversionServiceFactoryBean factory = new ConversionServiceFactoryBean(); Set converters = new HashSet<>(); diff --git a/spring-context/src/test/java/org/springframework/format/number/CurrencyStyleFormatterTests.java b/spring-context/src/test/java/org/springframework/format/number/CurrencyStyleFormatterTests.java index ec9e6a7e21..06d18633e1 100644 --- a/spring-context/src/test/java/org/springframework/format/number/CurrencyStyleFormatterTests.java +++ b/spring-context/src/test/java/org/springframework/format/number/CurrencyStyleFormatterTests.java @@ -59,7 +59,7 @@ public class CurrencyStyleFormatterTests { assertEquals(new BigDecimal("23.00"), formatter.parse("$23", Locale.US)); } - @Test(expected=ParseException.class) + @Test(expected = ParseException.class) public void parseValueNotLenientFailure() throws ParseException { formatter.parse("$23.56bogus", Locale.US); } diff --git a/spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceTests.java b/spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceTests.java index bcaadaaf71..ee38febb00 100644 --- a/spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceTests.java +++ b/spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceTests.java @@ -263,13 +263,13 @@ public class FormattingConversionServiceTests { assertNull(formattingService.convert(" ", TypeDescriptor.valueOf(String.class), TypeDescriptor.valueOf(Integer.class))); } - @Test(expected=ConversionFailedException.class) + @Test(expected = ConversionFailedException.class) public void testParseParserReturnsNull() throws ParseException { formattingService.addFormatterForFieldType(Integer.class, new NullReturningFormatter()); assertNull(formattingService.convert("1", TypeDescriptor.valueOf(String.class), TypeDescriptor.valueOf(Integer.class))); } - @Test(expected=ConversionFailedException.class) + @Test(expected = ConversionFailedException.class) public void testParseNullPrimitiveProperty() throws ParseException { formattingService.addFormatterForFieldType(Integer.class, new NumberStyleFormatter()); assertNull(formattingService.convert(null, TypeDescriptor.valueOf(String.class), TypeDescriptor.valueOf(int.class))); 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 e4dfba2ab3..151903feaf 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 @@ -29,14 +29,14 @@ import static org.junit.Assert.*; * @author Rick Evans * @author Chris Beams */ -public final class ReflectiveLoadTimeWeaverTests { +public class ReflectiveLoadTimeWeaverTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorWithNullClassLoader() { new ReflectiveLoadTimeWeaver(null); } - @Test(expected=IllegalStateException.class) + @Test(expected = IllegalStateException.class) public void testCtorWithClassLoaderThatDoesNotExposeAnAddTransformerMethod() { new ReflectiveLoadTimeWeaver(getClass().getClassLoader()); } @@ -54,7 +54,7 @@ public final class ReflectiveLoadTimeWeaverTests { assertEquals(1, classLoader.getNumTimesGetThrowawayClassLoaderCalled()); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testAddTransformerWithNullTransformer() { new ReflectiveLoadTimeWeaver(new JustAddTransformerClassLoader()).addTransformer(null); } diff --git a/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java b/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java index f30b5f2795..59ac629589 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java @@ -69,7 +69,7 @@ import static org.junit.Assert.*; * @author Stephane Nicoll */ @SuppressWarnings("deprecation") -public final class MBeanExporterTests extends AbstractMBeanServerTests { +public class MBeanExporterTests extends AbstractMBeanServerTests { @Rule public final ExpectedException thrown = ExpectedException.none(); 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 c196e6502e..2247cd92f1 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 @@ -33,24 +33,24 @@ import static org.junit.Assert.*; * @author Rick Evans * @author Chris Beams */ -public final class ModelMBeanNotificationPublisherTests { +public class ModelMBeanNotificationPublisherTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorWithNullMBean() throws Exception { new ModelMBeanNotificationPublisher(null, createObjectName(), this); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorWithNullObjectName() throws Exception { new ModelMBeanNotificationPublisher(new SpringModelMBean(), null, this); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testCtorWithNullManagedResource() throws Exception { new ModelMBeanNotificationPublisher(new SpringModelMBean(), createObjectName(), null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSendNullNotification() throws Exception { NotificationPublisher publisher = new ModelMBeanNotificationPublisher(new SpringModelMBean(), createObjectName(), this); diff --git a/spring-context/src/test/java/org/springframework/scripting/MessengerScrambler.java b/spring-context/src/test/java/org/springframework/scripting/MessengerScrambler.java index cf8253f91b..398891c838 100644 --- a/spring-context/src/test/java/org/springframework/scripting/MessengerScrambler.java +++ b/spring-context/src/test/java/org/springframework/scripting/MessengerScrambler.java @@ -24,7 +24,7 @@ import org.aspectj.lang.ProceedingJoinPoint; * * @author Rick Evans */ -public final class MessengerScrambler { +public class MessengerScrambler { public String scramble(ProceedingJoinPoint pjp) throws Throwable { String message = (String) pjp.proceed(); diff --git a/spring-context/src/test/java/org/springframework/scripting/support/StaticScriptSourceTests.java b/spring-context/src/test/java/org/springframework/scripting/support/StaticScriptSourceTests.java index 12c4e8182d..8dcec12a78 100644 --- a/spring-context/src/test/java/org/springframework/scripting/support/StaticScriptSourceTests.java +++ b/spring-context/src/test/java/org/springframework/scripting/support/StaticScriptSourceTests.java @@ -26,7 +26,7 @@ import static org.junit.Assert.*; * @author Rick Evans * @author Sam Brannen */ -public final class StaticScriptSourceTests { +public class StaticScriptSourceTests { private static final String SCRIPT_TEXT = "print($hello) if $true;"; diff --git a/spring-context/src/test/java/org/springframework/scripting/support/StubMessenger.java b/spring-context/src/test/java/org/springframework/scripting/support/StubMessenger.java index 7363033668..43f414b113 100644 --- a/spring-context/src/test/java/org/springframework/scripting/support/StubMessenger.java +++ b/spring-context/src/test/java/org/springframework/scripting/support/StubMessenger.java @@ -21,7 +21,7 @@ import org.springframework.scripting.ConfigurableMessenger; /** * @author Rick Evans */ -public final class StubMessenger implements ConfigurableMessenger { +public class StubMessenger implements ConfigurableMessenger { private String message = "I used to be smart... now I'm just stupid."; diff --git a/spring-context/src/test/java/org/springframework/tests/sample/beans/FactoryMethods.java b/spring-context/src/test/java/org/springframework/tests/sample/beans/FactoryMethods.java index a98548867a..e5aabb69ae 100644 --- a/spring-context/src/test/java/org/springframework/tests/sample/beans/FactoryMethods.java +++ b/spring-context/src/test/java/org/springframework/tests/sample/beans/FactoryMethods.java @@ -24,7 +24,7 @@ package org.springframework.tests.sample.beans; * @author Juergen Hoeller * @author Chris Beams */ -public final class FactoryMethods { +public class FactoryMethods { public static FactoryMethods nullInstance() { return null; diff --git a/spring-context/src/test/java/org/springframework/ui/ModelMapTests.java b/spring-context/src/test/java/org/springframework/ui/ModelMapTests.java index a8b6c279f8..2aa2191d7b 100644 --- a/spring-context/src/test/java/org/springframework/ui/ModelMapTests.java +++ b/spring-context/src/test/java/org/springframework/ui/ModelMapTests.java @@ -41,7 +41,7 @@ import static org.junit.Assert.*; * @author Juergen Hoeller * @author Chris Beams */ -public final class ModelMapTests { +public class ModelMapTests { @Test public void testNoArgCtorYieldsEmptyModel() throws Exception { @@ -96,7 +96,7 @@ public final class ModelMapTests { assertEquals("bing", string); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testOneArgCtorWithNull() { //Null model arguments added without a name being explicitly supplied are not allowed new ModelMap(null); @@ -120,7 +120,7 @@ public final class ModelMapTests { assertEquals(0, model.size()); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testAddObjectWithNull() throws Exception { // Null model arguments added without a name being explicitly supplied are not allowed ModelMap model = new ModelMap(); @@ -150,7 +150,7 @@ public final class ModelMapTests { assertEquals(0, model.size()); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testAddAllObjectsWithSparseArrayList() throws Exception { // Null model arguments added without a name being explicitly supplied are not allowed ModelMap model = new ModelMap(); diff --git a/spring-context/src/test/java/org/springframework/validation/ValidationUtilsTests.java b/spring-context/src/test/java/org/springframework/validation/ValidationUtilsTests.java index b45d873798..a22c5dff8a 100644 --- a/spring-context/src/test/java/org/springframework/validation/ValidationUtilsTests.java +++ b/spring-context/src/test/java/org/springframework/validation/ValidationUtilsTests.java @@ -32,14 +32,14 @@ import static org.junit.Assert.*; */ public class ValidationUtilsTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testInvokeValidatorWithNullValidator() throws Exception { TestBean tb = new TestBean(); Errors errors = new BeanPropertyBindingResult(tb, "tb"); ValidationUtils.invokeValidator(null, tb, errors); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testInvokeValidatorWithNullErrors() throws Exception { TestBean tb = new TestBean(); ValidationUtils.invokeValidator(new EmptyValidator(), tb, null); diff --git a/spring-core/src/test/java/org/springframework/core/OrderComparatorTests.java b/spring-core/src/test/java/org/springframework/core/OrderComparatorTests.java index 30c221681a..0f09f958d5 100644 --- a/spring-core/src/test/java/org/springframework/core/OrderComparatorTests.java +++ b/spring-core/src/test/java/org/springframework/core/OrderComparatorTests.java @@ -28,7 +28,7 @@ import static org.junit.Assert.assertEquals; * @author Rick Evans * @author Stephane Nicoll */ -public final class OrderComparatorTests { +public class OrderComparatorTests { private final OrderComparator comparator = new OrderComparator(); diff --git a/spring-core/src/test/java/org/springframework/core/convert/converter/ConvertingComparatorTests.java b/spring-core/src/test/java/org/springframework/core/convert/converter/ConvertingComparatorTests.java index 30f58a8b34..704992a2fd 100644 --- a/spring-core/src/test/java/org/springframework/core/convert/converter/ConvertingComparatorTests.java +++ b/spring-core/src/test/java/org/springframework/core/convert/converter/ConvertingComparatorTests.java @@ -45,22 +45,22 @@ public class ConvertingComparatorTests { private final TestComparator comparator = new TestComparator(); - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void shouldThrowOnNullComparator() throws Exception { new ConvertingComparator<>(null, this.converter); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void shouldThrowOnNullConverter() throws Exception { new ConvertingComparator(this.comparator, null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void shouldThrowOnNullConversionService() throws Exception { new ConvertingComparator(this.comparator, null, Integer.class); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void shouldThrowOnNullType() throws Exception { new ConvertingComparator(this.comparator, this.conversionService, null); diff --git a/spring-core/src/test/java/org/springframework/core/env/PropertySourcesPropertyResolverTests.java b/spring-core/src/test/java/org/springframework/core/env/PropertySourcesPropertyResolverTests.java index d2ffe16da1..a607cfec2e 100644 --- a/spring-core/src/test/java/org/springframework/core/env/PropertySourcesPropertyResolverTests.java +++ b/spring-core/src/test/java/org/springframework/core/env/PropertySourcesPropertyResolverTests.java @@ -221,7 +221,7 @@ public class PropertySourcesPropertyResolverTests { equalTo("Replace this value plus defaultValue")); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void resolvePlaceholders_withNullInput() { new PropertySourcesPropertyResolver(new MutablePropertySources()).resolvePlaceholders(null); } @@ -234,7 +234,7 @@ public class PropertySourcesPropertyResolverTests { assertThat(resolver.resolveRequiredPlaceholders("Replace this ${key}"), equalTo("Replace this value")); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void resolveRequiredPlaceholders_withUnresolvable() { MutablePropertySources propertySources = new MutablePropertySources(); propertySources.addFirst(new MockPropertySource().withProperty("key", "value")); @@ -251,7 +251,7 @@ public class PropertySourcesPropertyResolverTests { equalTo("Replace this value plus defaultValue")); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void resolveRequiredPlaceholders_withNullInput() { new PropertySourcesPropertyResolver(new MutablePropertySources()).resolveRequiredPlaceholders(null); } diff --git a/spring-core/src/test/java/org/springframework/core/env/SimpleCommandLineParserTests.java b/spring-core/src/test/java/org/springframework/core/env/SimpleCommandLineParserTests.java index 1ea0f79609..1d416218a4 100644 --- a/spring-core/src/test/java/org/springframework/core/env/SimpleCommandLineParserTests.java +++ b/spring-core/src/test/java/org/springframework/core/env/SimpleCommandLineParserTests.java @@ -60,25 +60,25 @@ public class SimpleCommandLineParserTests { assertThat(args.getOptionValues("o3"), nullValue()); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void withEmptyOptionText() { SimpleCommandLineArgsParser parser = new SimpleCommandLineArgsParser(); parser.parse("--"); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void withEmptyOptionName() { SimpleCommandLineArgsParser parser = new SimpleCommandLineArgsParser(); parser.parse("--=v1"); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void withEmptyOptionValue() { SimpleCommandLineArgsParser parser = new SimpleCommandLineArgsParser(); parser.parse("--o1="); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void withEmptyOptionNameAndEmptyOptionValue() { SimpleCommandLineArgsParser parser = new SimpleCommandLineArgsParser(); parser.parse("--="); @@ -97,13 +97,13 @@ public class SimpleCommandLineParserTests { assertThat(nonOptions.size(), equalTo(2)); } - @Test(expected=UnsupportedOperationException.class) + @Test(expected = UnsupportedOperationException.class) public void assertOptionNamesIsUnmodifiable() { CommandLineArgs args = new SimpleCommandLineArgsParser().parse(); args.getOptionNames().add("bogus"); } - @Test(expected=UnsupportedOperationException.class) + @Test(expected = UnsupportedOperationException.class) public void assertNonOptionArgsIsUnmodifiable() { CommandLineArgs args = new SimpleCommandLineArgsParser().parse(); args.getNonOptionArgs().add("foo"); diff --git a/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java b/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java index e094e342d2..0ffb1fd132 100644 --- a/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java +++ b/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java @@ -129,42 +129,42 @@ public class StandardEnvironmentTests { assertThat(activeProfiles.length, is(2)); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void setActiveProfiles_withNullProfileArray() { environment.setActiveProfiles((String[])null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void setActiveProfiles_withNullProfile() { environment.setActiveProfiles((String)null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void setActiveProfiles_withEmptyProfile() { environment.setActiveProfiles(""); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void setActiveProfiles_withNotOperator() { environment.setActiveProfiles("p1", "!p2"); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void setDefaultProfiles_withNullProfileArray() { environment.setDefaultProfiles((String[])null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void setDefaultProfiles_withNullProfile() { environment.setDefaultProfiles((String)null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void setDefaultProfiles_withEmptyProfile() { environment.setDefaultProfiles(""); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void setDefaultProfiles_withNotOperator() { environment.setDefaultProfiles("d1", "!d2"); } @@ -204,7 +204,7 @@ public class StandardEnvironmentTests { System.getProperties().remove(DEFAULT_PROFILES_PROPERTY_NAME); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void defaultProfileWithCircularPlaceholder() { System.setProperty(DEFAULT_PROFILES_PROPERTY_NAME, "${spring.profiles.default}"); try { @@ -263,22 +263,22 @@ public class StandardEnvironmentTests { assertThat(Arrays.asList(environment.getDefaultProfiles()), hasItems("pd2", "pd3")); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void acceptsProfiles_withEmptyArgumentList() { environment.acceptsProfiles(); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void acceptsProfiles_withNullArgumentList() { environment.acceptsProfiles((String[])null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void acceptsProfiles_withNullArgument() { environment.acceptsProfiles((String)null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void acceptsProfiles_withEmptyArgument() { environment.acceptsProfiles(""); } @@ -321,7 +321,7 @@ public class StandardEnvironmentTests { assertThat(environment.acceptsProfiles("!p1"), is(false)); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void acceptsProfiles_withInvalidNotOperator() { environment.acceptsProfiles("p1", "!"); } diff --git a/spring-core/src/test/java/org/springframework/core/io/ResourceEditorTests.java b/spring-core/src/test/java/org/springframework/core/io/ResourceEditorTests.java index 380f075967..e10adb6c2e 100644 --- a/spring-core/src/test/java/org/springframework/core/io/ResourceEditorTests.java +++ b/spring-core/src/test/java/org/springframework/core/io/ResourceEditorTests.java @@ -31,7 +31,7 @@ import static org.junit.Assert.*; * @author Arjen Poutsma * @author Dave Syer */ -public final class ResourceEditorTests { +public class ResourceEditorTests { @Test public void sunnyDay() throws Exception { @@ -75,7 +75,7 @@ public final class ResourceEditorTests { } } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testStrictSystemPropertyReplacement() { PropertyEditor editor = new ResourceEditor(new DefaultResourceLoader(), new StandardEnvironment(), false); System.setProperty("test.prop", "foo"); diff --git a/spring-core/src/test/java/org/springframework/core/io/ResourceTests.java b/spring-core/src/test/java/org/springframework/core/io/ResourceTests.java index 42a8c075a2..bb4949699a 100644 --- a/spring-core/src/test/java/org/springframework/core/io/ResourceTests.java +++ b/spring-core/src/test/java/org/springframework/core/io/ResourceTests.java @@ -239,7 +239,7 @@ public class ResourceTests { assertThat(resource.contentLength(), is(3L)); } - @Test(expected=IllegalStateException.class) + @Test(expected = IllegalStateException.class) public void testContentLength_withNullInputStream() throws IOException { AbstractResource resource = new AbstractResource() { @Override diff --git a/spring-core/src/test/java/org/springframework/core/io/support/ResourceArrayPropertyEditorTests.java b/spring-core/src/test/java/org/springframework/core/io/support/ResourceArrayPropertyEditorTests.java index 9a4a2994b7..6a6663fcc8 100644 --- a/spring-core/src/test/java/org/springframework/core/io/support/ResourceArrayPropertyEditorTests.java +++ b/spring-core/src/test/java/org/springframework/core/io/support/ResourceArrayPropertyEditorTests.java @@ -67,7 +67,7 @@ public class ResourceArrayPropertyEditorTests { } } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testStrictSystemPropertyReplacement() { PropertyEditor editor = new ResourceArrayPropertyEditor( new PathMatchingResourcePatternResolver(), new StandardEnvironment(), diff --git a/spring-core/src/test/java/org/springframework/core/task/SimpleAsyncTaskExecutorTests.java b/spring-core/src/test/java/org/springframework/core/task/SimpleAsyncTaskExecutorTests.java index 9a6bb5edfc..6792df567c 100644 --- a/spring-core/src/test/java/org/springframework/core/task/SimpleAsyncTaskExecutorTests.java +++ b/spring-core/src/test/java/org/springframework/core/task/SimpleAsyncTaskExecutorTests.java @@ -33,7 +33,7 @@ import static org.junit.Assert.*; * @author Juergen Hoeller * @author Sam Brannen */ -public final class SimpleAsyncTaskExecutorTests { +public class SimpleAsyncTaskExecutorTests { @Rule public final ExpectedException exception = ExpectedException.none(); diff --git a/spring-core/src/test/java/org/springframework/util/PropertyPlaceholderHelperTests.java b/spring-core/src/test/java/org/springframework/util/PropertyPlaceholderHelperTests.java index 8f9f7df364..f2b44cab13 100644 --- a/spring-core/src/test/java/org/springframework/util/PropertyPlaceholderHelperTests.java +++ b/spring-core/src/test/java/org/springframework/util/PropertyPlaceholderHelperTests.java @@ -104,7 +104,7 @@ public class PropertyPlaceholderHelperTests { assertEquals("foo=bar,bar=${bar}", this.helper.replacePlaceholders(text, props)); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testUnresolvedPlaceholderAsError() { String text = "foo=${foo},bar=${bar}"; Properties props = new Properties(); diff --git a/spring-core/src/test/java/org/springframework/util/SystemPropertyUtilsTests.java b/spring-core/src/test/java/org/springframework/util/SystemPropertyUtilsTests.java index dd36f6e167..6f7ee983cd 100644 --- a/spring-core/src/test/java/org/springframework/util/SystemPropertyUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/util/SystemPropertyUtilsTests.java @@ -94,7 +94,7 @@ public class SystemPropertyUtilsTests { assertEquals("Y#{foo.bar}X", resolved); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testReplaceWithNoDefault() { String resolved = SystemPropertyUtils.resolvePlaceholders("${test.prop}"); assertEquals("", resolved); diff --git a/spring-core/src/test/java/org/springframework/util/comparator/InvertibleComparatorTests.java b/spring-core/src/test/java/org/springframework/util/comparator/InvertibleComparatorTests.java index b53d7c5c4c..cd8cce1e1f 100644 --- a/spring-core/src/test/java/org/springframework/util/comparator/InvertibleComparatorTests.java +++ b/spring-core/src/test/java/org/springframework/util/comparator/InvertibleComparatorTests.java @@ -35,12 +35,12 @@ public class InvertibleComparatorTests { private Comparator comparator = new ComparableComparator<>(); - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void shouldNeedComparator() throws Exception { new InvertibleComparator<>(null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void shouldNeedComparatorWithAscending() throws Exception { new InvertibleComparator<>(null, true); } diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/MapSqlParameterSourceTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/MapSqlParameterSourceTests.java index 0676f608f1..76a952fbc9 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/MapSqlParameterSourceTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/MapSqlParameterSourceTests.java @@ -26,7 +26,7 @@ import static org.junit.Assert.*; * @author Rick Evans * @author Arjen Poutsma */ -public final class MapSqlParameterSourceTests { +public class MapSqlParameterSourceTests { @Test public void nullParameterValuesPassedToCtorIsOk() throws Exception { diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/JndiDataSourceLookupTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/JndiDataSourceLookupTests.java index 11ae5684ef..2f0fa5657d 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/JndiDataSourceLookupTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/JndiDataSourceLookupTests.java @@ -27,7 +27,7 @@ import static org.junit.Assert.*; * @author Rick Evans * @author Chris Beams */ -public final class JndiDataSourceLookupTests { +public class JndiDataSourceLookupTests { private static final String DATA_SOURCE_NAME = "Love is like a stove, burns you when it's hot"; @@ -46,7 +46,7 @@ public final class JndiDataSourceLookupTests { assertSame(expectedDataSource, dataSource); } - @Test(expected=DataSourceLookupFailureException.class) + @Test(expected = DataSourceLookupFailureException.class) public void testNoDataSourceAtJndiLocation() throws Exception { JndiDataSourceLookup lookup = new JndiDataSourceLookup() { @Override diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookupTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookupTests.java index 2e61ea223d..3560b77305 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookupTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookupTests.java @@ -30,7 +30,7 @@ import static org.junit.Assert.*; * @author Rick Evans * @author Chris Beams */ -public final class MapDataSourceLookupTests { +public class MapDataSourceLookupTests { private static final String DATA_SOURCE_NAME = "dataSource"; diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLStateSQLExceptionTranslatorTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLStateSQLExceptionTranslatorTests.java index b0a660366d..815c364803 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLStateSQLExceptionTranslatorTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLStateSQLExceptionTranslatorTests.java @@ -44,7 +44,7 @@ public class SQLStateSQLExceptionTranslatorTests { private static final String SQL = "select count(0) from t_sheep where over_fence = ... yawn... 1"; - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testTranslateNullException() throws Exception { new SQLStateSQLExceptionTranslator().translate("", "", null); } diff --git a/spring-jms/src/test/java/org/springframework/jms/listener/AbstractMessageListenerContainerTests.java b/spring-jms/src/test/java/org/springframework/jms/listener/AbstractMessageListenerContainerTests.java index b225303560..ab5f9a4ad5 100644 --- a/spring-jms/src/test/java/org/springframework/jms/listener/AbstractMessageListenerContainerTests.java +++ b/spring-jms/src/test/java/org/springframework/jms/listener/AbstractMessageListenerContainerTests.java @@ -29,12 +29,12 @@ public abstract class AbstractMessageListenerContainerTests { protected abstract AbstractMessageListenerContainer getContainer(); - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSettingMessageListenerToANullType() throws Exception { getContainer().setMessageListener(null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSettingMessageListenerToAnUnsupportedType() throws Exception { getContainer().setMessageListener("Bingo"); } diff --git a/spring-jms/src/test/java/org/springframework/jms/listener/SimpleMessageListenerContainerTests.java b/spring-jms/src/test/java/org/springframework/jms/listener/SimpleMessageListenerContainerTests.java index fefd92cb5b..b39b31f1f3 100644 --- a/spring-jms/src/test/java/org/springframework/jms/listener/SimpleMessageListenerContainerTests.java +++ b/spring-jms/src/test/java/org/springframework/jms/listener/SimpleMessageListenerContainerTests.java @@ -75,13 +75,13 @@ public class SimpleMessageListenerContainerTests extends AbstractMessageListener container.isPubSubNoLocal()); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSettingConcurrentConsumersToZeroIsNotAllowed() throws Exception { container.setConcurrentConsumers(0); container.afterPropertiesSet(); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSettingConcurrentConsumersToANegativeValueIsNotAllowed() throws Exception { container.setConcurrentConsumers(-198); container.afterPropertiesSet(); diff --git a/spring-jms/src/test/java/org/springframework/jms/support/JmsAccessorTests.java b/spring-jms/src/test/java/org/springframework/jms/support/JmsAccessorTests.java index 25b9cc9a41..cf2f2e629f 100644 --- a/spring-jms/src/test/java/org/springframework/jms/support/JmsAccessorTests.java +++ b/spring-jms/src/test/java/org/springframework/jms/support/JmsAccessorTests.java @@ -28,9 +28,9 @@ import static org.junit.Assert.*; * @author Rick Evans * @author Chris Beams */ -public final class JmsAccessorTests { +public class JmsAccessorTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testChokesIfConnectionFactoryIsNotSupplied() throws Exception { JmsAccessor accessor = new StubJmsAccessor(); accessor.afterPropertiesSet(); @@ -55,7 +55,7 @@ public final class JmsAccessorTests { accessor.getSessionAcknowledgeMode()); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testSetAcknowledgeModeNameChokesIfBadAckModeIsSupplied() throws Exception { new StubJmsAccessor().setSessionAcknowledgeModeName("Tally ho chaps!"); } diff --git a/spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/support/HeadersMethodArgumentResolverTests.java b/spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/support/HeadersMethodArgumentResolverTests.java index c312e2a26a..e666d50787 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/support/HeadersMethodArgumentResolverTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/handler/annotation/support/HeadersMethodArgumentResolverTests.java @@ -89,7 +89,7 @@ public class HeadersMethodArgumentResolverTests { assertEquals("bar", headers.get("foo")); } - @Test(expected=IllegalStateException.class) + @Test(expected = IllegalStateException.class) public void resolveArgumentAnnotatedNotMap() throws Exception { this.resolver.resolveArgument(this.paramAnnotatedNotMap, this.message); } diff --git a/spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/MethodMessageHandlerTests.java b/spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/MethodMessageHandlerTests.java index eb43dec917..54d6830be1 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/MethodMessageHandlerTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/MethodMessageHandlerTests.java @@ -75,7 +75,7 @@ public class MethodMessageHandlerTests { this.messageHandler.registerHandler(this.testController); } - @Test(expected=IllegalStateException.class) + @Test(expected = IllegalStateException.class) public void duplicateMapping() { this.messageHandler.registerHandler(new DuplicateMappingsController()); } diff --git a/spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompCodecTests.java b/spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompCodecTests.java index 6c6948490a..78d34d4084 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompCodecTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompCodecTests.java @@ -163,7 +163,7 @@ public class StompCodecTests { assertEquals("alpha:bravo\r\n\\", headers.getFirstNativeHeader("a:\r\n\\b")); } - @Test(expected=StompConversionException.class) + @Test(expected = StompConversionException.class) public void decodeFrameBodyNotAllowed() { decode("CONNECT\naccept-version:1.2\n\nThe body of the message\0"); } @@ -236,7 +236,7 @@ public class StompCodecTests { assertIncompleteDecode("SEND\ncontent-type:text/plain;charset=U\n\nThe body\0"); } - @Test(expected=StompConversionException.class) + @Test(expected = StompConversionException.class) public void decodeFrameWithIncorrectTerminator() { decode("SEND\ncontent-length:23\n\nThe body of the message*"); } diff --git a/spring-test/src/test/java/org/springframework/mock/web/MockFilterChainTests.java b/spring-test/src/test/java/org/springframework/mock/web/MockFilterChainTests.java index d008751f05..59f1e3a14e 100644 --- a/spring-test/src/test/java/org/springframework/mock/web/MockFilterChainTests.java +++ b/spring-test/src/test/java/org/springframework/mock/web/MockFilterChainTests.java @@ -49,12 +49,12 @@ public class MockFilterChainTests { this.response = new MockHttpServletResponse(); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void constructorNullServlet() { new MockFilterChain((Servlet) null); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void constructorNullFilter() { new MockFilterChain(mock(Servlet.class), (Filter) null); } diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/ExpectedExceptionSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/ExpectedExceptionSpringRunnerTests.java index 2ea416817c..287e237a7e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/ExpectedExceptionSpringRunnerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/ExpectedExceptionSpringRunnerTests.java @@ -28,7 +28,7 @@ import org.springframework.test.context.TestExecutionListeners; import static org.springframework.test.context.junit4.JUnitTestingUtils.*; /** - * Verifies proper handling of JUnit's {@link Test#expected() @Test(expected=...)} + * Verifies proper handling of JUnit's {@link Test#expected() @Test(expected = ...)} * support in conjunction with the {@link SpringRunner}. * * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/web/client/match/XpathRequestMatchersTests.java b/spring-test/src/test/java/org/springframework/test/web/client/match/XpathRequestMatchersTests.java index c6a285b51d..9900f3f7c7 100644 --- a/spring-test/src/test/java/org/springframework/test/web/client/match/XpathRequestMatchersTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/client/match/XpathRequestMatchersTests.java @@ -46,7 +46,7 @@ public class XpathRequestMatchersTests { new XpathRequestMatchers("/foo/bar", null).node(Matchers.notNullValue()).match(this.request); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void testNodeMatcherNoMatch() throws Exception { new XpathRequestMatchers("/foo/bar", null).node(Matchers.nullValue()).match(this.request); } @@ -56,7 +56,7 @@ public class XpathRequestMatchersTests { new XpathRequestMatchers("/foo/bar", null).exists().match(this.request); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void testExistsNoMatch() throws Exception { new XpathRequestMatchers("/foo/Bar", null).exists().match(this.request); } @@ -66,7 +66,7 @@ public class XpathRequestMatchersTests { new XpathRequestMatchers("/foo/Bar", null).doesNotExist().match(this.request); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void testDoesNotExistNoMatch() throws Exception { new XpathRequestMatchers("/foo/bar", null).doesNotExist().match(this.request); } @@ -76,7 +76,7 @@ public class XpathRequestMatchersTests { new XpathRequestMatchers("/foo/bar", null).nodeCount(2).match(this.request); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void testNodeCountNoMatch() throws Exception { new XpathRequestMatchers("/foo/bar", null).nodeCount(1).match(this.request); } @@ -86,7 +86,7 @@ public class XpathRequestMatchersTests { new XpathRequestMatchers("/foo/bar[1]", null).string("111").match(this.request); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void testStringNoMatch() throws Exception { new XpathRequestMatchers("/foo/bar[1]", null).string("112").match(this.request); } @@ -96,7 +96,7 @@ public class XpathRequestMatchersTests { new XpathRequestMatchers("/foo/bar[1]", null).number(111.0).match(this.request); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void testNumberNoMatch() throws Exception { new XpathRequestMatchers("/foo/bar[1]", null).number(111.1).match(this.request); } @@ -106,7 +106,7 @@ public class XpathRequestMatchersTests { new XpathRequestMatchers("/foo/bar[2]", null).booleanValue(true).match(this.request); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void testBooleanNoMatch() throws Exception { new XpathRequestMatchers("/foo/bar[2]", null).booleanValue(false).match(this.request); } diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/result/ContentResultMatchersTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/result/ContentResultMatchersTests.java index db1baee851..6c0972b5a9 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/result/ContentResultMatchersTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/result/ContentResultMatchersTests.java @@ -32,7 +32,7 @@ public class ContentResultMatchersTests { new ContentResultMatchers().contentType("application/json;charset=UTF-8").match(getStubMvcResult()); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void typeNoMatch() throws Exception { new ContentResultMatchers().contentType("text/plain").match(getStubMvcResult()); } @@ -42,7 +42,7 @@ public class ContentResultMatchersTests { new ContentResultMatchers().encoding("UTF-8").match(getStubMvcResult()); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void encodingNoMatch() throws Exception { new ContentResultMatchers().encoding("ISO-8859-1").match(getStubMvcResult()); } @@ -52,7 +52,7 @@ public class ContentResultMatchersTests { new ContentResultMatchers().string(new String(CONTENT.getBytes("UTF-8"))).match(getStubMvcResult()); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void stringNoMatch() throws Exception { new ContentResultMatchers().encoding("bogus").match(getStubMvcResult()); } @@ -63,7 +63,7 @@ public class ContentResultMatchersTests { new ContentResultMatchers().string(Matchers.equalTo(content)).match(getStubMvcResult()); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void stringMatcherNoMatch() throws Exception { new ContentResultMatchers().string(Matchers.equalTo("bogus")).match(getStubMvcResult()); } @@ -73,7 +73,7 @@ public class ContentResultMatchersTests { new ContentResultMatchers().bytes(CONTENT.getBytes("UTF-8")).match(getStubMvcResult()); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void bytesNoMatch() throws Exception { new ContentResultMatchers().bytes("bogus".getBytes()).match(getStubMvcResult()); } @@ -90,12 +90,12 @@ public class ContentResultMatchersTests { new ContentResultMatchers().json("{\n \"foo array\":[\"foo\",\"bar\"], \"foo\":\"bar\" \n}", true).match(getStubMvcResult()); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void jsonLenientNoMatch() throws Exception { new ContentResultMatchers().json("{\n\"fooo\":\"bar\"\n}").match(getStubMvcResult()); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void jsonStrictNoMatch() throws Exception { new ContentResultMatchers().json("{\"foo\":\"bar\", \"foo array\":[\"bar\",\"foo\"]}", true).match(getStubMvcResult()); } diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchersTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchersTests.java index 83d89c5204..e2010a940c 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchersTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchersTests.java @@ -31,7 +31,7 @@ public class FlashAttributeResultMatchersTests { new FlashAttributeResultMatchers().attributeExists("good").match(getStubMvcResult()); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void attributeExists_doesntExist() throws Exception { new FlashAttributeResultMatchers().attributeExists("bad").match(getStubMvcResult()); } @@ -41,7 +41,7 @@ public class FlashAttributeResultMatchersTests { new FlashAttributeResultMatchers().attribute("good", "good").match(getStubMvcResult()); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void attribute_incorrectValue() throws Exception { new FlashAttributeResultMatchers().attribute("good", "not good").match(getStubMvcResult()); } diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/result/ModelResultMatchersTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/result/ModelResultMatchersTests.java index b06807739b..445d47482f 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/result/ModelResultMatchersTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/result/ModelResultMatchersTests.java @@ -68,7 +68,7 @@ public class ModelResultMatchersTests { this.matchers.attributeExists("good").match(this.mvcResult); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void attributeExists_doesNotExist() throws Exception { this.matchers.attributeExists("bad").match(this.mvcResult); } @@ -78,7 +78,7 @@ public class ModelResultMatchersTests { this.matchers.attributeDoesNotExist("bad").match(this.mvcResult); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void attributeDoesNotExist_doesExist() throws Exception { this.matchers.attributeDoesNotExist("good").match(this.mvcResultWithError); } @@ -88,7 +88,7 @@ public class ModelResultMatchersTests { this.matchers.attribute("good", is("good")).match(this.mvcResult); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void attribute_notEqual() throws Exception { this.matchers.attribute("good", is("bad")).match(this.mvcResult); } @@ -98,7 +98,7 @@ public class ModelResultMatchersTests { this.matchers.hasNoErrors().match(this.mvcResult); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void hasNoErrors_withErrors() throws Exception { this.matchers.hasNoErrors().match(this.mvcResultWithError); } @@ -108,7 +108,7 @@ public class ModelResultMatchersTests { this.matchers.attributeHasErrors("date").match(this.mvcResultWithError); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void attributeHasErrors_withoutErrors() throws Exception { this.matchers.attributeHasErrors("good").match(this.mvcResultWithError); } @@ -118,12 +118,12 @@ public class ModelResultMatchersTests { this.matchers.attributeHasNoErrors("good").match(this.mvcResult); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void attributeHasNoErrors_withoutAttribute() throws Exception { this.matchers.attributeHasNoErrors("missing").match(this.mvcResultWithError); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void attributeHasNoErrors_withErrors() throws Exception { this.matchers.attributeHasNoErrors("date").match(this.mvcResultWithError); } @@ -133,17 +133,17 @@ public class ModelResultMatchersTests { this.matchers.attributeHasFieldErrors("date", "time").match(this.mvcResultWithError); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void attributeHasFieldErrors_withoutAttribute() throws Exception { this.matchers.attributeHasFieldErrors("missing", "bad").match(this.mvcResult); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void attributeHasFieldErrors_withoutErrorsForAttribute() throws Exception { this.matchers.attributeHasFieldErrors("date", "time").match(this.mvcResult); } - @Test(expected=AssertionError.class) + @Test(expected = AssertionError.class) public void attributeHasFieldErrors_withoutErrorsForField() throws Exception { this.matchers.attributeHasFieldErrors("date", "good", "time").match(this.mvcResultWithError); } diff --git a/spring-tx/src/test/java/org/springframework/jca/support/LocalConnectionFactoryBeanTests.java b/spring-tx/src/test/java/org/springframework/jca/support/LocalConnectionFactoryBeanTests.java index 617f47f241..186a2e2e1b 100644 --- a/spring-tx/src/test/java/org/springframework/jca/support/LocalConnectionFactoryBeanTests.java +++ b/spring-tx/src/test/java/org/springframework/jca/support/LocalConnectionFactoryBeanTests.java @@ -30,9 +30,9 @@ import static org.mockito.BDDMockito.*; * @author Rick Evans * @author Chris Beams */ -public final class LocalConnectionFactoryBeanTests { +public class LocalConnectionFactoryBeanTests { - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testManagedConnectionFactoryIsRequired() throws Exception { new LocalConnectionFactoryBean().afterPropertiesSet(); } 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 dbd329e57c..f0d7285e25 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 @@ -62,7 +62,7 @@ public class TransactionAttributeEditorTests { assertTrue(!ta.isReadOnly()); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testInvalidPropagationCodeOnly() { TransactionAttributeEditor pe = new TransactionAttributeEditor(); // should have failed with bogus propagation code @@ -79,7 +79,7 @@ public class TransactionAttributeEditorTests { assertTrue(ta.getIsolationLevel() == TransactionDefinition.ISOLATION_READ_UNCOMMITTED); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testValidPropagationAndIsolationCodesAndInvalidRollbackRule() { TransactionAttributeEditor pe = new TransactionAttributeEditor(); // should fail with bogus rollback rule 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 0e51892b01..6df0c598cd 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 @@ -35,7 +35,7 @@ import static org.junit.Assert.*; * @since 15.10.2003 * @see org.springframework.transaction.interceptor.TransactionProxyFactoryBean */ -public final class TransactionAttributeSourceTests { +public class TransactionAttributeSourceTests { @Test public void matchAlwaysTransactionAttributeSource() throws Exception { diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/HeaderContentTypeResolverTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/HeaderContentTypeResolverTests.java index 71072f535c..5a34c85eba 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/HeaderContentTypeResolverTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/accept/HeaderContentTypeResolverTests.java @@ -63,7 +63,7 @@ public class HeaderContentTypeResolverTests { assertEquals("text/plain;q=0.5", mediaTypes.get(3).toString()); } - @Test(expected=NotAcceptableStatusException.class) + @Test(expected = NotAcceptableStatusException.class) public void resolveMediaTypesParseError() throws Exception { ServerWebExchange exchange = createExchange("textplain; q=0.5"); this.resolver.resolveMediaTypes(exchange); diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/condition/CompositeRequestConditionTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/condition/CompositeRequestConditionTests.java index f45e4fbfb3..274a3d7ec6 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/condition/CompositeRequestConditionTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/condition/CompositeRequestConditionTests.java @@ -90,7 +90,7 @@ public class CompositeRequestConditionTests { assertSame(notEmpty, empty.combine(notEmpty)); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void combineDifferentLength() { CompositeRequestCondition cond1 = new CompositeRequestCondition(this.param1); CompositeRequestCondition cond2 = new CompositeRequestCondition(this.param1, this.header1); @@ -141,7 +141,7 @@ public class CompositeRequestConditionTests { assertEquals(1, empty.compareTo(notEmpty, this.exchange)); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void compareDifferentLength() { CompositeRequestCondition cond1 = new CompositeRequestCondition(this.param1); CompositeRequestCondition cond2 = new CompositeRequestCondition(this.param1, this.header1); diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/condition/RequestConditionHolderTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/condition/RequestConditionHolderTests.java index 266f80aa54..4830170cb0 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/condition/RequestConditionHolderTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/result/condition/RequestConditionHolderTests.java @@ -78,7 +78,7 @@ public class RequestConditionHolderTests { assertSame(notEmpty, empty.combine(notEmpty)); } - @Test(expected=ClassCastException.class) + @Test(expected = ClassCastException.class) public void combineIncompatible() { RequestConditionHolder params = new RequestConditionHolder(new ParamsRequestCondition("name")); RequestConditionHolder headers = new RequestConditionHolder(new HeadersRequestCondition("name")); @@ -130,7 +130,7 @@ public class RequestConditionHolderTests { assertEquals(1, empty.compareTo(notEmpty, this.exchange)); } - @Test(expected=ClassCastException.class) + @Test(expected = ClassCastException.class) public void compareIncompatible() { RequestConditionHolder params = new RequestConditionHolder(new ParamsRequestCondition("name")); RequestConditionHolder headers = new RequestConditionHolder(new HeadersRequestCondition("name")); diff --git a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java index 4832ec0bd6..4caf5d2f82 100644 --- a/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java +++ b/spring-web/src/main/java/org/springframework/http/converter/json/MappingJackson2HttpMessageConverter.java @@ -66,6 +66,7 @@ public class MappingJackson2HttpMessageConverter extends AbstractJackson2HttpMes super(objectMapper, MediaType.APPLICATION_JSON, new MediaType("application", "*+json")); } + /** * Specify a custom prefix to use for this view's JSON output. * Default is none. diff --git a/spring-web/src/test/java/org/springframework/protobuf/OuterSample.java b/spring-web/src/test/java/org/springframework/protobuf/OuterSample.java index c952ef5a9f..b0c36ed5c7 100644 --- a/spring-web/src/test/java/org/springframework/protobuf/OuterSample.java +++ b/spring-web/src/test/java/org/springframework/protobuf/OuterSample.java @@ -3,7 +3,7 @@ package org.springframework.protobuf; -public final class OuterSample { +public class OuterSample { private OuterSample() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { 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 26303f9ddf..3a16c97bba 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 @@ -105,7 +105,7 @@ public class DefaultResponseErrorHandlerTests { // SPR-9406 - @Test(expected=UnknownHttpStatusCodeException.class) + @Test(expected = UnknownHttpStatusCodeException.class) public void unknownStatusCode() throws Exception { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.TEXT_PLAIN); 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 3eb9849e18..72a07aceb9 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 @@ -128,7 +128,7 @@ public class StandardServletAsyncWebRequestTests { verify(timeoutHandler).run(); } - @Test(expected=IllegalStateException.class) + @Test(expected = IllegalStateException.class) public void setTimeoutDuringConcurrentHandling() { this.asyncRequest.startAsync(); this.asyncRequest.setTimeout(25L); 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 384299da3c..6ffda18a69 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 @@ -87,7 +87,7 @@ public class WebAsyncManagerTests { assertTrue(this.asyncManager.isConcurrentHandlingStarted()); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void setAsyncWebRequestAfterAsyncStarted() { this.asyncWebRequest.startAsync(); this.asyncManager.setAsyncWebRequest(null); 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 8dc6724132..570c192f21 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 @@ -171,7 +171,7 @@ public class DelegatingFilterProxyTests { assertNull(targetFilter.filterConfig); } - @Test(expected=IllegalStateException.class) + @Test(expected = IllegalStateException.class) public void testDelegatingFilterProxyWithTargetBeanNameAndNoApplicationContext() throws ServletException, IOException { MockServletContext sc = new MockServletContext(); 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 0b42e2397c..af6bcb4328 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 @@ -72,7 +72,7 @@ public class ErrorsMethodHandlerArgumentResolverTests { assertSame(actual, bindingResult); } - @Test(expected=IllegalStateException.class) + @Test(expected = IllegalStateException.class) public void bindingResultNotFound() throws Exception { ModelAndViewContainer mavContainer = new ModelAndViewContainer(); mavContainer.addAllAttributes(bindingResult.getModel()); @@ -81,7 +81,7 @@ public class ErrorsMethodHandlerArgumentResolverTests { resolver.resolveArgument(paramErrors, mavContainer, webRequest, null); } - @Test(expected=IllegalStateException.class) + @Test(expected = IllegalStateException.class) public void noBindingResult() throws Exception { resolver.resolveArgument(paramErrors, new ModelAndViewContainer(), webRequest, null); } 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 55d92b0c49..6ee180cb8f 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 @@ -104,7 +104,7 @@ public class InitBinderDataBinderFactoryTests { assertNull(dataBinder.getDisallowedFields()); } - @Test(expected=IllegalStateException.class) + @Test(expected = IllegalStateException.class) public void returnValueNotExpected() throws Exception { WebDataBinderFactory factory = createBinderFactory("initBinderReturnValue", WebDataBinder.class); factory.createBinder(webRequest, null, "invalidName"); 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 470aaf2700..52f853887a 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 @@ -72,7 +72,7 @@ public class HandlerMethodArgumentResolverCompositeTests { assertEquals("Didn't use the first registered resolver", Integer.valueOf(1), resolvedValue); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void noSuitableArgumentResolver() throws Exception { this.resolvers.resolveArgument(paramStr, null, null, null); } 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 06f46b227f..806819dfc9 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 @@ -112,7 +112,7 @@ public class HandlerMethodReturnValueHandlerCompositeTests { verifyNoMoreInteractions(responseBodyHandler); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void noSuitableReturnValueHandler() throws Exception { this.handlers.handleReturnValue("value", this.stringType, null, null); } diff --git a/spring-web/src/test/java/org/springframework/web/multipart/support/ByteArrayMultipartFileEditorTests.java b/spring-web/src/test/java/org/springframework/web/multipart/support/ByteArrayMultipartFileEditorTests.java index fdca3abc80..48ba034399 100644 --- a/spring-web/src/test/java/org/springframework/web/multipart/support/ByteArrayMultipartFileEditorTests.java +++ b/spring-web/src/test/java/org/springframework/web/multipart/support/ByteArrayMultipartFileEditorTests.java @@ -29,7 +29,7 @@ import static org.mockito.BDDMockito.*; * @author Rick Evans * @author Sam Brannen */ -public final class ByteArrayMultipartFileEditorTests { +public class ByteArrayMultipartFileEditorTests { private final ByteArrayMultipartFileEditor editor = new ByteArrayMultipartFileEditor(); 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 a41467612a..2ae57f4f5a 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 @@ -30,7 +30,7 @@ import static org.junit.Assert.*; * @author Alef Arendsen * @author Rick Evans */ -public final class TagUtilsTests { +public class TagUtilsTests { @Test public void getScopeSunnyDay() { 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 5bd2b73c65..c76b889413 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 @@ -71,7 +71,7 @@ public class CompositeRequestConditionTests { assertSame(notEmpty, empty.combine(notEmpty)); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void combineDifferentLength() { CompositeRequestCondition cond1 = new CompositeRequestCondition(this.param1); CompositeRequestCondition cond2 = new CompositeRequestCondition(this.param1, this.header1); @@ -130,7 +130,7 @@ public class CompositeRequestConditionTests { assertEquals(1, empty.compareTo(notEmpty, request)); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void compareDifferentLength() { CompositeRequestCondition cond1 = new CompositeRequestCondition(this.param1); CompositeRequestCondition cond2 = new CompositeRequestCondition(this.param1, this.header1); 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 a7dab0d393..6492939a94 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 @@ -51,7 +51,7 @@ public class RequestConditionHolderTests { assertSame(notEmpty, empty.combine(notEmpty)); } - @Test(expected=ClassCastException.class) + @Test(expected = ClassCastException.class) public void combineIncompatible() { RequestConditionHolder params = new RequestConditionHolder(new ParamsRequestCondition("name")); RequestConditionHolder headers = new RequestConditionHolder(new HeadersRequestCondition("name")); @@ -110,7 +110,7 @@ public class RequestConditionHolderTests { assertEquals(1, empty.compareTo(notEmpty, request)); } - @Test(expected=ClassCastException.class) + @Test(expected = ClassCastException.class) public void compareIncompatible() { RequestConditionHolder params = new RequestConditionHolder(new ParamsRequestCondition("name")); RequestConditionHolder headers = new RequestConditionHolder(new HeadersRequestCondition("name")); 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 e179252010..e327e822e3 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 @@ -159,7 +159,7 @@ public class RequestMappingInfoHandlerMappingTests { // SPR-9603 - @Test(expected=HttpMediaTypeNotAcceptableException.class) + @Test(expected = HttpMediaTypeNotAcceptableException.class) public void getHandlerRequestMethodMatchFalsePositive() throws Exception { MockHttpServletRequest request = new MockHttpServletRequest("GET", "/users"); request.addHeader("Accept", "application/xml"); 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 151809a2e4..3ccb9dc508 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 @@ -310,7 +310,7 @@ public class HttpEntityMethodProcessorMockTests { // SPR-9142 - @Test(expected=HttpMediaTypeNotAcceptableException.class) + @Test(expected = HttpMediaTypeNotAcceptableException.class) public void handleReturnValueNotAcceptableParseError() throws Exception { ResponseEntity returnValue = new ResponseEntity<>("Body", HttpStatus.ACCEPTED); servletRequest.addHeader("Accept", "01"); 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 7651b9d57a..9f57f9a42d 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 @@ -111,7 +111,7 @@ public class MatrixVariablesMethodArgumentResolverTests { assertEquals("2013", resolver.resolveArgument(this.paramYear, this.mavContainer, this.webRequest, null)); } - @Test(expected=ServletRequestBindingException.class) + @Test(expected = ServletRequestBindingException.class) public void resolveArgumentMultipleMatches() throws Exception { getMatrixVariables("var1").add("colors", "red"); @@ -120,7 +120,7 @@ public class MatrixVariablesMethodArgumentResolverTests { this.resolver.resolveArgument(this.paramColors, this.mavContainer, this.webRequest, null); } - @Test(expected=ServletRequestBindingException.class) + @Test(expected = ServletRequestBindingException.class) public void resolveArgumentRequired() throws Exception { resolver.resolveArgument(this.paramColors, this.mavContainer, this.webRequest, null); } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionsTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionsTagTests.java index 1e9370dd62..1437e6fd7f 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionsTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionsTagTests.java @@ -53,7 +53,7 @@ import static org.junit.Assert.*; * @author Jeremy Grelle */ @SuppressWarnings({ "rawtypes", "unchecked" }) -public final class OptionsTagTests extends AbstractHtmlElementTagTests { +public class OptionsTagTests extends AbstractHtmlElementTagTests { private static final String COMMAND_NAME = "testBean"; 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 7f574be803..13971094ec 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 @@ -52,7 +52,7 @@ import static org.junit.Assert.*; * @author Jeremy Grelle */ @SuppressWarnings({ "rawtypes", "unchecked" }) -public final class RadioButtonsTagTests extends AbstractFormTagTests { +public class RadioButtonsTagTests extends AbstractFormTagTests { private RadioButtonsTag tag; 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 dc882e4c50..79f4a97240 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 @@ -27,7 +27,7 @@ import static org.junit.Assert.*; * @author Rick Evans * @author Juergen Hoeller */ -public final class DefaultRequestToViewNameTranslatorTests { +public class DefaultRequestToViewNameTranslatorTests { private static final String VIEW_NAME = "apple"; private static final String EXTENSION = ".html"; 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 8e386b5543..31752dfe76 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 @@ -113,7 +113,7 @@ public class RedirectViewUriTemplateTests { assertEquals(url + "/value1/v1/value2?key3=value3", this.response.getRedirectedUrl()); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void uriTemplateNullValue() throws Exception { new RedirectView("/{foo}").renderMergedOutputModel(new ModelMap(), this.request, this.response); } 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 4394f2f056..ec6bd80cdc 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 @@ -83,7 +83,7 @@ public class StandardWebSocketClientTests { assertEquals(443, session.getLocalAddress().getPort()); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void testGetLocalAddressNoScheme() throws Exception { URI uri = new URI("localhost/abc"); this.wsClient.doHandshake(this.wsHandler, this.headers, uri); 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 7acd269b92..7b8b8c3d80 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 @@ -57,7 +57,7 @@ public class BeanCreatingHandlerProviderTests { assertNotNull(provider.getHandler()); } - @Test(expected=BeanInstantiationException.class) + @Test(expected = BeanInstantiationException.class) public void getHandlerNoBeanFactory() { BeanCreatingHandlerProvider provider = 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 481959b1a3..ea5d64a3c7 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 @@ -91,7 +91,7 @@ public class SubProtocolWebSocketHandlerTests { isA(ConcurrentWebSocketSessionDecorator.class), eq(this.inClientChannel)); } - @Test(expected=IllegalStateException.class) + @Test(expected = IllegalStateException.class) public void subProtocolNoMatch() throws Exception { this.webSocketHandler.setDefaultProtocolHandler(defaultHandler); this.webSocketHandler.setProtocolHandlers(Arrays.asList(stompHandler, mqttHandler)); @@ -132,13 +132,13 @@ public class SubProtocolWebSocketHandlerTests { isA(ConcurrentWebSocketSessionDecorator.class), eq(this.inClientChannel)); } - @Test(expected=IllegalStateException.class) + @Test(expected = IllegalStateException.class) public void noSubProtocolTwoHandlers() throws Exception { this.webSocketHandler.setProtocolHandlers(Arrays.asList(stompHandler, mqttHandler)); this.webSocketHandler.afterConnectionEstablished(session); } - @Test(expected=IllegalStateException.class) + @Test(expected = IllegalStateException.class) public void noSubProtocolNoDefaultHandler() throws Exception { this.webSocketHandler.setProtocolHandlers(Arrays.asList(stompHandler, mqttHandler)); this.webSocketHandler.afterConnectionEstablished(session); 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 070f8d7816..d5a2807812 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 @@ -84,7 +84,7 @@ public class HttpReceivingTransportHandlerTests extends AbstractHttpRequestTests handleRequestAndExpectFailure(); } - @Test(expected=IllegalArgumentException.class) + @Test(expected = IllegalArgumentException.class) public void readMessagesNoSession() throws Exception { WebSocketHandler webSocketHandler = mock(WebSocketHandler.class); new XhrReceivingTransportHandler().handleRequest(this.request, this.response, webSocketHandler, null); diff --git a/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java b/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java index 067a335166..8bb127473f 100644 --- a/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java +++ b/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java @@ -47,7 +47,7 @@ import org.springframework.web.context.support.XmlWebApplicationContext; * @author Juergen Hoeller * @author Chris Beams */ -public final class AopNamespaceHandlerScopeIntegrationTests { +public class AopNamespaceHandlerScopeIntegrationTests { private static final String CLASSNAME = AopNamespaceHandlerScopeIntegrationTests.class.getName(); private static final String CONTEXT = format("classpath:%s-context.xml", ClassUtils.convertClassNameToResourcePath(CLASSNAME)); diff --git a/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java b/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java index a972be2d97..bc8e0a8a4d 100644 --- a/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java +++ b/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java @@ -49,7 +49,7 @@ import org.springframework.transaction.interceptor.TransactionInterceptor; * @author Rod Johnson * @author Chris Beams */ -public final class AdvisorAutoProxyCreatorIntegrationTests { +public class AdvisorAutoProxyCreatorIntegrationTests { private static final Class CLASS = AdvisorAutoProxyCreatorIntegrationTests.class; private static final String CLASSNAME = CLASS.getSimpleName();