From 1762157ad1a89ff8778387a2c72a8e36ff341a40 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 18 Dec 2012 13:45:00 -0800 Subject: [PATCH] Remove trailing whitespace in source files find . -type f -name "*.java" -or -name "*.aj" | \ xargs perl -p -i -e "s/[ \t]*$//g" {} \; Issue: SPR-10127 --- gradle/jdiff/Null.java | 4 +- .../java/org/springframework/aop/Advisor.java | 6 +- .../aop/DynamicIntroductionAdvice.java | 4 +- .../aop/IntroductionAdvisor.java | 4 +- .../springframework/aop/IntroductionInfo.java | 2 +- .../aop/MethodBeforeAdvice.java | 8 +- .../springframework/aop/PointcutAdvisor.java | 6 +- .../springframework/aop/TrueClassFilter.java | 6 +- .../aop/TrueMethodMatcher.java | 8 +- .../org/springframework/aop/TruePointcut.java | 6 +- .../aop/aspectj/AbstractAspectJAdvice.java | 32 ++-- .../aop/aspectj/AspectJAfterAdvice.java | 2 +- .../aspectj/AspectJExpressionPointcut.java | 4 +- .../AspectJExpressionPointcutAdvisor.java | 2 +- .../aop/aspectj/AspectJProxyUtils.java | 2 +- .../aspectj/AspectJWeaverMessageHandler.java | 22 +-- .../aop/aspectj/DeclareParentsAdvisor.java | 4 +- .../MethodInvocationProceedingJoinPoint.java | 2 +- .../aop/aspectj/RuntimeTestWalker.java | 8 +- .../SingletonAspectInstanceFactory.java | 2 +- .../aop/aspectj/TypePatternClassFilter.java | 6 +- .../AbstractAspectJAdvisorFactory.java | 16 +- .../aspectj/annotation/AspectMetadata.java | 4 +- .../BeanFactoryAspectInstanceFactory.java | 4 +- ...ntiationModelAwarePointcutAdvisorImpl.java | 26 +-- .../ReflectiveAspectJAdvisorFactory.java | 2 +- .../aop/aspectj/annotation/package-info.java | 2 +- .../AspectJAwareAdvisorAutoProxyCreator.java | 8 +- .../AspectJPrecedenceComparator.java | 6 +- .../aop/aspectj/package-info.java | 2 +- ...erceptorDrivenBeanDefinitionDecorator.java | 2 +- .../aop/config/AdviceEntry.java | 2 +- .../aop/config/AdvisorEntry.java | 2 +- .../aop/config/AopConfigUtils.java | 4 +- .../config/ConfigBeanDefinitionParser.java | 8 +- .../aop/config/PointcutEntry.java | 2 +- .../ScopedProxyBeanDefinitionDecorator.java | 2 +- .../aop/framework/Advised.java | 2 +- .../aop/framework/AopProxyFactory.java | 2 +- .../aop/framework/ProxyFactoryBean.java | 16 +- .../adapter/ThrowsAdviceInterceptor.java | 6 +- .../adapter/UnknownAdviceTypeException.java | 6 +- .../aop/framework/adapter/package-info.java | 2 +- .../DefaultAdvisorAutoProxyCreator.java | 2 +- .../autoproxy/TargetSourceCreator.java | 8 +- .../aop/framework/autoproxy/package-info.java | 4 +- .../target/QuickTargetSourceCreator.java | 4 +- .../aop/framework/package-info.java | 6 +- .../AbstractMonitoringInterceptor.java | 2 +- .../ConcurrencyThrottleInterceptor.java | 6 +- .../interceptor/ExposeBeanNameAdvisors.java | 2 +- .../JamonPerformanceMonitorInterceptor.java | 2 +- .../org/springframework/aop/package-info.java | 6 +- .../aop/scope/DefaultScopedObject.java | 2 +- .../aop/scope/ScopedObject.java | 2 +- .../aop/scope/ScopedProxyFactoryBean.java | 4 +- .../aop/scope/ScopedProxyUtils.java | 4 +- .../support/DefaultIntroductionAdvisor.java | 2 +- .../aop/support/DefaultPointcutAdvisor.java | 4 +- ...erTargetObjectIntroductionInterceptor.java | 8 +- .../DelegatingIntroductionInterceptor.java | 12 +- .../aop/support/DynamicMethodMatcher.java | 6 +- .../support/DynamicMethodMatcherPointcut.java | 6 +- .../aop/support/JdkRegexpMethodPointcut.java | 6 +- .../aop/support/RootClassFilter.java | 12 +- .../aop/support/StaticMethodMatcher.java | 8 +- .../target/AbstractPoolingTargetSource.java | 4 +- .../aop/target/CommonsPoolTargetSource.java | 2 +- .../aop/target/PoolingConfig.java | 6 +- .../aop/target/SingletonTargetSource.java | 4 +- .../aop/target/ThreadLocalTargetSource.java | 8 +- .../target/ThreadLocalTargetSourceStats.java | 8 +- .../aop/target/dynamic/Refreshable.java | 6 +- ...eParameterNameDiscoverAnnotationTests.java | 2 +- ...ctJAdviceParameterNameDiscovererTests.java | 2 +- .../AspectJExpressionPointcutTests.java | 60 +++---- .../BeanNamePointcutMatchingTests.java | 8 +- ...hodInvocationProceedingJoinPointTests.java | 22 +-- ...ctJAdviceParameterNameDiscovererTests.java | 14 +- .../TigerAspectJExpressionPointcutTests.java | 68 ++++---- .../TrickyAspectJPointcutExpressionTests.java | 20 +-- .../aspectj/TypePatternClassFilterTests.java | 4 +- .../AbstractAspectJAdvisorFactoryTests.java | 152 ++++++++-------- .../annotation/ArgumentBindingTests.java | 4 +- .../AspectJPointcutAdvisorTests.java | 26 +-- .../annotation/AspectMetadataTests.java | 12 +- .../ReflectiveAspectJAdvisorFactoryTests.java | 2 +- .../AspectJPrecedenceComparatorTests.java | 4 +- .../config/AopNamespaceHandlerEventTests.java | 6 +- ...AopNamespaceHandlerPointcutErrorTests.java | 2 +- .../aop/config/TopLevelAopTagTests.java | 4 +- .../aop/framework/AopProxyUtilsTests.java | 16 +- .../framework/IntroductionBenchmarkTests.java | 10 +- .../aop/framework/MethodInvocationTests.java | 10 +- .../aop/framework/PrototypeTargetTests.java | 2 +- .../aop/framework/ProxyFactoryTests.java | 24 +-- .../interceptor/DebugInterceptorTests.java | 4 +- .../ExposeBeanNameAdvisorsTests.java | 22 +-- .../ExposeInvocationInterceptorTests.java | 14 +- .../aop/scope/ScopedProxyAutowireTests.java | 4 +- .../aop/support/AopUtilsTests.java | 4 +- .../aop/support/ClassFiltersTests.java | 14 +- .../aop/support/ComposablePointcutTests.java | 26 +-- .../aop/support/ControlFlowPointcutTests.java | 26 +-- ...elegatingIntroductionInterceptorTests.java | 8 +- .../aop/support/MethodMatchersTests.java | 18 +- .../support/NameMatchMethodPointcutTests.java | 24 +-- .../aop/support/PointcutsTests.java | 60 +++---- ...MethodPointcutAdvisorIntegrationTests.java | 30 ++-- .../CommonsPoolTargetSourceProxyTests.java | 2 +- .../target/HotSwappableTargetSourceTests.java | 50 +++--- .../aop/target/LazyInitTargetSourceTests.java | 4 +- .../PrototypeBasedTargetSourceTests.java | 4 +- .../target/PrototypeTargetSourceTests.java | 16 +- .../target/ThreadLocalTargetSourceTests.java | 34 ++-- .../test/java/test/aop/DefaultLockable.java | 8 +- .../src/test/java/test/aop/Lockable.java | 14 +- .../src/test/java/test/aop/MethodCounter.java | 2 +- .../test/java/test/aop/NopInterceptor.java | 12 +- .../test/java/test/aop/PerTargetAspect.java | 2 +- .../test/aop/SerializableNopInterceptor.java | 16 +- .../test/java/test/beans/INestedTestBean.java | 6 +- .../src/test/java/test/beans/IOther.java | 6 +- .../test/java/test/beans/NestedTestBean.java | 6 +- .../src/test/java/test/beans/Person.java | 16 +- .../java/test/beans/SerializablePerson.java | 16 +- .../test/java/test/beans/SideEffectBean.java | 14 +- .../test/java/test/beans/subpkg/DeepBean.java | 4 +- .../test/util/SerializationTestUtils.java | 8 +- .../java/test/util/TestResourceUtils.java | 12 +- .../src/test/java/test/util/TimeStamped.java | 8 +- .../aspectj/AbstractBeanConfigurerAspect.aj | 8 +- .../AbstractDependencyInjectionAspect.aj | 34 ++-- ...nterfaceDrivenDependencyInjectionAspect.aj | 50 +++--- .../aspectj/AnnotationBeanConfigurerAspect.aj | 8 +- .../factory/aspectj/ConfigurableObject.java | 2 +- ...nterfaceDrivenDependencyInjectionAspect.aj | 32 ++-- .../cache/aspectj/AbstractCacheAspect.aj | 2 +- .../AbstractMethodMockingControl.aj | 20 +-- ...otationDrivenStaticEntityMockingControl.aj | 12 +- .../aspectj/JpaExceptionTranslatorAspect.aj | 8 +- .../aspectj/AbstractAsyncExecutionAspect.aj | 2 +- .../aspectj/AnnotationTransactionAspect.aj | 10 +- .../AutoProxyWithCodeStyleAspectsTests.java | 4 +- .../beans/INestedTestBean.java | 6 +- .../org/springframework/beans/IOther.java | 6 +- .../springframework/beans/NestedTestBean.java | 6 +- .../cache/config/CacheableService.java | 2 +- .../cache/config/DefaultCacheableService.java | 2 +- ...nDrivenStaticEntityMockingControlTest.java | 14 +- .../mock/staticmock/Delegate.java | 6 +- .../mock/staticmock/Person_Roo_Entity.aj | 160 ++++++++--------- .../CallCountingTransactionManager.java | 2 +- .../ClassWithPrivateAnnotatedMember.java | 8 +- .../ClassWithProtectedAnnotatedMember.java | 8 +- .../transaction/aspectj/ITransactional.java | 2 +- ...ethodAnnotationOnClassWithNoInterface.java | 6 +- .../aspectj/TransactionAspectTests.java | 62 +++---- ...lAnnotationOnlyOnClassWithNoInterface.java | 4 +- .../beans/BeanWrapperImpl.java | 20 +-- .../GenericTypeAwarePropertyDescriptor.java | 2 +- .../beans/MethodInvocationException.java | 2 +- .../beans/PropertyAccessException.java | 2 +- .../beans/PropertyEditorRegistrar.java | 2 +- .../springframework/beans/PropertyValues.java | 8 +- .../beans/factory/BeanFactoryUtils.java | 2 +- .../factory/BeanIsNotAFactoryException.java | 6 +- .../beans/factory/DisposableBean.java | 6 +- .../factory/HierarchicalBeanFactory.java | 2 +- .../beans/factory/InitializingBean.java | 10 +- .../beans/factory/ListableBeanFactory.java | 2 +- .../NoSuchBeanDefinitionException.java | 2 +- .../factory/access/BootstrapException.java | 6 +- .../access/SingletonBeanFactoryLocator.java | 52 +++--- .../beans/factory/access/package-info.java | 2 +- .../AutowiredAnnotationBeanPostProcessor.java | 18 +- .../factory/annotation/Configurable.java | 4 +- .../beans/factory/annotation/Required.java | 2 +- .../factory/config/AbstractFactoryBean.java | 2 +- .../config/BeanFactoryPostProcessor.java | 6 +- .../factory/config/CommonsLogFactoryBean.java | 6 +- .../config/CustomEditorConfigurer.java | 12 +- .../config/FieldRetrievingFactoryBean.java | 6 +- .../config/MethodInvokingFactoryBean.java | 6 +- .../config/PropertyPathFactoryBean.java | 6 +- .../config/RuntimeBeanNameReference.java | 4 +- .../factory/config/RuntimeBeanReference.java | 4 +- .../beans/factory/package-info.java | 2 +- .../parsing/FailFastProblemReporter.java | 2 +- .../beans/factory/parsing/PropertyEntry.java | 2 +- .../beans/factory/parsing/QualifierEntry.java | 2 +- .../AbstractAutowireCapableBeanFactory.java | 16 +- .../support/BeanDefinitionDefaults.java | 2 +- ...CglibSubclassingInstantiationStrategy.java | 12 +- .../factory/support/ConstructorResolver.java | 6 +- .../support/FactoryBeanRegistrySupport.java | 4 +- .../beans/factory/support/LookupOverride.java | 2 +- .../beans/factory/support/MethodOverride.java | 2 +- .../factory/support/MethodOverrides.java | 2 +- .../beans/factory/support/MethodReplacer.java | 2 +- .../PropertiesBeanDefinitionReader.java | 2 +- .../factory/support/ReplaceOverride.java | 6 +- .../support/SecurityContextProvider.java | 6 +- .../SimpleSecurityContextProvider.java | 8 +- .../beans/factory/support/package-info.java | 2 +- .../xml/AbstractBeanDefinitionParser.java | 2 +- .../AbstractSimpleBeanDefinitionParser.java | 8 +- .../beans/factory/xml/BeansDtdResolver.java | 2 +- .../DefaultBeanDefinitionDocumentReader.java | 2 +- .../beans/factory/xml/NamespaceHandler.java | 4 +- .../SimpleConstructorNamespaceHandler.java | 24 +-- .../springframework/beans/package-info.java | 4 +- .../propertyeditors/CharacterEditor.java | 2 +- .../beans/propertyeditors/LocaleEditor.java | 6 +- .../propertyeditors/ResourceBundleEditor.java | 18 +- .../StringArrayPropertyEditor.java | 6 +- .../beans/propertyeditors/package-info.java | 2 +- .../beans/support/PropertyComparator.java | 2 +- .../beans/support/SortDefinition.java | 6 +- .../ComponentBeanDefinitionParserTest.java | 6 +- .../beans/AbstractPropertyValuesTests.java | 8 +- .../springframework/beans/BeanUtilsTests.java | 2 +- .../beans/BeanWrapperAutoGrowingTests.java | 30 ++-- .../beans/ConcurrentBeanWrapperTests.java | 8 +- .../beans/MutablePropertyValuesTests.java | 2 +- .../beans/factory/BeanFactoryUtilsTests.java | 10 +- .../factory/ConcurrentBeanFactoryTests.java | 2 +- .../DefaultListableBeanFactoryTests.java | 18 +- .../beans/factory/FactoryBeanLookupTests.java | 10 +- .../beans/factory/FactoryBeanTests.java | 14 +- .../SingletonBeanFactoryLocatorTests.java | 14 +- ...wiredAnnotationBeanPostProcessorTests.java | 2 +- .../CustomAutowireConfigurerTests.java | 2 +- .../config/CustomEditorConfigurerTests.java | 2 +- .../FieldRetrievingFactoryBeanTests.java | 4 +- .../MethodInvokingFactoryBeanTests.java | 2 +- ...ObjectFactoryCreatingFactoryBeanTests.java | 10 +- .../config/PropertiesFactoryBeanTests.java | 4 +- .../config/PropertyPathFactoryBeanTests.java | 4 +- .../ServiceLocatorFactoryBeanTests.java | 24 +-- .../factory/config/SimpleScopeTests.java | 6 +- .../beans/factory/config/TestTypes.java | 2 +- .../parsing/CustomProblemReporterTests.java | 2 +- .../PassThroughSourceExtractorTests.java | 2 +- ...ierAnnotationAutowireBeanFactoryTests.java | 20 +-- .../security/CallbacksSecurityTests.java | 16 +- .../security/support/ConstructorBean.java | 6 +- .../security/support/CustomCallbackBean.java | 8 +- .../security/support/CustomFactoryBean.java | 6 +- .../support/security/support/DestroyBean.java | 6 +- .../support/security/support/FactoryBean.java | 10 +- .../support/security/support/InitBean.java | 6 +- .../security/support/PropertyBean.java | 8 +- .../wiring/BeanConfigurerSupportTests.java | 4 +- .../factory/xml/BeanNameGenerationTests.java | 2 +- .../xml/ConstructorDependenciesBean.java | 12 +- .../beans/factory/xml/DependenciesBean.java | 12 +- .../beans/factory/xml/DummyReferencer.java | 6 +- .../factory/xml/DuplicateBeanIdTests.java | 4 +- .../beans/factory/xml/FactoryMethods.java | 24 +-- .../beans/factory/xml/InstanceFactory.java | 16 +- .../beans/factory/xml/TestBeanCreator.java | 12 +- .../factory/xml/XmlBeanCollectionTests.java | 8 +- .../xml/XmlBeanDefinitionReaderTests.java | 2 +- .../DefaultNamespaceHandlerResolverTests.java | 2 +- .../ByteArrayPropertyEditorTests.java | 2 +- .../propertyeditors/CustomEditorTests.java | 6 +- .../PropertiesEditorTests.java | 14 +- .../beans/support/PagedListHolderTests.java | 6 +- .../support/PropertyComparatorTests.java | 4 +- .../test/java/test/beans/BooleanTestBean.java | 6 +- .../src/test/java/test/beans/DummyBean.java | 8 +- .../test/java/test/beans/INestedTestBean.java | 6 +- .../src/test/java/test/beans/IOther.java | 6 +- .../test/java/test/beans/NestedTestBean.java | 6 +- .../test/java/test/beans/NumberTestBean.java | 6 +- .../test/beans/PackageLevelVisibleBean.java | 2 +- .../java/test/util/TestResourceUtils.java | 12 +- .../org/springframework/mail/MailSender.java | 8 +- .../mail/SimpleMailMessage.java | 4 +- .../freemarker/FreeMarkerTemplateUtils.java | 6 +- .../beans/INestedTestBean.java | 6 +- .../org/springframework/beans/IOther.java | 6 +- .../springframework/beans/NestedTestBean.java | 6 +- .../cache/annotation/CacheEvict.java | 4 +- .../cache/annotation/Cacheable.java | 2 +- .../cache/interceptor/CacheAspectSupport.java | 4 +- .../context/ApplicationContext.java | 2 +- .../context/ApplicationContextAware.java | 4 +- .../context/HierarchicalMessageSource.java | 10 +- .../context/MessageSourceResolvable.java | 2 +- .../context/NoSuchMessageException.java | 6 +- .../org/springframework/context/Phased.java | 2 +- .../context/ResourceLoaderAware.java | 2 +- .../access/ContextBeanFactoryReference.java | 8 +- .../context/access/DefaultLocatorFactory.java | 6 +- .../context/access/package-info.java | 2 +- .../AnnotationBeanNameGenerator.java | 2 +- .../context/annotation/Bean.java | 2 +- .../ClassPathBeanDefinitionScanner.java | 2 +- .../CommonAnnotationBeanPostProcessor.java | 2 +- .../annotation/ConfigurationClass.java | 4 +- ...onfigurationClassBeanDefinitionReader.java | 2 +- .../ConfigurationClassPostProcessor.java | 2 +- .../context/annotation/Scope.java | 2 +- .../context/annotation/ScopeMetadata.java | 2 +- .../annotation/ScopeMetadataResolver.java | 4 +- .../PropertyOverrideBeanDefinitionParser.java | 2 +- .../StandardBeanExpressionResolver.java | 2 +- .../springframework/context/package-info.java | 2 +- .../ApplicationContextAwareProcessor.java | 4 +- .../support/ApplicationObjectSupport.java | 4 +- .../support/ConversionServiceFactoryBean.java | 2 +- .../support/MessageSourceAccessor.java | 6 +- .../AbstractRemoteSlsbInvokerInterceptor.java | 2 +- .../access/LocalSlsbInvokerInterceptor.java | 2 +- ...LocalStatelessSessionProxyFactoryBean.java | 4 +- ...emoteStatelessSessionProxyFactoryBean.java | 4 +- .../ejb/access/package-info.java | 4 +- .../support/AbstractJmsMessageDrivenBean.java | 4 +- .../support/AbstractMessageDrivenBean.java | 2 +- .../support/AbstractStatefulSessionBean.java | 2 +- .../ejb/support/package-info.java | 6 +- .../format/AnnotationFormatterFactory.java | 4 +- .../org/springframework/format/Formatter.java | 2 +- .../format/FormatterRegistrar.java | 4 +- .../org/springframework/format/Parser.java | 2 +- .../org/springframework/format/Printer.java | 2 +- .../format/annotation/NumberFormat.java | 6 +- ...umberFormatAnnotationFormatterFactory.java | 2 +- ...ormattingConversionServiceFactoryBean.java | 14 +- ...esourceOverridingShadowingClassLoader.java | 10 +- .../GlassFishClassLoaderAdapter.java | 10 +- .../classloading/jboss/JBossMCAdapter.java | 2 +- .../jboss/JBossMCTranslatorAdapter.java | 4 +- .../oc4j/OC4JClassLoaderAdapter.java | 8 +- .../oc4j/OC4JClassPreprocessorAdapter.java | 8 +- .../classloading/oc4j/OC4JLoadTimeWeaver.java | 2 +- .../weblogic/WebLogicClassLoaderAdapter.java | 8 +- .../weblogic/WebLogicLoadTimeWeaver.java | 6 +- .../WebSphereClassLoaderAdapter.java | 4 +- .../WebSphereClassPreDefinePlugin.java | 10 +- .../jmx/export/MBeanExporter.java | 8 +- .../jmx/export/annotation/ManagedMetric.java | 2 +- .../AbstractReflectiveMBeanInfoAssembler.java | 10 +- .../MethodExclusionMBeanInfoAssembler.java | 2 +- .../export/metadata/JmxAttributeSource.java | 8 +- .../jmx/export/naming/KeyNamingStrategy.java | 4 +- .../ModelMBeanNotificationPublisher.java | 2 +- .../springframework/jndi/JndiTemplate.java | 6 +- .../jndi/JndiTemplateEditor.java | 6 +- .../springframework/jndi/package-info.java | 2 +- .../remoting/rmi/JndiRmiProxyFactoryBean.java | 2 +- .../support/RemoteInvocationUtils.java | 2 +- .../AnnotationDrivenBeanDefinitionParser.java | 2 +- .../ScheduledTasksBeanDefinitionParser.java | 2 +- .../config/SchedulerBeanDefinitionParser.java | 2 +- .../config/TaskNamespaceHandler.java | 4 +- .../support/CronSequenceGenerator.java | 2 +- .../scheduling/support/CronTrigger.java | 2 +- .../scheduling/support/PeriodicTrigger.java | 6 +- .../scheduling/support/TaskUtils.java | 2 +- .../config/LangNamespaceHandler.java | 4 +- .../config/ScriptBeanDefinitionParser.java | 2 +- .../config/ScriptingDefaultsParser.java | 2 +- .../scripting/groovy/GroovyScriptFactory.java | 2 +- .../support/ResourceScriptSource.java | 2 +- .../support/ScriptFactoryPostProcessor.java | 2 +- .../stereotype/package-info.java | 2 +- .../ui/context/HierarchicalThemeSource.java | 6 +- .../ui/context/package-info.java | 4 +- .../validation/BeanPropertyBindingResult.java | 2 +- .../springframework/validation/Errors.java | 8 +- .../validation/ObjectError.java | 2 +- .../validation/ValidationUtils.java | 8 +- .../springframework/validation/Validator.java | 14 +- .../java/example/scannable/MessageBean.java | 4 +- .../scannable/ServiceInvocationCounter.java | 2 +- .../aop/aspectj/AfterAdviceBindingTests.java | 22 +-- .../AfterReturningAdviceBindingTests.java | 40 ++--- .../AfterThrowingAdviceBindingTests.java | 28 +-- .../aop/aspectj/AroundAdviceBindingTests.java | 24 +-- .../AspectAndAdvicePrecedenceTests.java | 16 +- .../BeanNamePointcutAtAspectTests.java | 2 +- .../aop/aspectj/BeanNamePointcutTests.java | 8 +- .../aop/aspectj/BeforeAdviceBindingTests.java | 24 +-- .../DeclarationOrderIndependenceTests.java | 44 ++--- .../DeclareParentsDelegateRefTests.java | 6 +- .../aop/aspectj/DeclareParentsTests.java | 8 +- ...licitJPArgumentMatchingAtAspectJTests.java | 6 +- .../ImplicitJPArgumentMatchingTests.java | 6 +- .../aop/aspectj/OverloadedAdviceTests.java | 2 +- .../aop/aspectj/ProceedTests.java | 26 +-- .../aspectj/PropertyDependentAspectTests.java | 4 +- .../SharedPointcutWithArgsMismatchTests.java | 4 +- .../SubtypeSensitiveMatchingTests.java | 16 +- .../aspectj/TargetPointcutSelectionTests.java | 14 +- ...tSelectionOnlyPointcutsAtAspectJTests.java | 32 ++-- ...sAndTargetSelectionOnlyPointcutsTests.java | 16 +- .../aop/aspectj/_TestTypes.java | 18 +- .../autoproxy/AnnotationBindingTests.java | 2 +- .../autoproxy/AnnotationPointcutTests.java | 2 +- .../AspectImplementingInterfaceTests.java | 4 +- ...xyCreatorAndLazyInitTargetSourceTests.java | 2 +- .../AspectJAutoProxyCreatorTests.java | 4 +- .../AtAspectJAnnotationBindingTests.java | 4 +- .../aop/aspectj/autoproxy/_TestTypes.java | 2 +- .../autoproxy/benchmark/BenchmarkTests.java | 80 ++++----- .../autoproxy/spr3064/SPR3064Tests.java | 12 +- ...fterReturningGenericTypeMatchingTests.java | 4 +- .../GenericBridgeMethodMatchingTests.java | 4 +- .../GenericParameterMatchingTests.java | 20 +-- .../AopNamespaceHandlerAdviceTypeTests.java | 2 +- .../AopNamespaceHandlerArgNamesTests.java | 2 +- .../AopNamespaceHandlerReturningTests.java | 2 +- .../aop/config/AopNamespaceHandlerTests.java | 10 +- .../AopNamespaceHandlerThrowingTests.java | 2 +- .../MethodLocatingFactoryBeanTests.java | 20 +-- .../aop/framework/AbstractAopProxyTests.java | 62 +++---- .../aop/framework/CglibProxyTests.java | 10 +- .../aop/framework/JdkDynamicProxyTests.java | 14 +- .../aop/framework/ProxyFactoryBeanTests.java | 18 +- .../aop/framework/_TestTypes.java | 4 +- .../AdvisorAutoProxyCreatorTests.java | 14 +- .../BeanNameAutoProxyCreatorTests.java | 10 +- .../aop/scope/ScopedProxyTests.java | 4 +- .../target/CommonsPoolTargetSourceTests.java | 6 +- .../beans/INestedTestBean.java | 6 +- .../org/springframework/beans/IOther.java | 6 +- .../springframework/beans/NestedTestBean.java | 6 +- .../org/springframework/beans/Person.java | 6 +- .../beans/SerializablePerson.java | 6 +- .../beans/factory/DummyFactory.java | 4 +- .../springframework/beans/factory/HasMap.java | 14 +- .../beans/factory/MustBeInitialized.java | 12 +- .../SingletonBeanFactoryLocatorTests.java | 12 +- .../beans/factory/access/TestBean.java | 8 +- .../InjectAnnotationAutowireContextTests.java | 76 ++++---- ...alifierAnnotationAutowireContextTests.java | 84 ++++----- .../beans/factory/xml/DependenciesBean.java | 14 +- .../LookupMethodWrappedByCglibProxyTests.java | 4 +- .../factory/xml/QualifierAnnotationTests.java | 2 +- .../support/CustomNamespaceHandlerTests.java | 8 +- .../cache/config/CacheableService.java | 6 +- .../cache/config/DefaultCacheableService.java | 2 +- .../springframework/context/ACATester.java | 8 +- .../AbstractApplicationContextTests.java | 6 +- .../context/LifecycleContextBean.java | 18 +- .../ContextBeanFactoryReferenceTests.java | 10 +- .../ContextJndiBeanFactoryLocatorTests.java | 14 +- ...ntextSingletonBeanFactoryLocatorTests.java | 8 +- .../access/DefaultLocatorFactoryTests.java | 6 +- .../AbstractCircularImportDetectionTests.java | 4 +- ...notationConfigApplicationContextTests.java | 2 +- .../AsmCircularImportDetectionTests.java | 4 +- ...PathFactoryBeanDefinitionScannerTests.java | 4 +- .../annotation/ComponentScanParserTests.java | 4 +- ...nParserWithUserDefinedStrategiesTests.java | 2 +- .../context/annotation/SimpleConfigTests.java | 2 +- .../context/annotation/SimpleScanTests.java | 6 +- .../AutowiredConfigurationTests.java | 4 +- ...anAnnotationAttributePropagationTests.java | 2 +- .../BeanMethodQualificationTests.java | 6 +- ...figurationClassAspectIntegrationTests.java | 2 +- .../configuration/ImportResourceTests.java | 32 ++-- .../annotation/configuration/ImportTests.java | 4 +- ...tedConfigurationClassEnhancementTests.java | 12 +- .../configuration/ScopingTests.java | 22 +-- .../annotation/spr8761/Spr8761Tests.java | 2 +- .../context/conversionservice/Bar.java | 6 +- .../ConversionServiceContextConfigTests.java | 2 +- .../EventPublicationInterceptorTests.java | 4 +- .../context/event/LifecycleEventTests.java | 2 +- .../context/support/Assembler.java | 14 +- .../context/support/AutowiredService.java | 6 +- .../BeanFactoryPostProcessorTests.java | 16 +- .../ClassPathXmlApplicationContextTests.java | 2 +- .../ConversionServiceFactoryBeanTests.java | 8 +- .../DefaultLifecycleProcessorTests.java | 4 +- .../context/support/LifecycleTestBean.java | 2 +- .../context/support/Logic.java | 16 +- ...rtyResourceConfigurerIntegrationTests.java | 8 +- ...ertySourcesPlaceholderConfigurerTests.java | 2 +- .../context/support/Spr7283Tests.java | 2 +- .../context/support/Spr7816Tests.java | 18 +- ...ticApplicationContextMulticasterTests.java | 6 +- .../StaticApplicationContextTests.java | 6 +- .../context/support/TestIF.java | 6 +- .../LocalSlsbInvokerInterceptorTests.java | 2 +- ...StatelessSessionProxyFactoryBeanTests.java | 38 ++-- ...StatelessSessionProxyFactoryBeanTests.java | 58 +++---- .../format/number/CurrencyFormatterTests.java | 2 +- ...tingConversionServiceFactoryBeanTests.java | 4 +- .../FormattingConversionServiceTests.java | 6 +- ...ceOverridingShadowingClassLoaderTests.java | 26 +-- .../org/springframework/jmx/IJmxTestBean.java | 2 +- .../springframework/jmx/export/DateRange.java | 2 +- .../jmx/export/ExceptionOnInitBean.java | 2 +- .../export/annotation/AnnotationTestBean.java | 10 +- .../AbstractMetadataAssemblerTests.java | 10 +- .../assembler/IAdditionalTestMethods.java | 2 +- .../jmx/export/assembler/ICustomJmxBean.java | 2 +- ...aceBasedMBeanInfoAssemblerCustomTests.java | 2 +- ...ethodExclusionMBeanInfoAssemblerTests.java | 2 +- .../export/naming/KeyNamingStrategyTests.java | 2 +- .../jndi/JndiTemplateEditorTests.java | 6 +- .../mock/env/MockEnvironment.java | 2 +- .../mock/jndi/SimpleNamingContextBuilder.java | 2 +- .../remoting/rmi/RmiSupportTests.java | 4 +- .../ThreadPoolTaskSchedulerTests.java | 4 +- .../springframework/scripting/ScriptBean.java | 2 +- .../config/ScriptingDefaultsTests.java | 2 +- .../groovy/GroovyAspectIntegrationTests.java | 2 +- .../groovy/GroovyScriptFactoryTests.java | 2 +- .../scripting/groovy/LogUserAdvice.java | 8 +- .../ScriptFactoryPostProcessorTests.java | 2 +- .../util/SerializationTestUtils.java | 8 +- .../validation/ValidationUtilsTests.java | 2 +- .../advice/CountingAfterReturningAdvice.java | 6 +- .../test/advice/CountingBeforeAdvice.java | 6 +- .../test/java/test/advice/MethodCounter.java | 2 +- .../java/test/advice/MyThrowsHandler.java | 4 +- .../advice/TimestampIntroductionAdvisor.java | 8 +- .../java/test/aspect/PerTargetAspect.java | 2 +- .../src/test/java/test/beans/Employee.java | 12 +- .../test/java/test/beans/FactoryMethods.java | 2 +- .../src/test/java/test/beans/ITestBean.java | 4 +- .../test/java/test/beans/NestedTestBean.java | 2 +- .../test/java/test/beans/SideEffectBean.java | 16 +- .../src/test/java/test/beans/TestBean.java | 2 +- .../java/test/interceptor/NopInterceptor.java | 12 +- .../SerializableNopInterceptor.java | 16 +- .../TimestampIntroductionInterceptor.java | 8 +- .../test/java/test/mixin/DefaultLockable.java | 8 +- .../src/test/java/test/mixin/LockMixin.java | 14 +- .../java/test/mixin/LockMixinAdvisor.java | 8 +- .../src/test/java/test/mixin/Lockable.java | 14 +- .../test/java/test/mixin/LockedException.java | 6 +- .../src/test/java/test/util/TimeStamped.java | 8 +- .../core/ConstantException.java | 2 +- .../org/springframework/core/Constants.java | 2 +- .../org/springframework/core/ControlFlow.java | 6 +- .../org/springframework/core/ErrorCoded.java | 10 +- .../core/ParameterNameDiscoverer.java | 4 +- .../PrioritizedParameterNameDiscoverer.java | 2 +- .../enums/AbstractGenericLabeledEnum.java | 2 +- .../core/enums/LetterCodedLabeledEnum.java | 2 +- .../core/enums/ShortCodedLabeledEnum.java | 2 +- .../core/enums/StaticLabeledEnum.java | 10 +- .../core/env/EnvironmentCapable.java | 2 +- .../core/io/InputStreamSource.java | 8 +- .../PathMatchingResourcePatternResolver.java | 6 +- .../core/serializer/DefaultDeserializer.java | 4 +- .../core/serializer/DefaultSerializer.java | 2 +- .../core/serializer/Deserializer.java | 2 +- .../core/serializer/Serializer.java | 2 +- .../core/serializer/package-info.java | 2 +- .../core/style/StylerUtils.java | 4 +- .../core/style/ToStringCreator.java | 2 +- .../core/task/SyncTaskExecutor.java | 2 +- .../core/task/TaskExecutor.java | 2 +- .../core/type/StandardMethodMetadata.java | 4 +- .../core/type/classreading/package-info.java | 4 +- ...AbstractTypeHierarchyTraversingFilter.java | 4 +- .../type/filter/AnnotationTypeFilter.java | 2 +- .../type/filter/AssignableTypeFilter.java | 6 +- .../util/CachingMapDecorator.java | 2 +- .../util/ConcurrencyThrottleSupport.java | 4 +- .../org/springframework/util/DigestUtils.java | 2 +- .../util/PropertiesPersister.java | 6 +- .../util/SystemPropertyUtils.java | 2 +- .../org/springframework/util/TypeUtils.java | 2 +- .../util/comparator/ComparableComparator.java | 2 +- .../util/comparator/CompoundComparator.java | 2 +- .../springframework/util/xml/DomUtils.java | 2 +- .../util/xml/XMLEventStreamWriter.java | 4 +- .../beans/INestedTestBean.java | 6 +- .../org/springframework/beans/IOther.java | 6 +- .../springframework/beans/NestedTestBean.java | 6 +- .../core/AbstractControlFlowTests.java | 10 +- .../core/BridgeMethodResolverTests.java | 2 +- .../springframework/core/ConstantsTests.java | 2 +- .../core/DefaultControlFlowTests.java | 2 +- .../core/Jdk14ControlFlowTests.java | 2 +- ...ableTableParameterNameDiscovererTests.java | 2 +- .../core/NestedExceptionTests.java | 12 +- ...ioritizedParameterNameDiscovererTests.java | 18 +- .../core/annotation/AnnotationUtilsTests.java | 2 +- .../core/env/PropertySourceTests.java | 2 +- ...hMatchingResourcePatternResolverTests.java | 4 +- .../ResourceArrayPropertyEditorTests.java | 2 +- .../core/type/AnnotationMetadataTests.java | 2 +- .../core/type/AssignableTypeFilterTests.java | 6 +- .../type/CachingMetadataReaderLeakTest.java | 10 +- .../util/CompositeIteratorTests.java | 2 +- .../util/FileSystemUtilsTests.java | 26 +-- .../util/Log4jConfigurerTests.java | 6 +- .../util/MockLog4jAppender.java | 20 +-- .../util/PropertyPlaceholderHelperTests.java | 2 +- .../util/SerializationTestUtils.java | 26 +-- .../util/SerializationUtilsTests.java | 2 +- .../springframework/util/StopWatchTests.java | 36 ++-- .../util/xml/XMLEventStreamWriterTests.java | 2 +- .../expression/AccessException.java | 2 +- .../expression/BeanResolver.java | 1 - .../expression/ConstructorExecutor.java | 4 +- .../expression/EvaluationException.java | 10 +- .../expression/Expression.java | 22 +-- .../expression/ExpressionException.java | 10 +- .../ExpressionInvocationTargetException.java | 2 +- .../expression/MethodFilter.java | 20 +-- .../springframework/expression/Operation.java | 2 +- .../expression/OperatorOverloader.java | 2 +- .../expression/ParseException.java | 8 +- .../expression/ParserContext.java | 8 +- .../expression/PropertyAccessor.java | 2 +- .../expression/TypeComparator.java | 2 +- .../expression/TypedValue.java | 6 +- .../common/CompositeStringExpression.java | 10 +- .../expression/common/LiteralExpression.java | 2 +- .../common/TemplateParserContext.java | 2 +- .../expression/spel/ExpressionState.java | 30 ++-- .../spel/InternalParseException.java | 6 +- .../spel/SpelEvaluationException.java | 6 +- .../expression/spel/SpelMessage.java | 24 +-- .../expression/spel/SpelParseException.java | 4 +- .../expression/spel/ast/AstUtils.java | 4 +- .../expression/spel/ast/BeanReference.java | 6 +- .../spel/ast/CompoundExpression.java | 2 +- .../spel/ast/ConstructorReference.java | 4 +- .../expression/spel/ast/FormatHelper.java | 6 +- .../spel/ast/FunctionReference.java | 2 +- .../expression/spel/ast/InlineList.java | 2 +- .../expression/spel/ast/IntLiteral.java | 2 +- .../expression/spel/ast/Literal.java | 8 +- .../expression/spel/ast/LongLiteral.java | 2 +- .../expression/spel/ast/OpLT.java | 2 +- .../expression/spel/ast/OpMultiply.java | 2 +- .../expression/spel/ast/Operator.java | 4 +- .../expression/spel/ast/OperatorBetween.java | 2 +- .../expression/spel/ast/OperatorPower.java | 4 +- .../expression/spel/ast/Projection.java | 6 +- .../spel/ast/PropertyOrFieldReference.java | 16 +- .../expression/spel/ast/RealLiteral.java | 2 +- .../expression/spel/ast/Selection.java | 6 +- .../expression/spel/ast/TypeCode.java | 2 +- .../spel/ast/VariableReference.java | 4 +- .../spel/standard/SpelExpression.java | 36 ++-- .../spel/standard/SpelExpressionParser.java | 2 +- .../expression/spel/standard/Token.java | 14 +- .../expression/spel/standard/TokenKind.java | 4 +- .../expression/spel/standard/Tokenizer.java | 50 +++--- .../spel/support/BooleanTypedValue.java | 2 +- .../spel/support/ReflectionHelper.java | 32 ++-- .../ReflectiveConstructorResolver.java | 2 +- .../support/StandardEvaluationContext.java | 24 +-- .../spel/support/StandardTypeComparator.java | 4 +- .../spel/support/StandardTypeConverter.java | 4 +- .../spel/support/StandardTypeLocator.java | 6 +- .../spel/ArrayConstructorTests.java | 2 +- .../spel/ConstructorInvocationTests.java | 50 +++--- .../spel/DefaultComparatorUnitTests.java | 10 +- .../spel/ExpressionLanguageScenarioTests.java | 26 +-- .../expression/spel/ExpressionStateTests.java | 72 ++++---- ...essionTestsUsingCoreConversionService.java | 14 +- .../expression/spel/IndexingTests.java | 48 ++--- .../expression/spel/ListTests.java | 2 +- .../spel/LiteralExpressionTests.java | 2 +- .../expression/spel/LiteralTests.java | 4 +- .../expression/spel/MapAccessTests.java | 4 +- .../spel/OperatorOverloaderTests.java | 10 +- .../expression/spel/OperatorTests.java | 70 ++++---- .../expression/spel/ParsingTests.java | 18 +- .../expression/spel/PerformanceTests.java | 8 +- .../spel/ScenariosForSpringSecurity.java | 30 ++-- .../expression/spel/SetValueTests.java | 34 ++-- .../spel/SpelDocumentationTests.java | 164 +++++++++--------- .../expression/spel/SpelUtilities.java | 2 +- .../spel/StandardTypeLocatorTests.java | 8 +- .../spel/TemplateExpressionParsingTests.java | 36 ++-- .../spel/VariableAndFunctionTests.java | 4 +- .../spel/ast/FormatHelperTests.java | 4 +- .../spel/support/ReflectionHelperTests.java | 86 ++++----- .../spel/support/StandardComponentsTests.java | 8 +- .../spel/testresources/ArrayContainer.java | 4 +- .../spel/testresources/Company.java | 4 +- .../expression/spel/testresources/Fruit.java | 10 +- .../spel/testresources/Inventor.java | 18 +- .../expression/spel/testresources/Person.java | 6 +- .../spel/testresources/PlaceOfBirth.java | 12 +- .../spel/testresources/TestAddress.java | 2 +- .../spel/testresources/TestPerson.java | 2 +- .../TomcatInstrumentableClassLoader.java | 4 +- .../jdbc/BadSqlGrammarException.java | 2 +- .../jdbc/UncategorizedSQLException.java | 2 +- .../config/SortedResourcesFactoryBean.java | 2 +- .../core/BatchPreparedStatementSetter.java | 4 +- .../jdbc/core/CallableStatementCreator.java | 10 +- .../core/CallableStatementCreatorFactory.java | 2 +- .../jdbc/core/JdbcOperations.java | 6 +- .../jdbc/core/JdbcTemplate.java | 4 +- .../jdbc/core/ParameterMapper.java | 4 +- .../ParameterizedPreparedStatementSetter.java | 2 +- .../jdbc/core/PreparedStatementCreator.java | 8 +- .../jdbc/core/PreparedStatementSetter.java | 2 +- .../jdbc/core/ResultSetExtractor.java | 2 +- .../jdbc/core/RowCountCallbackHandler.java | 20 +-- .../springframework/jdbc/core/RowMapper.java | 5 +- .../jdbc/core/SqlProvider.java | 6 +- .../metadata/CallMetaDataProviderFactory.java | 2 +- .../metadata/GenericCallMetaDataProvider.java | 2 +- .../GenericTableMetaDataProvider.java | 4 +- .../metadata/HsqlTableMetaDataProvider.java | 2 +- .../metadata/OracleCallMetaDataProvider.java | 2 +- .../metadata/OracleTableMetaDataProvider.java | 8 +- .../core/metadata/TableMetaDataProvider.java | 2 +- .../NamedParameterJdbcDaoSupport.java | 4 +- .../core/namedparam/NamedParameterUtils.java | 4 +- .../jdbc/core/namedparam/package-info.java | 4 +- .../jdbc/core/simple/AbstractJdbcInsert.java | 2 +- .../jdbc/core/simple/SimpleJdbcCall.java | 2 +- .../core/simple/SimpleJdbcDaoSupport.java | 6 +- .../simple/SimpleJdbcInsertOperations.java | 6 +- .../core/simple/SimpleJdbcOperations.java | 2 +- .../jdbc/core/simple/SimpleJdbcTemplate.java | 6 +- .../jdbc/core/simple/package-info.java | 10 +- .../jdbc/core/support/SqlLobValue.java | 2 +- .../jdbc/datasource/DataSourceUtils.java | 2 +- .../jdbc/datasource/SmartDataSource.java | 4 +- .../DerbyEmbeddedDatabaseConfigurer.java | 2 +- .../embedded/EmbeddedDatabaseBuilder.java | 2 +- .../embedded/EmbeddedDatabaseConfigurer.java | 4 +- .../embedded/EmbeddedDatabaseType.java | 4 +- .../SimpleDriverDataSourceFactory.java | 10 +- .../datasource/init/DatabasePopulator.java | 2 +- .../lookup/BeanFactoryDataSourceLookup.java | 4 +- .../lookup/JndiDataSourceLookup.java | 2 +- .../lookup/MapDataSourceLookup.java | 4 +- .../jdbc/object/BatchSqlUpdate.java | 2 +- .../jdbc/object/GenericSqlQuery.java | 8 +- .../jdbc/object/GenericStoredProcedure.java | 6 +- .../jdbc/object/RdbmsOperation.java | 12 +- .../jdbc/object/SqlFunction.java | 4 +- .../jdbc/object/SqlOperation.java | 2 +- .../jdbc/object/SqlUpdate.java | 2 +- .../jdbc/object/StoredProcedure.java | 6 +- .../jdbc/object/UpdatableSqlQuery.java | 8 +- .../jdbc/object/package-info.java | 4 +- .../springframework/jdbc/package-info.java | 2 +- .../support/DatabaseMetaDataCallback.java | 12 +- .../jdbc/support/JdbcUtils.java | 4 +- .../jdbc/support/KeyHolder.java | 12 +- .../jdbc/support/SQLErrorCodes.java | 2 +- .../jdbc/support/SQLErrorCodesFactory.java | 6 +- .../SqlServerMaxValueIncrementer.java | 2 +- .../SybaseAnywhereMaxValueIncrementer.java | 2 +- .../SybaseMaxValueIncrementer.java | 2 +- .../support/incrementer/package-info.java | 2 +- .../jdbc/support/lob/package-info.java | 2 +- .../nativejdbc/JBossNativeJdbcExtractor.java | 2 +- .../jdbc/support/nativejdbc/package-info.java | 2 +- .../jdbc/support/package-info.java | 2 +- .../rowset/ResultSetWrappingSqlRowSet.java | 74 ++++---- .../ResultSetWrappingSqlRowSetMetaData.java | 4 +- .../jdbc/support/xml/XmlResultProvider.java | 2 +- .../beans/INestedTestBean.java | 6 +- .../org/springframework/beans/IOther.java | 6 +- .../springframework/beans/NestedTestBean.java | 6 +- .../jdbc/AbstractJdbcTests.java | 8 +- .../InitializeDatabaseIntegrationTests.java | 8 +- .../jdbc/core/JdbcTemplateQueryTests.java | 2 +- .../jdbc/core/JdbcTemplateTests.java | 36 ++-- .../namedparam/NamedParameterUtilsTests.java | 2 +- .../core/simple/SimpleJdbcInsertTests.java | 2 +- .../simple/TableMetaDataContextTests.java | 4 +- .../core/support/JdbcDaoSupportTests.java | 6 +- .../jdbc/core/support/LobSupportTests.java | 50 +++--- .../jdbc/core/support/SqlLobValueTests.java | 110 ++++++------ .../DataSourceTransactionManagerTests.java | 10 +- .../EmbeddedDatabaseFactoryTests.java | 10 +- .../BeanFactoryDataSourceLookupTests.java | 2 +- .../datasource/lookup/StubDataSource.java | 4 +- .../jdbc/object/CustomerMapper.java | 2 +- .../jdbc/object/GenericSqlQueryTests.java | 2 +- .../jdbc/object/RdbmsOperationTests.java | 4 +- .../jdbc/object/SqlQueryTests.java | 2 +- .../jdbc/object/SqlUpdateTests.java | 2 +- .../jdbc/object/StoredProcedureTests.java | 28 +-- .../support/CustomErrorCodeException.java | 6 +- .../DataFieldMaxValueIncrementerTests.java | 6 +- .../jdbc/support/DefaultLobHandlerTests.java | 6 +- .../jdbc/support/KeyHolderTests.java | 8 +- ...LErrorCodeSQLExceptionTranslatorTests.java | 16 +- .../SQLStateExceptionTranslatorTests.java | 26 +-- .../AbstractListenerContainerParser.java | 8 +- .../config/JcaListenerContainerParser.java | 4 +- .../config/JmsListenerContainerParser.java | 10 +- .../jms/config/JmsNamespaceHandler.java | 6 +- .../jms/core/JmsOperations.java | 2 +- .../jms/core/MessageCreator.java | 4 +- .../jms/core/ProducerCallback.java | 2 +- .../jms/core/SessionCallback.java | 4 +- .../jms/core/support/JmsGatewaySupport.java | 16 +- .../DefaultMessageListenerContainer.java | 4 +- .../jms/remoting/package-info.java | 2 +- .../destination/DestinationResolver.java | 2 +- .../beans/INestedTestBean.java | 6 +- .../org/springframework/beans/IOther.java | 6 +- .../springframework/beans/NestedTestBean.java | 6 +- .../jms/StubConnectionFactory.java | 8 +- .../jms/config/JmsNamespaceHandlerTests.java | 26 +-- .../core/support/JmsGatewaySupportTests.java | 4 +- ...AbstractMessageListenerContainerTests.java | 2 +- .../MessageListenerAdapter102Tests.java | 2 +- .../CallCountingTransactionManager.java | 2 +- .../mock/web/MockHttpServletResponse.java | 6 +- .../mock/web/MockHttpSession.java | 8 +- .../orm/hibernate3/HibernateOperations.java | 2 +- .../hibernate3/HibernateQueryException.java | 6 +- .../hibernate3/HibernateSystemException.java | 6 +- .../hibernate3/support/ClobStringType.java | 6 +- .../orm/ibatis/package-info.java | 2 +- .../orm/jdo/JdoSystemException.java | 8 +- .../orm/jdo/JdoUsageException.java | 6 +- .../orm/jpa/EntityManagerFactoryInfo.java | 4 +- .../orm/jpa/EntityManagerFactoryUtils.java | 4 +- .../springframework/orm/jpa/JpaDialect.java | 2 +- .../orm/jpa/JpaSystemException.java | 2 +- .../ClassFileTransformerAdapter.java | 4 +- .../orm/jpa/vendor/Database.java | 2 +- .../vendor/EclipseLinkJpaVendorAdapter.java | 2 +- .../orm/jpa/vendor/TopLinkJpaDialect.java | 2 +- .../beans/INestedTestBean.java | 6 +- .../org/springframework/beans/IOther.java | 6 +- .../springframework/beans/NestedTestBean.java | 6 +- .../mock/jndi/SimpleNamingContextBuilder.java | 2 +- .../HibernateTransactionManagerTests.java | 2 +- .../support/HibernateDaoSupportTests.java | 6 +- .../support/ScopedBeanInterceptorTests.java | 2 +- .../orm/jdo/JdoInterceptorTests.java | 6 +- .../orm/jdo/support/JdoDaoSupportTests.java | 6 +- .../OpenPersistenceManagerInViewTests.java | 2 +- ...rEntityManagerFactoryIntegrationTests.java | 34 ++-- ...AbstractEntityManagerFactoryBeanTests.java | 2 +- ...nManagedEntityManagerIntegrationTests.java | 46 ++--- ...rManagedEntityManagerIntegrationTests.java | 42 ++--- .../orm/jpa/DefaultJpaDialectTests.java | 10 +- .../EntityManagerFactoryBeanSupportTests.java | 12 +- .../jpa/EntityManagerFactoryUtilsTests.java | 8 +- .../orm/jpa/JpaInterceptorTests.java | 12 +- .../LocalEntityManagerFactoryBeanTests.java | 26 +-- .../orm/jpa/domain/DriversLicense.java | 8 +- .../orm/jpa/domain/Person.java | 2 +- ...eEntityManagerFactoryIntegrationTests.java | 2 +- ...oryWithAspectJWeavingIntegrationTests.java | 4 +- .../PersistenceXmlParsingTests.java | 4 +- .../orm/jpa/support/JpaDaoSupportTests.java | 8 +- ...kEntityManagerFactoryIntegrationTests.java | 2 +- .../test/jpa/AbstractJpaTests.java | 36 ++-- .../OrmXmlOverridingShadowingClassLoader.java | 2 +- .../oxm/castor/CastorMarshaller.java | 2 +- .../CastorMarshallerBeanDefinitionParser.java | 2 +- .../oxm/jaxb/Jaxb2Marshaller.java | 2 +- .../oxm/xmlbeans/XmlBeansMarshaller.java | 2 +- .../oxm/config/OxmNamespaceHandlerTests.java | 2 +- .../oxm/jaxb/Jaxb2MarshallerTests.java | 6 +- .../springframework/oxm/jaxb/Primitives.java | 2 +- .../oxm/jaxb/StandardClasses.java | 2 +- .../oxm/xstream/XStreamMarshallerTests.java | 4 +- .../web/struts/ContextLoaderPlugIn.java | 2 +- .../struts/DelegatingRequestProcessor.java | 2 +- .../DelegatingTilesRequestProcessor.java | 2 +- .../web/struts/SpringBindingActionForm.java | 2 +- .../view/tiles/TestComponentController.java | 6 +- .../result/ContentResultMatchersTests.java | 18 +- .../FlashAttributeResultMatchersTests.java | 2 +- .../mock/env/MockEnvironment.java | 2 +- .../mock/env/package-info.java | 2 +- .../mock/jndi/SimpleNamingContextBuilder.java | 2 +- .../mock/jndi/package-info.java | 2 +- .../mock/web/MockExpressionEvaluator.java | 4 +- .../mock/web/MockHttpServletRequest.java | 2 +- .../mock/web/MockHttpServletResponse.java | 10 +- .../mock/web/MockHttpSession.java | 10 +- .../mock/web/package-info.java | 2 +- .../mock/web/portlet/MockPortletConfig.java | 6 +- .../mock/web/portlet/MockPortletContext.java | 8 +- .../mock/web/portlet/MockPortletRequest.java | 8 +- .../mock/web/portlet/MockPortletSession.java | 2 +- .../mock/web/portlet/package-info.java | 2 +- .../springframework/test/AssertThrows.java | 2 +- .../test/annotation/DirtiesContext.java | 2 +- .../test/annotation/ExpectedException.java | 4 +- .../test/annotation/IfProfileValue.java | 6 +- .../test/annotation/NotTransactional.java | 2 +- .../ProfileValueSourceConfiguration.java | 4 +- .../test/annotation/ProfileValueUtils.java | 12 +- .../test/annotation/Repeat.java | 2 +- .../test/annotation/Rollback.java | 2 +- .../test/annotation/Timed.java | 2 +- .../test/context/ActiveProfiles.java | 8 +- .../test/context/ContextConfiguration.java | 34 ++-- .../test/context/ContextLoader.java | 2 +- .../test/context/ContextLoaderUtils.java | 14 +- .../context/MergedContextConfiguration.java | 8 +- .../test/context/SmartContextLoader.java | 2 +- .../test/context/TestContext.java | 2 +- .../test/context/TestContextManager.java | 2 +- .../test/context/TestExecutionListener.java | 12 +- .../test/context/TestExecutionListeners.java | 8 +- .../AbstractJUnit38SpringContextTests.java | 14 +- .../AbstractJUnit4SpringContextTests.java | 2 +- ...TransactionalJUnit4SpringContextTests.java | 2 +- .../junit4/SpringJUnit4ClassRunner.java | 2 +- .../RunAfterTestClassCallbacks.java | 4 +- .../RunBeforeTestClassCallbacks.java | 4 +- .../RunBeforeTestMethodCallbacks.java | 4 +- .../statements/SpringFailOnTimeout.java | 4 +- .../junit4/statements/SpringRepeat.java | 4 +- .../test/context/package-info.java | 2 +- .../support/AbstractContextLoader.java | 2 +- .../AbstractDelegatingSmartContextLoader.java | 20 +-- .../AbstractTestExecutionListener.java | 2 +- .../AnnotationConfigContextLoader.java | 6 +- .../support/DelegatingSmartContextLoader.java | 2 +- .../DirtiesContextTestExecutionListener.java | 2 +- .../AbstractTestNGSpringContextTests.java | 16 +- .../context/transaction/AfterTransaction.java | 2 +- .../transaction/BeforeTransaction.java | 2 +- .../web/AbstractGenericWebContextLoader.java | 2 +- .../web/AnnotationConfigWebContextLoader.java | 6 +- .../web/ServletTestExecutionListener.java | 4 +- .../test/context/web/WebAppConfiguration.java | 6 +- .../web/WebDelegatingSmartContextLoader.java | 2 +- .../web/WebMergedContextConfiguration.java | 2 +- .../test/jdbc/JdbcTestUtils.java | 2 +- .../test/jpa/AbstractJpaTests.java | 32 ++-- .../OrmXmlOverridingShadowingClassLoader.java | 2 +- .../test/util/ReflectionTestUtils.java | 40 ++--- .../test/web/AbstractModelAndViewTests.java | 6 +- .../test/web/ModelAndViewAssert.java | 16 +- .../org/springframework/beans/Employee.java | 12 +- .../beans/INestedTestBean.java | 6 +- .../org/springframework/beans/IOther.java | 6 +- .../springframework/beans/NestedTestBean.java | 6 +- .../org/springframework/beans/TestBean.java | 2 +- ...stractSpr3350SingleSpringContextTests.java | 4 +- ...DependencyInjectionSpringContextTests.java | 2 +- .../test/Spr3264SingleSpringContextTests.java | 2 +- ...alueAnnotationAwareTransactionalTests.java | 2 +- .../annotation/ProfileValueUtilsTests.java | 2 +- .../ClassLevelDirtiesContextTests.java | 4 +- .../test/context/ContextLoaderUtilsTests.java | 2 +- .../MergedContextConfigurationTests.java | 4 +- .../SpringRunnerContextCacheTests.java | 6 +- .../context/TestContextCacheKeyTests.java | 4 +- .../test/context/TestContextManagerTests.java | 6 +- .../context/TestExecutionListenersTests.java | 2 +- ...dingPropertiesAndInheritedLoaderTests.java | 2 +- ...ithPropertiesExtendingPropertiesTests.java | 2 +- ...ransactionalJUnit38SpringContextTests.java | 2 +- .../FailingBeforeAndAfterMethodsTests.java | 2 +- ...ProfileValueJUnit38SpringContextTests.java | 2 +- .../RepeatedJUnit38SpringContextTests.java | 2 +- ...athSpringJUnit4ClassRunnerAppCtxTests.java | 2 +- ...bstractTransactionalSpringRunnerTests.java | 2 +- ...ssLevelTransactionalSpringRunnerTests.java | 2 +- ...TransactionalJUnit4SpringContextTests.java | 2 +- ...ltContextLoaderClassSpringRunnerTests.java | 2 +- .../EnabledAndIgnoredSpringRunnerTests.java | 2 +- .../ExpectedExceptionSpringRunnerTests.java | 2 +- .../FailingBeforeAndAfterMethodsTests.java | 2 +- ...edProfileValueSourceSpringRunnerTests.java | 2 +- ...odLevelTransactionalSpringRunnerTests.java | 2 +- ...cesSpringJUnit4ClassRunnerAppCtxTests.java | 2 +- .../junit4/RepeatedSpringRunnerTests.java | 2 +- .../SpringJUnit47ClassRunnerRuleTests.java | 2 +- .../SpringJUnit4ClassRunnerAppCtxTests.java | 6 +- .../junit4/SpringJUnit4SuiteTests.java | 6 +- .../junit4/TimedSpringRunnerTests.java | 2 +- .../TimedTransactionalSpringRunnerTests.java | 2 +- .../context/junit4/TrackingRunListener.java | 2 +- ...figSpringJUnit4ClassRunnerAppCtxTests.java | 6 +- ...ingDefaultConfigClassesInheritedTests.java | 4 +- ...ngExplicitConfigClassesInheritedTests.java | 4 +- .../DefaultConfigClassesBaseTests.java | 4 +- .../DefaultConfigClassesInheritedTests.java | 4 +- ...ingDefaultConfigClassesInheritedTests.java | 2 +- ...ngExplicitConfigClassesInheritedTests.java | 2 +- ...ltLoaderDefaultConfigClassesBaseTests.java | 2 +- ...derDefaultConfigClassesInheritedTests.java | 2 +- ...tLoaderExplicitConfigClassesBaseTests.java | 2 +- ...erExplicitConfigClassesInheritedTests.java | 2 +- .../ExplicitConfigClassesBaseTests.java | 4 +- .../ExplicitConfigClassesInheritedTests.java | 4 +- .../annotation/PojoAndStringConfig.java | 4 +- .../orm/HibernateSessionFlushingTests.java | 2 +- .../junit4/orm/domain/DriversLicense.java | 2 +- .../context/junit4/orm/domain/Person.java | 2 +- .../orm/repository/PersonRepository.java | 2 +- .../hibernate/HibernatePersonRepository.java | 2 +- .../junit4/orm/service/PersonService.java | 2 +- .../service/impl/StandardPersonService.java | 2 +- .../junit4/spr4868/Jsr250LifecycleTests.java | 8 +- .../spr6128/AutowiredQualifierTests.java | 2 +- ...ransactionalAnnotatedConfigClassTests.java | 2 +- .../spr9051/AtBeanLiteModeScopeTests.java | 2 +- .../context/junit4/spr9051/LifecycleBean.java | 2 +- ...edConfigClassWithAtConfigurationTests.java | 4 +- ...figClassesWithoutAtConfigurationTests.java | 12 +- .../AnnotatedFooConfigInnerClassTestCase.java | 2 +- .../AnnotationConfigContextLoaderTests.java | 2 +- ...ontextConfigurationInnerClassTestCase.java | 2 +- .../DelegatingSmartContextLoaderTests.java | 2 +- .../FinalConfigInnerClassTestCase.java | 2 +- ...pleStaticConfigurationClassesTestCase.java | 2 +- .../NonStaticConfigInnerClassesTestCase.java | 2 +- ...ainVanillaFooConfigInnerClassTestCase.java | 2 +- .../PrivateConfigInnerClassTestCase.java | 2 +- ...TransactionalTestNGSpringContextTests.java | 4 +- ...TransactionalTestNGSpringContextTests.java | 2 +- ...TransactionalTestNGSpringContextTests.java | 2 +- .../FailingBeforeAndAfterMethodsTests.java | 2 +- ...TransactionalTestNGSpringContextTests.java | 2 +- .../web/WebContextLoaderTestSuite.java | 2 +- .../test/jdbc/JdbcTestUtilsTests.java | 2 +- .../test/util/ReflectionTestUtilsTests.java | 2 +- .../test/util/subpackage/LegacyEntity.java | 2 +- .../test/util/subpackage/Person.java | 2 +- .../dao/DataRetrievalFailureException.java | 2 +- ...ectUpdateSemanticsDataAccessException.java | 2 +- ...validDataAccessResourceUsageException.java | 4 +- .../org/springframework/dao/package-info.java | 4 +- ...ChainedPersistenceExceptionTranslator.java | 2 +- .../dao/support/DataAccessUtils.java | 4 +- .../PersistenceExceptionTranslator.java | 2 +- .../cci/CannotGetCciConnectionException.java | 6 +- .../cci/InvalidResultSetAccessException.java | 8 +- .../connection/ConnectionFactoryUtils.java | 2 +- .../jca/cci/connection/ConnectionHolder.java | 6 +- .../jca/cci/core/ConnectionCallback.java | 4 +- .../jca/cci/core/InteractionCallback.java | 4 +- .../jca/cci/core/RecordCreator.java | 6 +- .../jca/cci/core/RecordExtractor.java | 6 +- .../jca/cci/core/support/CommAreaRecord.java | 6 +- .../cci/object/MappingCommAreaOperation.java | 6 +- .../cci/object/MappingRecordOperation.java | 6 +- .../transaction/TransactionDefinition.java | 4 +- .../TransactionUsageException.java | 2 +- .../transaction/annotation/Isolation.java | 6 +- .../transaction/annotation/Propagation.java | 8 +- ...MatchAlwaysTransactionAttributeSource.java | 2 +- .../MethodMapTransactionAttributeSource.java | 2 +- .../interceptor/NoRollbackRuleAttribute.java | 6 +- .../interceptor/RollbackRuleAttribute.java | 2 +- .../RuleBasedTransactionAttribute.java | 2 +- .../interceptor/TransactionAttribute.java | 2 +- .../TransactionAttributeSourceAdvisor.java | 2 +- .../transaction/interceptor/package-info.java | 4 +- .../AbstractPlatformTransactionManager.java | 2 +- .../support/SimpleTransactionStatus.java | 2 +- .../support/TransactionSynchronization.java | 2 +- .../TransactionSynchronizationManager.java | 2 +- .../beans/INestedTestBean.java | 6 +- .../org/springframework/beans/IOther.java | 6 +- .../springframework/beans/NestedTestBean.java | 6 +- ...edPersistenceExceptionTranslatorTests.java | 16 +- .../jca/cci/CciLocalTransactionTests.java | 10 +- .../jca/cci/CciTemplateTests.java | 6 +- .../jca/cci/EisOperationTests.java | 8 +- .../mock/jndi/SimpleNamingContextBuilder.java | 2 +- .../CallCountingTransactionManager.java | 2 +- .../JtaTransactionManagerTests.java | 2 +- .../transaction/TestTransactionManager.java | 6 +- .../transaction/TxNamespaceHandlerTests.java | 4 +- ...tationTransactionAttributeSourceTests.java | 30 ++-- ...ationTransactionNamespaceHandlerTests.java | 6 +- .../AbstractTransactionAspectTests.java | 46 ++--- .../BeanFactoryTransactionTests.java | 24 +-- .../interceptor/ImplementsNoInterfaces.java | 14 +- .../interceptor/MyRuntimeException.java | 2 +- .../PlatformTransactionManagerFacade.java | 8 +- .../interceptor/RollbackRuleTests.java | 6 +- .../TransactionAttributeEditorTests.java | 6 +- ...ransactionAttributeSourceAdvisorTests.java | 12 +- ...TransactionAttributeSourceEditorTests.java | 10 +- .../TransactionInterceptorTests.java | 16 +- ...aTransactionManagerSerializationTests.java | 6 +- .../client/InterceptingClientHttpRequest.java | 2 +- .../caucho/HessianClientInterceptor.java | 2 +- .../remoting/caucho/package-info.java | 4 +- .../remoting/httpinvoker/package-info.java | 2 +- .../jaxrpc/ServletEndpointSupport.java | 2 +- .../bind/MethodArgumentNotValidException.java | 4 +- .../web/bind/ServletRequestDataBinder.java | 2 +- .../web/bind/WebDataBinder.java | 12 +- .../web/bind/annotation/RequestPart.java | 28 +-- .../support/HandlerMethodInvoker.java | 2 +- .../support/DefaultDataBinderFactory.java | 14 +- .../bind/support/WebDataBinderFactory.java | 12 +- .../web/context/WebApplicationContext.java | 4 +- .../AbstractRequestAttributesScope.java | 2 +- .../web/context/request/FacesWebRequest.java | 2 +- .../context/request/RequestContextHolder.java | 2 +- .../context/request/ServletWebRequest.java | 2 +- .../web/context/request/WebRequest.java | 4 +- .../support/ServletContextPropertySource.java | 2 +- .../web/filter/CompositeFilter.java | 12 +- .../web/jsf/el/package-info.java | 2 +- .../springframework/web/jsf/package-info.java | 2 +- .../web/method/HandlerMethodSelector.java | 8 +- ...ractCookieValueMethodArgumentResolver.java | 18 +- ...ExpressionValueMethodArgumentResolver.java | 16 +- .../InitBinderDataBinderFactory.java | 8 +- .../web/method/annotation/ModelFactory.java | 62 +++---- .../RequestHeaderMethodArgumentResolver.java | 14 +- .../HandlerMethodArgumentResolver.java | 26 +-- .../HandlerMethodReturnValueHandler.java | 22 +-- .../multipart/support/MultipartFilter.java | 2 +- .../RequestPartServletServerHttpRequest.java | 8 +- .../support/StringMultipartFileEditor.java | 2 +- .../springframework/web/util/TagUtils.java | 6 +- .../springframework/web/util/UriUtils.java | 8 +- .../beans/INestedTestBean.java | 6 +- .../org/springframework/beans/IOther.java | 6 +- .../springframework/beans/NestedTestBean.java | 6 +- .../org/springframework/beans/Person.java | 6 +- .../beans/SerializablePerson.java | 6 +- .../converter/HttpMessageConverterTests.java | 2 +- .../StringHttpMessageConverterTests.java | 2 +- ...b2RootElementHttpMessageConverterTest.java | 4 +- .../xml/SourceHttpMessageConverterTests.java | 2 +- .../mock/web/test/MockHttpSession.java | 10 +- .../RequestAndSessionScopedBeanTests.java | 2 +- .../web/filter/RequestContextFilterTests.java | 8 +- ...ookieValueMethodArgumentResolverTests.java | 8 +- ...orsMethodHandlerArgumentResolverTests.java | 8 +- .../ExceptionHandlerMethodResolverTests.java | 10 +- ...ssionValueMethodArgumentResolverTests.java | 12 +- .../InitBinderDataBinderFactoryTests.java | 34 ++-- .../annotation/MapMethodProcessorTests.java | 16 +- .../method/annotation/ModelFactoryTests.java | 38 ++-- .../annotation/ModelMethodProcessorTests.java | 20 +-- ...tHeaderMapMethodArgumentResolverTests.java | 8 +- ...uestHeaderMethodArgumentResolverTests.java | 4 +- ...stParamMapMethodArgumentResolverTests.java | 8 +- ...questParamMethodArgumentResolverTests.java | 10 +- .../WebArgumentResolverAdapterTests.java | 6 +- ...rMethodArgumentResolverCompositeTests.java | 14 +- ...ethodReturnValueHandlerCompositeTests.java | 22 +-- .../support/ModelAndViewContainerTests.java | 18 +- .../method/support/StubArgumentResolver.java | 4 +- .../support/StubReturnValueHandler.java | 8 +- ...uestPartServletServerHttpRequestTests.java | 10 +- .../web/util/Log4jWebConfigurerTests.java | 6 +- .../web/util/MockLog4jAppender.java | 6 +- .../web/util/TagUtilsTests.java | 6 +- .../web/util/UriComponentsTests.java | 4 +- .../web/util/UriTemplateTests.java | 4 +- .../web/util/UriUtilsTests.java | 2 +- .../web/portlet/FrameworkPortlet.java | 4 +- .../web/portlet/GenericPortletBean.java | 8 +- .../web/portlet/HandlerAdapter.java | 4 +- .../web/portlet/HandlerMapping.java | 2 +- .../ModelAndViewDefiningException.java | 6 +- .../PortletApplicationContextUtils.java | 2 +- .../PortletApplicationObjectSupport.java | 6 +- .../portlet/context/PortletConfigAware.java | 6 +- .../portlet/context/PortletContextAware.java | 6 +- .../context/PortletContextAwareProcessor.java | 2 +- .../portlet/context/PortletWebRequest.java | 2 +- .../StaticPortletApplicationContext.java | 2 +- .../handler/ParameterMappingInterceptor.java | 2 +- .../handler/PortletContentGenerator.java | 4 +- .../handler/SimplePortletHandlerAdapter.java | 2 +- .../DefaultMultipartActionRequest.java | 2 +- .../multipart/PortletMultipartResolver.java | 6 +- .../web/portlet/mvc/AbstractController.java | 2 +- .../portlet/mvc/AbstractFormController.java | 6 +- .../mvc/AbstractWizardFormController.java | 6 +- .../portlet/mvc/BaseCommandController.java | 24 +-- .../web/portlet/mvc/Controller.java | 6 +- .../mvc/ParameterizableViewController.java | 2 +- .../web/portlet/util/PortletUtils.java | 6 +- .../beans/INestedTestBean.java | 6 +- .../org/springframework/beans/IOther.java | 6 +- .../springframework/beans/NestedTestBean.java | 6 +- .../beans/factory/MustBeInitialized.java | 6 +- .../springframework/context/ACATester.java | 8 +- .../AbstractApplicationContextTests.java | 6 +- .../context/LifecycleContextBean.java | 12 +- .../mock/web/MockHttpServletResponse.java | 10 +- .../mock/web/MockHttpSession.java | 10 +- .../mock/web/portlet/MockPortletConfig.java | 6 +- .../mock/web/portlet/MockPortletContext.java | 8 +- .../ComplexPortletApplicationContext.java | 34 ++-- .../web/portlet/GenericPortletBeanTests.java | 16 +- .../SimplePortletApplicationContext.java | 4 +- ...etRequestParameterPropertyValuesTests.java | 6 +- .../bind/PortletRequestUtilsTests.java | 2 +- ...AbstractXmlWebApplicationContextTests.java | 6 +- .../context/PortletConfigAwareBean.java | 4 +- .../context/PortletContextAwareBean.java | 6 +- .../PortletContextAwareProcessorTests.java | 32 ++-- .../XmlPortletApplicationContextTests.java | 10 +- .../handler/ParameterHandlerMappingTests.java | 30 ++-- .../ParameterMappingInterceptorTests.java | 10 +- .../PortletModeHandlerMappingTests.java | 26 +-- ...rtletModeParameterHandlerMappingTests.java | 28 +-- .../SimpleMappingExceptionResolverTests.java | 42 ++--- ...UserRoleAuthorizationInterceptorTests.java | 2 +- .../portlet/mvc/CommandControllerTests.java | 54 +++--- .../ParameterizableViewControllerTests.java | 4 +- .../PortletModeNameViewControllerTests.java | 8 +- .../web/servlet/HandlerAdapter.java | 6 +- .../web/servlet/HttpServletBean.java | 4 +- .../ModelAndViewDefiningException.java | 6 +- .../web/servlet/ResourceServlet.java | 2 +- .../web/servlet/SmartView.java | 4 +- .../web/servlet/ThemeResolver.java | 6 +- .../web/servlet/ViewResolver.java | 4 +- ...ultServletHandlerBeanDefinitionParser.java | 24 +-- .../servlet/config/MvcNamespaceHandler.java | 2 +- .../web/servlet/config/MvcNamespaceUtils.java | 16 +- .../ViewControllerBeanDefinitionParser.java | 10 +- .../DefaultServletHandlerConfigurer.java | 10 +- .../config/annotation/EnableWebMvc.java | 16 +- .../ResourceHandlerRegistration.java | 16 +- .../annotation/ResourceHandlerRegistry.java | 12 +- .../ViewControllerRegistration.java | 12 +- .../annotation/ViewControllerRegistry.java | 16 +- .../ConversionServiceExposingInterceptor.java | 2 +- .../HandlerExceptionResolverComposite.java | 4 +- .../handler/SimpleServletHandlerAdapter.java | 2 +- .../handler/SimpleUrlHandlerMapping.java | 2 +- .../i18n/AcceptHeaderLocaleResolver.java | 2 +- .../servlet/i18n/SessionLocaleResolver.java | 2 +- .../web/servlet/mvc/AbstractController.java | 4 +- .../servlet/mvc/AbstractFormController.java | 2 +- .../servlet/mvc/BaseCommandController.java | 4 +- .../mvc/ParameterizableViewController.java | 2 +- .../mvc/ServletForwardingController.java | 2 +- .../mvc/UrlFilenameViewController.java | 2 +- .../AbstractNameValueExpression.java | 6 +- .../condition/AbstractRequestCondition.java | 10 +- .../condition/HeadersRequestCondition.java | 40 ++--- .../mvc/condition/MediaTypeExpression.java | 6 +- .../mvc/condition/NameValueExpression.java | 4 +- .../mvc/condition/ParamsRequestCondition.java | 28 +-- .../mvc/condition/RequestCondition.java | 2 +- .../method/AbstractHandlerMethodAdapter.java | 8 +- .../mvc/method/RequestMappingInfo.java | 34 ++-- ...dViewResolverMethodReturnValueHandler.java | 6 +- .../RequestMappingHandlerMapping.java | 2 +- ...vletCookieValueMethodArgumentResolver.java | 2 +- .../ServletModelAttributeMethodProcessor.java | 4 +- .../ServletRequestMethodArgumentResolver.java | 6 +- ...ServletResponseMethodArgumentResolver.java | 2 +- .../ServletWebArgumentResolverAdapter.java | 8 +- .../mvc/multiaction/MethodNameResolver.java | 2 +- .../ParameterMethodNameResolver.java | 14 +- .../PropertiesMethodNameResolver.java | 2 +- .../servlet/mvc/multiaction/package-info.java | 8 +- .../web/servlet/mvc/package-info.java | 6 +- .../mvc/support/RedirectAttributes.java | 32 ++-- .../support/RedirectAttributesModelMap.java | 12 +- .../web/servlet/package-info.java | 2 +- .../web/servlet/support/RequestContext.java | 2 +- .../servlet/support/RequestContextUtils.java | 4 +- .../support/RequestDataValueProcessor.java | 12 +- .../web/servlet/support/package-info.java | 2 +- .../web/servlet/tags/EvalTag.java | 4 +- .../web/servlet/tags/HtmlEscapeTag.java | 6 +- .../web/servlet/tags/MessageTag.java | 8 +- .../web/servlet/tags/Param.java | 14 +- .../web/servlet/tags/ParamTag.java | 18 +- .../servlet/tags/RequestContextAwareTag.java | 4 +- .../web/servlet/tags/UrlTag.java | 34 ++-- .../tags/form/AbstractCheckedElementTag.java | 2 +- .../tags/form/AbstractHtmlElementBodyTag.java | 2 +- .../tags/form/AbstractHtmlElementTag.java | 24 +-- .../form/AbstractHtmlInputElementTag.java | 2 +- .../form/AbstractMultiCheckedElementTag.java | 6 +- .../web/servlet/tags/form/ButtonTag.java | 10 +- .../web/servlet/tags/form/HiddenInputTag.java | 2 +- .../web/servlet/tags/form/InputTag.java | 6 +- .../web/servlet/tags/form/LabelTag.java | 2 +- .../web/servlet/tags/form/OptionTag.java | 16 +- .../web/servlet/tags/form/OptionWriter.java | 10 +- .../web/servlet/tags/form/OptionsTag.java | 12 +- .../web/servlet/tags/form/RadioButtonTag.java | 2 +- .../web/servlet/tags/form/SelectTag.java | 2 +- .../tags/form/SelectedValueComparator.java | 6 +- .../servlet/theme/CookieThemeResolver.java | 6 +- .../servlet/theme/SessionThemeResolver.java | 6 +- .../web/servlet/theme/package-info.java | 8 +- .../view/AbstractCachingViewResolver.java | 4 +- .../web/servlet/view/RedirectView.java | 42 ++--- .../view/ResourceBundleViewResolver.java | 4 +- .../servlet/view/UrlBasedViewResolver.java | 6 +- .../view/document/AbstractJExcelView.java | 20 +-- .../view/document/AbstractPdfView.java | 2 +- .../JasperReportsViewResolver.java | 2 +- .../web/servlet/view/package-info.java | 2 +- .../servlet/view/velocity/VelocityConfig.java | 8 +- .../servlet/view/xslt/AbstractXsltView.java | 4 +- .../beans/INestedTestBean.java | 6 +- .../org/springframework/beans/IOther.java | 6 +- .../springframework/beans/NestedTestBean.java | 6 +- .../org/springframework/beans/Person.java | 6 +- .../beans/SerializablePerson.java | 6 +- .../beans/factory/MustBeInitialized.java | 6 +- .../beans/factory/access/TestBean.java | 8 +- .../springframework/context/ACATester.java | 8 +- .../context/LifecycleContextBean.java | 12 +- .../XmlWebApplicationContextTests.java | 8 +- .../WebApplicationObjectSupportTests.java | 6 +- .../web/servlet/FlashMapTests.java | 16 +- .../servlet/SimpleWebApplicationContext.java | 6 +- ...tationDrivenBeanDefinitionParserTests.java | 4 +- .../ResourceHandlerRegistryTests.java | 2 +- .../ViewControllerRegistryTests.java | 2 +- .../BeanNameUrlHandlerMappingTests.java | 6 +- .../web/servlet/i18n/LocaleResolverTests.java | 6 +- .../servlet/mvc/CommandControllerTests.java | 12 +- .../ParameterizableViewControllerTests.java | 4 +- .../mvc/WebContentInterceptorTests.java | 2 +- .../ServletAnnotationControllerTests.java | 14 +- .../ServletAnnotationMappingUtilsTests.java | 10 +- .../servlet/mvc/annotation/Spr7766Tests.java | 2 +- .../servlet/mvc/annotation/Spr7839Tests.java | 24 +-- .../HeadersRequestConditionTests.java | 2 +- .../mvc/method/RequestMappingInfoTests.java | 132 +++++++------- ...ResolverMethodReturnValueHandlerTests.java | 16 +- ...thVariableMethodArgumentResolverTests.java | 20 +-- ...equestPartMethodArgumentResolverTests.java | 36 ++-- ...vetModelAttributeMethodProcessorTests.java | 40 ++--- ...ookieValueMethodArgumentResolverTests.java | 4 +- ...letRequestMethodArgumentResolverTests.java | 8 +- ...etResponseMethodArgumentResolverTests.java | 2 +- ...ntsBuilderMethodArgumentResolverTests.java | 14 +- .../ViewMethodReturnValueHandlerTests.java | 10 +- ...ViewNameMethodReturnValueHandlerTests.java | 12 +- .../RedirectAttributesModelMapTests.java | 36 ++-- .../servlet/support/RequestContextTests.java | 6 +- .../RequestDataValueProcessorWrapper.java | 2 +- .../ServletUriComponentsBuilderTests.java | 18 +- .../web/servlet/tags/EvalTagTests.java | 8 +- ...ssageTagOutsideDispatcherServletTests.java | 6 +- .../web/servlet/tags/MessageTagTests.java | 12 +- .../web/servlet/tags/ParamTagTests.java | 8 +- .../web/servlet/tags/ParamTests.java | 8 +- .../web/servlet/tags/ThemeTagTests.java | 6 +- .../web/servlet/tags/UrlTagTests.java | 8 +- .../form/AbstractHtmlElementTagTests.java | 2 +- .../web/servlet/tags/form/ButtonTagTests.java | 12 +- .../servlet/tags/form/CheckboxTagTests.java | 10 +- .../servlet/tags/form/CheckboxesTagTests.java | 28 +-- .../web/servlet/tags/form/ErrorsTagTests.java | 4 +- .../web/servlet/tags/form/FormTagTests.java | 42 ++--- .../tags/form/HiddenInputTagTests.java | 10 +- .../web/servlet/tags/form/InputTagTests.java | 6 +- .../web/servlet/tags/form/LabelTagTests.java | 6 +- .../servlet/tags/form/OptionTagEnumTests.java | 4 +- .../web/servlet/tags/form/OptionTagTests.java | 8 +- .../servlet/tags/form/OptionsTagTests.java | 24 +-- .../tags/form/RadioButtonTagTests.java | 8 +- .../tags/form/RadioButtonsTagTests.java | 18 +- .../web/servlet/tags/form/SelectTagTests.java | 6 +- .../web/servlet/tags/form/TestTypes.java | 4 +- .../servlet/tags/form/TextareaTagTests.java | 6 +- .../web/servlet/theme/ThemeResolverTests.java | 6 +- .../web/servlet/view/BaseViewTests.java | 68 ++++---- .../view/InternalResourceViewTests.java | 2 +- .../web/servlet/view/RedirectViewTests.java | 20 +-- .../view/RedirectViewUriTemplateTests.java | 12 +- ...esourceBundleViewResolverNoCacheTests.java | 8 +- .../view/ResourceBundleViewResolverTests.java | 4 +- .../web/servlet/view/ViewResolverTests.java | 10 +- .../servlet/view/document/ExcelViewTests.java | 12 +- ...rableJasperReportsViewWithStreamTests.java | 1 - ...rableJasperReportsViewWithWriterTests.java | 2 +- .../view/velocity/VelocityViewTests.java | 8 +- .../servlet/view/xslt/TestXsltViewTests.java | 4 +- ...NamespaceHandlerScopeIntegrationTests.java | 6 +- ...visorAutoProxyCreatorIntegrationTests.java | 28 +-- .../ltw/ComponentScanningWithLTWTests.java | 4 +- ...efinitionScannerScopeIntegrationTests.java | 6 +- .../expression/spel/support/Spr7538Tests.java | 18 +- .../CallCountingTransactionManager.java | 2 +- .../advice/CountingAfterReturningAdvice.java | 6 +- .../test/advice/CountingBeforeAdvice.java | 6 +- src/test/java/test/advice/MethodCounter.java | 2 +- src/test/java/test/beans/INestedTestBean.java | 8 +- src/test/java/test/beans/IOther.java | 8 +- src/test/java/test/beans/ITestBean.java | 2 +- src/test/java/test/beans/NestedTestBean.java | 6 +- .../java/test/interceptor/NopInterceptor.java | 12 +- .../SerializableNopInterceptor.java | 16 +- .../test/util/SerializationTestUtils.java | 6 +- 1400 files changed, 5902 insertions(+), 5905 deletions(-) diff --git a/gradle/jdiff/Null.java b/gradle/jdiff/Null.java index 019b71895da..2d8649e544e 100644 --- a/gradle/jdiff/Null.java +++ b/gradle/jdiff/Null.java @@ -1,6 +1,6 @@ -/** +/** * This class is used only as a "null" argument for Javadoc when comparing - * two API files. Javadoc has to have a package, .java or .class file as an + * two API files. Javadoc has to have a package, .java or .class file as an * argument, even though JDiff doesn't use it. */ public class Null { diff --git a/spring-aop/src/main/java/org/springframework/aop/Advisor.java b/spring-aop/src/main/java/org/springframework/aop/Advisor.java index 21c9c8301b6..ff4e1745d8e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/Advisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/Advisor.java @@ -18,14 +18,14 @@ package org.springframework.aop; import org.aopalliance.aop.Advice; -/** +/** * Base interface holding AOP advice (action to take at a joinpoint) - * and a filter determining the applicability of the advice (such as + * and a filter determining the applicability of the advice (such as * a pointcut). This interface is not for use by Spring users, but to * allow for commonality in support for different types of advice. * *

Spring AOP is based around around advice delivered via method - * interception, compliant with the AOP Alliance interception API. + * interception, compliant with the AOP Alliance interception API. * The Advisor interface allows support for different types of advice, * such as before and after advice, which need not be * implemented using interception. diff --git a/spring-aop/src/main/java/org/springframework/aop/DynamicIntroductionAdvice.java b/spring-aop/src/main/java/org/springframework/aop/DynamicIntroductionAdvice.java index 4fcd874cb09..37f9cb75006 100644 --- a/spring-aop/src/main/java/org/springframework/aop/DynamicIntroductionAdvice.java +++ b/spring-aop/src/main/java/org/springframework/aop/DynamicIntroductionAdvice.java @@ -18,7 +18,7 @@ package org.springframework.aop; import org.aopalliance.aop.Advice; -/** +/** * Subinterface of AOP Alliance Advice that allows additional interfaces * to be implemented by an Advice, and available via a proxy using that * interceptor. This is a fundamental AOP concept called introduction. @@ -37,7 +37,7 @@ import org.aopalliance.aop.Advice; * @see IntroductionAdvisor */ public interface DynamicIntroductionAdvice extends Advice { - + /** * Does this introduction advice implement the given interface? * @param intf the interface to check diff --git a/spring-aop/src/main/java/org/springframework/aop/IntroductionAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/IntroductionAdvisor.java index 9e71253ef0b..aa49595d51a 100644 --- a/spring-aop/src/main/java/org/springframework/aop/IntroductionAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/IntroductionAdvisor.java @@ -30,7 +30,7 @@ package org.springframework.aop; * @see IntroductionInterceptor */ public interface IntroductionAdvisor extends Advisor, IntroductionInfo { - + /** * Return the filter determining which target classes this introduction * should apply to. @@ -39,7 +39,7 @@ public interface IntroductionAdvisor extends Advisor, IntroductionInfo { * @return the class filter */ ClassFilter getClassFilter(); - + /** * Can the advised interfaces be implemented by the introduction advice? * Invoked before adding an IntroductionAdvisor. diff --git a/spring-aop/src/main/java/org/springframework/aop/IntroductionInfo.java b/spring-aop/src/main/java/org/springframework/aop/IntroductionInfo.java index c10e63c81d9..36ac7ea99be 100644 --- a/spring-aop/src/main/java/org/springframework/aop/IntroductionInfo.java +++ b/spring-aop/src/main/java/org/springframework/aop/IntroductionInfo.java @@ -29,7 +29,7 @@ package org.springframework.aop; * @since 1.1.1 */ public interface IntroductionInfo { - + /** * Return the additional interfaces introduced by this Advisor or Advice. * @return the introduced interfaces diff --git a/spring-aop/src/main/java/org/springframework/aop/MethodBeforeAdvice.java b/spring-aop/src/main/java/org/springframework/aop/MethodBeforeAdvice.java index 9383af683cf..63ee9c9dff9 100644 --- a/spring-aop/src/main/java/org/springframework/aop/MethodBeforeAdvice.java +++ b/spring-aop/src/main/java/org/springframework/aop/MethodBeforeAdvice.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,7 +28,7 @@ import java.lang.reflect.Method; * @author Rod Johnson */ public interface MethodBeforeAdvice extends BeforeAdvice { - + /** * Callback before a given method is invoked. * @param method method being invoked diff --git a/spring-aop/src/main/java/org/springframework/aop/PointcutAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/PointcutAdvisor.java index 02818d12e78..6fb4d884974 100644 --- a/spring-aop/src/main/java/org/springframework/aop/PointcutAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/PointcutAdvisor.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java b/spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java index 0b8c228a4ac..4cf96a3fca1 100644 --- a/spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java +++ b/spring-aop/src/main/java/org/springframework/aop/TrueClassFilter.java @@ -24,9 +24,9 @@ import java.io.Serializable; * @author Rod Johnson */ class TrueClassFilter implements ClassFilter, Serializable { - + public static final TrueClassFilter INSTANCE = new TrueClassFilter(); - + /** * Enforce Singleton pattern. */ @@ -36,7 +36,7 @@ class TrueClassFilter implements ClassFilter, Serializable { public boolean matches(Class clazz) { return true; } - + /** * Required to support serialization. Replaces with canonical * instance on deserialization, protecting Singleton pattern. diff --git a/spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java b/spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java index 7be4d470a2c..53e50f3c831 100644 --- a/spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java +++ b/spring-aop/src/main/java/org/springframework/aop/TrueMethodMatcher.java @@ -25,9 +25,9 @@ import java.lang.reflect.Method; * @author Rod Johnson */ class TrueMethodMatcher implements MethodMatcher, Serializable { - + public static final TrueMethodMatcher INSTANCE = new TrueMethodMatcher(); - + /** * Enforce Singleton pattern. */ @@ -46,7 +46,7 @@ class TrueMethodMatcher implements MethodMatcher, Serializable { // Should never be invoked as isRuntime returns false. throw new UnsupportedOperationException(); } - + /** * Required to support serialization. Replaces with canonical * instance on deserialization, protecting Singleton pattern. @@ -55,7 +55,7 @@ class TrueMethodMatcher implements MethodMatcher, Serializable { private Object readResolve() { return INSTANCE; } - + @Override public String toString() { return "MethodMatcher.TRUE"; diff --git a/spring-aop/src/main/java/org/springframework/aop/TruePointcut.java b/spring-aop/src/main/java/org/springframework/aop/TruePointcut.java index 0c6efcb70e4..87365aa1eff 100644 --- a/spring-aop/src/main/java/org/springframework/aop/TruePointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/TruePointcut.java @@ -24,9 +24,9 @@ import java.io.Serializable; * @author Rod Johnson */ class TruePointcut implements Pointcut, Serializable { - + public static final TruePointcut INSTANCE = new TruePointcut(); - + /** * Enforce Singleton pattern. */ @@ -40,7 +40,7 @@ class TruePointcut implements Pointcut, Serializable { public MethodMatcher getMethodMatcher() { return MethodMatcher.TRUE; } - + /** * Required to support serialization. Replaces with canonical * instance on deserialization, protecting Singleton pattern. diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java index 9cc93f3d282..734f4befb68 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AbstractAspectJAdvice.java @@ -211,7 +211,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence public void setAspectName(String name) { this.aspectName = name; } - + public String getAspectName() { return this.aspectName; } @@ -268,7 +268,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence throw new UnsupportedOperationException("Only afterReturning advice can be used to bind a return value"); } - /** + /** * We need to hold the returning name at this level for argument binding calculations, * this method allows the afterReturning advice subclass to set the name. */ @@ -302,7 +302,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence throw new UnsupportedOperationException("Only afterThrowing advice can be used to bind a thrown exception"); } - /** + /** * We need to hold the throwing name at this level for argument binding calculations, * this method allows the afterThrowing advice subclass to set the name. */ @@ -365,11 +365,11 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence Class[] parameterTypes = this.aspectJAdviceMethod.getParameterTypes(); if (maybeBindJoinPoint(parameterTypes[0]) || maybeBindProceedingJoinPoint(parameterTypes[0])) { numUnboundArgs--; - } + } else if (maybeBindJoinPointStaticPart(parameterTypes[0])) { numUnboundArgs--; } - + if (numUnboundArgs > 0) { // need to bind arguments by name as returned from the pointcut match bindArgumentsByName(numUnboundArgs); @@ -398,7 +398,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence } else { return false; - } + } } protected boolean supportsProceedingJoinPoint() { @@ -409,7 +409,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence if (candidateParameterType.equals(JoinPoint.StaticPart.class)) { this.joinPointStaticPartArgumentIndex = 0; return true; - } + } else { return false; } @@ -422,7 +422,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence if (this.argumentNames != null) { // We have been able to determine the arg names. bindExplicitArguments(numArgumentsExpectingToBind); - } + } else { throw new IllegalStateException("Advice method [" + this.aspectJAdviceMethod.getName() + "] " + "requires " + numArgumentsExpectingToBind + " arguments to be bound by name, but " + @@ -471,9 +471,9 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence // specified, and find the discovered argument types. if (this.returningName != null) { if (!this.argumentBindings.containsKey(this.returningName)) { - throw new IllegalStateException("Returning argument name '" + throw new IllegalStateException("Returning argument name '" + this.returningName + "' was not bound in advice arguments"); - } + } else { Integer index = this.argumentBindings.get(this.returningName); this.discoveredReturningType = this.aspectJAdviceMethod.getParameterTypes()[index]; @@ -482,9 +482,9 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence } if (this.throwingName != null) { if (!this.argumentBindings.containsKey(this.throwingName)) { - throw new IllegalStateException("Throwing argument name '" + throw new IllegalStateException("Throwing argument name '" + this.throwingName + "' was not bound in advice arguments"); - } + } else { Integer index = this.argumentBindings.get(this.throwingName); this.discoveredThrowingType = this.aspectJAdviceMethod.getParameterTypes()[index]; @@ -525,7 +525,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence pointcutParameterTypes[index] = methodParameterTypes[i]; index++; } - + this.pointcut.setParameterNames(pointcutParameterNames); this.pointcut.setParameterTypes(pointcutParameterTypes); } @@ -549,7 +549,7 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence if (this.joinPointArgumentIndex != -1) { adviceInvocationArgs[this.joinPointArgumentIndex] = jp; numBound++; - } + } else if (this.joinPointStaticPartArgumentIndex != -1) { adviceInvocationArgs[this.joinPointStaticPartArgumentIndex] = jp.getStaticPart(); numBound++; @@ -582,8 +582,8 @@ public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedence if (numBound != this.adviceInvocationArgumentCount) { throw new IllegalStateException("Required to bind " + this.adviceInvocationArgumentCount - + " arguments, but only bound " + numBound + " (JoinPointMatch " + - (jpMatch == null ? "was NOT" : "WAS") + + + " arguments, but only bound " + numBound + " (JoinPointMatch " + + (jpMatch == null ? "was NOT" : "WAS") + " bound in invocation)"); } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterAdvice.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterAdvice.java index 148f71ce5d6..7f869ed80d1 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterAdvice.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAfterAdvice.java @@ -36,7 +36,7 @@ public class AspectJAfterAdvice extends AbstractAspectJAdvice implements MethodI super(aspectJBeforeAdviceMethod, pointcut, aif); } - + public Object invoke(MethodInvocation mi) throws Throwable { try { return mi.proceed(); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java index 348b8449c37..f3334ea5695 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcut.java @@ -259,7 +259,7 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut ex); return false; } - } + } catch (BCException ex) { logger.debug("PointcutExpression matching rejected target class", ex); return false; @@ -554,7 +554,7 @@ public class AspectJExpressionPointcut extends AbstractExpressionPointcut String advisedBeanName = getCurrentProxiedBeanName(); if (advisedBeanName == null) { // no proxy creation in progress // abstain; can't return YES, since that will make pointcut with negation fail - return FuzzyBoolean.MAYBE; + return FuzzyBoolean.MAYBE; } if (BeanFactoryUtils.isGeneratedBeanName(advisedBeanName)) { return FuzzyBoolean.NO; diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.java index 001b161fe43..d17bbce30bf 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisor.java @@ -21,7 +21,7 @@ import org.springframework.aop.support.AbstractGenericPointcutAdvisor; /** * Spring AOP Advisor that can be used for any AspectJ pointcut expression. - * + * * @author Rob Harrop * @since 2.0 */ diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJProxyUtils.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJProxyUtils.java index 5c92ae6b4d4..8b39665a055 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJProxyUtils.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJProxyUtils.java @@ -30,7 +30,7 @@ import org.springframework.aop.interceptor.ExposeInvocationInterceptor; * @since 2.0 */ public abstract class AspectJProxyUtils { - + /** * Add special advisors if necessary to work with a proxy chain that contains AspectJ advisors. * This will expose the current Spring AOP invocation (necessary for some AspectJ pointcut matching) diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJWeaverMessageHandler.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJWeaverMessageHandler.java index 8932259dc38..5732ae14519 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJWeaverMessageHandler.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJWeaverMessageHandler.java @@ -27,7 +27,7 @@ import org.aspectj.bridge.IMessageHandler; * Implementation of AspectJ's {@link IMessageHandler} interface that * routes AspectJ weaving messages through the same logging system as the * regular Spring messages. - * + * *

Pass the option... * *

-XmessageHandlerClass:org.springframework.aop.aspectj.AspectJWeaverMessageHandler @@ -44,9 +44,9 @@ import org.aspectj.bridge.IMessageHandler; public class AspectJWeaverMessageHandler implements IMessageHandler { private static final String AJ_ID = "[AspectJ] "; - + private static final Log LOGGER = LogFactory.getLog("AspectJ Weaver"); - + public boolean handleMessage(IMessage message) throws AbortException { Kind messageKind = message.getKind(); @@ -56,39 +56,39 @@ public class AspectJWeaverMessageHandler implements IMessageHandler { LOGGER.debug(makeMessageFor(message)); return true; } - } - + } + if (LOGGER.isInfoEnabled()) { if ((messageKind == IMessage.INFO) || (messageKind == IMessage.WEAVEINFO)) { LOGGER.info(makeMessageFor(message)); return true; } - } - + } + if (LOGGER.isWarnEnabled()) { if (messageKind == IMessage.WARNING) { LOGGER.warn(makeMessageFor(message)); return true; } } - + if (LOGGER.isErrorEnabled()) { if (messageKind == IMessage.ERROR) { LOGGER.error(makeMessageFor(message)); return true; } } - + if (LOGGER.isFatalEnabled()) { if (messageKind == IMessage.ABORT) { LOGGER.fatal(makeMessageFor(message)); return true; } } - + return false; } - + private String makeMessageFor(IMessage aMessage) { return AJ_ID + aMessage.getMessage(); } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java index a60227a5df2..3838c7bda6c 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/DeclareParentsAdvisor.java @@ -48,7 +48,7 @@ public class DeclareParentsAdvisor implements IntroductionAdvisor { * @param defaultImpl the default implementation class */ public DeclareParentsAdvisor(Class interfaceType, String typePattern, Class defaultImpl) { - this(interfaceType, typePattern, defaultImpl, + this(interfaceType, typePattern, defaultImpl, new DelegatePerTargetObjectIntroductionInterceptor(defaultImpl, interfaceType)); } @@ -59,7 +59,7 @@ public class DeclareParentsAdvisor implements IntroductionAdvisor { * @param delegateRef the delegate implementation object */ public DeclareParentsAdvisor(Class interfaceType, String typePattern, Object delegateRef) { - this(interfaceType, typePattern, delegateRef.getClass(), + this(interfaceType, typePattern, delegateRef.getClass(), new DelegatingIntroductionInterceptor(delegateRef)); } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java index 6668a8b0155..b718359ff97 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint.java @@ -50,7 +50,7 @@ import org.springframework.util.Assert; * @since 2.0 */ public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, JoinPoint.StaticPart { - + private final ProxyMethodInvocation methodInvocation; private Object[] defensiveCopyOfArgs; diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/RuntimeTestWalker.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/RuntimeTestWalker.java index 1af86cc4171..208c65cb825 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/RuntimeTestWalker.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/RuntimeTestWalker.java @@ -39,7 +39,7 @@ import org.springframework.util.ReflectionUtils; /** * This class encapsulates some AspectJ internal knowledge that should be - * pushed back into the AspectJ project in a future release. + * pushed back into the AspectJ project in a future release. * *

It relies on implementation specific knowledge in AspectJ to break * encapsulation and do something AspectJ was not designed to do: query @@ -137,7 +137,7 @@ class RuntimeTestWalker { public void visit(MatchingContextBasedTest matchingContextTest) { } - + protected int getVarType(ReflectionVar v) { try { Field varTypeField = ReflectionVar.class.getDeclaredField("varType"); @@ -169,7 +169,7 @@ class RuntimeTestWalker { this.matches = defaultMatches; this.matchVarType = matchVarType; } - + public boolean instanceOfMatches(Test test) { test.accept(this); return matches; @@ -236,7 +236,7 @@ class RuntimeTestWalker { aTest.accept(this); return this.testsSubtypeSensitiveVars; } - + @Override public void visit(Instanceof i) { ReflectionVar v = (ReflectionVar) i.getVar(); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java index 53e86002240..c50b359452b 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/SingletonAspectInstanceFactory.java @@ -30,7 +30,7 @@ import org.springframework.util.Assert; * @see SimpleAspectInstanceFactory */ public class SingletonAspectInstanceFactory implements AspectInstanceFactory { - + private final Object aspectInstance; diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/TypePatternClassFilter.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/TypePatternClassFilter.java index 984c46f4f9b..e6fa6f0dd70 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/TypePatternClassFilter.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/TypePatternClassFilter.java @@ -47,11 +47,11 @@ public class TypePatternClassFilter implements ClassFilter { } /** - * Create a fully configured {@link TypePatternClassFilter} using the + * Create a fully configured {@link TypePatternClassFilter} using the * given type pattern. * @param typePattern the type pattern that AspectJ weaver should parse * @throws IllegalArgumentException if the supplied typePattern is null - * or is recognized as invalid + * or is recognized as invalid */ public TypePatternClassFilter(String typePattern) { setTypePattern(typePattern); @@ -73,7 +73,7 @@ public class TypePatternClassFilter implements ClassFilter { *

These conventions are established by AspectJ, not Spring AOP. * @param typePattern the type pattern that AspectJ weaver should parse * @throws IllegalArgumentException if the supplied typePattern is null - * or is recognized as invalid + * or is recognized as invalid */ public void setTypePattern(String typePattern) { Assert.notNull(typePattern); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java index cb09937a395..92721d5c778 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java @@ -58,7 +58,7 @@ import org.springframework.util.StringUtils; * @since 2.0 */ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFactory { - + protected static final ParameterNameDiscoverer ASPECTJ_ANNOTATION_PARAMETER_NAME_DISCOVERER = new AspectJAnnotationParameterNameDiscoverer(); @@ -121,7 +121,7 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac /** * We need to detect this as "code-style" AspectJ aspects should not be - * interpreted by Spring AOP. + * interpreted by Spring AOP. */ private boolean compiledByAjc(Class clazz) { // The AJTypeSystem goes to great lengths to provide a uniform appearance between code-style and @@ -154,11 +154,11 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac if (ajType.getPerClause().getKind() == PerClauseKind.PERCFLOWBELOW) { throw new AopConfigException(aspectClass.getName() + " uses percflowbelow instantiation model: " + "This is not supported in Spring AOP."); - } + } } /** - * The pointcut and advice annotations both have an "argNames" member which contains a + * The pointcut and advice annotations both have an "argNames" member which contains a * comma-separated list of the argument names. We use this (if non-empty) to build the * formal parameters for the pointcut. */ @@ -169,13 +169,13 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac if (pointcutParameterNames != null) { pointcutParameterTypes = extractPointcutParameterTypes(pointcutParameterNames,annotatedMethod); } - + AspectJExpressionPointcut ajexp = new AspectJExpressionPointcut(declarationScope,pointcutParameterNames,pointcutParameterTypes); ajexp.setLocation(annotatedMethod.toString()); return ajexp; } - + /** * Create the pointcut parameters needed by aspectj based on the given argument names * and the argument types that are available from the adviceMethod. Needs to take into @@ -326,10 +326,10 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac return names; } else { - return null; + return null; } } - + public String[] getParameterNames(Constructor ctor) { throw new UnsupportedOperationException("Spring AOP cannot handle constructor advice"); } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectMetadata.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectMetadata.java index cde9f43ef30..9125cbee2a8 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectMetadata.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AspectMetadata.java @@ -55,8 +55,8 @@ public class AspectMetadata { private final Pointcut perClausePointcut; /** - * The name of this aspect as defined to Spring (the bean name) - - * allows us to determine if two pieces of advice come from the + * The name of this aspect as defined to Spring (the bean name) - + * allows us to determine if two pieces of advice come from the * same aspect and hence their relative precedence. */ private String aspectName; diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java index a640e364584..fecd7b2e2a8 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/BeanFactoryAspectInstanceFactory.java @@ -27,7 +27,7 @@ import org.springframework.util.ClassUtils; * backed by a Spring {@link org.springframework.beans.factory.BeanFactory}. * *

Note that this may instantiate multiple times if using a prototype, - * which probably won't give the semantics you expect. + * which probably won't give the semantics you expect. * Use a {@link LazySingletonAspectInstanceFactoryDecorator} * to wrap this to ensure only one new aspect comes back. * @@ -56,7 +56,7 @@ public class BeanFactoryAspectInstanceFactory implements MetadataAwareAspectInst public BeanFactoryAspectInstanceFactory(BeanFactory beanFactory, String name) { this(beanFactory, name, beanFactory.getType(name)); } - + /** * Create a BeanFactoryAspectInstanceFactory, providing a type that AspectJ should * introspect to create AJType metadata. Use if the BeanFactory may consider the type diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java index 433a33bb6b0..071468141cb 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/InstantiationModelAwarePointcutAdvisorImpl.java @@ -41,23 +41,23 @@ class InstantiationModelAwarePointcutAdvisorImpl implements InstantiationModelAwarePointcutAdvisor, AspectJPrecedenceInformation { private final AspectJExpressionPointcut declaredPointcut; - + private Pointcut pointcut; - + private final MetadataAwareAspectInstanceFactory aspectInstanceFactory; - + private final Method method; - + private final boolean lazy; - + private final AspectJAdvisorFactory atAspectJAdvisorFactory; - + private Advice instantiatedAdvice; private int declarationOrder; - + private String aspectName; - + private Boolean isBeforeAdvice; private Boolean isAfterAdvice; @@ -72,12 +72,12 @@ class InstantiationModelAwarePointcutAdvisorImpl this.aspectInstanceFactory = aif; this.declarationOrder = declarationOrderInAspect; this.aspectName = aspectName; - + if (aif.getAspectMetadata().isLazilyInstantiated()) { // Static part of the pointcut is a lazy type. Pointcut preInstantiationPointcut = Pointcuts.union(aif.getAspectMetadata().getPerClausePointcut(), this.declaredPointcut); - + // Make it dynamic: must mutate from pre-instantiation to post-instantiation state. // If it's not a dynamic pointcut, it may be optimized out // by the Spring AOP infrastructure after the first evaluation. @@ -109,7 +109,7 @@ class InstantiationModelAwarePointcutAdvisorImpl public boolean isPerInstance() { return (getAspectMetadata().getAjType().getPerClause().getKind() != PerClauseKind.SINGLETON); } - + /** * Return the AspectJ AspectMetadata for this advisor. */ @@ -126,7 +126,7 @@ class InstantiationModelAwarePointcutAdvisorImpl } return this.instantiatedAdvice; } - + public boolean isLazy() { return this.lazy; } @@ -140,7 +140,7 @@ class InstantiationModelAwarePointcutAdvisorImpl return this.atAspectJAdvisorFactory.getAdvice( this.method, pcut, this.aspectInstanceFactory, this.declarationOrder, this.aspectName); } - + public MetadataAwareAspectInstanceFactory getAspectInstanceFactory() { return this.aspectInstanceFactory; } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java index c2e356678a7..35ade227ce5 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/ReflectiveAspectJAdvisorFactory.java @@ -203,7 +203,7 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto return null; } - // If we get here, we know we have an AspectJ method. + // If we get here, we know we have an AspectJ method. // Check that it's an AspectJ-annotated class if (!isAspect(candidateAspectClass)) { throw new AopConfigException("Advice must be declared inside an aspect type: " + diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/package-info.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/package-info.java index b0f747284bf..36b3f59f3d0 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/package-info.java @@ -2,7 +2,7 @@ /** * * Classes enabling AspectJ 5 @Annotated classes to be used in Spring AOP. - * + * *

Normally to be used through an AspectJAutoProxyCreator rather than directly. * */ diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJAwareAdvisorAutoProxyCreator.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJAwareAdvisorAutoProxyCreator.java index 0cb786cc255..1a64c9610a7 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJAwareAdvisorAutoProxyCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJAwareAdvisorAutoProxyCreator.java @@ -72,8 +72,8 @@ public class AspectJAwareAdvisorAutoProxyCreator extends AbstractAdvisorAutoProx for (Advisor element : advisors) { partiallyComparableAdvisors.add( new PartiallyComparableAdvisorHolder(element, DEFAULT_PRECEDENCE_COMPARATOR)); - } - + } + // sort it List sorted = (List) PartialOrder.sort(partiallyComparableAdvisors); @@ -81,13 +81,13 @@ public class AspectJAwareAdvisorAutoProxyCreator extends AbstractAdvisorAutoProx // TODO: work harder to give a better error message here. throw new IllegalArgumentException("Advice precedence circularity error"); } - + // extract results again List result = new LinkedList(); for (PartiallyComparableAdvisorHolder pcAdvisor : sorted) { result.add(pcAdvisor.getAdvisor()); } - + return result; } diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java index c293f0be721..8d21b47b5e5 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparator.java @@ -106,14 +106,14 @@ class AspectJPrecedenceComparator implements Comparator { boolean oneOrOtherIsAfterAdvice = (AspectJAopUtils.isAfterAdvice(advisor1) || AspectJAopUtils.isAfterAdvice(advisor2)); int adviceDeclarationOrderDelta = getAspectDeclarationOrder(advisor1) - getAspectDeclarationOrder(advisor2); - + if (oneOrOtherIsAfterAdvice) { // the advice declared last has higher precedence if (adviceDeclarationOrderDelta < 0) { // advice1 was declared before advice2 // so advice1 has lower precedence return LOWER_PRECEDENCE; - } + } else if (adviceDeclarationOrderDelta == 0) { return SAME_PRECEDENCE; } @@ -153,7 +153,7 @@ class AspectJPrecedenceComparator implements Comparator { } private int getAspectDeclarationOrder(Advisor anAdvisor) { - AspectJPrecedenceInformation precedenceInfo = + AspectJPrecedenceInformation precedenceInfo = AspectJAopUtils.getAspectJPrecedenceInformationFor(anAdvisor); if (precedenceInfo != null) { return precedenceInfo.getDeclarationOrder(); diff --git a/spring-aop/src/main/java/org/springframework/aop/aspectj/package-info.java b/spring-aop/src/main/java/org/springframework/aop/aspectj/package-info.java index 8355bc30826..6dc2fdb0c0b 100644 --- a/spring-aop/src/main/java/org/springframework/aop/aspectj/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/aspectj/package-info.java @@ -5,7 +5,7 @@ * annotation-style methods, and an AspectJExpressionPointcut: a Spring AOP Pointcut * implementation that allows use of the AspectJ pointcut expression language with the Spring AOP * runtime framework. - * + * *

Note that use of this package does not require the use of the ajc compiler * or AspectJ load-time weaver. It is intended to enable the use of a valuable subset of AspectJ * functionality, with consistent semantics, with the proxy-based Spring AOP framework. diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java b/spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java index 43de1f64466..173148c5ca4 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java @@ -60,7 +60,7 @@ public abstract class AbstractInterceptorDrivenBeanDefinitionDecorator implement public final BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definitionHolder, ParserContext parserContext) { BeanDefinitionRegistry registry = parserContext.getRegistry(); - + // get the root bean name - will be the name of the generated proxy factory bean String existingBeanName = definitionHolder.getBeanName(); BeanDefinition targetDefinition = definitionHolder.getBeanDefinition(); diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AdviceEntry.java b/spring-aop/src/main/java/org/springframework/aop/config/AdviceEntry.java index 4fa6a8a5524..180ea636a36 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/AdviceEntry.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/AdviceEntry.java @@ -20,7 +20,7 @@ import org.springframework.beans.factory.parsing.ParseState; /** * {@link ParseState} entry representing an advice element. - * + * * @author Mark Fisher * @since 2.0 */ diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AdvisorEntry.java b/spring-aop/src/main/java/org/springframework/aop/config/AdvisorEntry.java index fa635ae7a95..dc3b4f9ea8e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/AdvisorEntry.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/AdvisorEntry.java @@ -20,7 +20,7 @@ import org.springframework.beans.factory.parsing.ParseState; /** * {@link ParseState} entry representing an advisor. - * + * * @author Mark Fisher * @since 2.0 */ diff --git a/spring-aop/src/main/java/org/springframework/aop/config/AopConfigUtils.java b/spring-aop/src/main/java/org/springframework/aop/config/AopConfigUtils.java index dd568a51bd3..d3f28a464f8 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/AopConfigUtils.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/AopConfigUtils.java @@ -31,8 +31,8 @@ import org.springframework.util.Assert; /** * Utility class for handling registration of AOP auto-proxy creators. * - *

Only a single auto-proxy creator can be registered yet multiple concrete - * implementations are available. Therefore this class wraps a simple escalation + *

Only a single auto-proxy creator can be registered yet multiple concrete + * implementations are available. Therefore this class wraps a simple escalation * protocol, allowing classes to request a particular auto-proxy creator and know * that class, or a subclass thereof, will eventually be resident * in the application context. diff --git a/spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java b/spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java index de8beff487c..8613647b15d 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/ConfigBeanDefinitionParser.java @@ -93,7 +93,7 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser { private static final int ASPECT_INSTANCE_FACTORY_INDEX = 2; private ParseState parseState = new ParseState(); - + public BeanDefinition parse(Element element, ParserContext parserContext) { CompositeComponentDefinition compositeDef = @@ -281,10 +281,10 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser { BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(DeclareParentsAdvisor.class); builder.addConstructorArgValue(declareParentsElement.getAttribute(IMPLEMENT_INTERFACE)); builder.addConstructorArgValue(declareParentsElement.getAttribute(TYPE_PATTERN)); - + String defaultImpl = declareParentsElement.getAttribute(DEFAULT_IMPL); String delegateRef = declareParentsElement.getAttribute(DELEGATE_REF); - + if (StringUtils.hasText(defaultImpl) && !StringUtils.hasText(delegateRef)) { builder.addConstructorArgValue(defaultImpl); } @@ -435,7 +435,7 @@ class ConfigBeanDefinitionParser implements BeanDefinitionParser { String expression = pointcutElement.getAttribute(EXPRESSION); AbstractBeanDefinition pointcutDefinition = null; - + try { this.parseState.push(new PointcutEntry(id)); pointcutDefinition = createPointcutDefinition(expression); diff --git a/spring-aop/src/main/java/org/springframework/aop/config/PointcutEntry.java b/spring-aop/src/main/java/org/springframework/aop/config/PointcutEntry.java index c308d5b8331..e1cf5f65f32 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/PointcutEntry.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/PointcutEntry.java @@ -20,7 +20,7 @@ import org.springframework.beans.factory.parsing.ParseState; /** * {@link ParseState} entry representing a pointcut. - * + * * @author Mark Fisher * @since 2.0 */ diff --git a/spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java b/spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java index ac118d7096c..bbba335bb6a 100644 --- a/spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java +++ b/spring-aop/src/main/java/org/springframework/aop/config/ScopedProxyBeanDefinitionDecorator.java @@ -47,7 +47,7 @@ class ScopedProxyBeanDefinitionDecorator implements BeanDefinitionDecorator { proxyTargetClass = Boolean.valueOf(ele.getAttribute(PROXY_TARGET_CLASS)); } } - + // Register the original bean definition as it will be referenced by the scoped proxy // and is relevant for tooling (validation, navigation). BeanDefinitionHolder holder = diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/Advised.java b/spring-aop/src/main/java/org/springframework/aop/framework/Advised.java index 397c97b7698..c166ddc04d6 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/Advised.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/Advised.java @@ -124,7 +124,7 @@ public interface Advised extends TargetClassAware { */ void addAdvisor(Advisor advisor) throws AopConfigException; - /** + /** * Add an Advisor at the specified position in the chain. * @param advisor the advisor to add at the specified position in the chain * @param pos position in chain (0 is head). Must be valid. diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/AopProxyFactory.java b/spring-aop/src/main/java/org/springframework/aop/framework/AopProxyFactory.java index d97934f16c2..595eb35c65d 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/AopProxyFactory.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/AopProxyFactory.java @@ -35,7 +35,7 @@ package org.springframework.aop.framework; * *

Proxies may or may not allow advice changes to be made. * If they do not permit advice changes (for example, because - * the configuration was frozen) a proxy should throw an + * the configuration was frozen) a proxy should throw an * {@link AopConfigException} on an attempted advice change. * * @author Rod Johnson diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java b/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java index 9b4461fcb4b..a9b039f35f6 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java @@ -100,7 +100,7 @@ public class ProxyFactoryBean extends ProxyCreatorSupport protected final Log logger = LogFactory.getLog(getClass()); private String[] interceptorNames; - + private String targetName; private boolean autodetectInterfaces = true; @@ -543,10 +543,10 @@ public class ProxyFactoryBean extends ProxyCreatorSupport Advisor advisor = namedBeanToAdvisor(next); if (logger.isTraceEnabled()) { logger.trace("Adding advisor with name '" + name + "'"); - } + } addAdvisor(advisor); } - + /** * Return a TargetSource to use when creating a proxy. If the target was not * specified at the end of the interceptorNames list, the TargetSource will be @@ -627,24 +627,24 @@ public class ProxyFactoryBean extends ProxyCreatorSupport private final String beanName; private final String message; - + public PrototypePlaceholderAdvisor(String beanName) { this.beanName = beanName; this.message = "Placeholder for prototype Advisor/Advice with bean name '" + beanName + "'"; } - + public String getBeanName() { return beanName; } - + public Advice getAdvice() { throw new UnsupportedOperationException("Cannot invoke methods: " + this.message); } - + public boolean isPerInstance() { throw new UnsupportedOperationException("Cannot invoke methods: " + this.message); } - + @Override public String toString() { return this.message; diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java index 8773e933c01..81023c12512 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptor.java @@ -87,13 +87,13 @@ public class ThrowsAdviceInterceptor implements MethodInterceptor, AfterAdvice { } } } - + if (this.exceptionHandlerMap.isEmpty()) { throw new IllegalArgumentException( "At least one handler method must be found in class [" + throwsAdvice.getClass() + "]"); } } - + public int getHandlerMethodCount() { return this.exceptionHandlerMap.size(); } @@ -131,7 +131,7 @@ public class ThrowsAdviceInterceptor implements MethodInterceptor, AfterAdvice { throw ex; } } - + private void invokeHandlerMethod(MethodInvocation mi, Throwable ex, Method method) throws Throwable { Object[] handlerArgs; if (method.getParameterTypes().length == 1) { diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/UnknownAdviceTypeException.java b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/UnknownAdviceTypeException.java index 5d216e9b6bf..a479fbc8684 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/UnknownAdviceTypeException.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/UnknownAdviceTypeException.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/package-info.java b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/package-info.java index 765d127397e..0b3d0a28bfc 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/adapter/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/adapter/package-info.java @@ -7,7 +7,7 @@ * its capabilities, don't need to concern themselves with this package. *
* You may wish to use these adapters to wrap Spring-specific advices, such as MethodBeforeAdvice, - * in MethodInterceptor, to allow their use in another AOP framework supporting the AOP Alliance interfaces. + * in MethodInterceptor, to allow their use in another AOP framework supporting the AOP Alliance interfaces. *
*
* These adapters do not depend on any other Spring framework classes to allow such usage. diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java index 334b9a5cfed..cfc4e09cf97 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/DefaultAdvisorAutoProxyCreator.java @@ -94,6 +94,6 @@ public class DefaultAdvisorAutoProxyCreator extends AbstractAdvisorAutoProxyCrea @Override protected boolean isEligibleAdvisorBean(String beanName) { return (!isUsePrefix() || beanName.startsWith(getAdvisorBeanNamePrefix())); - } + } } diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/TargetSourceCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/TargetSourceCreator.java index 6219a5015c3..735a65b852e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/TargetSourceCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/TargetSourceCreator.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,7 +30,7 @@ import org.springframework.aop.TargetSource; * @author Juergen Hoeller */ public interface TargetSourceCreator { - + /** * Create a special TargetSource for the given bean, if any. * @param beanClass the class of the bean to create a TargetSource for diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/package-info.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/package-info.java index 691464cd7da..8646ea49588 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/package-info.java @@ -3,10 +3,10 @@ * * Bean post-processors for use in ApplicationContexts to simplify AOP usage * by automatically creating AOP proxies without the need to use a ProxyFactoryBean. - * + * *

The various post-processors in this package need only be added to an ApplicationContext * (typically in an XML bean definition document) to automatically proxy selected beans. - * + * *

NB: Automatic auto-proxying is not supported for BeanFactory implementations, * as post-processors beans are only automatically detected in application contexts. * Post-processors can be explicitly registered on a ConfigurableBeanFactory instead. diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/QuickTargetSourceCreator.java b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/QuickTargetSourceCreator.java index 094188be1c9..9667931793f 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/QuickTargetSourceCreator.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/autoproxy/target/QuickTargetSourceCreator.java @@ -23,7 +23,7 @@ import org.springframework.aop.target.ThreadLocalTargetSource; /** * Convenient TargetSourceCreator using bean name prefixes to create one of three - * well-known TargetSource types: + * well-known TargetSource types: *

  • : CommonsPoolTargetSource *
  • % ThreadLocalTargetSource *
  • ! PrototypeTargetSource @@ -59,5 +59,5 @@ public class QuickTargetSourceCreator extends AbstractBeanFactoryBasedTargetSour return null; } } - + } diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/package-info.java b/spring-aop/src/main/java/org/springframework/aop/framework/package-info.java index 4958a010cba..3581a82efe3 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/package-info.java @@ -3,13 +3,13 @@ * * Package containing Spring's basic AOP infrastructure, compliant with the * AOP Alliance interfaces. - * + * *

    Spring AOP supports proxying interfaces or classes, introductions, and offers * static and dynamic pointcuts. - * + * *

    Any Spring AOP proxy can be cast to the ProxyConfig AOP configuration interface * in this package to add or remove interceptors. - * + * *

    The ProxyFactoryBean is a convenient way to create AOP proxies in a BeanFactory * or ApplicationContext. However, proxies can be created programmatically using the * ProxyFactory class. diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractMonitoringInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractMonitoringInterceptor.java index 0c257c1c506..8eb36f0964c 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractMonitoringInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractMonitoringInterceptor.java @@ -28,7 +28,7 @@ import org.aopalliance.intercept.MethodInvocation; *

    Subclasses should call the createInvocationTraceName(MethodInvocation) * method to create a name for the given trace that includes information about the * method invocation under trace along with the prefix and suffix added as appropriate. - * + * * @author Rob Harrop * @author Juergen Hoeller * @since 1.2.7 diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptor.java index bf14ab64308..b8f5e89833c 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptor.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java index 81b31107424..5fbb6ad8e84 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisors.java @@ -125,7 +125,7 @@ public abstract class ExposeBeanNameAdvisors { */ private static class ExposeBeanNameIntroduction extends DelegatingIntroductionInterceptor implements NamedBean { - private final String beanName; + private final String beanName; public ExposeBeanNameIntroduction(String beanName) { this.beanName = beanName; diff --git a/spring-aop/src/main/java/org/springframework/aop/interceptor/JamonPerformanceMonitorInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/interceptor/JamonPerformanceMonitorInterceptor.java index 0ea4dd527f4..29b9f4620a8 100644 --- a/spring-aop/src/main/java/org/springframework/aop/interceptor/JamonPerformanceMonitorInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/interceptor/JamonPerformanceMonitorInterceptor.java @@ -27,7 +27,7 @@ import org.apache.commons.logging.Log; * and output the stats. * *

    This code is inspired by Thierry Templier's blog. - * + * * @author Dmitriy Kopylenko * @author Juergen Hoeller * @author Rob Harrop diff --git a/spring-aop/src/main/java/org/springframework/aop/package-info.java b/spring-aop/src/main/java/org/springframework/aop/package-info.java index 5076bc06781..b5691ccfa67 100644 --- a/spring-aop/src/main/java/org/springframework/aop/package-info.java +++ b/spring-aop/src/main/java/org/springframework/aop/package-info.java @@ -2,9 +2,9 @@ /** * * Core Spring AOP interfaces, built on AOP Alliance AOP interoperability interfaces. - * + * *
    Any AOP Alliance MethodInterceptor is usable in Spring. - * + * *
    Spring AOP also offers: *

    - * + * *
    * Spring AOP can be used programmatically or (preferably) * integrated with the Spring IoC container. diff --git a/spring-aop/src/main/java/org/springframework/aop/scope/DefaultScopedObject.java b/spring-aop/src/main/java/org/springframework/aop/scope/DefaultScopedObject.java index 77c3a107ab0..05a041aeec7 100644 --- a/spring-aop/src/main/java/org/springframework/aop/scope/DefaultScopedObject.java +++ b/spring-aop/src/main/java/org/springframework/aop/scope/DefaultScopedObject.java @@ -23,7 +23,7 @@ import org.springframework.util.Assert; /** * Default implementation of the {@link ScopedObject} interface. - * + * *

    Simply delegates the calls to the underlying * {@link ConfigurableBeanFactory bean factory} * ({@link ConfigurableBeanFactory#getBean(String)}/ diff --git a/spring-aop/src/main/java/org/springframework/aop/scope/ScopedObject.java b/spring-aop/src/main/java/org/springframework/aop/scope/ScopedObject.java index 1a500826416..9e46d230cd2 100644 --- a/spring-aop/src/main/java/org/springframework/aop/scope/ScopedObject.java +++ b/spring-aop/src/main/java/org/springframework/aop/scope/ScopedObject.java @@ -49,5 +49,5 @@ public interface ScopedObject extends RawTargetAccess { * the exact same target object in the target scope). */ void removeFromScope(); - + } diff --git a/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java b/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java index b13a9eb5099..a1cf5db4a82 100644 --- a/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java +++ b/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyFactoryBean.java @@ -32,14 +32,14 @@ import org.springframework.util.ClassUtils; /** * Convenient proxy factory bean for scoped objects. - * + * *

    Proxies created using this factory bean are thread-safe singletons * and may be injected into shared objects, with transparent scoping behavior. * *

    Proxies returned by this class implement the {@link ScopedObject} interface. * This presently allows for removing the corresponding object from the scope, * seamlessly creating a new instance in the scope on next access. - * + * *

    Please note that the proxies created by this factory are * class-based proxies by default. This can be customized * through switching the "proxyTargetClass" property to "false". diff --git a/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyUtils.java b/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyUtils.java index 62f13bb5c8a..e59267d30f3 100644 --- a/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyUtils.java +++ b/spring-aop/src/main/java/org/springframework/aop/scope/ScopedProxyUtils.java @@ -47,7 +47,7 @@ public abstract class ScopedProxyUtils { */ public static BeanDefinitionHolder createScopedProxy(BeanDefinitionHolder definition, BeanDefinitionRegistry registry, boolean proxyTargetClass) { - + String originalBeanName = definition.getBeanName(); BeanDefinition targetDefinition = definition.getBeanDefinition(); @@ -87,7 +87,7 @@ public abstract class ScopedProxyUtils { // (potentially an inner bean). return new BeanDefinitionHolder(proxyDefinition, originalBeanName, definition.getAliases()); } - + /** * Generates the bean name that is used within the scoped proxy to reference the target bean. * @param originalBeanName the original name of bean diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java index 194ae88656e..8d5eac8966e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java @@ -42,7 +42,7 @@ import org.springframework.util.ClassUtils; public class DefaultIntroductionAdvisor implements IntroductionAdvisor, ClassFilter, Ordered, Serializable { private final Advice advice; - + private final Set interfaces = new HashSet(); private int order = Integer.MAX_VALUE; diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DefaultPointcutAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/support/DefaultPointcutAdvisor.java index cb4402683d8..2e97d6de128 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/DefaultPointcutAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/DefaultPointcutAdvisor.java @@ -46,7 +46,7 @@ public class DefaultPointcutAdvisor extends AbstractGenericPointcutAdvisor imple */ public DefaultPointcutAdvisor() { } - + /** * Create a DefaultPointcutAdvisor that matches all methods. *

    Pointcut.TRUE will be used as Pointcut. @@ -55,7 +55,7 @@ public class DefaultPointcutAdvisor extends AbstractGenericPointcutAdvisor imple public DefaultPointcutAdvisor(Advice advice) { this(Pointcut.TRUE, advice); } - + /** * Create a DefaultPointcutAdvisor, specifying Pointcut and Advice. * @param pointcut the Pointcut targeting the Advice diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java index 5278ee233ff..8cac8329e37 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/DelegatePerTargetObjectIntroductionInterceptor.java @@ -53,7 +53,7 @@ import org.springframework.aop.ProxyMethodInvocation; public class DelegatePerTargetObjectIntroductionInterceptor extends IntroductionInfoSupport implements IntroductionInterceptor { - /** + /** * Hold weak references to keys as we don't want to interfere with garbage collection.. */ private final Map delegateMap = new WeakHashMap(); @@ -85,12 +85,12 @@ public class DelegatePerTargetObjectIntroductionInterceptor extends Introduction public Object invoke(MethodInvocation mi) throws Throwable { if (isMethodOnIntroducedInterface(mi)) { Object delegate = getIntroductionDelegateFor(mi.getThis()); - + // Using the following method rather than direct reflection, // we get correct handling of InvocationTargetException // if the introduced method throws an exception. Object retVal = AopUtils.invokeJoinpointUsingReflection(delegate, mi.getMethod(), mi.getArguments()); - + // Massage return value if possible: if the delegate returned itself, // we really want to return the proxy. if (retVal == delegate && mi instanceof ProxyMethodInvocation) { @@ -126,7 +126,7 @@ public class DelegatePerTargetObjectIntroductionInterceptor extends Introduction } } } - + private Object createNewDelegate() { try { return this.defaultImplType.newInstance(); diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java b/spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java index fc9631bd613..340e66639d9 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/DelegatingIntroductionInterceptor.java @@ -39,7 +39,7 @@ import org.springframework.util.Assert; *

    The suppressInterface method can be used to suppress interfaces * implemented by the delegate but which should not be introduced to the owning * AOP proxy. - * + * *

    An instance of this class is serializable if the delegate is. * * @author Rod Johnson @@ -50,7 +50,7 @@ import org.springframework.util.Assert; */ public class DelegatingIntroductionInterceptor extends IntroductionInfoSupport implements IntroductionInterceptor { - + /** * Object that actually implements the interfaces. * May be "this" if a subclass implements the introduced interfaces. @@ -66,7 +66,7 @@ public class DelegatingIntroductionInterceptor extends IntroductionInfoSupport public DelegatingIntroductionInterceptor(Object delegate) { init(delegate); } - + /** * Construct a new DelegatingIntroductionInterceptor. * The delegate will be the subclass, which must implement @@ -91,8 +91,8 @@ public class DelegatingIntroductionInterceptor extends IntroductionInfoSupport suppressInterface(IntroductionInterceptor.class); suppressInterface(DynamicIntroductionAdvice.class); } - - + + /** * Subclasses may need to override this if they want to perform custom * behaviour in around advice. However, subclasses should invoke this @@ -104,7 +104,7 @@ public class DelegatingIntroductionInterceptor extends IntroductionInfoSupport // get correct handling of InvocationTargetException // if the introduced method throws an exception. Object retVal = AopUtils.invokeJoinpointUsingReflection(this.delegate, mi.getMethod(), mi.getArguments()); - + // Massage return value if possible: if the delegate returned itself, // we really want to return the proxy. if (retVal == this.delegate && mi instanceof ProxyMethodInvocation) { diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcher.java b/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcher.java index d011aa641ba..6a6a70c9851 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcher.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcher.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java index 5adc4fa5395..e70530b0982 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/DynamicMethodMatcherPointcut.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-aop/src/main/java/org/springframework/aop/support/JdkRegexpMethodPointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/JdkRegexpMethodPointcut.java index d2a4fe13951..61595ff86ac 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/JdkRegexpMethodPointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/JdkRegexpMethodPointcut.java @@ -38,13 +38,13 @@ import java.util.regex.PatternSyntaxException; * @since 1.1 */ public class JdkRegexpMethodPointcut extends AbstractRegexpMethodPointcut { - - /** + + /** * Compiled form of the patterns. */ private Pattern[] compiledPatterns = new Pattern[0]; - /** + /** * Compiled form of the exclusion patterns. */ private Pattern[] compiledExclusionPatterns = new Pattern[0]; diff --git a/spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java b/spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java index 193de1d9695..83866afb50e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/RootClassFilter.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,11 +25,11 @@ import org.springframework.aop.ClassFilter; * @author Rod Johnson */ public class RootClassFilter implements ClassFilter, Serializable { - + private Class clazz; - + // TODO inheritance - + public RootClassFilter(Class clazz) { this.clazz = clazz; } diff --git a/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java b/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java index 8023ff88373..27209a18ac1 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/StaticMethodMatcher.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,7 +22,7 @@ import org.springframework.aop.MethodMatcher; /** * Convenient abstract superclass for static method matchers, which don't care - * about arguments at runtime. + * about arguments at runtime. */ public abstract class StaticMethodMatcher implements MethodMatcher { diff --git a/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java index 8111f2e4c47..3c73521e749 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/AbstractPoolingTargetSource.java @@ -90,7 +90,7 @@ public abstract class AbstractPoolingTargetSource extends AbstractPrototypeBased * @throws Exception to avoid placing constraints on pooling APIs */ protected abstract void createPool() throws Exception; - + /** * Acquire an object from the pool. * @return an object from the pool @@ -98,7 +98,7 @@ public abstract class AbstractPoolingTargetSource extends AbstractPrototypeBased * APIs, so we're forgiving with our exception signature */ public abstract Object getTarget() throws Exception; - + /** * Return the given object to the pool. * @param target object that must have been acquired from the pool diff --git a/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java index 887e253a087..ba3e32d1f4c 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/CommonsPoolTargetSource.java @@ -41,7 +41,7 @@ import org.springframework.core.Constants; * properties are explictly not mirrored because the implementation of * PoolableObjectFactory used by this class does not implement * meaningful validation. All exposed Commons Pool properties use the corresponding - * Commons Pool defaults: for example, + * Commons Pool defaults: for example, * * @author Rod Johnson * @author Rob Harrop diff --git a/spring-aop/src/main/java/org/springframework/aop/target/PoolingConfig.java b/spring-aop/src/main/java/org/springframework/aop/target/PoolingConfig.java index 4327a2747a2..ddaad787043 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/PoolingConfig.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/PoolingConfig.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-aop/src/main/java/org/springframework/aop/target/SingletonTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/SingletonTargetSource.java index 08ae6534a64..844073a5ab8 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/SingletonTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/SingletonTargetSource.java @@ -58,11 +58,11 @@ public class SingletonTargetSource implements TargetSource, Serializable { public Class getTargetClass() { return this.target.getClass(); } - + public Object getTarget() { return this.target; } - + public void releaseTarget(Object target) { // nothing to do } diff --git a/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java b/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java index 6048f7b4846..b57ecae2357 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSource.java @@ -49,7 +49,7 @@ import org.springframework.core.NamedThreadLocal; */ public class ThreadLocalTargetSource extends AbstractPrototypeBasedTargetSource implements ThreadLocalTargetSourceStats, DisposableBean { - + /** * ThreadLocal holding the target associated with the current * thread. Unlike most ThreadLocals, which are static, this variable @@ -62,9 +62,9 @@ public class ThreadLocalTargetSource extends AbstractPrototypeBasedTargetSource * Set of managed targets, enabling us to keep track of the targets we've created. */ private final Set targetSet = new HashSet(); - + private int invocationCount; - + private int hitCount; @@ -93,7 +93,7 @@ public class ThreadLocalTargetSource extends AbstractPrototypeBasedTargetSource } return target; } - + /** * Dispose of targets if necessary; clear ThreadLocal. * @see #destroyPrototypeInstance diff --git a/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSourceStats.java b/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSourceStats.java index 7e3a2fa5cf5..688b8913306 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSourceStats.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/ThreadLocalTargetSourceStats.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,7 +23,7 @@ package org.springframework.aop.target; * @author Juergen Hoeller */ public interface ThreadLocalTargetSourceStats { - + /** * Return the number of client invocations. */ diff --git a/spring-aop/src/main/java/org/springframework/aop/target/dynamic/Refreshable.java b/spring-aop/src/main/java/org/springframework/aop/target/dynamic/Refreshable.java index 7d55a0d59a1..82d16e7fd48 100644 --- a/spring-aop/src/main/java/org/springframework/aop/target/dynamic/Refreshable.java +++ b/spring-aop/src/main/java/org/springframework/aop/target/dynamic/Refreshable.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2006 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 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 3bc43af6576..0d523ba87e3 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 @@ -36,7 +36,7 @@ public final class AspectJAdviceParameterNameDiscoverAnnotationTests @Retention(RetentionPolicy.RUNTIME) @interface MyAnnotation {} - + public void pjpAndAnAnnotation(ProceedingJoinPoint pjp, MyAnnotation ann) {} @Test diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscovererTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscovererTests.java index f135239fe09..73ec4283958 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscovererTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscovererTests.java @@ -247,7 +247,7 @@ public class AspectJAdviceParameterNameDiscovererTests { public void testReferenceBindingWithAlternateTokenizations() { assertParameterNames(getMethod("onePrimitive"),"call(bar *) && somepc(foo)",new String[] {"foo"}); assertParameterNames(getMethod("onePrimitive"),"somepc ( foo )",new String[] {"foo"}); - assertParameterNames(getMethod("onePrimitive"),"somepc( foo)",new String[] {"foo"}); + assertParameterNames(getMethod("onePrimitive"),"somepc( foo)",new String[] {"foo"}); } 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 b1678c9d7c8..954377c0e2e 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -44,7 +44,7 @@ import test.beans.subpkg.DeepBean; * @author Chris Beams */ public final class AspectJExpressionPointcutTests { - + public static final String MATCH_ALL_METHODS = "execution(* *(..))"; private Method getAge; @@ -54,8 +54,8 @@ public final class AspectJExpressionPointcutTests { private Method setSomeNumber; private Method isPostProcessed; - - + + @Before public void setUp() throws NoSuchMethodException { getAge = TestBean.class.getMethod("getAge", (Class[])null); @@ -63,7 +63,7 @@ public final class AspectJExpressionPointcutTests { setSomeNumber = TestBean.class.getMethod("setSomeNumber", new Class[]{Number.class}); isPostProcessed = TestBean.class.getMethod("isPostProcessed", (Class[]) null); } - + @Test public void testMatchExplicit() { String expression = "execution(int test.beans.TestBean.getAge())"; @@ -100,60 +100,60 @@ public final class AspectJExpressionPointcutTests { assertTrue("Expression should match setAge(int) method", methodMatcher.matches(setAge, TestBean.class)); } - + @Test public void testThis() throws SecurityException, NoSuchMethodException{ testThisOrTarget("this"); } - + @Test public void testTarget() throws SecurityException, NoSuchMethodException { testThisOrTarget("target"); } - + public static class OtherIOther implements IOther { public void absquatulate() { // Empty } - + } - + /** * This and target are equivalent. Really instanceof pointcuts. * @throws Exception * @param which this or target - * @throws NoSuchMethodException - * @throws SecurityException + * @throws NoSuchMethodException + * @throws SecurityException */ private void testThisOrTarget(String which) throws SecurityException, NoSuchMethodException { String matchesTestBean = which + "(test.beans.TestBean)"; String matchesIOther = which + "(test.beans.IOther)"; AspectJExpressionPointcut testBeanPc = new AspectJExpressionPointcut(); testBeanPc.setExpression(matchesTestBean); - + AspectJExpressionPointcut iOtherPc = new AspectJExpressionPointcut(); iOtherPc.setExpression(matchesIOther); - + assertTrue(testBeanPc.matches(TestBean.class)); assertTrue(testBeanPc.matches(getAge, TestBean.class)); assertTrue(iOtherPc.matches(OtherIOther.class.getMethod("absquatulate", (Class[])null), OtherIOther.class)); - + assertFalse(testBeanPc.matches(OtherIOther.class.getMethod("absquatulate", (Class[])null), OtherIOther.class)); } - + @Test public void testWithinRootPackage() throws SecurityException, NoSuchMethodException { testWithinPackage(false); } - + @Test public void testWithinRootAndSubpackages() throws SecurityException, NoSuchMethodException { testWithinPackage(true); } - + private void testWithinPackage(boolean matchSubpackages) throws SecurityException, NoSuchMethodException { String withinBeansPackage = "within(test.beans."; // Subpackages are matched by ** @@ -163,7 +163,7 @@ public final class AspectJExpressionPointcutTests { withinBeansPackage = withinBeansPackage + "*)"; AspectJExpressionPointcut withinBeansPc = new AspectJExpressionPointcut(); withinBeansPc.setExpression(withinBeansPackage); - + assertTrue(withinBeansPc.matches(TestBean.class)); assertTrue(withinBeansPc.matches(getAge, TestBean.class)); assertEquals(matchSubpackages, withinBeansPc.matches(DeepBean.class)); @@ -173,7 +173,7 @@ public final class AspectJExpressionPointcutTests { assertFalse(withinBeansPc.matches(OtherIOther.class.getMethod("absquatulate", (Class[])null), OtherIOther.class)); } - + @Test public void testFriendlyErrorOnNoLocationClassMatching() { AspectJExpressionPointcut pc = new AspectJExpressionPointcut(); @@ -185,7 +185,7 @@ public final class AspectJExpressionPointcutTests { assertTrue(ex.getMessage().indexOf("expression") != -1); } } - + @Test public void testFriendlyErrorOnNoLocation2ArgMatching() { AspectJExpressionPointcut pc = new AspectJExpressionPointcut(); @@ -197,7 +197,7 @@ public final class AspectJExpressionPointcutTests { assertTrue(ex.getMessage().indexOf("expression") != -1); } } - + @Test public void testFriendlyErrorOnNoLocation3ArgMatching() { AspectJExpressionPointcut pc = new AspectJExpressionPointcut(); @@ -210,7 +210,7 @@ public final class AspectJExpressionPointcutTests { } } - + @Test public void testMatchWithArgs() throws Exception { String expression = "execution(void test.beans.TestBean.setSomeNumber(Number)) && args(Double)"; @@ -329,19 +329,19 @@ public final class AspectJExpressionPointcutTests { @Test public void testAndSubstitution() { Pointcut pc = getPointcut("execution(* *(..)) and args(String)"); - PointcutExpression expr = + PointcutExpression expr = ((AspectJExpressionPointcut) pc).getPointcutExpression(); assertEquals("execution(* *(..)) && args(String)",expr.getPointcutExpression()); } - + @Test public void testMultipleAndSubstitutions() { Pointcut pc = getPointcut("execution(* *(..)) and args(String) and this(Object)"); - PointcutExpression expr = + PointcutExpression expr = ((AspectJExpressionPointcut) pc).getPointcutExpression(); - assertEquals("execution(* *(..)) && args(String) && this(Object)",expr.getPointcutExpression()); + assertEquals("execution(* *(..)) && args(String) && this(Object)",expr.getPointcutExpression()); } - + private Pointcut getPointcut(String expression) { AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut(); pointcut.setExpression(expression); 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 ce148b7faa4..37140304cbf 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 @@ -34,8 +34,8 @@ public final class BeanNamePointcutMatchingTests { public void testMatchingPointcuts() { assertMatch("someName", "bean(someName)"); - // Spring bean names are less restrictive compared to AspectJ names (methods, types etc.) - // MVC Controller-kind + // Spring bean names are less restrictive compared to AspectJ names (methods, types etc.) + // MVC Controller-kind assertMatch("someName/someOtherName", "bean(someName/someOtherName)"); assertMatch("someName/foo/someOtherName", "bean(someName/*/someOtherName)"); assertMatch("someName/foo/bar/someOtherName", "bean(someName/*/someOtherName)"); @@ -58,9 +58,9 @@ public final class BeanNamePointcutMatchingTests { // Or, and, not expressions assertMatch("someName", "bean(someName) || bean(someOtherName)"); assertMatch("someOtherName", "bean(someName) || bean(someOtherName)"); - + assertMatch("someName", "!bean(someOtherName)"); - + assertMatch("someName", "bean(someName) || !bean(someOtherName)"); assertMatch("someName", "bean(someName) && !bean(someOtherName)"); } 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 6de4f5c6407..e72e475abee 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 @@ -72,31 +72,31 @@ public final class MethodInvocationProceedingJoinPointTests { final Object raw = new TestBean(); // Will be set by advice during a method call final int newAge = 23; - + ProxyFactory pf = new ProxyFactory(raw); pf.setExposeProxy(true); pf.addAdvisor(ExposeInvocationInterceptor.ADVISOR); pf.addAdvice(new MethodBeforeAdvice() { private int depth; - + public void before(Method method, Object[] args, Object target) throws Throwable { JoinPoint jp = AbstractAspectJAdvice.currentJoinPoint(); assertTrue("Method named in toString", jp.toString().contains(method.getName())); // Ensure that these don't cause problems jp.toShortString(); jp.toLongString(); - + assertSame(target, AbstractAspectJAdvice.currentJoinPoint().getTarget()); assertFalse(AopUtils.isAopProxy(AbstractAspectJAdvice.currentJoinPoint().getTarget())); - + ITestBean thisProxy = (ITestBean) AbstractAspectJAdvice.currentJoinPoint().getThis(); assertTrue(AopUtils.isAopProxy(AbstractAspectJAdvice.currentJoinPoint().getThis())); - + assertNotSame(target, thisProxy); - + // Check getting again doesn't cause a problem assertSame(thisProxy, AbstractAspectJAdvice.currentJoinPoint().getThis()); - + // Try reentrant call--will go through this advice. // Be sure to increment depth to avoid infinite recursion if (depth++ == 0) { @@ -109,10 +109,10 @@ public final class MethodInvocationProceedingJoinPointTests { assertSame(AopContext.currentProxy(), thisProxy); assertSame(target, raw); - + assertSame(method.getName(), AbstractAspectJAdvice.currentJoinPoint().getSignature().getName()); assertEquals(method.getModifiers(), AbstractAspectJAdvice.currentJoinPoint().getSignature().getModifiers()); - + MethodSignature msig = (MethodSignature) AbstractAspectJAdvice.currentJoinPoint().getSignature(); assertSame("Return same MethodSignature repeatedly", msig, AbstractAspectJAdvice.currentJoinPoint().getSignature()); assertSame("Return same JoinPoint repeatedly", AbstractAspectJAdvice.currentJoinPoint(), AbstractAspectJAdvice.currentJoinPoint()); @@ -146,7 +146,7 @@ public final class MethodInvocationProceedingJoinPointTests { catch (UnsupportedOperationException ex) { // Expected } - + try { sloc.getFileName(); fail("Can't get file name"); @@ -191,7 +191,7 @@ public final class MethodInvocationProceedingJoinPointTests { // it serves our purpose here JoinPoint.StaticPart aspectJVersionJp = Factory.makeEncSJP(method); JoinPoint jp = AbstractAspectJAdvice.currentJoinPoint(); - + assertEquals(aspectJVersionJp.getSignature().toLongString(), jp.getSignature().toLongString()); assertEquals(aspectJVersionJp.getSignature().toShortString(), jp.getSignature().toShortString()); assertEquals(aspectJVersionJp.getSignature().toString(), jp.getSignature().toString()); 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 824f51433b6..d9769685c5d 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 @@ -38,37 +38,37 @@ public final class TigerAspectJAdviceParameterNameDiscovererTests public void testAtTarget() { assertParameterNames(getMethod("oneAnnotation"),"@target(a)",new String[]{"a"}); } - + @Test public void testAtArgs() { assertParameterNames(getMethod("oneAnnotation"),"@args(a)",new String[]{"a"}); } - + @Test public void testAtWithin() { assertParameterNames(getMethod("oneAnnotation"),"@within(a)",new String[]{"a"}); } - + @Test public void testAtWithincode() { assertParameterNames(getMethod("oneAnnotation"),"@withincode(a)",new String[]{"a"}); } - + @Test public void testAtAnnotation() { assertParameterNames(getMethod("oneAnnotation"),"@annotation(a)",new String[]{"a"}); } - + @Test public void testAmbiguousAnnotationTwoVars() { assertException(getMethod("twoAnnotations"),"@annotation(a) && @this(x)",AmbiguousBindingException.class, "Found 2 potential annotation variable(s), and 2 potential argument slots"); } - + @Test public void testAmbiguousAnnotationOneVar() { assertException(getMethod("oneAnnotation"),"@annotation(a) && @this(x)",IllegalArgumentException.class, - "Found 2 candidate annotation binding variables but only one potential argument binding slot"); + "Found 2 candidate annotation binding variables but only one potential argument binding slot"); } @Test diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java index 9877171a60a..e6ca2ce3cf3 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java @@ -32,7 +32,7 @@ import test.annotation.transaction.Tx; import test.beans.TestBean; -/** +/** * Java5-specific {@link AspectJExpressionPointcutTests}. * * @author Rod Johnson @@ -54,10 +54,10 @@ public final class TigerAspectJExpressionPointcutTests { methodsOnHasGeneric.put(m.getName(), m); } } - + public static class HasGeneric { - + public void setFriends(List friends) { } public void setEnemies(List enemies) { @@ -73,20 +73,20 @@ public final class TigerAspectJExpressionPointcutTests { String expression = "execution(* set*(java.util.List) )"; AspectJExpressionPointcut ajexp = new AspectJExpressionPointcut(); ajexp.setExpression(expression); - + // TODO this will currently map, would be nice for optimization //assertTrue(ajexp.matches(HasGeneric.class)); //assertFalse(ajexp.matches(TestBean.class)); - + Method takesGenericList = methodsOnHasGeneric.get("setFriends"); assertTrue(ajexp.matches(takesGenericList, HasGeneric.class)); assertTrue(ajexp.matches(methodsOnHasGeneric.get("setEnemies"), HasGeneric.class)); assertFalse(ajexp.matches(methodsOnHasGeneric.get("setPartners"), HasGeneric.class)); assertFalse(ajexp.matches(methodsOnHasGeneric.get("setPhoneNumbers"), HasGeneric.class)); - + assertFalse(ajexp.matches(getAge, TestBean.class)); } - + @Test public void testMatchVarargs() throws SecurityException, NoSuchMethodException { class MyTemplate { @@ -94,20 +94,20 @@ public final class TigerAspectJExpressionPointcutTests { return 0; } } - + String expression = "execution(int *.*(String, Object...))"; AspectJExpressionPointcut jdbcVarArgs = new AspectJExpressionPointcut(); jdbcVarArgs.setExpression(expression); - + // TODO: the expression above no longer matches Object[] // assertFalse(jdbcVarArgs.matches( // JdbcTemplate.class.getMethod("queryForInt", String.class, Object[].class), // JdbcTemplate.class)); - + assertTrue(jdbcVarArgs.matches( MyTemplate.class.getMethod("queryForInt", String.class, Object[].class), MyTemplate.class)); - + Method takesGenericList = methodsOnHasGeneric.get("setFriends"); assertFalse(jdbcVarArgs.matches(takesGenericList, HasGeneric.class)); assertFalse(jdbcVarArgs.matches(methodsOnHasGeneric.get("setEnemies"), HasGeneric.class)); @@ -115,44 +115,44 @@ public final class TigerAspectJExpressionPointcutTests { assertFalse(jdbcVarArgs.matches(methodsOnHasGeneric.get("setPhoneNumbers"), HasGeneric.class)); assertFalse(jdbcVarArgs.matches(getAge, TestBean.class)); } - + @Test public void testMatchAnnotationOnClassWithAtWithin() throws SecurityException, NoSuchMethodException { String expression = "@within(test.annotation.transaction.Tx)"; testMatchAnnotationOnClass(expression); } - + @Test public void testMatchAnnotationOnClassWithoutBinding() throws SecurityException, NoSuchMethodException { String expression = "within(@test.annotation.transaction.Tx *)"; testMatchAnnotationOnClass(expression); } - + @Test public void testMatchAnnotationOnClassWithSubpackageWildcard() throws SecurityException, NoSuchMethodException { String expression = "within(@(test.annotation..*) *)"; AspectJExpressionPointcut springAnnotatedPc = testMatchAnnotationOnClass(expression); - assertFalse(springAnnotatedPc.matches(TestBean.class.getMethod("setName", String.class), + assertFalse(springAnnotatedPc.matches(TestBean.class.getMethod("setName", String.class), TestBean.class)); - assertTrue(springAnnotatedPc.matches(SpringAnnotated.class.getMethod("foo", (Class[]) null), + assertTrue(springAnnotatedPc.matches(SpringAnnotated.class.getMethod("foo", (Class[]) null), SpringAnnotated.class)); - + expression = "within(@(test.annotation.transaction..*) *)"; AspectJExpressionPointcut springTxAnnotatedPc = testMatchAnnotationOnClass(expression); - assertFalse(springTxAnnotatedPc.matches(SpringAnnotated.class.getMethod("foo", (Class[]) null), + assertFalse(springTxAnnotatedPc.matches(SpringAnnotated.class.getMethod("foo", (Class[]) null), SpringAnnotated.class)); } - + @Test public void testMatchAnnotationOnClassWithExactPackageWildcard() throws SecurityException, NoSuchMethodException { String expression = "within(@(test.annotation.transaction.*) *)"; testMatchAnnotationOnClass(expression); } - + private AspectJExpressionPointcut testMatchAnnotationOnClass(String expression) throws SecurityException, NoSuchMethodException { AspectJExpressionPointcut ajexp = new AspectJExpressionPointcut(); ajexp.setExpression(expression); - + assertFalse(ajexp.matches(getAge, TestBean.class)); assertTrue(ajexp.matches(HasTransactionalAnnotation.class.getMethod("foo", (Class[]) null), HasTransactionalAnnotation.class)); assertTrue(ajexp.matches(HasTransactionalAnnotation.class.getMethod("bar", String.class), HasTransactionalAnnotation.class)); @@ -160,13 +160,13 @@ public final class TigerAspectJExpressionPointcutTests { assertFalse(ajexp.matches(BeanA.class.getMethod("setName", String.class), BeanA.class)); return ajexp; } - + @Test public void testAnnotationOnMethodWithFQN() throws SecurityException, NoSuchMethodException { String expression = "@annotation(test.annotation.transaction.Tx)"; AspectJExpressionPointcut ajexp = new AspectJExpressionPointcut(); ajexp.setExpression(expression); - + assertFalse(ajexp.matches(getAge, TestBean.class)); assertFalse(ajexp.matches(HasTransactionalAnnotation.class.getMethod("foo", (Class[]) null), HasTransactionalAnnotation.class)); assertFalse(ajexp.matches(HasTransactionalAnnotation.class.getMethod("bar", String.class), HasTransactionalAnnotation.class)); @@ -174,13 +174,13 @@ public final class TigerAspectJExpressionPointcutTests { assertTrue(ajexp.matches(BeanA.class.getMethod("getAge", (Class[]) null), BeanA.class)); assertFalse(ajexp.matches(BeanA.class.getMethod("setName", String.class), BeanA.class)); } - + @Test public void testAnnotationOnMethodWithWildcard() throws SecurityException, NoSuchMethodException { String expression = "execution(@(test.annotation..*) * *(..))"; AspectJExpressionPointcut anySpringMethodAnnotation = new AspectJExpressionPointcut(); anySpringMethodAnnotation.setExpression(expression); - + assertFalse(anySpringMethodAnnotation.matches(getAge, TestBean.class)); assertFalse(anySpringMethodAnnotation.matches(HasTransactionalAnnotation.class.getMethod("foo", (Class[]) null), HasTransactionalAnnotation.class)); assertFalse(anySpringMethodAnnotation.matches(HasTransactionalAnnotation.class.getMethod("bar", String.class), HasTransactionalAnnotation.class)); @@ -194,43 +194,43 @@ public final class TigerAspectJExpressionPointcutTests { String expression = "@args(*, test.annotation.EmptySpringAnnotation))"; AspectJExpressionPointcut takesSpringAnnotatedArgument2 = new AspectJExpressionPointcut(); takesSpringAnnotatedArgument2.setExpression(expression); - + assertFalse(takesSpringAnnotatedArgument2.matches(getAge, TestBean.class)); assertFalse(takesSpringAnnotatedArgument2.matches(HasTransactionalAnnotation.class.getMethod("foo", (Class[]) null), HasTransactionalAnnotation.class)); assertFalse(takesSpringAnnotatedArgument2.matches(HasTransactionalAnnotation.class.getMethod("bar", String.class), HasTransactionalAnnotation.class)); assertFalse(takesSpringAnnotatedArgument2.matches(BeanA.class.getMethod("setName", String.class), BeanA.class)); assertFalse(takesSpringAnnotatedArgument2.matches(BeanA.class.getMethod("getAge", (Class[]) null), BeanA.class)); assertFalse(takesSpringAnnotatedArgument2.matches(BeanA.class.getMethod("setName", String.class), BeanA.class)); - + assertTrue(takesSpringAnnotatedArgument2.matches( ProcessesSpringAnnotatedParameters.class.getMethod("takesAnnotatedParameters", TestBean.class, SpringAnnotated.class), ProcessesSpringAnnotatedParameters.class)); - + // True because it maybeMatches with potential argument subtypes assertTrue(takesSpringAnnotatedArgument2.matches( ProcessesSpringAnnotatedParameters.class.getMethod("takesNoAnnotatedParameters", TestBean.class, BeanA.class), ProcessesSpringAnnotatedParameters.class)); - + assertFalse(takesSpringAnnotatedArgument2.matches( ProcessesSpringAnnotatedParameters.class.getMethod("takesNoAnnotatedParameters", TestBean.class, BeanA.class), ProcessesSpringAnnotatedParameters.class, new Object[] { new TestBean(), new BeanA()}) ); } - + @Test public void testAnnotationOnMethodArgumentsWithWildcards() throws SecurityException, NoSuchMethodException { String expression = "execution(* *(*, @(test..*) *))"; AspectJExpressionPointcut takesSpringAnnotatedArgument2 = new AspectJExpressionPointcut(); takesSpringAnnotatedArgument2.setExpression(expression); - + assertFalse(takesSpringAnnotatedArgument2.matches(getAge, TestBean.class)); assertFalse(takesSpringAnnotatedArgument2.matches(HasTransactionalAnnotation.class.getMethod("foo", (Class[]) null), HasTransactionalAnnotation.class)); assertFalse(takesSpringAnnotatedArgument2.matches(HasTransactionalAnnotation.class.getMethod("bar", String.class), HasTransactionalAnnotation.class)); assertFalse(takesSpringAnnotatedArgument2.matches(BeanA.class.getMethod("setName", String.class), BeanA.class)); assertFalse(takesSpringAnnotatedArgument2.matches(BeanA.class.getMethod("getAge", (Class[]) null), BeanA.class)); assertFalse(takesSpringAnnotatedArgument2.matches(BeanA.class.getMethod("setName", String.class), BeanA.class)); - + assertTrue(takesSpringAnnotatedArgument2.matches( ProcessesSpringAnnotatedParameters.class.getMethod("takesAnnotatedParameters", TestBean.class, SpringAnnotated.class), ProcessesSpringAnnotatedParameters.class)); @@ -267,7 +267,7 @@ public final class TigerAspectJExpressionPointcutTests { } } - + static class BeanA { private String name; @@ -283,7 +283,7 @@ public final class TigerAspectJExpressionPointcutTests { } } - + @Tx static class BeanB { private String name; diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/TrickyAspectJPointcutExpressionTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/TrickyAspectJPointcutExpressionTests.java index 227c1553c31..2d8acfe9925 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/TrickyAspectJPointcutExpressionTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/TrickyAspectJPointcutExpressionTests.java @@ -67,7 +67,7 @@ public class TrickyAspectJPointcutExpressionTests { // Test with default class loader first... testAdvice(new DefaultPointcutAdvisor(pointcut, logAdvice), logAdvice, new TestServiceImpl(), "TestServiceImpl"); - + // Then try again with a different class loader on the target... SimpleThrowawayClassLoader loader = new SimpleThrowawayClassLoader(new TestServiceImpl().getClass().getClassLoader()); // Make sure the interface is loaded from the parent class loader @@ -102,7 +102,7 @@ public class TrickyAspectJPointcutExpressionTests { } assertEquals(1, logAdvice.getCountThrows()); } - + public static class SimpleThrowawayClassLoader extends OverridingClassLoader { /** @@ -114,7 +114,7 @@ public class TrickyAspectJPointcutExpressionTests { } } - + public static class TestException extends RuntimeException { public TestException(String string) { @@ -129,11 +129,11 @@ public class TrickyAspectJPointcutExpressionTests { @Inherited public static @interface Log { } - + public static interface TestService { public String sayHello(); } - + @Log public static class TestServiceImpl implements TestService{ public String sayHello() { @@ -142,11 +142,11 @@ public class TrickyAspectJPointcutExpressionTests { } public class LogUserAdvice implements MethodBeforeAdvice, ThrowsAdvice { - + private int countBefore = 0; - + private int countThrows = 0; - + public void before(Method method, Object[] objects, Object o) throws Throwable { countBefore++; } @@ -163,12 +163,12 @@ public class TrickyAspectJPointcutExpressionTests { public int getCountThrows() { return countThrows; } - + public void reset() { countThrows = 0; countBefore = 0; } } - + } 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 c3708d6b86c..7b6811aee86 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 @@ -63,7 +63,7 @@ public final class TypePatternClassFilterTests { assertFalse("Must be excluded: not subclass", tpcf.matches(IOther.class)); assertFalse("Must be excluded: not subclass", tpcf.matches(DefaultListableBeanFactory.class)); } - + @Test public void testAndOrNotReplacement() { TypePatternClassFilter tpcf = new TypePatternClassFilter("java.lang.Object or java.lang.String"); @@ -75,7 +75,7 @@ public final class TypePatternClassFilterTests { assertFalse("matches Double",tpcf.matches(Double.class)); tpcf = new TypePatternClassFilter("java.lang.Number+ and not java.lang.Float"); assertFalse("matches Float",tpcf.matches(Float.class)); - assertTrue("matches Double",tpcf.matches(Double.class)); + assertTrue("matches Double",tpcf.matches(Double.class)); } @Test(expected=IllegalArgumentException.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 1c366a70425..89716a8789d 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 @@ -76,7 +76,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests { * @return the fixture */ protected abstract AspectJAdvisorFactory getFixture(); - + @Test public void testRejectsPerCflowAspect() { @@ -88,7 +88,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests { assertTrue(ex.getMessage().indexOf("PERCFLOW") != -1); } } - + @Test public void testRejectsPerCflowBelowAspect() { try { @@ -105,11 +105,11 @@ public abstract class AbstractAspectJAdvisorFactoryTests { TestBean target = new TestBean(); int realAge = 65; target.setAge(realAge); - TestBean itb = (TestBean) createProxy(target, + TestBean itb = (TestBean) createProxy(target, getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(new PerTargetAspect(), "someBean")), TestBean.class); assertEquals("Around advice must NOT apply", realAge, itb.getAge()); - + Advised advised = (Advised) itb; SyntheticInstantiationAdvisor sia = (SyntheticInstantiationAdvisor) advised.getAdvisors()[1]; assertTrue(sia.getPointcut().getMethodMatcher().matches(TestBean.class.getMethod("getSpouse"), null)); @@ -121,10 +121,10 @@ public abstract class AbstractAspectJAdvisorFactoryTests { // Check that the perclause pointcut is valid assertTrue(maaif.getAspectMetadata().getPerClausePointcut().getMethodMatcher().matches(TestBean.class.getMethod("getSpouse"), null)); assertNotSame(imapa.getDeclaredPointcut(), imapa.getPointcut()); - + // Hit the method in the per clause to instantiate the aspect itb.getSpouse(); - + assertTrue(maaif.isMaterialized()); assertEquals("Around advice must apply", 0, itb.getAge()); @@ -190,11 +190,11 @@ public abstract class AbstractAspectJAdvisorFactoryTests { TestBean target = new TestBean(); int realAge = 65; target.setAge(realAge); - TestBean itb = (TestBean) createProxy(target, + TestBean itb = (TestBean) createProxy(target, getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(new PerThisAspect(), "someBean")), TestBean.class); assertEquals("Around advice must NOT apply", realAge, itb.getAge()); - + Advised advised = (Advised) itb; // Will be ExposeInvocationInterceptor, synthetic instantiation advisor, 2 method advisors assertEquals(4, advised.getAdvisors().length); @@ -208,30 +208,30 @@ public abstract class AbstractAspectJAdvisorFactoryTests { // Check that the perclause pointcut is valid assertTrue(maaif.getAspectMetadata().getPerClausePointcut().getMethodMatcher().matches(TestBean.class.getMethod("getSpouse"), null)); assertNotSame(imapa.getDeclaredPointcut(), imapa.getPointcut()); - + // Hit the method in the per clause to instantiate the aspect itb.getSpouse(); - + assertTrue(maaif.isMaterialized()); assertTrue(imapa.getDeclaredPointcut().getMethodMatcher().matches(TestBean.class.getMethod("getAge"), null)); - + assertEquals("Around advice must apply", 0, itb.getAge()); assertEquals("Around advice must apply", 1, itb.getAge()); } - + @Test public void testPerTypeWithinAspect() throws SecurityException, NoSuchMethodException { TestBean target = new TestBean(); int realAge = 65; target.setAge(realAge); PerTypeWithinAspectInstanceFactory aif = new PerTypeWithinAspectInstanceFactory(); - TestBean itb = (TestBean) createProxy(target, - getFixture().getAdvisors(aif), + TestBean itb = (TestBean) createProxy(target, + getFixture().getAdvisors(aif), TestBean.class); assertEquals("No method calls", 0, aif.getInstantiationCount()); assertEquals("Around advice must now apply", 0, itb.getAge()); - + Advised advised = (Advised) itb; // Will be ExposeInvocationInterceptor, synthetic instantiation advisor, 2 method advisors assertEquals(4, advised.getAdvisors().length); @@ -245,19 +245,19 @@ public abstract class AbstractAspectJAdvisorFactoryTests { // Check that the perclause pointcut is valid assertTrue(maaif.getAspectMetadata().getPerClausePointcut().getMethodMatcher().matches(TestBean.class.getMethod("getSpouse"), null)); assertNotSame(imapa.getDeclaredPointcut(), imapa.getPointcut()); - + // Hit the method in the per clause to instantiate the aspect itb.getSpouse(); - + assertTrue(maaif.isMaterialized()); assertTrue(imapa.getDeclaredPointcut().getMethodMatcher().matches(TestBean.class.getMethod("getAge"), null)); - + assertEquals("Around advice must still apply", 1, itb.getAge()); assertEquals("Around advice must still apply", 2, itb.getAge()); - - TestBean itb2 = (TestBean) createProxy(target, - getFixture().getAdvisors(aif), + + TestBean itb2 = (TestBean) createProxy(target, + getFixture().getAdvisors(aif), TestBean.class); assertEquals(1, aif.getInstantiationCount()); assertEquals("Around advice be independent for second instance", 0, itb2.getAge()); @@ -282,20 +282,20 @@ public abstract class AbstractAspectJAdvisorFactoryTests { @Test public void testNamedPointcutFromAspectLibraryWithBinding() { TestBean target = new TestBean(); - ITestBean itb = (ITestBean) createProxy(target, - getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(new NamedPointcutAspectFromLibraryWithBinding(),"someBean")), + ITestBean itb = (ITestBean) createProxy(target, + getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(new NamedPointcutAspectFromLibraryWithBinding(),"someBean")), ITestBean.class); itb.setAge(10); assertEquals("Around advice must apply", 20, itb.getAge()); assertEquals(20,target.getAge()); } - + private void testNamedPointcuts(Object aspectInstance) { TestBean target = new TestBean(); int realAge = 65; target.setAge(realAge); - ITestBean itb = (ITestBean) createProxy(target, - getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(aspectInstance,"someBean")), + ITestBean itb = (ITestBean) createProxy(target, + getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(aspectInstance,"someBean")), ITestBean.class); assertEquals("Around advice must apply", -1, itb.getAge()); assertEquals(realAge, target.getAge()); @@ -304,8 +304,8 @@ public abstract class AbstractAspectJAdvisorFactoryTests { @Test public void testBindingWithSingleArg() { TestBean target = new TestBean(); - ITestBean itb = (ITestBean) createProxy(target, - getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(new BindingAspectWithSingleArg(),"someBean")), + ITestBean itb = (ITestBean) createProxy(target, + getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(new BindingAspectWithSingleArg(),"someBean")), ITestBean.class); itb.setAge(10); assertEquals("Around advice must apply", 20, itb.getAge()); @@ -315,10 +315,10 @@ public abstract class AbstractAspectJAdvisorFactoryTests { @Test public void testBindingWithMultipleArgsDifferentlyOrdered() { ManyValuedArgs target = new ManyValuedArgs(); - ManyValuedArgs mva = (ManyValuedArgs) createProxy(target, - getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(new ManyValuedArgs(),"someBean")), + ManyValuedArgs mva = (ManyValuedArgs) createProxy(target, + getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(new ManyValuedArgs(),"someBean")), ManyValuedArgs.class); - + String a = "a"; int b = 12; int c = 25; @@ -327,7 +327,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests { String expectedResult = a + b+ c + d + e; assertEquals(expectedResult, mva.mungeArgs(a, b, c, d, e)); } - + /** * In this case the introduction will be made. */ @@ -344,7 +344,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests { assertFalse(lockable.locked()); lockable.lock(); assertTrue(lockable.locked()); - + NotLockable notLockable2Target = new NotLockable(); NotLockable notLockable2 = (NotLockable) createProxy(notLockable2Target, getFixture().getAdvisors( @@ -363,17 +363,17 @@ public abstract class AbstractAspectJAdvisorFactoryTests { } assertTrue(lockable2.locked()); } - + @Test public void testIntroductionAdvisorExcludedFromTargetImplementingInterface() { assertTrue(AopUtils.findAdvisorsThatCanApply( getFixture().getAdvisors( new SingletonMetadataAwareAspectInstanceFactory( - new MakeLockable(),"someBean")), + new MakeLockable(),"someBean")), CannotBeUnlocked.class).isEmpty()); assertEquals(2, AopUtils.findAdvisorsThatCanApply(getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(new MakeLockable(),"someBean")), NotLockable.class).size()); } - + @Test public void testIntroductionOnTargetImplementingInterface() { CannotBeUnlocked target = new CannotBeUnlocked(); @@ -398,7 +398,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests { // Ok } } - + @SuppressWarnings("unchecked") @Test public void testIntroductionOnTargetExcludedByTypePattern() { @@ -415,7 +415,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests { @Test public void testIntroductionBasedOnAnnotationMatch_Spr5307() { AnnotatedTarget target = new AnnotatedTargetImpl(); - + List advisors = getFixture().getAdvisors( new SingletonMetadataAwareAspectInstanceFactory(new MakeAnnotatedTypeModifiable(),"someBean")); Object proxy = createProxy(target, @@ -430,19 +430,19 @@ public abstract class AbstractAspectJAdvisorFactoryTests { // TODO: Why does this test fail? It hasn't been run before, so it maybe never actually passed... public void XtestIntroductionWithArgumentBinding() { TestBean target = new TestBean(); - + List advisors = getFixture().getAdvisors( new SingletonMetadataAwareAspectInstanceFactory(new MakeITestBeanModifiable(),"someBean")); advisors.addAll(getFixture().getAdvisors( new SingletonMetadataAwareAspectInstanceFactory(new MakeLockable(),"someBean"))); - + Modifiable modifiable = (Modifiable) createProxy(target, advisors, ITestBean.class); assertTrue(modifiable instanceof Modifiable); Lockable lockable = (Lockable) modifiable; assertFalse(lockable.locked()); - + ITestBean itb = (ITestBean) modifiable; assertFalse(modifiable.isModified()); int oldAge = itb.getAge(); @@ -454,7 +454,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests { assertFalse("Setting same value does not modify", modifiable.isModified()); itb.setName("And now for something completely different"); assertTrue(modifiable.isModified()); - + lockable.lock(); assertTrue(lockable.locked()); try { @@ -474,8 +474,8 @@ public abstract class AbstractAspectJAdvisorFactoryTests { UnsupportedOperationException expectedException = new UnsupportedOperationException(); List advisors = getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(new ExceptionAspect(expectedException),"someBean")); assertEquals("One advice method was found", 1, advisors.size()); - ITestBean itb = (ITestBean) createProxy(target, - advisors, + ITestBean itb = (ITestBean) createProxy(target, + advisors, ITestBean.class); try { itb.getAge(); @@ -485,7 +485,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests { assertSame(expectedException, ex); } } - + // TODO document this behaviour. // Is it different AspectJ behaviour, at least for checked exceptions? @Test @@ -494,8 +494,8 @@ public abstract class AbstractAspectJAdvisorFactoryTests { RemoteException expectedException = new RemoteException(); List advisors = getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(new ExceptionAspect(expectedException),"someBean")); assertEquals("One advice method was found", 1, advisors.size()); - ITestBean itb = (ITestBean) createProxy(target, - advisors, + ITestBean itb = (ITestBean) createProxy(target, + advisors, ITestBean.class); try { itb.getAge(); @@ -505,7 +505,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests { assertSame(expectedException, ex.getCause()); } } - + protected Object createProxy(Object target, List advisors, Class... interfaces) { ProxyFactory pf = new ProxyFactory(target); if (interfaces.length > 1 || interfaces[0].isInterface()) { @@ -533,8 +533,8 @@ public abstract class AbstractAspectJAdvisorFactoryTests { TwoAdviceAspect twoAdviceAspect = new TwoAdviceAspect(); List advisors = getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(twoAdviceAspect,"someBean")); assertEquals("Two advice methods found", 2, advisors.size()); - ITestBean itb = (ITestBean) createProxy(target, - advisors, + ITestBean itb = (ITestBean) createProxy(target, + advisors, ITestBean.class); itb.setName(""); assertEquals(0, itb.getAge()); @@ -549,8 +549,8 @@ public abstract class AbstractAspectJAdvisorFactoryTests { ExceptionHandling afterReturningAspect = new ExceptionHandling(); List advisors = getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(afterReturningAspect,"someBean")); - Echo echo = (Echo) createProxy(target, - advisors, + Echo echo = (Echo) createProxy(target, + advisors, Echo.class); assertEquals(0, afterReturningAspect.successCount); assertEquals("", echo.echo("")); @@ -886,45 +886,45 @@ public abstract class AbstractAspectJAdvisorFactoryTests { */ @Aspect abstract class AbstractMakeModifiable { - + public interface MutableModifable extends Modifiable { void markDirty(); } - + public static class ModifiableImpl implements MutableModifable { private boolean modified; - + public void acceptChanges() { modified = false; } - + public boolean isModified() { return modified; } - + public void markDirty() { this.modified = true; } } - - @Before(value="execution(void set*(*)) && this(modifiable) && args(newValue)", + + @Before(value="execution(void set*(*)) && this(modifiable) && args(newValue)", argNames="modifiable,newValue") - public void recordModificationIfSetterArgumentDiffersFromOldValue(JoinPoint jp, + public void recordModificationIfSetterArgumentDiffersFromOldValue(JoinPoint jp, MutableModifable mixin, Object newValue) { - + /* * We use the mixin to check and, if necessary, change, - * modification status. We need the JoinPoint to get the - * setter method. We use newValue for comparison. + * modification status. We need the JoinPoint to get the + * setter method. We use newValue for comparison. * We try to invoke the getter if possible. */ - + if (mixin.isModified()) { // Already changed, don't need to change again //System.out.println("changed"); return; } - + // Find the current raw value, by invoking the corresponding setter Method correspondingGetter = getGetterFromSetter(((MethodSignature) jp.getSignature()).getMethod()); boolean modified = true; @@ -946,12 +946,12 @@ abstract class AbstractMakeModifiable { mixin.markDirty(); } } - + private Method getGetterFromSetter(Method setter) { String getterName = setter.getName().replaceFirst("set", "get"); try { return setter.getDeclaringClass().getMethod(getterName, (Class[]) null); - } + } catch (NoSuchMethodException ex) { // must be write only return null; @@ -968,7 +968,7 @@ abstract class AbstractMakeModifiable { */ @Aspect class MakeITestBeanModifiable extends AbstractMakeModifiable { - + @DeclareParents(value = "test.beans.ITestBean+", defaultImpl=ModifiableImpl.class) public static MutableModifable mixin; @@ -982,7 +982,7 @@ class MakeITestBeanModifiable extends AbstractMakeModifiable { */ @Aspect class MakeAnnotatedTypeModifiable extends AbstractMakeModifiable { - + @DeclareParents(value = "(@org.springframework.aop.aspectj.annotation.Measured *)", // @DeclareParents(value = "(@Measured *)", // this would be a nice alternative... defaultImpl=DefaultLockable.class) @@ -996,11 +996,11 @@ class MakeAnnotatedTypeModifiable extends AbstractMakeModifiable { */ @Aspect class MakeLockable { - + @DeclareParents(value = "org.springframework..*", defaultImpl=DefaultLockable.class) public static Lockable mixin; - + @Before(value="execution(void set*(*)) && this(mixin)", argNames="mixin") public void checkNotLocked( Lockable mixin) // Bind to arg @@ -1043,9 +1043,9 @@ class CannotBeUnlocked implements Lockable, Comparable { interface Modifiable { boolean isModified(); - + void acceptChanges(); - + } /** @@ -1057,14 +1057,14 @@ interface AnnotatedTarget { @Measured class AnnotatedTargetImpl implements AnnotatedTarget { - + } @Retention(RetentionPolicy.RUNTIME) @interface Measured {} class NotLockable { - + private int intValue; public int getIntValue() { @@ -1097,5 +1097,5 @@ class PerThisAspect { public void countSetter() { ++count; } - + } 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 5f108cb56da..ebb9f03c437 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 @@ -44,7 +44,7 @@ public final class ArgumentBindingTests { TestBean tb = new TestBean(); AspectJProxyFactory proxyFactory = new AspectJProxyFactory(tb); proxyFactory.addAspect(NamedPointcutWithArgs.class); - + ITestBean proxiedTestBean = (ITestBean) proxyFactory.getProxy(); proxiedTestBean.setName("Supercalifragalisticexpialidocious"); // should throw } @@ -54,7 +54,7 @@ public final class ArgumentBindingTests { TransactionalBean tb = new TransactionalBean(); AspectJProxyFactory proxyFactory = new AspectJProxyFactory(tb); proxyFactory.addAspect(PointcutWithAnnotationArgument.class); - + ITransactionalBean proxiedTestBean = (ITransactionalBean) proxyFactory.getProxy(); proxiedTestBean.doInTransaction(); // should throw } diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java index ead9f1f62cc..1627f57d69c 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java @@ -29,56 +29,56 @@ import test.beans.TestBean; /** - * @author Rod Johnson + * @author Rod Johnson * @author Chris Beams */ public final class AspectJPointcutAdvisorTests { - + private AspectJAdvisorFactory af = new ReflectiveAspectJAdvisorFactory(); @Test public void testSingleton() throws SecurityException, NoSuchMethodException { AspectJExpressionPointcut ajexp = new AspectJExpressionPointcut(); ajexp.setExpression(AspectJExpressionPointcutTests.MATCH_ALL_METHODS); - - InstantiationModelAwarePointcutAdvisorImpl ajpa = new InstantiationModelAwarePointcutAdvisorImpl(af, ajexp, - new SingletonMetadataAwareAspectInstanceFactory(new AbstractAspectJAdvisorFactoryTests.ExceptionAspect(null),"someBean"), + + InstantiationModelAwarePointcutAdvisorImpl ajpa = new InstantiationModelAwarePointcutAdvisorImpl(af, ajexp, + new SingletonMetadataAwareAspectInstanceFactory(new AbstractAspectJAdvisorFactoryTests.ExceptionAspect(null),"someBean"), TestBean.class.getMethod("getAge", (Class[]) null),1,"someBean"); assertSame(Pointcut.TRUE, ajpa.getAspectMetadata().getPerClausePointcut()); assertFalse(ajpa.isPerInstance()); } - + @Test public void testPerTarget() throws SecurityException, NoSuchMethodException { AspectJExpressionPointcut ajexp = new AspectJExpressionPointcut(); ajexp.setExpression(AspectJExpressionPointcutTests.MATCH_ALL_METHODS); - - InstantiationModelAwarePointcutAdvisorImpl ajpa = new InstantiationModelAwarePointcutAdvisorImpl(af, ajexp, + + InstantiationModelAwarePointcutAdvisorImpl ajpa = new InstantiationModelAwarePointcutAdvisorImpl(af, ajexp, new SingletonMetadataAwareAspectInstanceFactory(new PerTargetAspect(),"someBean"), null, 1, "someBean"); assertNotSame(Pointcut.TRUE, ajpa.getAspectMetadata().getPerClausePointcut()); assertTrue(ajpa.getAspectMetadata().getPerClausePointcut() instanceof AspectJExpressionPointcut); assertTrue(ajpa.isPerInstance()); - + assertTrue(ajpa.getAspectMetadata().getPerClausePointcut().getClassFilter().matches(TestBean.class)); assertFalse(ajpa.getAspectMetadata().getPerClausePointcut().getMethodMatcher().matches( TestBean.class.getMethod("getAge", (Class[]) null), TestBean.class)); - + assertTrue(ajpa.getAspectMetadata().getPerClausePointcut().getMethodMatcher().matches( TestBean.class.getMethod("getSpouse", (Class[]) null), TestBean.class)); } - + @Test(expected=AopConfigException.class) public void testPerCflowTarget() { testIllegalInstantiationModel(AbstractAspectJAdvisorFactoryTests.PerCflowAspect.class); } - + @Test(expected=AopConfigException.class) public void testPerCflowBelowTarget() { testIllegalInstantiationModel(AbstractAspectJAdvisorFactoryTests.PerCflowBelowAspect.class); } - + private void testIllegalInstantiationModel(Class c) throws AopConfigException { new AspectMetadata(c,"someBean"); } 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 f1c32fe992e..472b495a50d 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -37,7 +37,7 @@ public final class AspectMetadataTests { public void testNotAnAspect() { new AspectMetadata(String.class,"someBean"); } - + @Test public void testSingletonAspect() { AspectMetadata am = new AspectMetadata(ExceptionAspect.class,"someBean"); @@ -45,7 +45,7 @@ public final class AspectMetadataTests { assertSame(Pointcut.TRUE, am.getPerClausePointcut()); assertEquals(PerClauseKind.SINGLETON, am.getAjType().getPerClause().getKind()); } - + @Test public void testPerTargetAspect() { AspectMetadata am = new AspectMetadata(PerTargetAspect.class,"someBean"); @@ -53,7 +53,7 @@ public final class AspectMetadataTests { assertNotSame(Pointcut.TRUE, am.getPerClausePointcut()); assertEquals(PerClauseKind.PERTARGET, am.getAjType().getPerClause().getKind()); } - + @Test public void testPerThisAspect() { AspectMetadata am = new AspectMetadata(PerThisAspect.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 9cb01199f06..085e8c5d9f5 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 @@ -17,7 +17,7 @@ package org.springframework.aop.aspectj.annotation; /** - * Tests for ReflectiveAtAspectJAdvisorFactory. + * Tests for ReflectiveAtAspectJAdvisorFactory. * Tests are inherited: we only set the test fixture here. * * @author Rod Johnson diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparatorTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparatorTests.java index 0869a1fa02d..8af3a40d8aa 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparatorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparatorTests.java @@ -42,9 +42,9 @@ import org.springframework.aop.support.DefaultPointcutAdvisor; public final class AspectJPrecedenceComparatorTests { /* - * Specification for the comparator (as defined in the + * Specification for the comparator (as defined in the * AspectJPrecedenceComparator class) - * + * *

    * Orders AspectJ advice/advisors by invocation order. *

    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 de36eb98b63..de575c88426 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 @@ -43,18 +43,18 @@ import test.parsing.CollectingReaderEventListener; public final class AopNamespaceHandlerEventTests { private static final Class CLASS = AopNamespaceHandlerEventTests.class; - + private static final Resource CONTEXT = qualifiedResource(CLASS, "context.xml"); private static final Resource POINTCUT_EVENTS_CONTEXT = qualifiedResource(CLASS, "pointcutEvents.xml"); private static final Resource POINTCUT_REF_CONTEXT = qualifiedResource(CLASS, "pointcutRefEvents.xml"); private static final Resource DIRECT_POINTCUT_EVENTS_CONTEXT = qualifiedResource(CLASS, "directPointcutEvents.xml"); - + private CollectingReaderEventListener eventListener = new CollectingReaderEventListener(); private XmlBeanDefinitionReader reader; private DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory(); - + @Before 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 860e3dd0ba8..fcb34b4012d 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 @@ -29,7 +29,7 @@ import org.springframework.beans.factory.xml.XmlBeanFactory; * @author Chris Beams */ public final class AopNamespaceHandlerPointcutErrorTests { - + @Test public void testDuplicatePointcutConfig() { try { 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 353df218fa4..40209c7d7bf 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 @@ -26,12 +26,12 @@ import org.springframework.core.io.Resource; /** * Tests that the <aop:config/> element can be used as a top level element. - * + * * @author Rob Harrop * @author Chris Beams */ public final class TopLevelAopTagTests { - + private static final Resource CONTEXT = qualifiedResource(TopLevelAopTagTests.class, "context.xml"); @Test diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java index dda6cf20b1a..fc5268c840d 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java @@ -35,7 +35,7 @@ import test.beans.TestBean; * @author Chris Beams */ public final class AopProxyUtilsTests { - + @Test public void testCompleteProxiedInterfacesWorksWithNull() { AdvisedSupport as = new AdvisedSupport(); @@ -45,7 +45,7 @@ public final class AopProxyUtilsTests { assertTrue(ifaces.contains(Advised.class)); assertTrue(ifaces.contains(SpringProxy.class)); } - + @Test public void testCompleteProxiedInterfacesWorksWithNullOpaque() { AdvisedSupport as = new AdvisedSupport(); @@ -53,7 +53,7 @@ public final class AopProxyUtilsTests { Class[] completedInterfaces = AopProxyUtils.completeProxiedInterfaces(as); assertEquals(1, completedInterfaces.length); } - + @Test public void testCompleteProxiedInterfacesAdvisedNotIncluded() { AdvisedSupport as = new AdvisedSupport(); @@ -61,14 +61,14 @@ public final class AopProxyUtilsTests { as.addInterface(Comparable.class); Class[] completedInterfaces = AopProxyUtils.completeProxiedInterfaces(as); assertEquals(4, completedInterfaces.length); - + // Can't assume ordering for others, so use a list List l = Arrays.asList(completedInterfaces); assertTrue(l.contains(Advised.class)); assertTrue(l.contains(ITestBean.class)); assertTrue(l.contains(Comparable.class)); } - + @Test public void testCompleteProxiedInterfacesAdvisedIncluded() { AdvisedSupport as = new AdvisedSupport(); @@ -77,14 +77,14 @@ public final class AopProxyUtilsTests { as.addInterface(Advised.class); Class[] completedInterfaces = AopProxyUtils.completeProxiedInterfaces(as); assertEquals(4, completedInterfaces.length); - + // Can't assume ordering for others, so use a list List l = Arrays.asList(completedInterfaces); assertTrue(l.contains(Advised.class)); assertTrue(l.contains(ITestBean.class)); assertTrue(l.contains(Comparable.class)); } - + @Test public void testCompleteProxiedInterfacesAdvisedNotIncludedOpaque() { AdvisedSupport as = new AdvisedSupport(); @@ -93,7 +93,7 @@ public final class AopProxyUtilsTests { as.addInterface(Comparable.class); Class[] completedInterfaces = AopProxyUtils.completeProxiedInterfaces(as); assertEquals(3, completedInterfaces.length); - + // Can't assume ordering for others, so use a list List l = Arrays.asList(completedInterfaces); assertFalse(l.contains(Advised.class)); 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 a8623ba81c7..9de89648053 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,9 +25,9 @@ import test.beans.TestBean; /** * Benchmarks for introductions. - * + * * NOTE: No assertions! - * + * * @author Rod Johnson * @author Chris Beams * @since 2.0 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 4fdbbc0126b..9b102261196 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,7 +34,7 @@ import test.beans.TestBean; * @since 14.03.2003 */ public final class MethodInvocationTests { - + @Test public void testValidInvocation() throws Throwable { Method m = Object.class.getMethod("hashCode", (Class[]) null); @@ -52,7 +52,7 @@ public final class MethodInvocationTests { Object rv = invocation.proceed(); assertTrue("correct response", rv == returnValue); } - + /** * toString on target can cause failure. */ 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 fd4eae3a7fb..814b9025409 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 @@ -31,7 +31,7 @@ import org.springframework.core.io.Resource; * @since 03.09.2004 */ public final class PrototypeTargetTests { - + private static final Resource CONTEXT = qualifiedResource(PrototypeTargetTests.class, "context.xml"); @Test diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java index f7d325e4c53..f8999fe6744 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java @@ -64,7 +64,7 @@ public final class ProxyFactoryTests { assertEquals(1, pf.indexOf(advisor)); assertEquals(-1, advised.indexOf(new DefaultPointcutAdvisor(null))); } - + @Test public void testRemoveAdvisorByReference() { TestBean target = new TestBean(); @@ -84,7 +84,7 @@ public final class ProxyFactoryTests { assertEquals(2, nop.getCount()); assertFalse(pf.removeAdvisor(new DefaultPointcutAdvisor(null))); } - + @Test public void testRemoveAdvisorByIndex() { TestBean target = new TestBean(); @@ -113,7 +113,7 @@ public final class ProxyFactoryTests { assertEquals(1, cba.getCalls()); assertEquals(2, nop.getCount()); assertEquals(3, nop2.getCount()); - + // Check out of bounds try { pf.removeAdvisor(-1); @@ -121,14 +121,14 @@ public final class ProxyFactoryTests { catch (AopConfigException ex) { // Ok } - + try { pf.removeAdvisor(2); } catch (AopConfigException ex) { // Ok } - + assertEquals(5, proxied.getAge()); assertEquals(4, nop2.getCount()); } @@ -191,17 +191,17 @@ public final class ProxyFactoryTests { assertEquals("Found correct number of interfaces", 3, factory.getProxiedInterfaces().length); ITestBean tb = (ITestBean) factory.getProxy(); assertThat("Picked up secondary interface", tb, instanceOf(IOther.class)); - + raw.setAge(25); assertTrue(tb.getAge() == raw.getAge()); long t = 555555L; TimestampIntroductionInterceptor ti = new TimestampIntroductionInterceptor(t); - + Class[] oldProxiedInterfaces = factory.getProxiedInterfaces(); - + factory.addAdvisor(0, new DefaultIntroductionAdvisor(ti, TimeStamped.class)); - + Class[] newProxiedInterfaces = factory.getProxiedInterfaces(); assertEquals("Advisor proxies one more interface after introduction", oldProxiedInterfaces.length + 1, newProxiedInterfaces.length); @@ -210,7 +210,7 @@ public final class ProxyFactoryTests { // Shouldn't fail; ((IOther) ts).absquatulate(); } - + @Test public void testInterceptorInclusionMethods() { class MyInterceptor implements MethodInterceptor { @@ -218,7 +218,7 @@ public final class ProxyFactoryTests { throw new UnsupportedOperationException(); } } - + NopInterceptor di = new NopInterceptor(); NopInterceptor diUnused = new NopInterceptor(); ProxyFactory factory = new ProxyFactory(new TestBean()); @@ -228,7 +228,7 @@ public final class ProxyFactoryTests { assertTrue(!factory.adviceIncluded(diUnused)); assertTrue(factory.countAdvicesOfType(NopInterceptor.class) == 1); assertTrue(factory.countAdvicesOfType(MyInterceptor.class) == 0); - + factory.addAdvice(0, diUnused); assertTrue(factory.adviceIncluded(diUnused)); assertTrue(factory.countAdvicesOfType(NopInterceptor.class) == 2); 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 6ac026fcbf4..cd7f8b8bda5 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 @@ -34,7 +34,7 @@ public final class DebugInterceptorTests { @Test public void testSunnyDayPathLogsCorrectly() throws Throwable { Log log = createMock(Log.class); - + MethodInvocation methodInvocation = createMock(MethodInvocation.class); expect(log.isTraceEnabled()).andReturn(true); @@ -56,7 +56,7 @@ public final class DebugInterceptorTests { @Test public void testExceptionPathStillLogsCorrectly() throws Throwable { Log log = createMock(Log.class); - + MethodInvocation methodInvocation = createMock(MethodInvocation.class); expect(log.isTraceEnabled()).andReturn(true); 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 cc105bebcd6..c5f6cf8fe43 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,20 +30,20 @@ import test.beans.TestBean; * @author Chris Beams */ public final class ExposeBeanNameAdvisorsTests { - + private class RequiresBeanNameBoundTestBean extends TestBean { private final String beanName; - + public RequiresBeanNameBoundTestBean(String beanName) { this.beanName = beanName; } - + public int getAge() { assertEquals(beanName, ExposeBeanNameAdvisors.getBeanName()); return super.getAge(); } } - + @Test public void testNoIntroduction() { String beanName = "foo"; @@ -52,12 +52,12 @@ public final class ExposeBeanNameAdvisorsTests { pf.addAdvisor(ExposeInvocationInterceptor.ADVISOR); pf.addAdvisor(ExposeBeanNameAdvisors.createAdvisorWithoutIntroduction(beanName)); ITestBean proxy = (ITestBean) pf.getProxy(); - + assertFalse("No introduction", proxy instanceof NamedBean); // Requires binding proxy.getAge(); } - + @Test public void testWithIntroduction() { String beanName = "foo"; @@ -66,11 +66,11 @@ public final class ExposeBeanNameAdvisorsTests { pf.addAdvisor(ExposeInvocationInterceptor.ADVISOR); pf.addAdvisor(ExposeBeanNameAdvisors.createAdvisorIntroducingNamedBean(beanName)); ITestBean proxy = (ITestBean) pf.getProxy(); - + assertTrue("Introduction was made", proxy instanceof NamedBean); // Requires binding proxy.getAge(); - + NamedBean nb = (NamedBean) proxy; assertEquals("Name returned correctly", beanName, nb.getBeanName()); } 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 bfa9ea4d053..72e2cf36933 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,12 +29,12 @@ import test.beans.TestBean; /** * Non-XML tests are in AbstractAopProxyTests - * + * * @author Rod Johnson * @author Chris Beams */ public final class ExposeInvocationInterceptorTests { - + private static final Resource CONTEXT = qualifiedResource(ExposeInvocationInterceptorTests.class, "context.xml"); @@ -64,7 +64,7 @@ abstract class ExposedInvocationTestBean extends TestBean { assertions(invocation); super.absquatulate(); } - + protected abstract void assertions(MethodInvocation invocation); } @@ -72,7 +72,7 @@ abstract class ExposedInvocationTestBean extends TestBean { class InvocationCheckExposedInvocationTestBean extends ExposedInvocationTestBean { protected void assertions(MethodInvocation invocation) { assertTrue(invocation.getThis() == this); - assertTrue("Invocation should be on ITestBean: " + invocation.getMethod(), + assertTrue("Invocation should be on ITestBean: " + invocation.getMethod(), ITestBean.class.isAssignableFrom(invocation.getMethod().getDeclaringClass())); } } 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 3706293c2c3..83bb13216e0 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 @@ -28,9 +28,9 @@ import org.springframework.core.io.Resource; * @author Chris Beams */ public final class ScopedProxyAutowireTests { - + private static final Class CLASS = ScopedProxyAutowireTests.class; - + private static final Resource SCOPED_AUTOWIRE_TRUE_CONTEXT = qualifiedResource(CLASS, "scopedAutowireTrue.xml"); private static final Resource SCOPED_AUTOWIRE_FALSE_CONTEXT = qualifiedResource(CLASS, "scopedAutowireFalse.xml"); 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 c423579aa01..6b86cd7232a 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 @@ -44,7 +44,7 @@ public final class AopUtilsTests { return false; } } - + Pointcut no = new TestPointcut(); assertFalse(AopUtils.canApply(no, Object.class)); } @@ -64,7 +64,7 @@ public final class AopUtilsTests { } Pointcut pc = new TestPointcut(); - + // will return true if we're not proxying interfaces assertTrue(AopUtils.canApply(pc, Object.class)); } 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 3c9f37ef137..8df910eecb9 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,11 +30,11 @@ import test.beans.TestBean; * @author Chris Beams */ public final class ClassFiltersTests { - + private ClassFilter exceptionFilter = new RootClassFilter(Exception.class); - + private ClassFilter itbFilter = new RootClassFilter(ITestBean.class); - + private ClassFilter hasRootCauseFilter = new RootClassFilter(NestedRuntimeException.class); @Test @@ -47,7 +47,7 @@ public final class ClassFiltersTests { assertTrue(union.matches(RuntimeException.class)); assertTrue(union.matches(TestBean.class)); } - + @Test public void testIntersection() { assertTrue(exceptionFilter.matches(RuntimeException.class)); diff --git a/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java index 85b40b9112e..41c3e2dd54a 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,31 +33,31 @@ import test.beans.TestBean; * @author Chris Beams */ public final class ComposablePointcutTests { - + public static MethodMatcher GETTER_METHOD_MATCHER = new StaticMethodMatcher() { public boolean matches(Method m, Class targetClass) { return m.getName().startsWith("get"); } }; - + public static MethodMatcher GET_AGE_METHOD_MATCHER = new StaticMethodMatcher() { public boolean matches(Method m, Class targetClass) { return m.getName().equals("getAge"); } }; - + public static MethodMatcher ABSQUATULATE_METHOD_MATCHER = new StaticMethodMatcher() { public boolean matches(Method m, Class targetClass) { return m.getName().equals("absquatulate"); } }; - + public static MethodMatcher SETTER_METHOD_MATCHER = new StaticMethodMatcher() { public boolean matches(Method m, Class targetClass) { return m.getName().startsWith("set"); } }; - + @Test public void testMatchAll() throws NoSuchMethodException { Pointcut pc = new ComposablePointcut(); @@ -68,9 +68,9 @@ public final class ComposablePointcutTests { @Test public void testFilterByClass() throws NoSuchMethodException { ComposablePointcut pc = new ComposablePointcut(); - + assertTrue(pc.getClassFilter().matches(Object.class)); - + ClassFilter cf = new RootClassFilter(Exception.class); pc.intersection(cf); assertFalse(pc.getClassFilter().matches(Object.class)); @@ -92,15 +92,15 @@ public final class ComposablePointcutTests { assertFalse(Pointcuts.matches(pc, PointcutsTests.TEST_BEAN_ABSQUATULATE, TestBean.class, null)); assertTrue(Pointcuts.matches(pc, PointcutsTests.TEST_BEAN_GET_AGE, TestBean.class, null)); assertFalse(Pointcuts.matches(pc, PointcutsTests.TEST_BEAN_GET_NAME, TestBean.class, null)); - + pc.union(GETTER_METHOD_MATCHER); // Should now match all getter methods assertFalse(Pointcuts.matches(pc, PointcutsTests.TEST_BEAN_ABSQUATULATE, TestBean.class, null)); assertTrue(Pointcuts.matches(pc, PointcutsTests.TEST_BEAN_GET_AGE, TestBean.class, null)); assertTrue(Pointcuts.matches(pc, PointcutsTests.TEST_BEAN_GET_NAME, TestBean.class, null)); - + pc.union(ABSQUATULATE_METHOD_MATCHER); - // Should now match absquatulate() as well + // Should now match absquatulate() as well assertTrue(Pointcuts.matches(pc, PointcutsTests.TEST_BEAN_ABSQUATULATE, TestBean.class, null)); assertTrue(Pointcuts.matches(pc, PointcutsTests.TEST_BEAN_GET_AGE, TestBean.class, null)); assertTrue(Pointcuts.matches(pc, PointcutsTests.TEST_BEAN_GET_NAME, TestBean.class, null)); 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 ed17db66188..e6c08c08f28 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,7 +31,7 @@ import test.beans.TestBean; * @author Chris Beams */ public final class ControlFlowPointcutTests { - + @Test public void testMatches() { TestBean target = new TestBean(); @@ -41,21 +41,21 @@ public final class ControlFlowPointcutTests { ProxyFactory pf = new ProxyFactory(target); ITestBean proxied = (ITestBean) pf.getProxy(); pf.addAdvisor(new DefaultPointcutAdvisor(cflow, nop)); - + // Not advised, not under One assertEquals(target.getAge(), proxied.getAge()); assertEquals(0, nop.getCount()); - + // Will be advised assertEquals(target.getAge(), new One().getAge(proxied)); assertEquals(1, nop.getCount()); - + // Won't be advised assertEquals(target.getAge(), new One().nomatch(proxied)); assertEquals(1, nop.getCount()); assertEquals(3, cflow.getEvaluations()); } - + /** * Check that we can use a cflow pointcut only in conjunction with * a static pointcut: e.g. all setter methods that are invoked under @@ -73,19 +73,19 @@ public final class ControlFlowPointcutTests { ProxyFactory pf = new ProxyFactory(target); ITestBean proxied = (ITestBean) pf.getProxy(); pf.addAdvisor(new DefaultPointcutAdvisor(settersUnderOne, nop)); - + // Not advised, not under One target.setAge(16); assertEquals(0, nop.getCount()); - + // Not advised; under One but not a setter assertEquals(16, new One().getAge(proxied)); assertEquals(0, nop.getCount()); - + // Won't be advised new One().set(proxied); assertEquals(1, nop.getCount()); - + // We saved most evaluations assertEquals(1, cflow.getEvaluations()); } @@ -99,7 +99,7 @@ public final class ControlFlowPointcutTests { assertEquals(new ControlFlowPointcut(One.class, "getAge").hashCode(), new ControlFlowPointcut(One.class, "getAge").hashCode()); assertFalse(new ControlFlowPointcut(One.class, "getAge").hashCode() == new ControlFlowPointcut(One.class).hashCode()); } - + public class One { int getAge(ITestBean proxied) { return proxied.getAge(); 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 cd51a4895c4..f74bb4c61e9 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -79,7 +79,7 @@ public final class DelegatingIntroductionInterceptorTests { long timestamp = 111L; expect(ts.getTimeStamp()).andReturn(timestamp); replay(ts); - + factory.addAdvisor(0, new DefaultIntroductionAdvisor(new DelegatingIntroductionInterceptor(ts), SubTimeStamped.class)); SubTimeStamped tsp = (SubTimeStamped) factory.getProxy(); diff --git a/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java b/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java index 4df8bcde48e..a55b083a3f3 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -37,9 +37,9 @@ public final class MethodMatchersTests { private final Method EXCEPTION_GETMESSAGE; private final Method ITESTBEAN_SETAGE; - + private final Method ITESTBEAN_GETAGE; - + private final Method IOTHER_ABSQUATULATE; public MethodMatchersTests() throws Exception { @@ -55,7 +55,7 @@ public final class MethodMatchersTests { assertTrue(defaultMm.matches(EXCEPTION_GETMESSAGE, Exception.class)); assertTrue(defaultMm.matches(ITESTBEAN_SETAGE, TestBean.class)); } - + @Test public void testMethodMatcherTrueSerializable() throws Exception { assertSame(SerializationTestUtils.serializeAndDeserialize(MethodMatcher.TRUE), MethodMatcher.TRUE); @@ -72,7 +72,7 @@ public final class MethodMatchersTests { assertFalse(defaultMm.matches(ITESTBEAN_SETAGE, TestBean.class)); } - + @Test public void testDynamicAndStaticMethodMatcherIntersection() throws Exception { MethodMatcher mm1 = MethodMatcher.TRUE; @@ -87,13 +87,13 @@ public final class MethodMatchersTests { assertTrue("2Matched setAge method", intersection.matches(ITESTBEAN_SETAGE, TestBean.class)); assertFalse("3 - not Matched setAge method", intersection.matches(ITESTBEAN_SETAGE, TestBean.class, new Object[] { new Integer(5) })); } - + @Test public void testStaticMethodMatcherUnion() throws Exception { MethodMatcher getterMatcher = new StartsWithMatcher("get"); MethodMatcher setterMatcher = new StartsWithMatcher("set"); MethodMatcher union = MethodMatchers.union(getterMatcher, setterMatcher); - + assertFalse("Union is a static matcher", union.isRuntime()); assertTrue("Matched setAge method", union.matches(ITESTBEAN_SETAGE, TestBean.class)); assertTrue("Matched getAge method", union.matches(ITESTBEAN_GETAGE, TestBean.class)); 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 996d72f02fa..a36856ddd36 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,11 +34,11 @@ import test.util.SerializationTestUtils; * @author Chris Beams */ public final class NameMatchMethodPointcutTests { - + protected NameMatchMethodPointcut pc; - + protected Person proxied; - + protected SerializableNopInterceptor nop; /** @@ -52,7 +52,7 @@ public final class NameMatchMethodPointcutTests { pf.addAdvisor(new DefaultPointcutAdvisor(pc, nop)); proxied = (Person) pf.getProxy(); } - + @Test public void testMatchingOnly() { // Can't do exact matching through isMatch @@ -63,7 +63,7 @@ public final class NameMatchMethodPointcutTests { assertFalse(pc.isMatch("setName", "set")); assertTrue(pc.isMatch("testing", "*ing")); } - + @Test public void testEmpty() throws Throwable { assertEquals(0, nop.getCount()); @@ -72,8 +72,8 @@ public final class NameMatchMethodPointcutTests { proxied.echo(null); assertEquals(0, nop.getCount()); } - - + + @Test public void testMatchOneMethod() throws Throwable { pc.addMethodName("echo"); @@ -84,7 +84,7 @@ public final class NameMatchMethodPointcutTests { assertEquals(0, nop.getCount()); proxied.echo(null); assertEquals(1, nop.getCount()); - + proxied.setName(""); assertEquals(2, nop.getCount()); proxied.setAge(25); @@ -102,7 +102,7 @@ public final class NameMatchMethodPointcutTests { proxied.echo(null); assertEquals(2, nop.getCount()); } - + @Test public void testSerializable() throws Throwable { testSets(); diff --git a/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java b/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java index eb008c7f30e..e7967198669 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,12 +31,12 @@ import test.beans.TestBean; * @author Chris Beams */ public final class PointcutsTests { - + public static Method TEST_BEAN_SET_AGE; public static Method TEST_BEAN_GET_AGE; public static Method TEST_BEAN_GET_NAME; public static Method TEST_BEAN_ABSQUATULATE; - + static { try { TEST_BEAN_SET_AGE = TestBean.class.getMethod("setAge", new Class[] { int.class }); @@ -48,7 +48,7 @@ public final class PointcutsTests { throw new RuntimeException("Shouldn't happen: error in test suite"); } } - + /** * Matches only TestBean class, not subclasses */ @@ -65,13 +65,13 @@ public final class PointcutsTests { return true; } }; - + public static Pointcut allClassSetterPointcut = Pointcuts.SETTERS; - + // Subclass used for matching public static class MyTestBean extends TestBean { } - + public static Pointcut myTestBeanSetterPointcut = new StaticMethodMatcherPointcut() { public ClassFilter getClassFilter() { return new RootClassFilter(MyTestBean.class); @@ -81,7 +81,7 @@ public final class PointcutsTests { return m.getName().startsWith("set"); } }; - + // Will match MyTestBeanSubclass public static Pointcut myTestBeanGetterPointcut = new StaticMethodMatcherPointcut() { public ClassFilter getClassFilter() { @@ -92,11 +92,11 @@ public final class PointcutsTests { return m.getName().startsWith("get"); } }; - + // Still more specific class public static class MyTestBeanSubclass extends MyTestBean { } - + public static Pointcut myTestBeanSubclassGetterPointcut = new StaticMethodMatcherPointcut() { public ClassFilter getClassFilter() { return new RootClassFilter(MyTestBeanSubclass.class); @@ -106,14 +106,14 @@ public final class PointcutsTests { return m.getName().startsWith("get"); } }; - + public static Pointcut allClassGetterPointcut = Pointcuts.GETTERS; - + public static Pointcut allClassGetAgePointcut = new NameMatchMethodPointcut().addMethodName("getAge"); - + public static Pointcut allClassGetNamePointcut = new NameMatchMethodPointcut().addMethodName("getName"); - - + + @Test public void testTrue() { assertTrue(Pointcuts.matches(Pointcut.TRUE, TEST_BEAN_SET_AGE, TestBean.class, new Object[] { new Integer(6)})); @@ -133,7 +133,7 @@ public final class PointcutsTests { assertTrue(Pointcuts.matches(allClassGetterPointcut, TEST_BEAN_GET_AGE, TestBean.class, null)); assertFalse(Pointcuts.matches(allClassGetterPointcut, TEST_BEAN_ABSQUATULATE, TestBean.class, null)); } - + /** * Should match all setters and getters on any class */ @@ -144,7 +144,7 @@ public final class PointcutsTests { assertTrue(Pointcuts.matches(union, TEST_BEAN_GET_AGE, TestBean.class, null)); assertFalse(Pointcuts.matches(union, TEST_BEAN_ABSQUATULATE, TestBean.class, null)); } - + @Test public void testUnionOfSpecificGetters() { Pointcut union = Pointcuts.union(allClassGetAgePointcut, allClassGetNamePointcut); @@ -153,7 +153,7 @@ public final class PointcutsTests { assertFalse(Pointcuts.matches(allClassGetAgePointcut, TEST_BEAN_GET_NAME, TestBean.class, null)); assertTrue(Pointcuts.matches(union, TEST_BEAN_GET_NAME, TestBean.class, null)); assertFalse(Pointcuts.matches(union, TEST_BEAN_ABSQUATULATE, TestBean.class, null)); - + // Union with all setters union = Pointcuts.union(union, allClassSetterPointcut); assertTrue(Pointcuts.matches(union, TEST_BEAN_SET_AGE, TestBean.class, new Object[] { new Integer(6)})); @@ -161,10 +161,10 @@ public final class PointcutsTests { assertFalse(Pointcuts.matches(allClassGetAgePointcut, TEST_BEAN_GET_NAME, TestBean.class, null)); assertTrue(Pointcuts.matches(union, TEST_BEAN_GET_NAME, TestBean.class, null)); assertFalse(Pointcuts.matches(union, TEST_BEAN_ABSQUATULATE, TestBean.class, null)); - + assertTrue(Pointcuts.matches(union, TEST_BEAN_SET_AGE, TestBean.class, new Object[] { new Integer(6)})); } - + /** * Tests vertical composition. First pointcut matches all setters. * Second one matches all getters in the MyTestBean class. TestBean getters shouldn't pass. @@ -174,7 +174,7 @@ public final class PointcutsTests { assertFalse(Pointcuts.matches(myTestBeanSetterPointcut, TEST_BEAN_SET_AGE, TestBean.class, new Object[] { new Integer(6)})); assertTrue(Pointcuts.matches(myTestBeanSetterPointcut, TEST_BEAN_SET_AGE, MyTestBean.class, new Object[] { new Integer(6)})); assertFalse(Pointcuts.matches(myTestBeanSetterPointcut, TEST_BEAN_GET_AGE, TestBean.class, null)); - + Pointcut union = Pointcuts.union(myTestBeanSetterPointcut, allClassGetterPointcut); assertTrue(Pointcuts.matches(union, TEST_BEAN_GET_AGE, TestBean.class, null)); assertTrue(Pointcuts.matches(union, TEST_BEAN_GET_AGE, MyTestBean.class, null)); @@ -182,7 +182,7 @@ public final class PointcutsTests { assertTrue(Pointcuts.matches(union, TEST_BEAN_SET_AGE, MyTestBean.class, new Object[] { new Integer(6)})); assertFalse(Pointcuts.matches(union, TEST_BEAN_SET_AGE, TestBean.class, new Object[] { new Integer(6)})); } - + /** * Intersection should be MyTestBean getAge() only: * it's the union of allClassGetAge and subclass getters @@ -195,7 +195,7 @@ public final class PointcutsTests { assertFalse(Pointcuts.matches(myTestBeanGetterPointcut, TEST_BEAN_GET_AGE, TestBean.class, null)); assertTrue(Pointcuts.matches(myTestBeanGetterPointcut, TEST_BEAN_GET_NAME, MyTestBean.class, null)); assertTrue(Pointcuts.matches(myTestBeanGetterPointcut, TEST_BEAN_GET_AGE, MyTestBean.class, null)); - + Pointcut intersection = Pointcuts.intersection(allClassGetAgePointcut, myTestBeanGetterPointcut); assertFalse(Pointcuts.matches(intersection, TEST_BEAN_GET_NAME, TestBean.class, null)); assertFalse(Pointcuts.matches(intersection, TEST_BEAN_GET_AGE, TestBean.class, null)); @@ -204,7 +204,7 @@ public final class PointcutsTests { // Matches subclass of MyTestBean assertFalse(Pointcuts.matches(intersection, TEST_BEAN_GET_NAME, MyTestBeanSubclass.class, null)); assertTrue(Pointcuts.matches(intersection, TEST_BEAN_GET_AGE, MyTestBeanSubclass.class, null)); - + // Now intersection with MyTestBeanSubclass getters should eliminate MyTestBean target intersection = Pointcuts.intersection(intersection, myTestBeanSubclassGetterPointcut); assertFalse(Pointcuts.matches(intersection, TEST_BEAN_GET_NAME, TestBean.class, null)); @@ -214,7 +214,7 @@ public final class PointcutsTests { // Still matches subclass of MyTestBean assertFalse(Pointcuts.matches(intersection, TEST_BEAN_GET_NAME, MyTestBeanSubclass.class, null)); assertTrue(Pointcuts.matches(intersection, TEST_BEAN_GET_AGE, MyTestBeanSubclass.class, null)); - + // Now union with all TestBean methods Pointcut union = Pointcuts.union(intersection, allTestBeanMethodsPointcut); assertTrue(Pointcuts.matches(union, TEST_BEAN_GET_NAME, TestBean.class, null)); @@ -224,12 +224,12 @@ public final class PointcutsTests { // Still matches subclass of MyTestBean assertFalse(Pointcuts.matches(union, TEST_BEAN_GET_NAME, MyTestBeanSubclass.class, null)); assertTrue(Pointcuts.matches(union, TEST_BEAN_GET_AGE, MyTestBeanSubclass.class, null)); - + assertTrue(Pointcuts.matches(union, TEST_BEAN_ABSQUATULATE, TestBean.class, null)); assertFalse(Pointcuts.matches(union, TEST_BEAN_ABSQUATULATE, MyTestBean.class, null)); } - - + + /** * The intersection of these two pointcuts leaves nothing. */ 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 8218e4d5db3..bab75b7a3d4 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -37,18 +37,18 @@ import test.util.SerializationTestUtils; * @author Chris Beams */ public final class RegexpMethodPointcutAdvisorIntegrationTests { - + private static final Resource CONTEXT = qualifiedResource(RegexpMethodPointcutAdvisorIntegrationTests.class, "context.xml"); @Test public void testSinglePattern() throws Throwable { - BeanFactory bf = new XmlBeanFactory(CONTEXT); + BeanFactory bf = new XmlBeanFactory(CONTEXT); ITestBean advised = (ITestBean) bf.getBean("settersAdvised"); // Interceptor behind regexp advisor NopInterceptor nop = (NopInterceptor) bf.getBean("nopInterceptor"); assertEquals(0, nop.getCount()); - + int newAge = 12; // Not advised advised.exceptional(null); @@ -58,21 +58,21 @@ public final class RegexpMethodPointcutAdvisorIntegrationTests { // Only setter fired assertEquals(1, nop.getCount()); } - + @Test public void testMultiplePatterns() throws Throwable { - BeanFactory bf = new XmlBeanFactory(CONTEXT); + BeanFactory bf = new XmlBeanFactory(CONTEXT); // This is a CGLIB proxy, so we can proxy it to the target class TestBean advised = (TestBean) bf.getBean("settersAndAbsquatulateAdvised"); // Interceptor behind regexp advisor NopInterceptor nop = (NopInterceptor) bf.getBean("nopInterceptor"); assertEquals(0, nop.getCount()); - + int newAge = 12; // Not advised advised.exceptional(null); assertEquals(0, nop.getCount()); - + // This is proxied advised.absquatulate(); assertEquals(1, nop.getCount()); @@ -81,21 +81,21 @@ public final class RegexpMethodPointcutAdvisorIntegrationTests { // Only setter fired assertEquals(2, nop.getCount()); } - + @Test public void testSerialization() throws Throwable { - BeanFactory bf = new XmlBeanFactory(CONTEXT); + BeanFactory bf = new XmlBeanFactory(CONTEXT); // This is a CGLIB proxy, so we can proxy it to the target class Person p = (Person) bf.getBean("serializableSettersAdvised"); // Interceptor behind regexp advisor NopInterceptor nop = (NopInterceptor) bf.getBean("nopInterceptor"); assertEquals(0, nop.getCount()); - + int newAge = 12; // Not advised assertEquals(0, p.getAge()); assertEquals(0, nop.getCount()); - + // This is proxied p.setAge(newAge); assertEquals(1, nop.getCount()); @@ -103,7 +103,7 @@ public final class RegexpMethodPointcutAdvisorIntegrationTests { assertEquals(newAge, p.getAge()); // Only setter fired assertEquals(2, nop.getCount()); - + // Serialize and continue... p = (Person) SerializationTestUtils.serializeAndDeserialize(p); assertEquals(newAge, p.getAge()); diff --git a/spring-aop/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceProxyTests.java b/spring-aop/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceProxyTests.java index 69907b0f2f1..269d585e9d4 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceProxyTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceProxyTests.java @@ -33,7 +33,7 @@ import test.beans.ITestBean; * @since 2.0 */ public final class CommonsPoolTargetSourceProxyTests { - + private static final Resource CONTEXT = qualifiedResource(CommonsPoolTargetSourceProxyTests.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 284c3ae5619..be9b929475f 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -40,19 +40,19 @@ import test.util.SerializationTestUtils; * @author Chris Beams */ public final class HotSwappableTargetSourceTests { - + private static final Resource CONTEXT = qualifiedResource(HotSwappableTargetSourceTests.class, "context.xml"); /** Initial count value set in bean factory XML */ private static final int INITIAL_COUNT = 10; private XmlBeanFactory beanFactory; - + @Before public void setUp() throws Exception { this.beanFactory = new XmlBeanFactory(CONTEXT); } - + /** * We must simulate container shutdown, which should clear threads. */ @@ -72,42 +72,42 @@ public final class HotSwappableTargetSourceTests { assertEquals(INITIAL_COUNT, proxied.getCount() ); proxied.doWork(); assertEquals(INITIAL_COUNT + 1, proxied.getCount() ); - + proxied = (SideEffectBean) beanFactory.getBean("swappable"); proxied.doWork(); assertEquals(INITIAL_COUNT + 2, proxied.getCount() ); } - + @Test public void testValidSwaps() { SideEffectBean target1 = (SideEffectBean) beanFactory.getBean("target1"); SideEffectBean target2 = (SideEffectBean) beanFactory.getBean("target2"); - + SideEffectBean proxied = (SideEffectBean) beanFactory.getBean("swappable"); assertEquals(target1.getCount(), proxied.getCount() ); proxied.doWork(); assertEquals(INITIAL_COUNT + 1, proxied.getCount() ); - + HotSwappableTargetSource swapper = (HotSwappableTargetSource) beanFactory.getBean("swapper"); Object old = swapper.swap(target2); assertEquals("Correct old target was returned", target1, old); - + // TODO should be able to make this assertion: need to fix target handling // in AdvisedSupport //assertEquals(target2, ((Advised) proxied).getTarget()); - + assertEquals(20, proxied.getCount()); proxied.doWork(); assertEquals(21, target2.getCount()); - + // Swap it back swapper.swap(target1); assertEquals(target1.getCount(), proxied.getCount()); } - - + + /** - * + * * @param invalid * @return the message */ @@ -122,46 +122,46 @@ public final class HotSwappableTargetSourceTests { // Ok aopex = ex; } - + // It shouldn't be corrupted, it should still work testBasicFunctionality(); return aopex; } - + @Test public void testRejectsSwapToNull() { IllegalArgumentException ex = testRejectsSwapToInvalidValue(null); assertTrue(ex.getMessage().indexOf("null") != -1); } - + // TODO test reject swap to wrong interface or class? // how to decide what's valid? - - + + @Test public void testSerialization() throws Exception { SerializablePerson sp1 = new SerializablePerson(); sp1.setName("Tony"); SerializablePerson sp2 = new SerializablePerson(); sp1.setName("Gordon"); - + HotSwappableTargetSource hts = new HotSwappableTargetSource(sp1); ProxyFactory pf = new ProxyFactory(); pf.addInterface(Person.class); pf.setTargetSource(hts); pf.addAdvisor(new DefaultPointcutAdvisor(new SerializableNopInterceptor())); Person p = (Person) pf.getProxy(); - + assertEquals(sp1.getName(), p.getName()); hts.swap(sp2); assertEquals(sp2.getName(), p.getName()); - + p = (Person) SerializationTestUtils.serializeAndDeserialize(p); // We need to get a reference to the client-side targetsource hts = (HotSwappableTargetSource) ((Advised) p).getTargetSource(); assertEquals(sp2.getName(), p.getName()); hts.swap(sp1); assertEquals(sp1.getName(), p.getName()); - + } } 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 b26fbb1e911..52919dc0631 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,9 +34,9 @@ import test.beans.ITestBean; * @since 07.01.2005 */ public final class LazyInitTargetSourceTests { - + private static final Class CLASS = LazyInitTargetSourceTests.class; - + private static final Resource SINGLETON_CONTEXT = qualifiedResource(CLASS, "singleton.xml"); private static final Resource CUSTOM_TARGET_CONTEXT = qualifiedResource(CLASS, "customTarget.xml"); private static final Resource FACTORY_BEAN_CONTEXT = qualifiedResource(CLASS, "factoryBean.xml"); 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 43ba8a211a7..daecd1b5e87 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 @@ -59,9 +59,9 @@ public final class PrototypeBasedTargetSourceTests { assertNotNull(sts.getTarget()); } - + private static class TestTargetSource extends AbstractPrototypeBasedTargetSource { - + /** * Nonserializable test field to check that subclass * state can't prevent serialization from working 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 c5f0fa9d385..3317694eff0 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,14 +33,14 @@ import test.beans.SideEffectBean; * @author Chris Beams */ public final class PrototypeTargetSourceTests { - + private static final Resource CONTEXT = qualifiedResource(PrototypeTargetSourceTests.class, "context.xml"); - + /** Initial count value set in bean factory XML */ private static final int INITIAL_COUNT = 10; - + private BeanFactory beanFactory; - + @Before public void setUp() throws Exception { this.beanFactory = new XmlBeanFactory(CONTEXT); @@ -57,7 +57,7 @@ public final class PrototypeTargetSourceTests { assertEquals(INITIAL_COUNT, singleton.getCount() ); singleton.doWork(); assertEquals(INITIAL_COUNT + 1, singleton.getCount() ); - + SideEffectBean prototype = (SideEffectBean) beanFactory.getBean("prototype"); assertEquals(INITIAL_COUNT, prototype.getCount() ); prototype.doWork(); diff --git a/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java index bd79620b700..2519e89f823 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,26 +33,26 @@ import test.beans.SideEffectBean; * @author Chris Beams */ public class ThreadLocalTargetSourceTests { - + private static final Resource CONTEXT = qualifiedResource(ThreadLocalTargetSourceTests.class, "context.xml"); /** Initial count value set in bean factory XML */ private static final int INITIAL_COUNT = 10; private XmlBeanFactory beanFactory; - + @Before public void setUp() throws Exception { this.beanFactory = new XmlBeanFactory(CONTEXT); } - + /** * We must simulate container shutdown, which should clear threads. */ protected void tearDown() { this.beanFactory.destroySingletons(); } - + /** * Check we can use two different ThreadLocalTargetSources * managing objects of different types without them interfering @@ -64,7 +64,7 @@ public class ThreadLocalTargetSourceTests { assertEquals(INITIAL_COUNT, apartment.getCount() ); apartment.doWork(); assertEquals(INITIAL_COUNT + 1, apartment.getCount() ); - + ITestBean test = (ITestBean) beanFactory.getBean("threadLocal2"); assertEquals("Rod", test.getName()); assertEquals("Kerry", test.getSpouse().getName()); @@ -76,11 +76,11 @@ public class ThreadLocalTargetSourceTests { assertEquals(INITIAL_COUNT, apartment.getCount() ); apartment.doWork(); assertEquals(INITIAL_COUNT + 1, apartment.getCount() ); - + apartment = (SideEffectBean) beanFactory.getBean("apartment"); assertEquals(INITIAL_COUNT + 1, apartment.getCount() ); } - + /** * Relies on introduction. */ @@ -101,7 +101,7 @@ public class ThreadLocalTargetSourceTests { // Only one thread so only one object can have been bound assertEquals(1, stats.getObjectCount()); } - + @Test public void testNewThreadHasOwnInstance() throws InterruptedException { SideEffectBean apartment = (SideEffectBean) beanFactory.getBean("apartment"); @@ -110,7 +110,7 @@ public class ThreadLocalTargetSourceTests { apartment.doWork(); apartment.doWork(); assertEquals(INITIAL_COUNT + 3, apartment.getCount() ); - + class Runner implements Runnable { public SideEffectBean mine; public void run() { @@ -124,16 +124,16 @@ public class ThreadLocalTargetSourceTests { Thread t = new Thread(r); t.start(); t.join(); - + assertNotNull(r); - + // Check it didn't affect the other thread's copy assertEquals(INITIAL_COUNT + 3, apartment.getCount() ); - - // When we use other thread's copy in this thread + + // When we use other thread's copy in this thread // it should behave like ours assertEquals(INITIAL_COUNT + 3, r.mine.getCount() ); - + // Bound to two threads assertEquals(2, ((ThreadLocalTargetSourceStats) apartment).getObjectCount()); } diff --git a/spring-aop/src/test/java/test/aop/DefaultLockable.java b/spring-aop/src/test/java/test/aop/DefaultLockable.java index 42d6c73cb09..82c59d8bc54 100644 --- a/spring-aop/src/test/java/test/aop/DefaultLockable.java +++ b/spring-aop/src/test/java/test/aop/DefaultLockable.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,7 @@ package test.aop; /** * Simple implementation of Lockable interface for use in mixins. - * + * * @author Rod Johnson */ public class DefaultLockable implements Lockable { diff --git a/spring-aop/src/test/java/test/aop/Lockable.java b/spring-aop/src/test/java/test/aop/Lockable.java index 94272745673..135a9914246 100644 --- a/spring-aop/src/test/java/test/aop/Lockable.java +++ b/spring-aop/src/test/java/test/aop/Lockable.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,15 +19,15 @@ package test.aop; /** * Simple interface to use for mixins - * + * * @author Rod Johnson * */ public interface Lockable { - + void lock(); - + void unlock(); - + boolean locked(); } \ No newline at end of file diff --git a/spring-aop/src/test/java/test/aop/MethodCounter.java b/spring-aop/src/test/java/test/aop/MethodCounter.java index 9c5ed06e9ac..745b7289cbb 100644 --- a/spring-aop/src/test/java/test/aop/MethodCounter.java +++ b/spring-aop/src/test/java/test/aop/MethodCounter.java @@ -22,7 +22,7 @@ import java.util.HashMap; /** * Abstract superclass for counting advices etc. - * + * * @author Rod Johnson * @author Chris Beams */ diff --git a/spring-aop/src/test/java/test/aop/NopInterceptor.java b/spring-aop/src/test/java/test/aop/NopInterceptor.java index 81bdd9e703f..1dc341d427b 100644 --- a/spring-aop/src/test/java/test/aop/NopInterceptor.java +++ b/spring-aop/src/test/java/test/aop/NopInterceptor.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,7 +25,7 @@ import org.aopalliance.intercept.MethodInvocation; * @author Rod Johnson */ public class NopInterceptor implements MethodInterceptor { - + private int count; /** @@ -35,11 +35,11 @@ public class NopInterceptor implements MethodInterceptor { increment(); return invocation.proceed(); } - + public int getCount() { return this.count; } - + protected void increment() { ++count; } diff --git a/spring-aop/src/test/java/test/aop/PerTargetAspect.java b/spring-aop/src/test/java/test/aop/PerTargetAspect.java index 2d373f17e7a..cee24201381 100644 --- a/spring-aop/src/test/java/test/aop/PerTargetAspect.java +++ b/spring-aop/src/test/java/test/aop/PerTargetAspect.java @@ -1,5 +1,5 @@ /** - * + * */ package test.aop; diff --git a/spring-aop/src/test/java/test/aop/SerializableNopInterceptor.java b/spring-aop/src/test/java/test/aop/SerializableNopInterceptor.java index ca425b81f6c..3b306743b27 100644 --- a/spring-aop/src/test/java/test/aop/SerializableNopInterceptor.java +++ b/spring-aop/src/test/java/test/aop/SerializableNopInterceptor.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,26 +23,26 @@ import java.io.Serializable; /** * Subclass of NopInterceptor that is serializable and * can be used to test proxy serialization. - * + * * @author Rod Johnson * @author Chris Beams */ @SuppressWarnings("serial") public class SerializableNopInterceptor extends NopInterceptor implements Serializable { - + /** * We must override this field and the related methods as * otherwise count won't be serialized from the non-serializable * NopInterceptor superclass. */ private int count; - + public int getCount() { return this.count; } - + protected void increment() { ++count; } - + } \ No newline at end of file diff --git a/spring-aop/src/test/java/test/beans/INestedTestBean.java b/spring-aop/src/test/java/test/beans/INestedTestBean.java index 228109c284a..87bfc267738 100644 --- a/spring-aop/src/test/java/test/beans/INestedTestBean.java +++ b/spring-aop/src/test/java/test/beans/INestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-aop/src/test/java/test/beans/IOther.java b/spring-aop/src/test/java/test/beans/IOther.java index 734235aa068..e5b576de3b1 100644 --- a/spring-aop/src/test/java/test/beans/IOther.java +++ b/spring-aop/src/test/java/test/beans/IOther.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-aop/src/test/java/test/beans/NestedTestBean.java b/spring-aop/src/test/java/test/beans/NestedTestBean.java index d3fde438b67..a630f8662a7 100644 --- a/spring-aop/src/test/java/test/beans/NestedTestBean.java +++ b/spring-aop/src/test/java/test/beans/NestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-aop/src/test/java/test/beans/Person.java b/spring-aop/src/test/java/test/beans/Person.java index d163756b4e2..d1a441945ee 100644 --- a/spring-aop/src/test/java/test/beans/Person.java +++ b/spring-aop/src/test/java/test/beans/Person.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,19 +17,19 @@ package test.beans; /** - * + * * @author Rod Johnson */ public interface Person { - + String getName(); void setName(String name); int getAge(); void setAge(int i); - - /** + + /** * Test for non-property method matching. - * If the parameter is a Throwable, it will be thrown rather than + * If the parameter is a Throwable, it will be thrown rather than * returned. */ Object echo(Object o) throws Throwable; diff --git a/spring-aop/src/test/java/test/beans/SerializablePerson.java b/spring-aop/src/test/java/test/beans/SerializablePerson.java index e0a1839c0c1..adb2966907e 100644 --- a/spring-aop/src/test/java/test/beans/SerializablePerson.java +++ b/spring-aop/src/test/java/test/beans/SerializablePerson.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,26 +34,26 @@ public class SerializablePerson implements Person, Serializable { public int getAge() { return age; } - + public void setAge(int age) { this.age = age; } - + public String getName() { return name; } - + public void setName(String name) { this.name = name; } - + public Object echo(Object o) throws Throwable { if (o instanceof Throwable) { throw (Throwable) o; } return o; } - + public boolean equals(Object other) { if (!(other instanceof SerializablePerson)) { return false; diff --git a/spring-aop/src/test/java/test/beans/SideEffectBean.java b/spring-aop/src/test/java/test/beans/SideEffectBean.java index ea8279e2c2d..82871af7527 100644 --- a/spring-aop/src/test/java/test/beans/SideEffectBean.java +++ b/spring-aop/src/test/java/test/beans/SideEffectBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,17 +22,17 @@ package test.beans; * @author Rod Johnson */ public class SideEffectBean { - + private int count; - + public void setCount(int count) { this.count = count; } - + public int getCount() { return this.count; } - + public void doWork() { ++count; } diff --git a/spring-aop/src/test/java/test/beans/subpkg/DeepBean.java b/spring-aop/src/test/java/test/beans/subpkg/DeepBean.java index 7920111e2e8..211e1010234 100644 --- a/spring-aop/src/test/java/test/beans/subpkg/DeepBean.java +++ b/spring-aop/src/test/java/test/beans/subpkg/DeepBean.java @@ -20,9 +20,9 @@ import org.springframework.aop.aspectj.AspectJExpressionPointcutTests; /** * Used for testing pointcut matching. - * + * * @see AspectJExpressionPointcutTests#testWithinRootAndSubpackages() - * + * * @author Chris Beams */ public class DeepBean { diff --git a/spring-aop/src/test/java/test/util/SerializationTestUtils.java b/spring-aop/src/test/java/test/util/SerializationTestUtils.java index 74130ff343c..132bd33d4eb 100644 --- a/spring-aop/src/test/java/test/util/SerializationTestUtils.java +++ b/spring-aop/src/test/java/test/util/SerializationTestUtils.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -63,7 +63,7 @@ public final class SerializationTestUtils { oos.flush(); baos.flush(); byte[] bytes = baos.toByteArray(); - + ByteArrayInputStream is = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(is); Object o2 = ois.readObject(); diff --git a/spring-aop/src/test/java/test/util/TestResourceUtils.java b/spring-aop/src/test/java/test/util/TestResourceUtils.java index bae2b829acd..9d764e6b83f 100644 --- a/spring-aop/src/test/java/test/util/TestResourceUtils.java +++ b/spring-aop/src/test/java/test/util/TestResourceUtils.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,12 +30,12 @@ public class TestResourceUtils { /** * Loads a {@link ClassPathResource} qualified by the simple name of clazz, * and relative to the package for clazz. - * + * *

    Example: given a clazz 'com.foo.BarTests' and a resourceSuffix of 'context.xml', * this method will return a ClassPathResource representing com/foo/BarTests-context.xml - * + * *

    Intended for use loading context configuration XML files within JUnit tests. - * + * * @param clazz * @param resourceSuffix */ diff --git a/spring-aop/src/test/java/test/util/TimeStamped.java b/spring-aop/src/test/java/test/util/TimeStamped.java index 052b56ff738..484d5dda44b 100644 --- a/spring-aop/src/test/java/test/util/TimeStamped.java +++ b/spring-aop/src/test/java/test/util/TimeStamped.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,7 +23,7 @@ package test.util; * @author Rod Johnson */ public interface TimeStamped { - + /** * Return the timestamp for this object. * @return long the timestamp for this object, diff --git a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractBeanConfigurerAspect.aj b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractBeanConfigurerAspect.aj index 97fe1cb3ea5..2061f623212 100644 --- a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractBeanConfigurerAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractBeanConfigurerAspect.aj @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + package org.springframework.beans.factory.aspectj; import org.aspectj.lang.annotation.SuppressAjWarnings; @@ -23,12 +23,12 @@ import org.springframework.beans.factory.wiring.BeanConfigurerSupport; * Abstract superaspect for AspectJ aspects that can perform Dependency * Injection on objects, however they may be created. Define the beanCreation() * pointcut in subaspects. - * + * *

    Subaspects may also need a metadata resolution strategy, in the * BeanWiringInfoResolver interface. The default implementation * looks for a bean with the same name as the FQN. This is the default name * of a bean in a Spring container if the id value is not supplied explicitly. - * + * * @author Rob Harrop * @author Rod Johnson * @author Adrian Colyer @@ -62,7 +62,7 @@ public abstract aspect AbstractBeanConfigurerAspect extends BeanConfigurerSuppor /** * The initialization of a new object. - * + * *

    WARNING: Although this pointcut is non-abstract for backwards * compatibility reasons, it is meant to be overridden to select * initialization of any configurable bean. diff --git a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractDependencyInjectionAspect.aj b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractDependencyInjectionAspect.aj index 9008182f024..42a27944d42 100644 --- a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractDependencyInjectionAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractDependencyInjectionAspect.aj @@ -21,7 +21,7 @@ import org.aspectj.lang.annotation.SuppressAjWarnings; /** * Abstract base aspect that can perform Dependency * Injection on objects, however they may be created. - * + * * @author Ramnivas Laddad * @since 2.5.2 */ @@ -29,26 +29,26 @@ public abstract aspect AbstractDependencyInjectionAspect { /** * Select construction join points for objects to inject dependencies */ - public abstract pointcut beanConstruction(Object bean); + public abstract pointcut beanConstruction(Object bean); /** * Select deserialization join points for objects to inject dependencies */ public abstract pointcut beanDeserialization(Object bean); - + /** * Select join points in a configurable bean */ public abstract pointcut inConfigurableBean(); - + /** * Select join points in beans to be configured prior to construction? * By default, use post-construction injection matching the default in the Configurable annotation. */ public pointcut preConstructionConfiguration() : if(false); - + /** - * Select the most-specific initialization join point + * Select the most-specific initialization join point * (most concrete class) for the initialization of an instance. */ public pointcut mostSpecificSubTypeConstruction() : @@ -58,25 +58,25 @@ public abstract aspect AbstractDependencyInjectionAspect { * Select least specific super type that is marked for DI (so that injection occurs only once with pre-construction inejection */ public abstract pointcut leastSpecificSuperTypeConstruction(); - + /** * Configure the bean */ public abstract void configureBean(Object bean); - - private pointcut preConstructionCondition() : + + private pointcut preConstructionCondition() : leastSpecificSuperTypeConstruction() && preConstructionConfiguration(); - + private pointcut postConstructionCondition() : mostSpecificSubTypeConstruction() && !preConstructionConfiguration(); - + /** * Pre-construction configuration. */ @SuppressAjWarnings("adviceDidNotMatch") - before(Object bean) : - beanConstruction(bean) && preConstructionCondition() && inConfigurableBean() { + before(Object bean) : + beanConstruction(bean) && preConstructionCondition() && inConfigurableBean() { configureBean(bean); } @@ -84,18 +84,18 @@ public abstract aspect AbstractDependencyInjectionAspect { * Post-construction configuration. */ @SuppressAjWarnings("adviceDidNotMatch") - after(Object bean) returning : + after(Object bean) returning : beanConstruction(bean) && postConstructionCondition() && inConfigurableBean() { configureBean(bean); } - + /** * Post-deserialization configuration. */ @SuppressAjWarnings("adviceDidNotMatch") - after(Object bean) returning : + after(Object bean) returning : beanDeserialization(bean) && inConfigurableBean() { configureBean(bean); } - + } diff --git a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj index 4ecd2923de9..fee434c3e38 100644 --- a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AbstractInterfaceDrivenDependencyInjectionAspect.aj @@ -26,7 +26,7 @@ import java.io.Serializable; * upon deserialization. Subaspects need to simply provide definition for the configureBean() method. This * method may be implemented without relying on Spring container if so desired. *

    - *

    + *

    * There are two cases that needs to be handled: *

      *
    1. Normal object creation via the 'new' operator: this is @@ -37,24 +37,24 @@ import java.io.Serializable; * require user classes to implement any specific method. This implies that * we need to introduce the chosen method. We should also handle the cases * where the chosen method is already implemented in classes (in which case, - * the user's implementation for that method should take precedence over the + * the user's implementation for that method should take precedence over the * introduced implementation). There are a few choices for the chosen method: *
        *
      • readObject(ObjectOutputStream): Java requires that the method must be - * private

        . Since aspects cannot introduce a private member, + * private

        . Since aspects cannot introduce a private member, * while preserving its name, this option is ruled out.
      • - *
      • readResolve(): Java doesn't pose any restriction on an access specifier. - * Problem solved! There is one (minor) limitation of this approach in - * that if a user class already has this method, that method must be + *
      • readResolve(): Java doesn't pose any restriction on an access specifier. + * Problem solved! There is one (minor) limitation of this approach in + * that if a user class already has this method, that method must be * public. However, this shouldn't be a big burden, since - * use cases that need classes to implement readResolve() (custom enums, + * use cases that need classes to implement readResolve() (custom enums, * for example) are unlikely to be marked as @Configurable, and * in any case asking to make that method public should not * pose any undue burden.
      • *
      - * The minor collaboration needed by user classes (i.e., that the - * implementation of readResolve(), if any, must be - * public) can be lifted as well if we were to use an + * The minor collaboration needed by user classes (i.e., that the + * implementation of readResolve(), if any, must be + * public) can be lifted as well if we were to use an * experimental feature in AspectJ - the hasmethod() PCD.
    2. *
    @@ -63,7 +63,7 @@ import java.io.Serializable; * is to use a 'declare parents' statement another aspect (a subaspect of this aspect would be a logical choice) * that declares the classes that need to be configured by supplying the {@link ConfigurableObject} interface. *

    - * + * * @author Ramnivas Laddad * @since 2.5.2 */ @@ -71,8 +71,8 @@ public abstract aspect AbstractInterfaceDrivenDependencyInjectionAspect extends /** * Select initialization join point as object construction */ - public pointcut beanConstruction(Object bean) : - initialization(ConfigurableObject+.new(..)) && this(bean); + public pointcut beanConstruction(Object bean) : + initialization(ConfigurableObject+.new(..)) && this(bean); /** * Select deserialization join point made available through ITDs for ConfigurableDeserializationSupport @@ -80,38 +80,38 @@ public abstract aspect AbstractInterfaceDrivenDependencyInjectionAspect extends public pointcut beanDeserialization(Object bean) : execution(Object ConfigurableDeserializationSupport+.readResolve()) && this(bean); - + public pointcut leastSpecificSuperTypeConstruction() : initialization(ConfigurableObject.new(..)); - - - + + + // Implementation to support re-injecting dependencies once an object is deserialized /** - * Declare any class implementing Serializable and ConfigurableObject as also implementing - * ConfigurableDeserializationSupport. This allows us to introduce the readResolve() + * Declare any class implementing Serializable and ConfigurableObject as also implementing + * ConfigurableDeserializationSupport. This allows us to introduce the readResolve() * method and select it with the beanDeserialization() pointcut. - * + * *

    Here is an improved version that uses the hasmethod() pointcut and lifts * even the minor requirement on user classes: * *

    declare parents: ConfigurableObject+ Serializable+
    -	 *		            && !hasmethod(Object readResolve() throws ObjectStreamException) 
    +	 *		            && !hasmethod(Object readResolve() throws ObjectStreamException)
     	 *		            implements ConfigurableDeserializationSupport;
     	 * 
    */ - declare parents: + declare parents: ConfigurableObject+ && Serializable+ implements ConfigurableDeserializationSupport; - + /** * A marker interface to which the readResolve() is introduced. */ static interface ConfigurableDeserializationSupport extends Serializable { } - + /** * Introduce the readResolve() method so that we can advise its * execution to configure the object. - * + * *

    Note if a method with the same signature already exists in a * Serializable class of ConfigurableObject type, * that implementation will take precedence (a good thing, since we are diff --git a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj index f9602877200..20b151ed312 100644 --- a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/AnnotationBeanConfigurerAspect.aj @@ -43,7 +43,7 @@ import org.springframework.beans.factory.wiring.BeanConfigurerSupport; * @see org.springframework.beans.factory.annotation.Configurable * @see org.springframework.beans.factory.annotation.AnnotationBeanWiringInfoResolver */ -public aspect AnnotationBeanConfigurerAspect +public aspect AnnotationBeanConfigurerAspect extends AbstractInterfaceDrivenDependencyInjectionAspect implements BeanFactoryAware, InitializingBean, DisposableBean { @@ -51,7 +51,7 @@ public aspect AnnotationBeanConfigurerAspect public pointcut inConfigurableBean() : @this(Configurable); - public pointcut preConstructionConfiguration() : preConstructionConfigurationSupport(*); + public pointcut preConstructionConfiguration() : preConstructionConfigurationSupport(*); declare parents: @Configurable * implements ConfigurableObject; @@ -80,10 +80,10 @@ public aspect AnnotationBeanConfigurerAspect private pointcut preConstructionConfigurationSupport(Configurable c) : @this(c) && if(c.preConstruction()); /* - * This declaration shouldn't be needed, + * This declaration shouldn't be needed, * except for an AspectJ bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=214559) */ - declare parents: @Configurable Serializable+ + declare parents: @Configurable Serializable+ implements ConfigurableDeserializationSupport; } diff --git a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/ConfigurableObject.java b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/ConfigurableObject.java index 13597f9a97e..9aca558660f 100644 --- a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/ConfigurableObject.java +++ b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/ConfigurableObject.java @@ -17,7 +17,7 @@ package org.springframework.beans.factory.aspectj; /** * Marker interface for domain object that need DI through aspects. - * + * * @author Ramnivas Laddad * @since 2.5 */ diff --git a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/GenericInterfaceDrivenDependencyInjectionAspect.aj b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/GenericInterfaceDrivenDependencyInjectionAspect.aj index 82795313e7c..61a8b90d742 100644 --- a/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/GenericInterfaceDrivenDependencyInjectionAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/beans/factory/aspectj/GenericInterfaceDrivenDependencyInjectionAspect.aj @@ -17,24 +17,24 @@ package org.springframework.beans.factory.aspectj; /** * Generic-based dependency injection aspect. - *

    - * This aspect allows users to implement efficient, type-safe dependency injection without + *

    + * This aspect allows users to implement efficient, type-safe dependency injection without * the use of the @Configurable annotation. - * - * The subaspect of this aspect doesn't need to include any AOP constructs. + * + * The subaspect of this aspect doesn't need to include any AOP constructs. * For example, here is a subaspect that configures the PricingStrategyClient objects. *

    - * aspect PricingStrategyDependencyInjectionAspect 
    + * aspect PricingStrategyDependencyInjectionAspect
      *        extends GenericInterfaceDrivenDependencyInjectionAspect {
      *     private PricingStrategy pricingStrategy;
    - *     
    - *     public void configure(PricingStrategyClient bean) { 
    - *         bean.setPricingStrategy(pricingStrategy); 
    + *
    + *     public void configure(PricingStrategyClient bean) {
    + *         bean.setPricingStrategy(pricingStrategy);
    + *     }
    + *
    + *     public void setPricingStrategy(PricingStrategy pricingStrategy) {
    + *         this.pricingStrategy = pricingStrategy;
      *     }
    - *     
    - *     public void setPricingStrategy(PricingStrategy pricingStrategy) { 
    - *         this.pricingStrategy = pricingStrategy; 
    - *     } 
      * }
      * 
    * @author Ramnivas Laddad @@ -42,13 +42,13 @@ package org.springframework.beans.factory.aspectj; */ public abstract aspect GenericInterfaceDrivenDependencyInjectionAspect extends AbstractInterfaceDrivenDependencyInjectionAspect { declare parents: I implements ConfigurableObject; - + public pointcut inConfigurableBean() : within(I+); - + public final void configureBean(Object bean) { configure((I)bean); } - - // Unfortunately, erasure used with generics won't allow to use the same named method + + // Unfortunately, erasure used with generics won't allow to use the same named method protected abstract void configure(I bean); } diff --git a/spring-aspects/src/main/java/org/springframework/cache/aspectj/AbstractCacheAspect.aj b/spring-aspects/src/main/java/org/springframework/cache/aspectj/AbstractCacheAspect.aj index ccd94725169..ca4d14a66bf 100644 --- a/spring-aspects/src/main/java/org/springframework/cache/aspectj/AbstractCacheAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/cache/aspectj/AbstractCacheAspect.aj @@ -62,7 +62,7 @@ public abstract aspect AbstractCacheAspect extends CacheAspectSupport { } }; - return execute(aspectJInvoker, thisJoinPoint.getTarget(), method, thisJoinPoint.getArgs()); + return execute(aspectJInvoker, thisJoinPoint.getTarget(), method, thisJoinPoint.getArgs()); } /** diff --git a/spring-aspects/src/main/java/org/springframework/mock/staticmock/AbstractMethodMockingControl.aj b/spring-aspects/src/main/java/org/springframework/mock/staticmock/AbstractMethodMockingControl.aj index 6ca2bd728c6..165252eecff 100644 --- a/spring-aspects/src/main/java/org/springframework/mock/staticmock/AbstractMethodMockingControl.aj +++ b/spring-aspects/src/main/java/org/springframework/mock/staticmock/AbstractMethodMockingControl.aj @@ -23,9 +23,9 @@ import java.util.List; /** * Abstract aspect to enable mocking of methods picked out by a pointcut. * Sub-aspects must define the mockStaticsTestMethod() pointcut to - * indicate call stacks when mocking should be triggered, and the + * indicate call stacks when mocking should be triggered, and the * methodToMock() pointcut to pick out a method invocations to mock. - * + * * @author Rod Johnson * @author Ramnivas Laddad */ @@ -42,7 +42,7 @@ public abstract aspect AbstractMethodMockingControl percflow(mockStaticsTestMeth // Represents a list of expected calls to static entity methods // Public to allow inserted code to access: is this normal?? public class Expectations { - + // Represents an expected call to a static entity method private class Call { private final String signature; @@ -50,21 +50,21 @@ public abstract aspect AbstractMethodMockingControl percflow(mockStaticsTestMeth private Object responseObject; // return value or throwable private CallResponse responseType = CallResponse.nothing; - + public Call(String name, Object[] args) { this.signature = name; this.args = args; } - + public boolean hasResponseSpecified() { return responseType != CallResponse.nothing; } - + public void setReturnVal(Object retVal) { this.responseObject = retVal; responseType = CallResponse.return_; } - + public void setThrow(Throwable throwable) { this.responseObject = throwable; responseType = CallResponse.throw_; @@ -89,7 +89,7 @@ public abstract aspect AbstractMethodMockingControl percflow(mockStaticsTestMeth } } } - + private List calls = new LinkedList(); // Calls already verified @@ -101,7 +101,7 @@ public abstract aspect AbstractMethodMockingControl percflow(mockStaticsTestMeth + " calls, received " + verified); } } - + /** * Validate the call and provide the expected return value * @param lastSig @@ -175,7 +175,7 @@ public abstract aspect AbstractMethodMockingControl percflow(mockStaticsTestMeth return expectations.respond(thisJoinPointStaticPart.toLongString(), thisJoinPoint.getArgs()); } } - + public void expectReturnInternal(Object retVal) { if (!recording) { throw new IllegalStateException("Not recording: Cannot set return value"); diff --git a/spring-aspects/src/main/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControl.aj b/spring-aspects/src/main/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControl.aj index 1c35a47e97e..f6c9b7b0a9e 100644 --- a/spring-aspects/src/main/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControl.aj +++ b/spring-aspects/src/main/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControl.aj @@ -20,14 +20,14 @@ package org.springframework.mock.staticmock; * Annotation-based aspect to use in test build to enable mocking static methods * on JPA-annotated @Entity classes, as used by Roo for finders. * - *

    Mocking will occur in the call stack of any method in a class (typically a test class) - * that is annotated with the @MockStaticEntityMethods annotation. + *

    Mocking will occur in the call stack of any method in a class (typically a test class) + * that is annotated with the @MockStaticEntityMethods annotation. * *

    Also provides static methods to simplify the programming model for * entering playback mode and setting expected return values. * *

    Usage: - *

      + *
        *
      1. Annotate a test class with @MockStaticEntityMethods. *
      2. In each test method, AnnotationDrivenStaticEntityMockingControl will begin in recording mode. * Invoke static methods on Entity classes, with each recording-mode invocation @@ -37,20 +37,20 @@ package org.springframework.mock.staticmock; *
      3. Call the code you wish to test that uses the static methods. Verification will * occur automatically. *
      - * + * * @author Rod Johnson * @author Ramnivas Laddad * @see MockStaticEntityMethods */ public aspect AnnotationDrivenStaticEntityMockingControl extends AbstractMethodMockingControl { - + /** * Stop recording mock calls and enter playback state */ public static void playback() { AnnotationDrivenStaticEntityMockingControl.aspectOf().playbackInternal(); } - + public static void expectReturn(Object retVal) { AnnotationDrivenStaticEntityMockingControl.aspectOf().expectReturnInternal(retVal); } diff --git a/spring-aspects/src/main/java/org/springframework/orm/jpa/aspectj/JpaExceptionTranslatorAspect.aj b/spring-aspects/src/main/java/org/springframework/orm/jpa/aspectj/JpaExceptionTranslatorAspect.aj index 6ff44249d08..134cfcdf26a 100644 --- a/spring-aspects/src/main/java/org/springframework/orm/jpa/aspectj/JpaExceptionTranslatorAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/orm/jpa/aspectj/JpaExceptionTranslatorAspect.aj @@ -10,13 +10,13 @@ import org.springframework.orm.jpa.EntityManagerFactoryUtils; public aspect JpaExceptionTranslatorAspect { pointcut entityManagerCall(): call(* EntityManager.*(..)) || call(* EntityManagerFactory.*(..)) || call(* EntityTransaction.*(..)) || call(* Query.*(..)); - - after() throwing(RuntimeException re): entityManagerCall() { + + after() throwing(RuntimeException re): entityManagerCall() { DataAccessException dex = EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(re); if (dex != null) { throw dex; } else { throw re; - } - } + } + } } \ No newline at end of file diff --git a/spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AbstractAsyncExecutionAspect.aj b/spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AbstractAsyncExecutionAspect.aj index c8abf4a7297..a64def7ed11 100644 --- a/spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AbstractAsyncExecutionAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/scheduling/aspectj/AbstractAsyncExecutionAspect.aj @@ -28,7 +28,7 @@ import org.springframework.core.task.AsyncTaskExecutor; /** * Abstract aspect that routes selected methods asynchronously. * - *

      This aspect needs to be injected with an implementation of + *

      This aspect needs to be injected with an implementation of * {@link Executor} to activate it for a specific thread pool. * Otherwise it will simply delegate all calls synchronously. * diff --git a/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AnnotationTransactionAspect.aj b/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AnnotationTransactionAspect.aj index f4b31090348..36ac0eb2cb1 100644 --- a/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AnnotationTransactionAspect.aj +++ b/spring-aspects/src/main/java/org/springframework/transaction/aspectj/AnnotationTransactionAspect.aj @@ -21,17 +21,17 @@ import org.springframework.transaction.annotation.Transactional; /** * Concrete AspectJ transaction aspect using Spring's @Transactional annotation. - * + * *

      When using this aspect, you must annotate the implementation class * (and/or methods within that class), not the interface (if any) that - * the class implements. AspectJ follows Java's rule that annotations on + * the class implements. AspectJ follows Java's rule that annotations on * interfaces are not inherited. * *

      An @Transactional annotation on a class specifies the default transaction * semantics for the execution of any public operation in the class. * *

      An @Transactional annotation on a method within the class overrides the - * default transaction semantics given by the class annotation (if present). + * default transaction semantics given by the class annotation (if present). * Any method may be annotated (regardless of visibility). * Annotating non-public methods directly is the only way * to get transaction demarcation for the execution of such operations. @@ -57,7 +57,7 @@ public aspect AnnotationTransactionAspect extends AbstractTransactionAspect { execution(public * ((@Transactional *)+).*(..)) && within(@Transactional *); /** - * Matches the execution of any method with the + * Matches the execution of any method with the * Transactional annotation. */ private pointcut executionOfTransactionalMethod() : @@ -66,7 +66,7 @@ public aspect AnnotationTransactionAspect extends AbstractTransactionAspect { /** * Definition of pointcut from super aspect - matched join points * will have Spring transaction management applied. - */ + */ protected pointcut transactionalMethodExecution(Object txObject) : (executionOfAnyPublicMethodInAtTransactionalType() || executionOfTransactionalMethod() ) diff --git a/spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/AutoProxyWithCodeStyleAspectsTests.java b/spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/AutoProxyWithCodeStyleAspectsTests.java index 2dd6faa417a..d5667cd1555 100644 --- a/spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/AutoProxyWithCodeStyleAspectsTests.java +++ b/spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/AutoProxyWithCodeStyleAspectsTests.java @@ -26,7 +26,7 @@ import junit.framework.TestCase; public class AutoProxyWithCodeStyleAspectsTests extends TestCase { public void testNoAutoproxyingOfAjcCompiledAspects() { - new ClassPathXmlApplicationContext("org/springframework/aop/aspectj/autoproxy/ajcAutoproxyTests.xml"); + new ClassPathXmlApplicationContext("org/springframework/aop/aspectj/autoproxy/ajcAutoproxyTests.xml"); } - + } diff --git a/spring-aspects/src/test/java/org/springframework/beans/INestedTestBean.java b/spring-aspects/src/test/java/org/springframework/beans/INestedTestBean.java index 7d87547b5f7..c5c4ed5e679 100644 --- a/spring-aspects/src/test/java/org/springframework/beans/INestedTestBean.java +++ b/spring-aspects/src/test/java/org/springframework/beans/INestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-aspects/src/test/java/org/springframework/beans/IOther.java b/spring-aspects/src/test/java/org/springframework/beans/IOther.java index 797486ec44e..6a8f74187cb 100644 --- a/spring-aspects/src/test/java/org/springframework/beans/IOther.java +++ b/spring-aspects/src/test/java/org/springframework/beans/IOther.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-aspects/src/test/java/org/springframework/beans/NestedTestBean.java b/spring-aspects/src/test/java/org/springframework/beans/NestedTestBean.java index a06e15d150b..0eb8df5c8ae 100644 --- a/spring-aspects/src/test/java/org/springframework/beans/NestedTestBean.java +++ b/spring-aspects/src/test/java/org/springframework/beans/NestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-aspects/src/test/java/org/springframework/cache/config/CacheableService.java b/spring-aspects/src/test/java/org/springframework/cache/config/CacheableService.java index cdcb73b2cbc..09e2fc4c4b1 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/config/CacheableService.java +++ b/spring-aspects/src/test/java/org/springframework/cache/config/CacheableService.java @@ -18,7 +18,7 @@ package org.springframework.cache.config; /** * Basic service interface. - * + * * @author Costin Leau */ public interface CacheableService { diff --git a/spring-aspects/src/test/java/org/springframework/cache/config/DefaultCacheableService.java b/spring-aspects/src/test/java/org/springframework/cache/config/DefaultCacheableService.java index e8938a804e0..33cc40d0a44 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/config/DefaultCacheableService.java +++ b/spring-aspects/src/test/java/org/springframework/cache/config/DefaultCacheableService.java @@ -25,7 +25,7 @@ import org.springframework.cache.annotation.Caching; /** * Simple cacheable service - * + * * @author Costin Leau */ public class DefaultCacheableService implements CacheableService { diff --git a/spring-aspects/src/test/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControlTest.java b/spring-aspects/src/test/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControlTest.java index e33e3aa3f3d..3bd1741699c 100644 --- a/spring-aspects/src/test/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControlTest.java +++ b/spring-aspects/src/test/java/org/springframework/mock/staticmock/AnnotationDrivenStaticEntityMockingControlTest.java @@ -45,7 +45,7 @@ public class AnnotationDrivenStaticEntityMockingControlTest { playback(); Assert.assertEquals(expectedCount, Person.countPeople()); } - + @Test(expected=PersistenceException.class) public void testNoArgThrows() { Person.countPeople(); @@ -64,7 +64,7 @@ public class AnnotationDrivenStaticEntityMockingControlTest { Assert.assertEquals(found, Person.findPerson(id)); } - + @Test public void testLongSeriesOfCalls() { long id1 = 13; @@ -80,7 +80,7 @@ public class AnnotationDrivenStaticEntityMockingControlTest { Person.countPeople(); expectReturn(0); playback(); - + Assert.assertEquals(found1, Person.findPerson(id1)); Assert.assertEquals(found2, Person.findPerson(id2)); Assert.assertEquals(found1, Person.findPerson(id1)); @@ -122,22 +122,22 @@ public class AnnotationDrivenStaticEntityMockingControlTest { public void testRejectUnexpectedCall() { new Delegate().rejectUnexpectedCall(); } - + @Test(expected=IllegalStateException.class) public void testFailTooFewCalls() { new Delegate().failTooFewCalls(); } - + @Test public void testEmpty() { // Test that verification check doesn't blow up if no replay() call happened } - + @Test(expected=IllegalStateException.class) public void testDoesntEverReplay() { new Delegate().doesntEverReplay(); } - + @Test(expected=IllegalStateException.class) public void testDoesntEverSetReturn() { new Delegate().doesntEverSetReturn(); diff --git a/spring-aspects/src/test/java/org/springframework/mock/staticmock/Delegate.java b/spring-aspects/src/test/java/org/springframework/mock/staticmock/Delegate.java index c99dfe0c2e3..946e33aa01e 100644 --- a/spring-aspects/src/test/java/org/springframework/mock/staticmock/Delegate.java +++ b/spring-aspects/src/test/java/org/springframework/mock/staticmock/Delegate.java @@ -52,7 +52,7 @@ public class Delegate { AnnotationDrivenStaticEntityMockingControl.playback(); Assert.assertEquals(found, Person.findPerson(id + 1)); } - + @Test public void failTooFewCalls() { long id = 13; @@ -69,7 +69,7 @@ public class Delegate { public void doesntEverReplay() { Person.countPeople(); } - + @Test public void doesntEverSetReturn() { Person.countPeople(); @@ -81,7 +81,7 @@ public class Delegate { AnnotationDrivenStaticEntityMockingControl.playback(); Person.countPeople(); } - + @Test(expected=RemoteException.class) public void testVerificationFailsEvenWhenTestFailsInExpectedManner() throws RemoteException { Person.countPeople(); diff --git a/spring-aspects/src/test/java/org/springframework/mock/staticmock/Person_Roo_Entity.aj b/spring-aspects/src/test/java/org/springframework/mock/staticmock/Person_Roo_Entity.aj index 4d30f14376d..7e50ab4a7f3 100644 --- a/spring-aspects/src/test/java/org/springframework/mock/staticmock/Person_Roo_Entity.aj +++ b/spring-aspects/src/test/java/org/springframework/mock/staticmock/Person_Roo_Entity.aj @@ -17,84 +17,84 @@ package org.springframework.mock.staticmock; privileged aspect Person_Roo_Entity { - - @javax.persistence.PersistenceContext - transient javax.persistence.EntityManager Person.entityManager; - - @javax.persistence.Id - @javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.AUTO) - @javax.persistence.Column(name = "id") - private java.lang.Long Person.id; - - @javax.persistence.Version - @javax.persistence.Column(name = "version") - private java.lang.Integer Person.version; - - public java.lang.Long Person.getId() { - return this.id; - } - - public void Person.setId(java.lang.Long id) { - this.id = id; - } - - public java.lang.Integer Person.getVersion() { - return this.version; - } - - public void Person.setVersion(java.lang.Integer version) { - this.version = version; - } - - @org.springframework.transaction.annotation.Transactional - public void Person.persist() { - if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - this.entityManager.persist(this); - } - - @org.springframework.transaction.annotation.Transactional - public void Person.remove() { - if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - this.entityManager.remove(this); - } - - @org.springframework.transaction.annotation.Transactional - public void Person.flush() { - if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - this.entityManager.flush(); - } - - @org.springframework.transaction.annotation.Transactional - public void Person.merge() { - if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - Person merged = this.entityManager.merge(this); - this.entityManager.flush(); - this.id = merged.getId(); - } - - public static long Person.countPeople() { - javax.persistence.EntityManager em = new Person().entityManager; - if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - return (Long) em.createQuery("select count(o) from Person o").getSingleResult(); - } - - public static java.util.List Person.findAllPeople() { - javax.persistence.EntityManager em = new Person().entityManager; - if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - return em.createQuery("select o from Person o").getResultList(); - } - - public static Person Person.findPerson(java.lang.Long id) { - if (id == null) throw new IllegalArgumentException("An identifier is required to retrieve an instance of Person"); - javax.persistence.EntityManager em = new Person().entityManager; - if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - return em.find(Person.class, id); - } - - public static java.util.List Person.findPersonEntries(int firstResult, int maxResults) { - javax.persistence.EntityManager em = new Person().entityManager; - if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); - return em.createQuery("select o from Person o").setFirstResult(firstResult).setMaxResults(maxResults).getResultList(); - } - + + @javax.persistence.PersistenceContext + transient javax.persistence.EntityManager Person.entityManager; + + @javax.persistence.Id + @javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.AUTO) + @javax.persistence.Column(name = "id") + private java.lang.Long Person.id; + + @javax.persistence.Version + @javax.persistence.Column(name = "version") + private java.lang.Integer Person.version; + + public java.lang.Long Person.getId() { + return this.id; + } + + public void Person.setId(java.lang.Long id) { + this.id = id; + } + + public java.lang.Integer Person.getVersion() { + return this.version; + } + + public void Person.setVersion(java.lang.Integer version) { + this.version = version; + } + + @org.springframework.transaction.annotation.Transactional + public void Person.persist() { + if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + this.entityManager.persist(this); + } + + @org.springframework.transaction.annotation.Transactional + public void Person.remove() { + if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + this.entityManager.remove(this); + } + + @org.springframework.transaction.annotation.Transactional + public void Person.flush() { + if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + this.entityManager.flush(); + } + + @org.springframework.transaction.annotation.Transactional + public void Person.merge() { + if (this.entityManager == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + Person merged = this.entityManager.merge(this); + this.entityManager.flush(); + this.id = merged.getId(); + } + + public static long Person.countPeople() { + javax.persistence.EntityManager em = new Person().entityManager; + if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + return (Long) em.createQuery("select count(o) from Person o").getSingleResult(); + } + + public static java.util.List Person.findAllPeople() { + javax.persistence.EntityManager em = new Person().entityManager; + if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + return em.createQuery("select o from Person o").getResultList(); + } + + public static Person Person.findPerson(java.lang.Long id) { + if (id == null) throw new IllegalArgumentException("An identifier is required to retrieve an instance of Person"); + javax.persistence.EntityManager em = new Person().entityManager; + if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + return em.find(Person.class, id); + } + + public static java.util.List Person.findPersonEntries(int firstResult, int maxResults) { + javax.persistence.EntityManager em = new Person().entityManager; + if (em == null) throw new IllegalStateException("Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)"); + return em.createQuery("select o from Person o").setFirstResult(firstResult).setMaxResults(maxResults).getResultList(); + } + } diff --git a/spring-aspects/src/test/java/org/springframework/transaction/CallCountingTransactionManager.java b/spring-aspects/src/test/java/org/springframework/transaction/CallCountingTransactionManager.java index d5c2531fbde..563d6107149 100644 --- a/spring-aspects/src/test/java/org/springframework/transaction/CallCountingTransactionManager.java +++ b/spring-aspects/src/test/java/org/springframework/transaction/CallCountingTransactionManager.java @@ -50,7 +50,7 @@ public class CallCountingTransactionManager extends AbstractPlatformTransactionM ++rollbacks; --inflight; } - + public void clear() { begun = commits = rollbacks = inflight = 0; } diff --git a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/ClassWithPrivateAnnotatedMember.java b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/ClassWithPrivateAnnotatedMember.java index 6351d55d0d7..f718e093855 100644 --- a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/ClassWithPrivateAnnotatedMember.java +++ b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/ClassWithPrivateAnnotatedMember.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2006 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,7 +28,7 @@ public class ClassWithPrivateAnnotatedMember { public void doSomething() { doInTransaction(); } - + @Transactional private void doInTransaction() {} } diff --git a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/ClassWithProtectedAnnotatedMember.java b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/ClassWithProtectedAnnotatedMember.java index f681c81e844..18763dcc742 100644 --- a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/ClassWithProtectedAnnotatedMember.java +++ b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/ClassWithProtectedAnnotatedMember.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2006 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,7 +28,7 @@ public class ClassWithProtectedAnnotatedMember { public void doSomething() { doInTransaction(); } - + @Transactional protected void doInTransaction() {} } diff --git a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/ITransactional.java b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/ITransactional.java index 19a115ea214..7e8ef63d165 100644 --- a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/ITransactional.java +++ b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/ITransactional.java @@ -4,7 +4,7 @@ import org.springframework.transaction.annotation.Transactional; @Transactional public interface ITransactional { - + Object echo(Throwable t) throws Throwable; } diff --git a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/MethodAnnotationOnClassWithNoInterface.java b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/MethodAnnotationOnClassWithNoInterface.java index 22cc31ebc65..437a1a4f07c 100644 --- a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/MethodAnnotationOnClassWithNoInterface.java +++ b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/MethodAnnotationOnClassWithNoInterface.java @@ -3,7 +3,7 @@ package org.springframework.transaction.aspectj; import org.springframework.transaction.annotation.Transactional; public class MethodAnnotationOnClassWithNoInterface { - + @Transactional(rollbackFor=InterruptedException.class) public Object echo(Throwable t) throws Throwable { if (t != null) { @@ -11,9 +11,9 @@ public class MethodAnnotationOnClassWithNoInterface { } return t; } - + public void noTransactionAttribute() { - + } } diff --git a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java index 9449b2bcf70..407a5e2e991 100644 --- a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java +++ b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java @@ -31,17 +31,17 @@ import org.springframework.transaction.interceptor.TransactionAttribute; * @author Ramnivas Laddad */ public class TransactionAspectTests extends AbstractDependencyInjectionSpringContextTests { - + private TransactionAspectSupport transactionAspect; - + private CallCountingTransactionManager txManager; - + private TransactionalAnnotationOnlyOnClassWithNoInterface annotationOnlyOnClassWithNoInterface; - + private ClassWithProtectedAnnotatedMember beanWithAnnotatedProtectedMethod; private ClassWithPrivateAnnotatedMember beanWithAnnotatedPrivateMethod; - + private MethodAnnotationOnClassWithNoInterface methodAnnotationOnly = new MethodAnnotationOnClassWithNoInterface(); @@ -49,7 +49,7 @@ public class TransactionAspectTests extends AbstractDependencyInjectionSpringCon TransactionalAnnotationOnlyOnClassWithNoInterface annotationOnlyOnClassWithNoInterface) { this.annotationOnlyOnClassWithNoInterface = annotationOnlyOnClassWithNoInterface; } - + public void setClassWithAnnotatedProtectedMethod(ClassWithProtectedAnnotatedMember aBean) { this.beanWithAnnotatedProtectedMethod = aBean; } @@ -84,14 +84,14 @@ public class TransactionAspectTests extends AbstractDependencyInjectionSpringCon txManager.clear(); assertEquals(0, txManager.begun); beanWithAnnotatedProtectedMethod.doInTransaction(); - assertEquals(1, txManager.commits); + assertEquals(1, txManager.commits); } public void testCommitOnAnnotatedPrivateMethod() throws Throwable { txManager.clear(); assertEquals(0, txManager.begun); beanWithAnnotatedPrivateMethod.doSomething(); - assertEquals(1, txManager.commits); + assertEquals(1, txManager.commits); } public void testNoCommitOnNonAnnotatedNonPublicMethodInTransactionalType() throws Throwable { @@ -100,28 +100,28 @@ public class TransactionAspectTests extends AbstractDependencyInjectionSpringCon annotationOnlyOnClassWithNoInterface.nonTransactionalMethod(); assertEquals(0,txManager.begun); } - + public void testCommitOnAnnotatedMethod() throws Throwable { txManager.clear(); assertEquals(0, txManager.begun); methodAnnotationOnly.echo(null); assertEquals(1, txManager.commits); } - - + + public static class NotTransactional { public void noop() { } } - + public void testNotTransactional() throws Throwable { txManager.clear(); assertEquals(0, txManager.begun); new NotTransactional().noop(); assertEquals(0, txManager.begun); } - - + + public void testDefaultCommitOnAnnotatedClass() throws Throwable { testRollback(new TransactionOperationCallback() { public Object performTransactionalOperation() throws Throwable { @@ -129,7 +129,7 @@ public class TransactionAspectTests extends AbstractDependencyInjectionSpringCon } }, false); } - + public void testDefaultRollbackOnAnnotatedClass() throws Throwable { testRollback(new TransactionOperationCallback() { public Object performTransactionalOperation() throws Throwable { @@ -137,11 +137,11 @@ public class TransactionAspectTests extends AbstractDependencyInjectionSpringCon } }, true); } - - + + public static class SubclassOfClassWithTransactionalAnnotation extends TransactionalAnnotationOnlyOnClassWithNoInterface { } - + public void testDefaultCommitOnSubclassOfAnnotatedClass() throws Throwable { testRollback(new TransactionOperationCallback() { public Object performTransactionalOperation() throws Throwable { @@ -149,10 +149,10 @@ public class TransactionAspectTests extends AbstractDependencyInjectionSpringCon } }, false); } - + public static class SubclassOfClassWithTransactionalMethodAnnotation extends MethodAnnotationOnClassWithNoInterface { } - + public void testDefaultCommitOnSubclassOfClassWithTransactionalMethodAnnotated() throws Throwable { testRollback(new TransactionOperationCallback() { public Object performTransactionalOperation() throws Throwable { @@ -160,7 +160,7 @@ public class TransactionAspectTests extends AbstractDependencyInjectionSpringCon } }, false); } - + public static class ImplementsAnnotatedInterface implements ITransactional { public Object echo(Throwable t) throws Throwable { if (t != null) { @@ -169,14 +169,14 @@ public class TransactionAspectTests extends AbstractDependencyInjectionSpringCon return t; } } - + public void testDefaultCommitOnImplementationOfAnnotatedInterface() throws Throwable { // testRollback(new TransactionOperationCallback() { // public Object performTransactionalOperation() throws Throwable { // return new ImplementsAnnotatedInterface().echo(new Exception()); // } // }, false); - + final Exception ex = new Exception(); testNotTransactional(new TransactionOperationCallback() { public Object performTransactionalOperation() throws Throwable { @@ -184,7 +184,7 @@ public class TransactionAspectTests extends AbstractDependencyInjectionSpringCon } }, ex); } - + /** * Note: resolution does not occur. Thus we can't make a class transactional if * it implements a transactionally annotated interface. This behaviour could only @@ -198,15 +198,15 @@ public class TransactionAspectTests extends AbstractDependencyInjectionSpringCon TransactionAttribute ta = atas.getTransactionAttribute(m, ImplementsAnnotatedInterface.class); assertNull(ta); } - - + + public void testDefaultRollbackOnImplementationOfAnnotatedInterface() throws Throwable { // testRollback(new TransactionOperationCallback() { // public Object performTransactionalOperation() throws Throwable { // return new ImplementsAnnotatedInterface().echo(new RuntimeException()); // } // }, true); - + final Exception rollbackProvokingException = new RuntimeException(); testNotTransactional(new TransactionOperationCallback() { public Object performTransactionalOperation() throws Throwable { @@ -215,7 +215,7 @@ public class TransactionAspectTests extends AbstractDependencyInjectionSpringCon }, rollbackProvokingException); } - + protected void testRollback(TransactionOperationCallback toc, boolean rollback) throws Throwable { txManager.clear(); assertEquals(0, txManager.begun); @@ -228,13 +228,13 @@ public class TransactionAspectTests extends AbstractDependencyInjectionSpringCon return; } } - + if (rollback) { assertEquals(1, txManager.rollbacks); } assertEquals(1, txManager.begun); } - + protected void testNotTransactional(TransactionOperationCallback toc, Throwable expected) throws Throwable { txManager.clear(); assertEquals(0, txManager.begun); @@ -251,7 +251,7 @@ public class TransactionAspectTests extends AbstractDependencyInjectionSpringCon assertEquals(0, txManager.begun); } } - + private interface TransactionOperationCallback { diff --git a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionalAnnotationOnlyOnClassWithNoInterface.java b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionalAnnotationOnlyOnClassWithNoInterface.java index 691506baa03..93bd225f7ca 100644 --- a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionalAnnotationOnlyOnClassWithNoInterface.java +++ b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionalAnnotationOnlyOnClassWithNoInterface.java @@ -4,14 +4,14 @@ import org.springframework.transaction.annotation.Transactional; @Transactional public class TransactionalAnnotationOnlyOnClassWithNoInterface { - + public Object echo(Throwable t) throws Throwable { if (t != null) { throw t; } return t; } - + void nonTransactionalMethod() { // no-op } diff --git a/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java b/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java index efe6fccbcc2..b4c13315e72 100644 --- a/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java +++ b/spring-beans/src/main/java/org/springframework/beans/BeanWrapperImpl.java @@ -559,7 +559,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra propertyValue = setDefaultValue(tokens); } else { - throw new NullValueInNestedPathException(getRootClass(), this.nestedPath + canonicalName); + throw new NullValueInNestedPathException(getRootClass(), this.nestedPath + canonicalName); } } @@ -723,7 +723,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra readMethod.setAccessible(true); } } - + Object value; if (System.getSecurityManager() != null) { try { @@ -740,8 +740,8 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra else { value = readMethod.invoke(object, (Object[]) null); } - - if (tokens.keys != null) { + + if (tokens.keys != null) { if (value == null) { if (this.autoGrowNestedPaths) { value = setDefaultValue(tokens.actualName); @@ -749,9 +749,9 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra else { throw new NullValueInNestedPathException(getRootClass(), this.nestedPath + propertyName, "Cannot access indexed value of property referenced in indexed " + - "property path '" + propertyName + "': returned null"); + "property path '" + propertyName + "': returned null"); } - } + } String indexedPropertyName = tokens.actualName; // apply indexes and map keys for (int i = 0; i < tokens.keys.length; i++) { @@ -759,7 +759,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra if (value == null) { throw new NullValueInNestedPathException(getRootClass(), this.nestedPath + propertyName, "Cannot access indexed value of property referenced in indexed " + - "property path '" + propertyName + "': returned null"); + "property path '" + propertyName + "': returned null"); } else if (value.getClass().isArray()) { int index = Integer.parseInt(key); @@ -767,9 +767,9 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra value = Array.get(value, index); } else if (value instanceof List) { - int index = Integer.parseInt(key); + int index = Integer.parseInt(key); List list = (List) value; - growCollectionIfNecessary(list, index, indexedPropertyName, pd, i + 1); + growCollectionIfNecessary(list, index, indexedPropertyName, pd, i + 1); value = list.get(index); } else if (value instanceof Set) { @@ -804,7 +804,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra "Property referenced in indexed property path '" + propertyName + "' is neither an array nor a List nor a Set nor a Map; returned value was [" + value + "]"); } - indexedPropertyName += PROPERTY_KEY_PREFIX + key + PROPERTY_KEY_SUFFIX; + indexedPropertyName += PROPERTY_KEY_PREFIX + key + PROPERTY_KEY_SUFFIX; } } return value; diff --git a/spring-beans/src/main/java/org/springframework/beans/GenericTypeAwarePropertyDescriptor.java b/spring-beans/src/main/java/org/springframework/beans/GenericTypeAwarePropertyDescriptor.java index a2d5ee7af3f..e9675f52e46 100644 --- a/spring-beans/src/main/java/org/springframework/beans/GenericTypeAwarePropertyDescriptor.java +++ b/spring-beans/src/main/java/org/springframework/beans/GenericTypeAwarePropertyDescriptor.java @@ -95,7 +95,7 @@ class GenericTypeAwarePropertyDescriptor extends PropertyDescriptor { public Class getBeanClass() { return this.beanClass; } - + @Override public Method getReadMethod() { return this.readMethod; diff --git a/spring-beans/src/main/java/org/springframework/beans/MethodInvocationException.java b/spring-beans/src/main/java/org/springframework/beans/MethodInvocationException.java index 6a9c0eac84a..49d1398d7bc 100644 --- a/spring-beans/src/main/java/org/springframework/beans/MethodInvocationException.java +++ b/spring-beans/src/main/java/org/springframework/beans/MethodInvocationException.java @@ -30,7 +30,7 @@ public class MethodInvocationException extends PropertyAccessException { * Error code that a method invocation error will be registered with. */ public static final String ERROR_CODE = "methodInvocation"; - + /** * Create a new MethodInvocationException. diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyAccessException.java b/spring-beans/src/main/java/org/springframework/beans/PropertyAccessException.java index 830ea5f40d0..cb17396c8c8 100644 --- a/spring-beans/src/main/java/org/springframework/beans/PropertyAccessException.java +++ b/spring-beans/src/main/java/org/springframework/beans/PropertyAccessException.java @@ -30,7 +30,7 @@ import org.springframework.core.ErrorCoded; public abstract class PropertyAccessException extends BeansException implements ErrorCoded { private transient PropertyChangeEvent propertyChangeEvent; - + /** * Create a new PropertyAccessException. diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrar.java b/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrar.java index 9e141fde3a9..56dddc4de56 100644 --- a/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrar.java +++ b/spring-beans/src/main/java/org/springframework/beans/PropertyEditorRegistrar.java @@ -31,7 +31,7 @@ package org.springframework.beans; * @see java.beans.PropertyEditor */ public interface PropertyEditorRegistrar { - + /** * Register custom {@link java.beans.PropertyEditor PropertyEditors} with * the given PropertyEditorRegistry. diff --git a/spring-beans/src/main/java/org/springframework/beans/PropertyValues.java b/spring-beans/src/main/java/org/springframework/beans/PropertyValues.java index e2180a077e7..ad9dbba66e9 100644 --- a/spring-beans/src/main/java/org/springframework/beans/PropertyValues.java +++ b/spring-beans/src/main/java/org/springframework/beans/PropertyValues.java @@ -26,12 +26,12 @@ package org.springframework.beans; * @see PropertyValue */ public interface PropertyValues { - - /** + + /** * Return an array of the PropertyValue objects held in this object. */ - PropertyValue[] getPropertyValues(); - + PropertyValue[] getPropertyValues(); + /** * Return the property value with the given name, if any. * @param propertyName the name to search for diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactoryUtils.java b/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactoryUtils.java index 0e58200ad96..a2888182ba3 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactoryUtils.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactoryUtils.java @@ -115,7 +115,7 @@ public abstract class BeanFactoryUtils { public static int countBeansIncludingAncestors(ListableBeanFactory lbf) { return beanNamesIncludingAncestors(lbf).length; } - + /** * Return all bean names in the factory, including ancestor factories. * @param lbf the bean factory diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/BeanIsNotAFactoryException.java b/spring-beans/src/main/java/org/springframework/beans/factory/BeanIsNotAFactoryException.java index 7146ec7806b..a741715a3b8 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/BeanIsNotAFactoryException.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/BeanIsNotAFactoryException.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/DisposableBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/DisposableBean.java index 12fdeb853bc..536c2e695c8 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/DisposableBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/DisposableBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/HierarchicalBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/HierarchicalBeanFactory.java index 20eb7845b3d..f471915b0a5 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/HierarchicalBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/HierarchicalBeanFactory.java @@ -30,7 +30,7 @@ package org.springframework.beans.factory; * @see org.springframework.beans.factory.config.ConfigurableBeanFactory#setParentBeanFactory */ public interface HierarchicalBeanFactory extends BeanFactory { - + /** * Return the parent bean factory, or null if there is none. */ diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/InitializingBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/InitializingBean.java index a21912d31ca..420aefb2c0b 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/InitializingBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/InitializingBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,7 @@ package org.springframework.beans.factory; * Interface to be implemented by beans that need to react once all their * properties have been set by a BeanFactory: for example, to perform custom * initialization, or merely to check that all mandatory properties have been set. - * + * *

      An alternative to implementing InitializingBean is specifying a custom * init-method, for example in an XML bean definition. * For a list of all bean lifecycle methods, see the BeanFactory javadocs. @@ -33,7 +33,7 @@ package org.springframework.beans.factory; * @see org.springframework.context.ApplicationContextAware */ public interface InitializingBean { - + /** * Invoked by a BeanFactory after it has set all bean properties supplied * (and satisfied BeanFactoryAware and ApplicationContextAware). diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/ListableBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/ListableBeanFactory.java index e7c08c2dc55..64e86dc2c4b 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/ListableBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/ListableBeanFactory.java @@ -84,7 +84,7 @@ public interface ListableBeanFactory extends BeanFactory { * or an empty array if none defined */ String[] getBeanDefinitionNames(); - + /** * Return the names of beans matching the given type (including subclasses), * judging from either bean definitions or the value of getObjectType diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/NoSuchBeanDefinitionException.java b/spring-beans/src/main/java/org/springframework/beans/factory/NoSuchBeanDefinitionException.java index 74620895566..0157d086506 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/NoSuchBeanDefinitionException.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/NoSuchBeanDefinitionException.java @@ -73,7 +73,7 @@ public class NoSuchBeanDefinitionException extends BeansException { super("No unique bean of type [" + type.getName() + "] is defined: " + message); this.beanType = type; } - + /** * Create a new {@code NoSuchBeanDefinitionException}. * @param type required type of the missing bean diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/access/BootstrapException.java b/spring-beans/src/main/java/org/springframework/beans/factory/access/BootstrapException.java index b502384d703..9a607de3efd 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/access/BootstrapException.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/access/BootstrapException.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java b/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java index 8425921237e..61eea7a094a 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocator.java @@ -40,7 +40,7 @@ import org.springframework.core.io.support.ResourcePatternUtils; * which accesses shared Spring {@link BeanFactory} instances.

      * *

      Please see the warning in BeanFactoryLocator's javadoc about appropriate usage - * of singleton style BeanFactoryLocator implementations. It is the opinion of the + * of singleton style BeanFactoryLocator implementations. It is the opinion of the * Spring team that the use of this class and similar classes is unnecessary except * (sometimes) for a small amount of glue code. Excessive usage will lead to code * that is more tightly coupled, and harder to modify or test.

      @@ -50,11 +50,11 @@ import org.springframework.core.io.support.ResourcePatternUtils; * searched for is 'classpath*:beanRefFactory.xml', with the Spring-standard * 'classpath*:' prefix ensuring that if the classpath contains multiple copies * of this file (perhaps one in each component jar) they will be combined. To - * override the default resource name, instead of using the no-arg + * override the default resource name, instead of using the no-arg * {@link #getInstance()} method, use the {@link #getInstance(String selector)} * variant, which will treat the 'selector' argument as the resource name to * search for.

      - * + * *

      The purpose of this 'outer' BeanFactory is to create and hold a copy of one * or more 'inner' BeanFactory or ApplicationContext instances, and allow those * to be obtained either directly or via an alias. As such, this class provides @@ -80,10 +80,10 @@ import org.springframework.core.io.support.ResourcePatternUtils; * or created as three hierarchical ApplicationContexts, by one piece of code * somewhere at application startup (perhaps a Servlet filter), from which all other * code in the application would flow, obtained as beans from the context(s). However - * when third party code enters into the picture, things can get problematic. If the + * when third party code enters into the picture, things can get problematic. If the * third party code needs to create user classes, which should normally be obtained * from a Spring BeanFactory/ApplicationContext, but can handle only newInstance() - * style object creation, then some extra work is required to actually access and + * style object creation, then some extra work is required to actually access and * use object from a BeanFactory/ApplicationContext. One solutions is to make the * class created by the third party code be just a stub or proxy, which gets the * real object from a BeanFactory/ApplicationContext, and delegates to it. However, @@ -101,7 +101,7 @@ import org.springframework.core.io.support.ResourcePatternUtils; * *

      Another use of SingletonBeanFactoryLocator, is to demand-load/use one or more * BeanFactories/ApplicationContexts. Because the definition can contain one of more - * BeanFactories/ApplicationContexts, which can be independent or in a hierarchy, if + * BeanFactories/ApplicationContexts, which can be independent or in a hierarchy, if * they are set to lazy-initialize, they will only be created when actually requested * for use. * @@ -111,9 +111,9 @@ import org.springframework.core.io.support.ResourcePatternUtils; * *

      <?xml version="1.0" encoding="UTF-8"?>
        * <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
      - * 
      + *
        * <beans>
      - * 
      + *
        *   <bean id="com.mycompany.myapp"
        *         class="org.springframework.context.support.ClassPathXmlApplicationContext">
        *     <constructor-arg>
      @@ -124,7 +124,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
        *       </list>
        *     </constructor-arg>
        *   </bean>
      - * 
      + *
        * </beans>
        * 
      * @@ -133,7 +133,7 @@ import org.springframework.core.io.support.ResourcePatternUtils; *
        * BeanFactoryLocator bfl = SingletonBeanFactoryLocator.getInstance();
        * BeanFactoryReference bf = bfl.useBeanFactory("com.mycompany.myapp");
      - * // now use some bean from factory 
      + * // now use some bean from factory
        * MyClass zed = bf.getFactory().getBean("mybean");
        * 
      * @@ -141,16 +141,16 @@ import org.springframework.core.io.support.ResourcePatternUtils; * *
      <?xml version="1.0" encoding="UTF-8"?>
        * <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
      - * 
      + *
        * <beans>
      - * 
      + *
        *   <bean id="com.mycompany.myapp.util" lazy-init="true"
        *         class="org.springframework.context.support.ClassPathXmlApplicationContext">
        *     <constructor-arg>
        *       <value>com/mycompany/myapp/util/applicationContext.xml</value>
        *     </constructor-arg>
        *   </bean>
      - * 
      + *
        *   <!-- child of above -->
        *   <bean id="com.mycompany.myapp.dataaccess" lazy-init="true"
        *         class="org.springframework.context.support.ClassPathXmlApplicationContext">
      @@ -161,7 +161,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
        *       <ref bean="com.mycompany.myapp.util"/>
        *     </constructor-arg>
        *   </bean>
      - * 
      + *
        *   <!-- child of above -->
        *   <bean id="com.mycompany.myapp.services" lazy-init="true"
        *         class="org.springframework.context.support.ClassPathXmlApplicationContext">
      @@ -172,7 +172,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
        *       <ref bean="com.mycompany.myapp.dataaccess"/>
        *     </constructor-arg>
        *   </bean>
      - * 
      + *
        *   <!-- define an alias -->
        *   <bean id="com.mycompany.myapp.mypackage"
        *         class="java.lang.String">
      @@ -180,7 +180,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
        *       <value>com.mycompany.myapp.services</value>
        *     </constructor-arg>
        *   </bean>
      - * 
      + *
        * </beans>
        * 
      * @@ -200,7 +200,7 @@ import org.springframework.core.io.support.ResourcePatternUtils; * *
      <?xml version="1.0" encoding="UTF-8"?>
        * <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
      - * 
      + *
        * <beans>
        *   <bean id="com.mycompany.myapp.util" lazy-init="true"
        *        class="org.springframework.context.support.ClassPathXmlApplicationContext">
      @@ -210,12 +210,12 @@ import org.springframework.core.io.support.ResourcePatternUtils;
        *   </bean>
        * </beans>
        * 
      - * + * * beanRefFactory.xml file inside jar for data-access module:
      * *
      <?xml version="1.0" encoding="UTF-8"?>
        * <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
      - * 
      + *
        * <beans>
        *   <!-- child of util -->
        *   <bean id="com.mycompany.myapp.dataaccess" lazy-init="true"
      @@ -229,12 +229,12 @@ import org.springframework.core.io.support.ResourcePatternUtils;
        *   </bean>
        * </beans>
        * 
      - * + * * beanRefFactory.xml file inside jar for services module: * *
      <?xml version="1.0" encoding="UTF-8"?>
        * <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
      - * 
      + *
        * <beans>
        *   <!-- child of data-access -->
        *   <bean id="com.mycompany.myapp.services" lazy-init="true"
      @@ -248,20 +248,20 @@ import org.springframework.core.io.support.ResourcePatternUtils;
        *   </bean>
        * </beans>
        * 
      - * + * * beanRefFactory.xml file inside jar for mypackage module. This doesn't * create any of its own contexts, but allows the other ones to be referred to be * a name known to this module: * *
      <?xml version="1.0" encoding="UTF-8"?>
        * <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
      - * 
      + *
        * <beans>
        *   <!-- define an alias for "com.mycompany.myapp.services" -->
        *   <alias name="com.mycompany.myapp.services" alias="com.mycompany.myapp.mypackage"/>
        * </beans>
        * 
      - * + * * @author Colin Sampaleanu * @author Juergen Hoeller * @see org.springframework.context.access.ContextSingletonBeanFactoryLocator @@ -362,7 +362,7 @@ public class SingletonBeanFactoryLocator implements BeanFactoryLocator { logger.trace("Factory group with resource name [" + this.resourceLocation + "] requested. Creating new instance."); } - + // Create the BeanFactory but don't initialize it. BeanFactory groupContext = createDefinition(this.resourceLocation, factoryKey); @@ -446,7 +446,7 @@ public class SingletonBeanFactoryLocator implements BeanFactoryLocator { return factory; } - + /** * Instantiate singletons and do any other normal initialization of the factory. * Subclasses that override {@link #createDefinition createDefinition()} should diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/access/package-info.java b/spring-beans/src/main/java/org/springframework/beans/factory/access/package-info.java index 85e6b11a021..7c4a159d5fa 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/access/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/access/package-info.java @@ -2,7 +2,7 @@ /** * * Helper infrastructure to locate and access bean factories. - * + * *

      Note: This package is only relevant for special sharing of bean * factories, for example behind EJB facades. It is not used in a * typical web application or standalone application. diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java index 4d0b8b5bbfb..5b1d61b5439 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessor.java @@ -70,10 +70,10 @@ import org.springframework.util.ReflectionUtils; * if available, as a direct alternative to Spring's own @Autowired. * *

      Only one constructor (at max) of any given bean class may carry this - * annotation with the 'required' parameter set to true, - * indicating the constructor to autowire when used as a Spring bean. - * If multiple non-required constructors carry the annotation, they - * will be considered as candidates for autowiring. The constructor with + * annotation with the 'required' parameter set to true, + * indicating the constructor to autowire when used as a Spring bean. + * If multiple non-required constructors carry the annotation, they + * will be considered as candidates for autowiring. The constructor with * the greatest number of dependencies that can be satisfied by matching * beans in the Spring container will be chosen. If none of the candidates * can be satisfied, then a default constructor (if present) will be used. @@ -109,9 +109,9 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean private final Set> autowiredAnnotationTypes = new LinkedHashSet>(); - + private String requiredParameterName = "required"; - + private boolean requiredParameterValue = true; private int order = Ordered.LOWEST_PRECEDENCE - 2; @@ -185,9 +185,9 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean } /** - * Set the boolean value that marks a dependency as required - *

      For example if using 'required=true' (the default), - * this value should be true; but if using + * Set the boolean value that marks a dependency as required + *

      For example if using 'required=true' (the default), + * this value should be true; but if using * 'optional=false', this value should be false. * @see #setRequiredParameterName(String) */ diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Configurable.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Configurable.java index 040a80981cc..84102e70e90 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Configurable.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Configurable.java @@ -25,7 +25,7 @@ import java.lang.annotation.Target; /** * Marks a class as being eligible for Spring-driven configuration. - * + * *

      Typically used with the AspectJ AnnotationBeanConfigurerAspect. * * @author Rod Johnson @@ -54,7 +54,7 @@ public @interface Configurable { * Is dependency checking to be performed for configured objects? */ boolean dependencyCheck() default false; - + /** * Are dependencies to be injected prior to the construction of an object? */ diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Required.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Required.java index 91aff60e6fd..46ef046864f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Required.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Required.java @@ -24,7 +24,7 @@ import java.lang.annotation.Target; /** * Marks a method (typically a JavaBean setter method) as being 'required': that is, * the setter method must be configured to be dependency-injected with a value. - * + * *

      Please do consult the javadoc for the {@link RequiredAnnotationBeanPostProcessor} * class (which, by default, checks for the presence of this annotation). * diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/AbstractFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/AbstractFactoryBean.java index 67d52452787..320db670778 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/AbstractFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/AbstractFactoryBean.java @@ -45,7 +45,7 @@ import org.springframework.util.ReflectionUtils; * this class will create the object that it creates exactly once * on initialization and subsequently return said singleton instance * on all calls to the {@link #getObject()} method. - * + * *

      Else, this class will create a new instance every time the * {@link #getObject()} method is invoked. Subclasses are responsible * for implementing the abstract {@link #createInstance()} template diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanFactoryPostProcessor.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanFactoryPostProcessor.java index 1619505c1f5..47db66447eb 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanFactoryPostProcessor.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/BeanFactoryPostProcessor.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/CommonsLogFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/CommonsLogFactoryBean.java index 70b2e00508b..ebaa3a44bba 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/CommonsLogFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/CommonsLogFactoryBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomEditorConfigurer.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomEditorConfigurer.java index 641f6c7f265..2118bdae985 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomEditorConfigurer.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/CustomEditorConfigurer.java @@ -35,7 +35,7 @@ import org.springframework.util.ClassUtils; /** * {@link BeanFactoryPostProcessor} implementation that allows for convenient * registration of custom {@link PropertyEditor property editors}. - * + * *

      * In case you want to register {@link PropertyEditor} instances, the * recommended usage as of Spring 2.0 is to use custom @@ -43,7 +43,7 @@ import org.springframework.util.ClassUtils; * desired editor instances on a given * {@link org.springframework.beans.PropertyEditorRegistry registry}. Each * PropertyEditorRegistrar can register any number of custom editors. - * + * *

        * <bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
        *   <property name="propertyEditorRegistrars">
      @@ -54,12 +54,12 @@ import org.springframework.util.ClassUtils;
        *   </property>
        * </bean>
        * 
      - * + * *

      * It's perfectly fine to register {@link PropertyEditor} classes via * the {@code customEditors} property. Spring will create fresh instances of * them for each editing attempt then: - * + * *

        * <bean id="customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer">
        *   <property name="customEditors">
      @@ -70,7 +70,7 @@ import org.springframework.util.ClassUtils;
        *   </property>
        * </bean>
        * 
      - * + * *

      * Note, that you shouldn't register {@link PropertyEditor} bean instances via * the {@code customEditors} property as {@link PropertyEditor}s are stateful @@ -78,7 +78,7 @@ import org.springframework.util.ClassUtils; * attempt. In case you need control over the instantiation process of * {@link PropertyEditor}s, use a {@link PropertyEditorRegistrar} to register * them. - * + * *

      * Also supports "java.lang.String[]"-style array class names and primitive * class names (e.g. "boolean"). Delegates to {@link ClassUtils} for actual diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java index 7b3c5ea5df2..e84f61c4d5b 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBean.java @@ -30,7 +30,7 @@ import org.springframework.util.StringUtils; /** * {@link FactoryBean} which retrieves a static or non-static field value. - * + * *

      Typically used for retrieving public static final constants. Usage example: * *

      // standard definition for exposing a static field, specifying the "staticField" property
      @@ -42,10 +42,10 @@ import org.springframework.util.StringUtils;
        * <bean id="java.sql.Connection.TRANSACTION_SERIALIZABLE"
        *       class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean"/>
      * - * + * *

      If you are using Spring 2.0, you can also use the following style of configuration for * public static fields. - * + * *

      <util:constant static-field="java.sql.Connection.TRANSACTION_SERIALIZABLE"/>
      * * @author Juergen Hoeller diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java index 51440d47dad..758092b8128 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/MethodInvokingFactoryBean.java @@ -30,7 +30,7 @@ import org.springframework.util.ClassUtils; /** * {@link FactoryBean} which returns a value which is the result of a static or instance - * method invocation. For most use cases it is better to just use the container's + * method invocation. For most use cases it is better to just use the container's * built-in factory method support for the same purpose, since that is smarter at * converting arguments. This factory bean is still useful though when you need to * call a method which doesn't return any value (for example, a static class method @@ -55,7 +55,7 @@ import org.springframework.util.ClassUtils; * *

      This class depends on {@link #afterPropertiesSet()} being called once * all properties have been set, as per the InitializingBean contract. - * + * *

      An example (in an XML based bean factory definition) of a bean definition * which uses this class to call a static factory method: * @@ -82,7 +82,7 @@ import org.springframework.util.ClassUtils; * </list> * </property> * </bean> - * + * * @author Colin Sampaleanu * @author Juergen Hoeller * @since 21.11.2003 diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java index 518ce93ff3b..c15c47090e3 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/PropertyPathFactoryBean.java @@ -31,7 +31,7 @@ import org.springframework.util.StringUtils; /** * {@link FactoryBean} that evaluates a property path on a given target object. - * + * *

      The target object can be specified directly or via a bean name. * *

      Usage examples: @@ -64,12 +64,12 @@ import org.springframework.util.StringUtils; * * <!-- will result in 10, which is the value of property 'age' of bean 'tb' --> * <bean id="tb.age" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/> - * + * *

      If you are using Spring 2.0 and XML Schema support in your configuration file(s), * you can also use the following style of configuration for property path access. * (See also the appendix entitled 'XML Schema-based configuration' in the Spring * reference manual for more examples.) - * + * *

       <!-- will result in 10, which is the value of property 'age' of bean 'tb' -->
        * <util:property-path id="name" path="testBean.age"/>
      * diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java index 3df4a47c271..92e3fd18997 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanNameReference.java @@ -18,7 +18,7 @@ package org.springframework.beans.factory.config; import org.springframework.util.Assert; -/** +/** * Immutable placeholder class used for a property value object when it's a * reference to another bean name in the factory, to be resolved at runtime. * @@ -29,7 +29,7 @@ import org.springframework.util.Assert; * @see org.springframework.beans.factory.BeanFactory#getBean */ public class RuntimeBeanNameReference implements BeanReference { - + private final String beanName; private Object source; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java index 822d98c43cc..9bef3a1e81d 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/RuntimeBeanReference.java @@ -18,7 +18,7 @@ package org.springframework.beans.factory.config; import org.springframework.util.Assert; -/** +/** * Immutable placeholder class used for a property value object when it's * a reference to another bean in the factory, to be resolved at runtime. * @@ -28,7 +28,7 @@ import org.springframework.util.Assert; * @see org.springframework.beans.factory.BeanFactory#getBean */ public class RuntimeBeanReference implements BeanReference { - + private final String beanName; private final boolean toParent; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/package-info.java b/spring-beans/src/main/java/org/springframework/beans/factory/package-info.java index bae3c67c50e..d4454c46ee6 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/package-info.java @@ -6,7 +6,7 @@ * Provides an alternative to the Singleton and Prototype design * patterns, including a consistent approach to configuration management. * Builds on the org.springframework.beans package. - * + * *

      This package and related packages are discussed in Chapter 11 of * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/FailFastProblemReporter.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/FailFastProblemReporter.java index 9b3311f5127..97ce2d3dde2 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/FailFastProblemReporter.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/FailFastProblemReporter.java @@ -22,7 +22,7 @@ import org.apache.commons.logging.LogFactory; /** * Simple {@link ProblemReporter} implementation that exhibits fail-fast * behavior when errors are encountered. - * + * *

      The first error encountered results in a {@link BeanDefinitionParsingException} * being thrown. * diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/PropertyEntry.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/PropertyEntry.java index c1737e456ca..18875d3af35 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/PropertyEntry.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/PropertyEntry.java @@ -33,7 +33,7 @@ public class PropertyEntry implements ParseState.Entry { * Creates a new instance of the {@link PropertyEntry} class. * @param name the name of the JavaBean property represented by this instance * @throws IllegalArgumentException if the supplied name is null - * or consists wholly of whitespace + * or consists wholly of whitespace */ public PropertyEntry(String name) { if (!StringUtils.hasText(name)) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/QualifierEntry.java b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/QualifierEntry.java index 2c80092fb15..4da479b2341 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/parsing/QualifierEntry.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/parsing/QualifierEntry.java @@ -20,7 +20,7 @@ import org.springframework.util.StringUtils; /** * {@link ParseState} entry representing an autowire candidate qualifier. - * + * * @author Mark Fisher * @since 2.5 */ diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java index 1cf82fc6904..7d06a13b085 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java @@ -346,10 +346,10 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac else { Object bean; final BeanFactory parent = this; - + if (System.getSecurityManager() != null) { bean = AccessController.doPrivileged(new PrivilegedAction() { - + public Object run() { return getInstantiationStrategy().instantiate(bd, null, parent); } @@ -358,7 +358,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac else { bean = getInstantiationStrategy().instantiate(bd, null, parent); } - + populateBean(beanClass.getName(), bd, new BeanWrapperImpl(bean)); return bean; } @@ -1346,7 +1346,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac MutablePropertyValues mpvs = null; List original; - + if (System.getSecurityManager()!= null) { if (bw instanceof BeanWrapperImpl) { ((BeanWrapperImpl) bw).setSecurityContext(getAccessControlContext()); @@ -1473,7 +1473,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac else { invokeAwareMethods(beanName, bean); } - + Object wrappedBean = bean; if (mbd == null || !mbd.isSynthetic()) { wrappedBean = applyBeanPostProcessorsBeforeInitialization(wrappedBean, beanName); @@ -1540,7 +1540,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac catch (PrivilegedActionException pae) { throw pae.getException(); } - } + } else { ((InitializingBean) bean).afterPropertiesSet(); } @@ -1585,7 +1585,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac if (logger.isDebugEnabled()) { logger.debug("Invoking init method '" + initMethodName + "' on bean with name '" + beanName + "'"); } - + if (System.getSecurityManager() != null) { AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws Exception { @@ -1610,7 +1610,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac try { ReflectionUtils.makeAccessible(initMethod); initMethod.invoke(bean); - } + } catch (InvocationTargetException ex) { throw ex.getTargetException(); } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionDefaults.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionDefaults.java index 382cc32069e..00d5c0bbc0f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionDefaults.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/BeanDefinitionDefaults.java @@ -20,7 +20,7 @@ import org.springframework.util.StringUtils; /** * A simple holder for BeanDefinition property defaults. - * + * * @author Mark Fisher * @since 2.5 */ diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java index 2d3ce41f37d..ce25df07110 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/CglibSubclassingInstantiationStrategy.java @@ -53,7 +53,7 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt * be overridden to provide method lookup. */ private static final int LOOKUP_OVERRIDE = 1; - + /** * Index in the CGLIB callback array for a method that should * be overridden using generic Methodreplacer functionality. @@ -114,8 +114,8 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt new ReplaceOverrideMethodInterceptor() }); - return (ctor == null) ? - enhancer.create() : + return (ctor == null) ? + enhancer.create() : enhancer.create(ctor.getParameterTypes(), args); } @@ -123,7 +123,7 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt /** * Class providing hashCode and equals methods required by CGLIB to * ensure that CGLIB doesn't generate a distinct class per bean. - * Identity is based on class and bean definition. + * Identity is based on class and bean definition. */ private class CglibIdentitySupport { @@ -157,7 +157,7 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt // Cast is safe, as CallbackFilter filters are used selectively. LookupOverride lo = (LookupOverride) beanDefinition.getMethodOverrides().getOverride(method); return owner.getBean(lo.getBeanName()); - } + } } @@ -180,7 +180,7 @@ public class CglibSubclassingInstantiationStrategy extends SimpleInstantiationSt * CGLIB object to filter method interception behavior. */ private class CallbackFilterImpl extends CglibIdentitySupport implements CallbackFilter { - + public int accept(Method method) { MethodOverride methodOverride = beanDefinition.getMethodOverrides().getOverride(method); if (logger.isTraceEnabled()) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java index 3a769c85d27..a14e5b2b4d4 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java @@ -280,7 +280,7 @@ class ConstructorResolver { beanInstance = this.beanFactory.getInstantiationStrategy().instantiate( mbd, beanName, this.beanFactory, constructorToUse, argsToUse); } - + bw.setWrappedInstance(beanInstance); return bw; } @@ -412,7 +412,7 @@ class ConstructorResolver { rawCandidates = (mbd.isNonPublicAccessAllowed() ? ReflectionUtils.getAllDeclaredMethods(factoryClazz) : factoryClazz.getMethods()); } - + List candidateSet = new ArrayList(); for (Method candidate : rawCandidates) { if (Modifier.isStatic(candidate.getModifiers()) == isStatic && @@ -570,7 +570,7 @@ class ConstructorResolver { beanInstance = beanFactory.getInstantiationStrategy().instantiate( mbd, beanName, beanFactory, factoryBean, factoryMethodToUse, argsToUse); } - + if (beanInstance == null) { return null; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/FactoryBeanRegistrySupport.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/FactoryBeanRegistrySupport.java index 9517497ac9b..37faa4357d9 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/FactoryBeanRegistrySupport.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/FactoryBeanRegistrySupport.java @@ -149,7 +149,7 @@ public abstract class FactoryBeanRegistrySupport extends DefaultSingletonBeanReg throw new BeanCreationException(beanName, "FactoryBean threw exception on object creation", ex); } - + // Do not accept a null value for a FactoryBean that's not fully // initialized yet: Many FactoryBeans just return null then. if (object == null && isSingletonCurrentlyInCreation(beanName)) { @@ -206,7 +206,7 @@ public abstract class FactoryBeanRegistrySupport extends DefaultSingletonBeanReg super.removeSingleton(beanName); this.factoryBeanObjectCache.remove(beanName); } - + /** * Returns the security context for this bean factory. If a security manager * is set, interaction with the user code will be executed using the privileged diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/LookupOverride.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/LookupOverride.java index 2a34093cf6a..9c1e9292e29 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/LookupOverride.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/LookupOverride.java @@ -31,7 +31,7 @@ import org.springframework.util.ObjectUtils; * @since 1.1 */ public class LookupOverride extends MethodOverride { - + private final String beanName; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverride.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverride.java index a2b85bb2fe7..af32ccb0752 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverride.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverride.java @@ -34,7 +34,7 @@ import org.springframework.util.ObjectUtils; * @since 1.1 */ public abstract class MethodOverride implements BeanMetadataElement { - + private final String methodName; private boolean overloaded = true; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverrides.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverrides.java index c8ba6e4b070..72dd7fd4ca7 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverrides.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverrides.java @@ -82,7 +82,7 @@ public class MethodOverrides { public boolean isEmpty() { return this.overrides.isEmpty(); } - + /** * Return the override for the given method, if any. * @param method method to check for overrides for diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodReplacer.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodReplacer.java index 7e04f826d6b..0fa1b59046f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodReplacer.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/MethodReplacer.java @@ -30,7 +30,7 @@ import java.lang.reflect.Method; * @since 1.1 */ public interface MethodReplacer { - + /** * Reimplement the given method. * @param obj the instance we're reimplementing the method for diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java index 71b673c8d8e..1dde9b3e2d6 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java @@ -66,7 +66,7 @@ import org.springframework.util.StringUtils; * ceo.$0(ref)=secretary // inject 'secretary' bean as 0th constructor arg * ceo.$1=1000000 // inject value '1000000' at 1st constructor arg * - * + * * @author Rod Johnson * @author Juergen Hoeller * @author Rob Harrop diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/ReplaceOverride.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/ReplaceOverride.java index 3faa967b2b9..261ccc04163 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/ReplaceOverride.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/ReplaceOverride.java @@ -76,12 +76,12 @@ public class ReplaceOverride extends MethodOverride { // It can't match. return false; } - + if (!isOverloaded()) { // No overloaded: don't worry about arg type matching. return true; } - + // If we get to here, we need to insist on precise argument matching. if (this.typeIdentifiers.size() != method.getParameterTypes().length) { return false; @@ -93,7 +93,7 @@ public class ReplaceOverride extends MethodOverride { return false; } } - return true; + return true; } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/SecurityContextProvider.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/SecurityContextProvider.java index 0403b8900f0..6efe58e1e1f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/SecurityContextProvider.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/SecurityContextProvider.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleSecurityContextProvider.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleSecurityContextProvider.java index 78b62938da5..dbc12b05fca 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleSecurityContextProvider.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/SimpleSecurityContextProvider.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,7 +21,7 @@ import java.security.AccessController; /** * Simple {@link SecurityContextProvider} implementation. - * + * * @author Costin Leau * @since 3.0 */ diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/package-info.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/package-info.java index 71a483e483f..2523fc71fd4 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/package-info.java @@ -3,7 +3,7 @@ * * Classes supporting the org.springframework.beans.factory package. * Contains abstract base classes for BeanFactory implementations. - * + * * */ package org.springframework.beans.factory.support; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractBeanDefinitionParser.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractBeanDefinitionParser.java index d624b2331e3..5a7315f81c5 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractBeanDefinitionParser.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractBeanDefinitionParser.java @@ -125,7 +125,7 @@ public abstract class AbstractBeanDefinitionParser implements BeanDefinitionPars * parameter is false, because one typically does not want inner beans * to be registered as top level beans. * @param definition the bean definition to be registered - * @param registry the registry that the bean is to be registered with + * @param registry the registry that the bean is to be registered with * @see BeanDefinitionReaderUtils#registerBeanDefinition(BeanDefinitionHolder, BeanDefinitionRegistry) */ protected void registerBeanDefinition(BeanDefinitionHolder definition, BeanDefinitionRegistry registry) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractSimpleBeanDefinitionParser.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractSimpleBeanDefinitionParser.java index 20c96bba686..b933e488cf4 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractSimpleBeanDefinitionParser.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/AbstractSimpleBeanDefinitionParser.java @@ -40,11 +40,11 @@ import org.springframework.util.StringUtils; * class immediately clear. Consider the following class definition: * *
      public class SimpleCache implements Cache {
      - * 
      + *
        *     public void setName(String name) {...}
        *     public void setTimeout(int timeout) {...}
        *     public void setEvictionPolicy(EvictionPolicy policy) {...}
      - * 
      + *
        *     // remaining class definition elided for clarity...
        * }
      * @@ -62,7 +62,7 @@ import org.springframework.util.StringUtils; * protected Class getBeanClass(Element element) { * return SimpleCache.class; * } - * } + * } * *

      Please note that the AbstractSimpleBeanDefinitionParser * is limited to populating the created bean definition with property values. @@ -121,7 +121,7 @@ public abstract class AbstractSimpleBeanDefinitionParser extends AbstractSingleB * property. * @param element the XML element being parsed * @param builder used to define the BeanDefinition - * @see #extractPropertyName(String) + * @see #extractPropertyName(String) */ @Override protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeansDtdResolver.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeansDtdResolver.java index fcf9af90013..a833a3c5144 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeansDtdResolver.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/BeansDtdResolver.java @@ -42,7 +42,7 @@ import org.springframework.core.io.Resource; * @see ResourceEntityResolver */ public class BeansDtdResolver implements EntityResolver { - + private static final String DTD_EXTENSION = ".dtd"; private static final String[] DTD_NAMES = {"spring-beans-2.0", "spring-beans"}; diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultBeanDefinitionDocumentReader.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultBeanDefinitionDocumentReader.java index 4bcc94a22a3..913c7db1a61 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultBeanDefinitionDocumentReader.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/DefaultBeanDefinitionDocumentReader.java @@ -223,7 +223,7 @@ public class DefaultBeanDefinitionDocumentReader implements BeanDefinitionDocume Set actualResources = new LinkedHashSet(4); - // Discover whether the location is an absolute or relative URI + // Discover whether the location is an absolute or relative URI boolean absoluteLocation = false; try { absoluteLocation = ResourcePatternUtils.isUrl(location) || ResourceUtils.toURI(location).isAbsolute(); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/NamespaceHandler.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/NamespaceHandler.java index a6553b1ce4b..a3bf241ae76 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/NamespaceHandler.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/NamespaceHandler.java @@ -50,7 +50,7 @@ public interface NamespaceHandler { /** * Invoked by the {@link DefaultBeanDefinitionDocumentReader} after * construction but before any custom elements are parsed. - * @see NamespaceHandlerSupport#registerBeanDefinitionParser(String, BeanDefinitionParser) + * @see NamespaceHandlerSupport#registerBeanDefinitionParser(String, BeanDefinitionParser) */ void init(); @@ -66,7 +66,7 @@ public interface NamespaceHandler { * not be used in a nested scenario. * @param element the element that is to be parsed into one or more BeanDefinitions * @param parserContext the object encapsulating the current state of the parsing process - * @return the primary BeanDefinition (can be null as explained above) + * @return the primary BeanDefinition (can be null as explained above) */ BeanDefinition parse(Element element, ParserContext parserContext); diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandler.java b/spring-beans/src/main/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandler.java index a3656ec8bb9..69d2fc41645 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandler.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandler.java @@ -1,12 +1,12 @@ /* * Copyright 2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,24 +33,24 @@ import org.w3c.dom.Node; * attributes directly through to bean properties. An important point to note is * that this NamespaceHandler does not have a corresponding schema * since there is no way to know in advance all possible attribute names. - * + * *

      * An example of the usage of this NamespaceHandler is shown below: - * + * *

        * <bean id="author" class="..TestBean" c:name="Enescu" c:work-ref="compositions"/>
        * 
      - * + * * Here the 'c:name' corresponds directly to the 'name * ' argument declared on the constructor of class 'TestBean'. The * 'c:work-ref' attributes corresponds to the 'work' * argument and, rather than being the concrete value, it contains the name of * the bean that will be considered as a parameter. - * + * * Note: This implementation supports only named parameters - there is no * support for indexes or types. Further more, the names are used as hints by * the container which, by default, does type introspection. - * + * * @see SimplePropertyNamespaceHandler * @author Costin Leau */ @@ -90,7 +90,7 @@ public class SimpleConstructorNamespaceHandler implements NamespaceHandler { if (argName.startsWith(DELIMITER_PREFIX)) { String arg = argName.substring(1).trim(); - // fast default check + // fast default check if (!StringUtils.hasText(arg)) { cvs.addGenericArgumentValue(valueHolder); } @@ -107,13 +107,13 @@ public class SimpleConstructorNamespaceHandler implements NamespaceHandler { parserContext.getReaderContext().error( "Constructor argument '" + argName + "' specifies a negative index", attr); } - + if (cvs.hasIndexedArgumentValue(index)){ parserContext.getReaderContext().error( "Constructor argument '" + argName + "' with index "+ index+" already defined using ." + " Only one approach may be used per argument.", attr); } - + cvs.addIndexedArgumentValue(index, valueHolder); } } @@ -139,7 +139,7 @@ public class SimpleConstructorNamespaceHandler implements NamespaceHandler { return true; } - + private boolean checkName(String name, Collection values) { for (ValueHolder holder : values) { if (name.equals(holder.getName())) { diff --git a/spring-beans/src/main/java/org/springframework/beans/package-info.java b/spring-beans/src/main/java/org/springframework/beans/package-info.java index 1af0af89568..11d8730cd96 100644 --- a/spring-beans/src/main/java/org/springframework/beans/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/package-info.java @@ -3,10 +3,10 @@ * * This package contains interfaces and classes for manipulating Java beans. * It is used by most other Spring packages. - * + * *

      A BeanWrapper object may be used to set and get bean properties, * singly or in bulk. - * + * *

      The classes in this package are discussed in Chapter 11 of * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). diff --git a/spring-beans/src/main/java/org/springframework/beans/propertyeditors/CharacterEditor.java b/spring-beans/src/main/java/org/springframework/beans/propertyeditors/CharacterEditor.java index bf20a7544c1..5cdcb1d5001 100644 --- a/spring-beans/src/main/java/org/springframework/beans/propertyeditors/CharacterEditor.java +++ b/spring-beans/src/main/java/org/springframework/beans/propertyeditors/CharacterEditor.java @@ -28,7 +28,7 @@ import org.springframework.util.StringUtils; * {@link java.beans.PropertyEditor property editor} for char! * {@link org.springframework.beans.BeanWrapperImpl} will register this * editor by default. - * + * *

      Also supports conversion from a Unicode character sequence; e.g. * u0041 ('A'). * diff --git a/spring-beans/src/main/java/org/springframework/beans/propertyeditors/LocaleEditor.java b/spring-beans/src/main/java/org/springframework/beans/propertyeditors/LocaleEditor.java index 49df5791680..9e0944662c1 100644 --- a/spring-beans/src/main/java/org/springframework/beans/propertyeditors/LocaleEditor.java +++ b/spring-beans/src/main/java/org/springframework/beans/propertyeditors/LocaleEditor.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/main/java/org/springframework/beans/propertyeditors/ResourceBundleEditor.java b/spring-beans/src/main/java/org/springframework/beans/propertyeditors/ResourceBundleEditor.java index 4f0f404d82c..19f8bf5393f 100644 --- a/spring-beans/src/main/java/org/springframework/beans/propertyeditors/ResourceBundleEditor.java +++ b/spring-beans/src/main/java/org/springframework/beans/propertyeditors/ResourceBundleEditor.java @@ -26,13 +26,13 @@ import java.util.ResourceBundle; /** * {@link java.beans.PropertyEditor} implementation for * {@link java.util.ResourceBundle ResourceBundles}. - * + * *

      Only supports conversion from a String, but not * to a String. - * - * Find below some examples of using this class in a + * + * Find below some examples of using this class in a * (properly configured) Spring container using XML-based metadata: - * + * *

       <bean id="errorDialog" class="...">
        *    <!--
        *        the 'messages' property is of type java.util.ResourceBundle.
      @@ -40,18 +40,18 @@ import java.util.ResourceBundle;
        *    -->
        *    <property name="messages" value="DialogMessages"/>
        * </bean>
      - * + * *
       <bean id="errorDialog" class="...">
        *    <!--
        *        the 'DialogMessages.properties' file exists in the 'com/messages' package
        *    -->
        *    <property name="messages" value="com/messages/DialogMessages"/>
        * </bean>
      - * + * *

      A 'properly configured' Spring {@link org.springframework.context.ApplicationContext container} * might contain a {@link org.springframework.beans.factory.config.CustomEditorConfigurer} * definition such that the conversion can be effected transparently: - * + * *

       <bean class="org.springframework.beans.factory.config.CustomEditorConfigurer">
        *    <property name="customEditors">
        *        <map>
      @@ -61,10 +61,10 @@ import java.util.ResourceBundle;
        *        </map>
        *    </property>
        * </bean>
      - * + * *

      Please note that this {@link java.beans.PropertyEditor} is * not registered by default with any of the Spring infrastructure. - * + * *

      Thanks to David Leal Valmana for the suggestion and initial prototype. * * @author Rick Evans diff --git a/spring-beans/src/main/java/org/springframework/beans/propertyeditors/StringArrayPropertyEditor.java b/spring-beans/src/main/java/org/springframework/beans/propertyeditors/StringArrayPropertyEditor.java index c715f61e4c8..5bcecaf9738 100644 --- a/spring-beans/src/main/java/org/springframework/beans/propertyeditors/StringArrayPropertyEditor.java +++ b/spring-beans/src/main/java/org/springframework/beans/propertyeditors/StringArrayPropertyEditor.java @@ -46,7 +46,7 @@ public class StringArrayPropertyEditor extends PropertyEditorSupport { private final String charsToDelete; private final boolean emptyArrayAsNull; - + private final boolean trimValues; @@ -83,7 +83,7 @@ public class StringArrayPropertyEditor extends PropertyEditorSupport { * @param separator the separator to use for splitting a {@link String} * @param emptyArrayAsNull true if an empty String array * is to be transformed into null - * @param trimValues true if the values in the parsed arrays + * @param trimValues true if the values in the parsed arrays * are to be be trimmed of whitespace (default is true). */ public StringArrayPropertyEditor(String separator, boolean emptyArrayAsNull, boolean trimValues) { @@ -111,7 +111,7 @@ public class StringArrayPropertyEditor extends PropertyEditorSupport { * e.g. "\r\n\f" will delete all new lines and line feeds in a String. * @param emptyArrayAsNull true if an empty String array * is to be transformed into null - * @param trimValues true if the values in the parsed arrays + * @param trimValues true if the values in the parsed arrays * are to be be trimmed of whitespace (default is true). */ public StringArrayPropertyEditor(String separator, String charsToDelete, boolean emptyArrayAsNull, boolean trimValues) { diff --git a/spring-beans/src/main/java/org/springframework/beans/propertyeditors/package-info.java b/spring-beans/src/main/java/org/springframework/beans/propertyeditors/package-info.java index 40aa76e11e7..376e3c6d3f4 100644 --- a/spring-beans/src/main/java/org/springframework/beans/propertyeditors/package-info.java +++ b/spring-beans/src/main/java/org/springframework/beans/propertyeditors/package-info.java @@ -3,7 +3,7 @@ * * Properties editors used to convert from String values to object * types such as java.util.Properties. - * + * *

      Some of these editors are registered automatically by BeanWrapperImpl. * "CustomXxxEditor" classes are intended for manual registration in * specific binding processes, as they are localized or the like. diff --git a/spring-beans/src/main/java/org/springframework/beans/support/PropertyComparator.java b/spring-beans/src/main/java/org/springframework/beans/support/PropertyComparator.java index d9f9a95bbb2..950f22cb06e 100644 --- a/spring-beans/src/main/java/org/springframework/beans/support/PropertyComparator.java +++ b/spring-beans/src/main/java/org/springframework/beans/support/PropertyComparator.java @@ -81,7 +81,7 @@ public class PropertyComparator implements Comparator { } int result; - + // Put an object with null property at the end of the sort result. try { if (v1 != null) { diff --git a/spring-beans/src/main/java/org/springframework/beans/support/SortDefinition.java b/spring-beans/src/main/java/org/springframework/beans/support/SortDefinition.java index 869701bc598..9ad02dade06 100644 --- a/spring-beans/src/main/java/org/springframework/beans/support/SortDefinition.java +++ b/spring-beans/src/main/java/org/springframework/beans/support/SortDefinition.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/test/java/com/foo/ComponentBeanDefinitionParserTest.java b/spring-beans/src/test/java/com/foo/ComponentBeanDefinitionParserTest.java index aec54454ece..d85622e12bd 100644 --- a/spring-beans/src/test/java/com/foo/ComponentBeanDefinitionParserTest.java +++ b/spring-beans/src/test/java/com/foo/ComponentBeanDefinitionParserTest.java @@ -1,12 +1,12 @@ /* * Copyright 2006-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyValuesTests.java b/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyValuesTests.java index f85c45233d9..4132763825c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyValuesTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyValuesTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,7 +25,7 @@ import java.util.Map; * @author Rod Johnson * @author Chris Beams */ -public abstract class AbstractPropertyValuesTests { +public abstract class AbstractPropertyValuesTests { /** * Must contain: forname=Tony surname=Blair age=50 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 a8abdd95f29..25331d6606d 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java @@ -36,7 +36,7 @@ import test.beans.TestBean; /** * Unit tests for {@link BeanUtils}. - * + * * @author Juergen Hoeller * @author Rob Harrop * @author Chris Beams diff --git a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperAutoGrowingTests.java b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperAutoGrowingTests.java index 469b22cdafc..c9966af03ba 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperAutoGrowingTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperAutoGrowingTests.java @@ -71,12 +71,12 @@ public class BeanWrapperAutoGrowingTests { @Test public void getPropertyValueAutoGrowArrayBySeveralElements() { assertNotNull(wrapper.getPropertyValue("array[4]")); - assertEquals(5, bean.getArray().length); - assertTrue(bean.getArray()[0] instanceof Bean); - assertTrue(bean.getArray()[1] instanceof Bean); - assertTrue(bean.getArray()[2] instanceof Bean); - assertTrue(bean.getArray()[3] instanceof Bean); - assertTrue(bean.getArray()[4] instanceof Bean); + assertEquals(5, bean.getArray().length); + assertTrue(bean.getArray()[0] instanceof Bean); + assertTrue(bean.getArray()[1] instanceof Bean); + assertTrue(bean.getArray()[2] instanceof Bean); + assertTrue(bean.getArray()[3] instanceof Bean); + assertTrue(bean.getArray()[4] instanceof Bean); assertNotNull(wrapper.getPropertyValue("array[0]")); assertNotNull(wrapper.getPropertyValue("array[1]")); assertNotNull(wrapper.getPropertyValue("array[2]")); @@ -94,7 +94,7 @@ public class BeanWrapperAutoGrowingTests { public void getPropertyValueAutoGrowList() { assertNotNull(wrapper.getPropertyValue("list[0]")); assertEquals(1, bean.getList().size()); - assertTrue(bean.getList().get(0) instanceof Bean); + assertTrue(bean.getList().get(0) instanceof Bean); } @Test @@ -107,11 +107,11 @@ public class BeanWrapperAutoGrowingTests { public void getPropertyValueAutoGrowListBySeveralElements() { assertNotNull(wrapper.getPropertyValue("list[4]")); assertEquals(5, bean.getList().size()); - assertTrue(bean.getList().get(0) instanceof Bean); - assertTrue(bean.getList().get(1) instanceof Bean); - assertTrue(bean.getList().get(2) instanceof Bean); - assertTrue(bean.getList().get(3) instanceof Bean); - assertTrue(bean.getList().get(4) instanceof Bean); + assertTrue(bean.getList().get(0) instanceof Bean); + assertTrue(bean.getList().get(1) instanceof Bean); + assertTrue(bean.getList().get(2) instanceof Bean); + assertTrue(bean.getList().get(3) instanceof Bean); + assertTrue(bean.getList().get(4) instanceof Bean); assertNotNull(wrapper.getPropertyValue("list[0]")); assertNotNull(wrapper.getPropertyValue("list[1]")); assertNotNull(wrapper.getPropertyValue("list[2]")); @@ -167,9 +167,9 @@ public class BeanWrapperAutoGrowingTests { private Bean[] array; private Bean[][] multiArray; - + private List list; - + private List> multiList; private List listNotParameterized; @@ -215,7 +215,7 @@ public class BeanWrapperAutoGrowingTests { public void setList(List list) { this.list = list; } - + public List> getMultiList() { return multiList; } 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 4866cc101b6..2a0cf025b09 100644 --- a/spring-beans/src/test/java/org/springframework/beans/ConcurrentBeanWrapperTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/ConcurrentBeanWrapperTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -50,7 +50,7 @@ public final class ConcurrentBeanWrapperTests { performSet(); } } - + @Test public void testConcurrent() { for (int i = 0; i < 10; i++) { 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 8eeb96e36cb..2b114defc7c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/MutablePropertyValuesTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/MutablePropertyValuesTests.java @@ -36,7 +36,7 @@ public final class MutablePropertyValuesTests extends AbstractPropertyValuesTest pvs.addPropertyValue(new PropertyValue("surname", "Blair")); pvs.addPropertyValue(new PropertyValue("age", "50")); doTestTony(pvs); - + MutablePropertyValues deepCopy = new MutablePropertyValues(pvs); doTestTony(deepCopy); deepCopy.setPropertyValueAt(new PropertyValue("name", "Gordon"), 0); 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 4094dd39747..636fbda545f 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 @@ -45,12 +45,12 @@ import static test.util.TestResourceUtils.qualifiedResource; * @since 04.07.2003 */ public final class BeanFactoryUtilsTests { - + private static final Class CLASS = BeanFactoryUtilsTests.class; - private static final Resource ROOT_CONTEXT = qualifiedResource(CLASS, "root.xml"); - private static final Resource MIDDLE_CONTEXT = qualifiedResource(CLASS, "middle.xml"); - private static final Resource LEAF_CONTEXT = qualifiedResource(CLASS, "leaf.xml"); - private static final Resource DEPENDENT_BEANS_CONTEXT = qualifiedResource(CLASS, "dependentBeans.xml"); + private static final Resource ROOT_CONTEXT = qualifiedResource(CLASS, "root.xml"); + private static final Resource MIDDLE_CONTEXT = qualifiedResource(CLASS, "middle.xml"); + private static final Resource LEAF_CONTEXT = qualifiedResource(CLASS, "leaf.xml"); + private static final Resource DEPENDENT_BEANS_CONTEXT = qualifiedResource(CLASS, "dependentBeans.xml"); private ConfigurableListableBeanFactory listableBeanFactory; 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 563b56fca8c..3ba946c9626 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 @@ public final class ConcurrentBeanFactoryTests { private static final Log logger = LogFactory.getLog(ConcurrentBeanFactoryTests.class); private static final Resource CONTEXT = qualifiedResource(ConcurrentBeanFactoryTests.class, "context.xml"); - + private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy/MM/dd"); private static final Date DATE_1, DATE_2; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java index 1acfc0a504b..5c821a4f80c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java @@ -2539,38 +2539,38 @@ public class DefaultListableBeanFactoryTests { return this.userName; } } - + /** * Bean that changes state on a business invocation, so that * we can check whether it's been invoked * @author Rod Johnson */ private static class SideEffectBean { - + private int count; - + public void setCount(int count) { this.count = count; } - + public int getCount() { return this.count; } - + public void doWork() { ++count; } } - + private static class KnowsIfInstantiated { - + private static boolean instantiated; - + public static void clearInstantiationRecord() { instantiated = false; } - + public static boolean wasInstantiated() { return instantiated; } diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanLookupTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanLookupTests.java index 127b1621101..5b4c200f58d 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanLookupTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanLookupTests.java @@ -40,31 +40,31 @@ public class FactoryBeanLookupTests { beanFactory = new XmlBeanFactory( new ClassPathResource("FactoryBeanLookupTests-context.xml", this.getClass())); } - + @Test public void factoryBeanLookupByNameDereferencing() { Object fooFactory = beanFactory.getBean("&fooFactory"); assertThat(fooFactory, instanceOf(FooFactoryBean.class)); } - + @Test public void factoryBeanLookupByType() { FooFactoryBean fooFactory = beanFactory.getBean(FooFactoryBean.class); assertNotNull(fooFactory); } - + @Test public void factoryBeanLookupByTypeAndNameDereference() { FooFactoryBean fooFactory = beanFactory.getBean("&fooFactory", FooFactoryBean.class); assertNotNull(fooFactory); } - + @Test public void factoryBeanObjectLookupByName() { Object fooFactory = beanFactory.getBean("fooFactory"); assertThat(fooFactory, instanceOf(Foo.class)); } - + @Test public void factoryBeanObjectLookupByNameAndType() { Foo foo = beanFactory.getBean("fooFactory", Foo.class); diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java index 9d1123fe1c3..c1e5f9acfed 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java @@ -33,9 +33,9 @@ import org.springframework.util.Assert; public final class FactoryBeanTests { private static final Class CLASS = FactoryBeanTests.class; - private static final Resource RETURNS_NULL_CONTEXT = qualifiedResource(CLASS, "returnsNull.xml"); - private static final Resource WITH_AUTOWIRING_CONTEXT = qualifiedResource(CLASS, "withAutowiring.xml"); - + private static final Resource RETURNS_NULL_CONTEXT = qualifiedResource(CLASS, "returnsNull.xml"); + private static final Resource WITH_AUTOWIRING_CONTEXT = qualifiedResource(CLASS, "withAutowiring.xml"); + @Test public void testFactoryBeanReturnsNull() throws Exception { XmlBeanFactory factory = new XmlBeanFactory(RETURNS_NULL_CONTEXT); @@ -46,10 +46,10 @@ public final class FactoryBeanTests { @Test public void testFactoryBeansWithAutowiring() throws Exception { XmlBeanFactory factory = new XmlBeanFactory(WITH_AUTOWIRING_CONTEXT); - + BeanFactoryPostProcessor ppc = (BeanFactoryPostProcessor) factory.getBean("propertyPlaceholderConfigurer"); ppc.postProcessBeanFactory(factory); - + Alpha alpha = (Alpha) factory.getBean("alpha"); Beta beta = (Beta) factory.getBean("beta"); Gamma gamma = (Gamma) factory.getBean("gamma"); @@ -63,10 +63,10 @@ public final class FactoryBeanTests { @Test public void testFactoryBeansWithIntermediateFactoryBeanAutowiringFailure() throws Exception { XmlBeanFactory factory = new XmlBeanFactory(WITH_AUTOWIRING_CONTEXT); - + BeanFactoryPostProcessor ppc = (BeanFactoryPostProcessor) factory.getBean("propertyPlaceholderConfigurer"); ppc.postProcessBeanFactory(factory); - + Beta beta = (Beta) factory.getBean("beta"); Alpha alpha = (Alpha) factory.getBean("alpha"); Gamma gamma = (Gamma) factory.getBean("gamma"); diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocatorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocatorTests.java index 2a9bff1c30b..460559b0684 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocatorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocatorTests.java @@ -26,7 +26,7 @@ import org.springframework.util.ClassUtils; /** * Unit tests for {@link SingletonBeanFactoryLocator}. - * + * * @author Colin Sampaleanu * @author Chris Beams */ @@ -38,7 +38,7 @@ public class SingletonBeanFactoryLocatorTests { public void testBasicFunctionality() { SingletonBeanFactoryLocator facLoc = new SingletonBeanFactoryLocator( "classpath*:" + ClassUtils.addResourcePathToPackagePath(CLASS, REF1_XML)); - + basicFunctionalityTest(facLoc); } @@ -81,7 +81,7 @@ public class SingletonBeanFactoryLocatorTests { BeanFactoryLocator facLoc = SingletonBeanFactoryLocator.getInstance( ClassUtils.addResourcePathToPackagePath(CLASS, REF1_XML)); getInstanceTest1(facLoc); - + facLoc = SingletonBeanFactoryLocator.getInstance( "classpath*:/" + ClassUtils.addResourcePathToPackagePath(CLASS, REF1_XML)); getInstanceTest2(facLoc); @@ -90,7 +90,7 @@ public class SingletonBeanFactoryLocatorTests { facLoc = SingletonBeanFactoryLocator.getInstance( "classpath:" + ClassUtils.addResourcePathToPackagePath(CLASS, REF1_XML)); getInstanceTest3(facLoc); - + } /** @@ -109,12 +109,12 @@ public class SingletonBeanFactoryLocatorTests { fac = bfr3.getFactory(); tb = (TestBean) fac.getBean("beans1.bean1"); assertTrue(tb.getName().equals("was beans1.bean1")); - + BeanFactoryReference bfr4 = facLoc.useBeanFactory("a.qualified.name.which.is.an.alias"); fac = bfr4.getFactory(); tb = (TestBean) fac.getBean("beans1.bean1"); assertTrue(tb.getName().equals("was beans1.bean1")); - + bfr.release(); bfr3.release(); bfr2.release(); @@ -152,7 +152,7 @@ public class SingletonBeanFactoryLocatorTests { bfr4.release(); bfr3.release(); } - + /** * Worker method so subclass can use it too */ diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java index 0e798b9e413..37fc30a4ee2 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java @@ -45,7 +45,7 @@ import static org.junit.Assert.*; /** * Unit tests for {@link AutowiredAnnotationBeanPostProcessor}. - * + * * @author Juergen Hoeller * @author Mark Fisher * @author Sam Brannen 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 6beb38ada18..4f96efc8d3c 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 @@ -30,7 +30,7 @@ import org.springframework.core.io.Resource; /** * Unit tests for {@link CustomAutowireConfigurer}. - * + * * @author Mark Fisher * @author Juergen Hoeller * @author Chris Beams diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java index c7870b3236b..265fea19a60 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 @@ -39,7 +39,7 @@ import org.springframework.beans.propertyeditors.CustomDateEditor; /** * Unit tests for {@link CustomEditorConfigurer}. - * + * * @author Juergen Hoeller * @author Chris Beams * @since 31.07.2004 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 29aa612110f..0c328ce481d 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 @@ -30,13 +30,13 @@ import test.beans.TestBean; /** * Unit tests for {@link FieldRetrievingFactoryBean}. - * + * * @author Juergen Hoeller * @author Chris Beams * @since 31.07.2004 */ public final 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/MethodInvokingFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/MethodInvokingFactoryBeanTests.java index bd11117a4ab..616b025ad39 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/MethodInvokingFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/MethodInvokingFactoryBeanTests.java @@ -29,7 +29,7 @@ import org.springframework.util.MethodInvoker; /** * Unit tests for {@link MethodInvokingFactoryBean}. - * + * * @author Colin Sampaleanu * @author Juergen Hoeller * @author Chris Beams diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java index 41c9ce811f1..b67861cc281 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -42,7 +42,7 @@ public class ObjectFactoryCreatingFactoryBeanTests { private static final Resource CONTEXT = qualifiedResource(ObjectFactoryCreatingFactoryBeanTests.class, "context.xml"); - + private XmlBeanFactory beanFactory; @Before @@ -116,7 +116,7 @@ public class ObjectFactoryCreatingFactoryBeanTests { ObjectFactory objectFactory = (ObjectFactory) factory.getObject(); Object actualSingleton = objectFactory.getObject(); assertSame(expectedSingleton, actualSingleton); - + verify(beanFactory); } 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 ca972f349aa..18fd8bd4210 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 @@ -26,13 +26,13 @@ import org.springframework.core.io.Resource; /** * Unit tests for {@link PropertiesFactoryBean}. - * + * * @author Juergen Hoeller * @author Chris Beams * @since 01.11.2003 */ public final class PropertiesFactoryBeanTests { - + private static final Class CLASS = PropertiesFactoryBeanTests.class; private static final Resource TEST_PROPS = qualifiedResource(CLASS, "test.properties"); private static final Resource TEST_PROPS_XML = qualifiedResource(CLASS, "test.properties.xml"); diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java index fd3891bf998..5a564500eb3 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java @@ -28,13 +28,13 @@ import test.beans.TestBean; /** * Unit tests for {@link PropertyPathFactoryBean}. - * + * * @author Juergen Hoeller * @author Chris Beams * @since 04.10.2004 */ public class PropertyPathFactoryBeanTests { - + private static final Resource CONTEXT = qualifiedResource(PropertyPathFactoryBeanTests.class, "context.xml"); @Test 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 afb273a5b57..115f618a00b 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 @@ -32,7 +32,7 @@ import org.springframework.core.NestedRuntimeException; /** * Unit tests for {@link ServiceLocatorFactoryBean}. - * + * * @author Colin Sampaleanu * @author Rick Evans * @author Chris Beams @@ -40,7 +40,7 @@ import org.springframework.core.NestedRuntimeException; public final class ServiceLocatorFactoryBeanTests { private DefaultListableBeanFactory bf; - + @Before public void setUp() { bf = new DefaultListableBeanFactory(); @@ -53,7 +53,7 @@ public final class ServiceLocatorFactoryBeanTests { genericBeanDefinition(ServiceLocatorFactoryBean.class) .addPropertyValue("serviceLocatorInterface", TestServiceLocator.class) .getBeanDefinition()); - + TestServiceLocator factory = (TestServiceLocator) bf.getBean("factory"); TestService testService = factory.getTestService(); assertNotNull(testService); @@ -75,13 +75,13 @@ public final class ServiceLocatorFactoryBeanTests { genericBeanDefinition(ServiceLocatorFactoryBean.class) .addPropertyValue("serviceLocatorInterface", TestService2Locator.class) .getBeanDefinition()); - + try { TestServiceLocator factory = (TestServiceLocator) bf.getBean("factory"); factory.getTestService(); fail("Must fail on more than one matching type"); } catch (NoSuchBeanDefinitionException ex) { /* expected */ } - + try { TestServiceLocator2 factory = (TestServiceLocator2) bf.getBean("factory2"); factory.getTestService(null); @@ -114,7 +114,7 @@ public final class ServiceLocatorFactoryBeanTests { .addPropertyValue("serviceLocatorInterface", TestService2Locator.class) .addPropertyValue("serviceLocatorExceptionClass", CustomServiceLocatorException3.class) .getBeanDefinition()); - + try { TestServiceLocator factory = (TestServiceLocator) bf.getBean("factory"); factory.getTestService(); @@ -123,7 +123,7 @@ public final class ServiceLocatorFactoryBeanTests { catch (CustomServiceLocatorException1 expected) { assertTrue(expected.getCause() instanceof NoSuchBeanDefinitionException); } - + try { TestServiceLocator2 factory2 = (TestServiceLocator2) bf.getBean("factory2"); factory2.getTestService(null); @@ -132,7 +132,7 @@ public final class ServiceLocatorFactoryBeanTests { catch (CustomServiceLocatorException2 expected) { assertTrue(expected.getCause() instanceof NoSuchBeanDefinitionException); } - + try { TestService2Locator factory3 = (TestService2Locator) bf.getBean("factory3"); factory3.getTestService(); @@ -150,7 +150,7 @@ public final class ServiceLocatorFactoryBeanTests { // test string-arg getter with null id TestServiceLocator2 factory = (TestServiceLocator2) bf.getBean("factory"); - + @SuppressWarnings("unused") TestService testBean = factory.getTestService(null); // now test with explicit id @@ -166,12 +166,12 @@ public final class ServiceLocatorFactoryBeanTests { public void testCombinedLocatorInterface() { bf.registerBeanDefinition("testService", genericBeanDefinition(TestService.class).getBeanDefinition()); bf.registerAlias("testService", "1"); - + bf.registerBeanDefinition("factory", genericBeanDefinition(ServiceLocatorFactoryBean.class) .addPropertyValue("serviceLocatorInterface", TestServiceLocator3.class) .getBeanDefinition()); - + // StaticApplicationContext ctx = new StaticApplicationContext(); // ctx.registerPrototype("testService", TestService.class, new MutablePropertyValues()); // ctx.registerAlias("testService", "1"); @@ -204,7 +204,7 @@ public final class ServiceLocatorFactoryBeanTests { .addPropertyValue("serviceLocatorInterface", TestServiceLocator3.class) .addPropertyValue("serviceMappings", "=testService1\n1=testService1\n2=testService2") .getBeanDefinition()); - + // StaticApplicationContext ctx = new StaticApplicationContext(); // ctx.registerPrototype("testService1", TestService.class, new MutablePropertyValues()); // ctx.registerPrototype("testService2", ExtendedTestService.class, new MutablePropertyValues()); 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 68330921190..14b272ee0f0 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 @@ -39,11 +39,11 @@ import test.beans.TestBean; * @author Chris Beams */ public final class SimpleScopeTests { - + private static final Resource CONTEXT = qualifiedResource(SimpleScopeTests.class, "context.xml"); private DefaultListableBeanFactory beanFactory; - + @Before public void setUp() { beanFactory = new DefaultListableBeanFactory(); @@ -71,7 +71,7 @@ public final class SimpleScopeTests { XmlBeanDefinitionReader xbdr = new XmlBeanDefinitionReader(beanFactory); xbdr.loadBeanDefinitions(CONTEXT); } - + @Test public void testCanGetScopedObject() { TestBean tb1 = (TestBean) beanFactory.getBean("usesScope"); diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/TestTypes.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/TestTypes.java index 2aec11ef713..5460f8bd016 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/TestTypes.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/TestTypes.java @@ -20,7 +20,7 @@ import org.springframework.beans.factory.ObjectFactory; /** * Shared test types for this package. - * + * * @author Chris Beams */ final class TestTypes {} 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 774fb0b5a83..d5e4441f20e 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 @@ -36,7 +36,7 @@ import test.beans.TestBean; * @since 2.0 */ public final class CustomProblemReporterTests { - + private static final Resource CONTEXT = qualifiedResource(CustomProblemReporterTests.class, "context.xml"); private CollatingProblemReporter problemReporter; 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 c8d5e9c1ec7..56b9b1fbc64 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 @@ -22,7 +22,7 @@ import org.junit.Test; /** * Unit tests for {@link PassThroughSourceExtractor}. - * + * * @author Rick Evans * @author Chris Beams */ diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireBeanFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireBeanFactoryTests.java index b995560e5fc..72a90473e2b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireBeanFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireBeanFactoryTests.java @@ -53,9 +53,9 @@ public class QualifierAnnotationAutowireBeanFactoryTests { RootBeanDefinition rbd = new RootBeanDefinition(Person.class, cavs, null); lbf.registerBeanDefinition(JUERGEN, rbd); assertTrue(lbf.isAutowireCandidate(JUERGEN, null)); - assertTrue(lbf.isAutowireCandidate(JUERGEN, + assertTrue(lbf.isAutowireCandidate(JUERGEN, new DependencyDescriptor(Person.class.getDeclaredField("name"), false))); - assertTrue(lbf.isAutowireCandidate(JUERGEN, + assertTrue(lbf.isAutowireCandidate(JUERGEN, new DependencyDescriptor(Person.class.getDeclaredField("name"), true))); } @@ -68,16 +68,16 @@ public class QualifierAnnotationAutowireBeanFactoryTests { rbd.setAutowireCandidate(false); lbf.registerBeanDefinition(JUERGEN, rbd); assertFalse(lbf.isAutowireCandidate(JUERGEN, null)); - assertFalse(lbf.isAutowireCandidate(JUERGEN, + assertFalse(lbf.isAutowireCandidate(JUERGEN, new DependencyDescriptor(Person.class.getDeclaredField("name"), false))); - assertFalse(lbf.isAutowireCandidate(JUERGEN, + assertFalse(lbf.isAutowireCandidate(JUERGEN, new DependencyDescriptor(Person.class.getDeclaredField("name"), true))); } @Ignore @Test public void testAutowireCandidateWithFieldDescriptor() throws Exception { - DefaultListableBeanFactory lbf = new DefaultListableBeanFactory(); + DefaultListableBeanFactory lbf = new DefaultListableBeanFactory(); ConstructorArgumentValues cavs1 = new ConstructorArgumentValues(); cavs1.addGenericArgumentValue(JUERGEN); RootBeanDefinition person1 = new RootBeanDefinition(Person.class, cavs1, null); @@ -101,7 +101,7 @@ public class QualifierAnnotationAutowireBeanFactoryTests { @Test public void testAutowireCandidateExplicitlyFalseWithFieldDescriptor() throws Exception { - DefaultListableBeanFactory lbf = new DefaultListableBeanFactory(); + DefaultListableBeanFactory lbf = new DefaultListableBeanFactory(); ConstructorArgumentValues cavs = new ConstructorArgumentValues(); cavs.addGenericArgumentValue(JUERGEN); RootBeanDefinition person = new RootBeanDefinition(Person.class, cavs, null); @@ -119,7 +119,7 @@ public class QualifierAnnotationAutowireBeanFactoryTests { @Test public void testAutowireCandidateWithShortClassName() throws Exception { - DefaultListableBeanFactory lbf = new DefaultListableBeanFactory(); + DefaultListableBeanFactory lbf = new DefaultListableBeanFactory(); ConstructorArgumentValues cavs = new ConstructorArgumentValues(); cavs.addGenericArgumentValue(JUERGEN); RootBeanDefinition person = new RootBeanDefinition(Person.class, cavs, null); @@ -137,7 +137,7 @@ public class QualifierAnnotationAutowireBeanFactoryTests { @Ignore @Test public void testAutowireCandidateWithConstructorDescriptor() throws Exception { - DefaultListableBeanFactory lbf = new DefaultListableBeanFactory(); + DefaultListableBeanFactory lbf = new DefaultListableBeanFactory(); ConstructorArgumentValues cavs1 = new ConstructorArgumentValues(); cavs1.addGenericArgumentValue(JUERGEN); RootBeanDefinition person1 = new RootBeanDefinition(Person.class, cavs1, null); @@ -159,7 +159,7 @@ public class QualifierAnnotationAutowireBeanFactoryTests { @Ignore @Test public void testAutowireCandidateWithMethodDescriptor() throws Exception { - DefaultListableBeanFactory lbf = new DefaultListableBeanFactory(); + DefaultListableBeanFactory lbf = new DefaultListableBeanFactory(); ConstructorArgumentValues cavs1 = new ConstructorArgumentValues(); cavs1.addGenericArgumentValue(JUERGEN); RootBeanDefinition person1 = new RootBeanDefinition(Person.class, cavs1, null); @@ -189,7 +189,7 @@ public class QualifierAnnotationAutowireBeanFactoryTests { @Test public void testAutowireCandidateWithMultipleCandidatesDescriptor() throws Exception { - DefaultListableBeanFactory lbf = new DefaultListableBeanFactory(); + DefaultListableBeanFactory lbf = new DefaultListableBeanFactory(); ConstructorArgumentValues cavs1 = new ConstructorArgumentValues(); cavs1.addGenericArgumentValue(JUERGEN); RootBeanDefinition person1 = new RootBeanDefinition(Person.class, cavs1, null); diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java index 497352028ad..ea14f4c875e 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -63,11 +63,11 @@ import org.springframework.core.io.Resource; /** * Security test case. Checks whether the container uses its privileges for its * internal work but does not leak them when touching/calling user code. - * + * *t The first half of the test case checks that permissions are downgraded when * calling user code while the second half that the caller code permission get * through and Spring doesn't override the permission stack. - * + * * @author Costin Leau */ public class CallbacksSecurityTests { @@ -97,7 +97,7 @@ public class CallbacksSecurityTests { public void setProperty(Object value) { checkCurrentContext(); } - + public Object getProperty() { checkCurrentContext(); return null; @@ -111,7 +111,7 @@ public class CallbacksSecurityTests { checkCurrentContext(); return null; } - + private void checkCurrentContext() { assertEquals(expectedName, getCurrentSubjectName()); } @@ -352,7 +352,7 @@ public class CallbacksSecurityTests { assertTrue(ex.getCause() instanceof SecurityException); } } - + @Test public void testCustomInitBean() throws Exception { try { diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/ConstructorBean.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/ConstructorBean.java index 95cf5df4dab..1d07565be64 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/ConstructorBean.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/ConstructorBean.java @@ -1,12 +1,12 @@ /* * Copyright 2006-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/CustomCallbackBean.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/CustomCallbackBean.java index 80c09aff2bd..0091998af75 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/CustomCallbackBean.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/CustomCallbackBean.java @@ -1,12 +1,12 @@ /* * Copyright 2006-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,7 +23,7 @@ public class CustomCallbackBean { public void init() { System.getProperties(); } - + public void destroy() { System.setProperty("security.destroy", "true"); } diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/CustomFactoryBean.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/CustomFactoryBean.java index 93a8c344ba9..12f80e38b72 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/CustomFactoryBean.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/CustomFactoryBean.java @@ -1,12 +1,12 @@ /* * Copyright 2006-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/DestroyBean.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/DestroyBean.java index d24ff224741..b429cd8e4b7 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/DestroyBean.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/DestroyBean.java @@ -1,12 +1,12 @@ /* * Copyright 2006-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/FactoryBean.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/FactoryBean.java index 43efd6fd8b0..f648206980e 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/FactoryBean.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/FactoryBean.java @@ -1,12 +1,12 @@ /* * Copyright 2006-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,12 +19,12 @@ package org.springframework.beans.factory.support.security.support; * @author Costin Leau */ public class FactoryBean { - + public static Object makeStaticInstance() { System.getProperties(); return new Object(); } - + protected static Object protectedStaticInstance() { return "protectedStaticInstance"; } diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/InitBean.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/InitBean.java index acd4343d21c..62f379ee8b5 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/InitBean.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/InitBean.java @@ -1,12 +1,12 @@ /* * Copyright 2006-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/PropertyBean.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/PropertyBean.java index ced0d45b93b..cf51e1cdd02 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/PropertyBean.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/support/PropertyBean.java @@ -1,12 +1,12 @@ /* * Copyright 2006-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,6 +25,6 @@ public class PropertyBean { } public void setProperty(Object property) { - + } } diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanConfigurerSupportTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanConfigurerSupportTests.java index 6deeeb47c93..2a72cde7010 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanConfigurerSupportTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanConfigurerSupportTests.java @@ -102,7 +102,7 @@ public class BeanConfigurerSupportTests extends TestCase { configurer.setBeanWiringInfoResolver(resolver); configurer.configureBean(beanInstance); assertEquals("Bean is evidently not being configured (for some reason)", "David Gavurin", beanInstance.getSpouse().getName()); - + mock.verify(); } @@ -126,7 +126,7 @@ public class BeanConfigurerSupportTests extends TestCase { configurer.setBeanWiringInfoResolver(resolver); configurer.configureBean(beanInstance); assertEquals("Bean is evidently not being configured (for some reason)", "David Gavurin", beanInstance.getSpouse().getName()); - + mock.verify(); } diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/BeanNameGenerationTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/BeanNameGenerationTests.java index ba05c516756..32e6134823d 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/BeanNameGenerationTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/BeanNameGenerationTests.java @@ -58,5 +58,5 @@ public class BeanNameGenerationTests extends TestCase { assertFalse(child1.getBeanName().equals(child2.getBeanName())); } - + } diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/ConstructorDependenciesBean.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/ConstructorDependenciesBean.java index 72f32f07ef6..d16ff925c5f 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/ConstructorDependenciesBean.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/ConstructorDependenciesBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,11 +28,11 @@ import test.beans.TestBean; * @since 09.11.2003 */ public class ConstructorDependenciesBean implements Serializable { - + private int age; - + private String name; - + private TestBean spouse1; private TestBean spouse2; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DependenciesBean.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DependenciesBean.java index 2a2b5dcdabc..7387cdf6003 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DependenciesBean.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DependenciesBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,11 +28,11 @@ import test.beans.TestBean; * @since 04.09.2003 */ public class DependenciesBean implements BeanFactoryAware { - + private int age; - + private String name; - + private TestBean spouse; private BeanFactory beanFactory; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DummyReferencer.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DummyReferencer.java index d42ab430eb1..fbc40ca3025 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DummyReferencer.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DummyReferencer.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java index 1c9e484182e..bd2d8370384 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java @@ -31,11 +31,11 @@ import test.beans.TestBean; * With Spring 3.1, bean id attributes (and all other id attributes across the * core schemas) are no longer typed as xsd:id, but as xsd:string. This allows * for using the same bean id within nested elements. - * + * * Duplicate ids *within the same level of nesting* will still be treated as an * error through the ProblemReporter, as this could never be an intended/valid * situation. - * + * * @author Chris Beams * @since 3.1 * @see org.springframework.beans.factory.xml.XmlBeanFactoryTests#testWithDuplicateName diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java index 38666e188cb..8ee4c39d633 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java @@ -29,7 +29,7 @@ import test.beans.TestBean; * @author Juergen Hoeller */ public class FactoryMethods { - + public static FactoryMethods nullInstance() { return null; } @@ -39,21 +39,21 @@ public class FactoryMethods { tb.setName("defaultInstance"); return new FactoryMethods(tb, "default", 0); } - + /** * Note that overloaded methods are supported. */ public static FactoryMethods newInstance(TestBean tb) { return new FactoryMethods(tb, "default", 0); } - + protected static FactoryMethods newInstance(TestBean tb, int num, String name) { if (name == null) { throw new IllegalStateException("Should never be called with null value"); } return new FactoryMethods(tb, name, num); } - + static FactoryMethods newInstance(TestBean tb, int num, Integer something) { if (something != null) { throw new IllegalStateException("Should never be called with non-null value"); @@ -81,35 +81,35 @@ public class FactoryMethods { this.name = name; this.num = num; } - + public void setStringValue(String stringValue) { this.stringValue = stringValue; } - + public String getStringValue() { return this.stringValue; } - + public TestBean getTestBean() { return this.tb; } - + protected TestBean protectedGetTestBean() { return this.tb; } - + private TestBean privateGetTestBean() { return this.tb; } - + public int getNum() { return num; } - + public String getName() { return name; } - + /** * Set via Setter Injection once instance is created. */ diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java index f67a7189498..6e3f1df422b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -37,26 +37,26 @@ public class InstanceFactory { public void setFactoryBeanProperty(String s) { this.factoryBeanProperty = s; } - + public String getFactoryBeanProperty() { return this.factoryBeanProperty; } - + public FactoryMethods defaultInstance() { TestBean tb = new TestBean(); tb.setName(this.factoryBeanProperty); return FactoryMethods.newInstance(tb); } - + /** * Note that overloaded methods are supported. */ public FactoryMethods newInstance(TestBean tb) { return FactoryMethods.newInstance(tb); } - + public FactoryMethods newInstance(TestBean tb, int num, String name) { return FactoryMethods.newInstance(tb, num, name); } - + } diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/TestBeanCreator.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/TestBeanCreator.java index ffd13f4630d..07d8371b6f8 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/TestBeanCreator.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/TestBeanCreator.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,18 +21,18 @@ import test.beans.TestBean; /** * Test class for Spring's ability to create * objects using static factory methods, rather - * than constructors. + * than constructors. * @author Rod Johnson */ public class TestBeanCreator { - + public static TestBean createTestBean(String name, int age) { TestBean tb = new TestBean(); tb.setName(name); tb.setAge(age); return tb; } - + public static TestBean createTestBean() { TestBean tb = new TestBean(); tb.setName("Tristan"); diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java index 460c18a9f6b..eacf97579e6 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java @@ -454,7 +454,7 @@ public class XmlBeanCollectionTests { * @since 05.06.2003 */ class HasMap { - + private Map map; private IdentityHashMap identityMap; @@ -464,11 +464,11 @@ class HasMap { private CopyOnWriteArraySet concurrentSet; private Properties props; - + private Object[] objectArray; - + private Class[] classArray; - + private Integer[] intArray; public Map getMap() { diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReaderTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReaderTests.java index 8af531ca8f9..49473c6dc59 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReaderTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReaderTests.java @@ -106,7 +106,7 @@ public class XmlBeanDefinitionReaderTests extends TestCase { catch (BeanDefinitionStoreException expected) { } } - + public void testWithInputSourceAndExplicitValidationMode() { SimpleBeanDefinitionRegistry registry = new SimpleBeanDefinitionRegistry();; InputSource resource = new InputSource(getClass().getResourceAsStream("test.xml")); 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 e491b3ef881..eb936a57efa 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 @@ -25,7 +25,7 @@ import org.springframework.beans.factory.xml.UtilNamespaceHandler; /** * Unit and integration tests for the {@link DefaultNamespaceHandlerResolver} class. - * + * * @author Rob Harrop * @author Rick Evans */ 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 7c8ab4a56fe..4bf47d014aa 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 @@ -46,7 +46,7 @@ public final class ByteArrayPropertyEditorTests extends TestCase { public void testGetAsTextReturnsEmptyStringIfValueIsNull() throws Exception { PropertyEditor byteEditor = new ByteArrayPropertyEditor(); assertEquals("", byteEditor.getAsText()); - + byteEditor.setAsText(null); assertEquals("", byteEditor.getAsText()); } diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java index ea5a69fb461..c5a230a2c86 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java @@ -59,7 +59,7 @@ import test.beans.TestBean; * @author Rob Harrop * @author Arjen Poutsma * @author Chris Beams - * + * * @since 10.06.2003 */ public class CustomEditorTests { @@ -511,7 +511,7 @@ public class CustomEditorTests { bw.setPropertyValue("myChar", "\\u0022"); assertEquals('"', cb.getMyChar()); - + CharacterEditor editor = new CharacterEditor(false); editor.setAsText("M"); assertEquals("M", editor.getAsText()); @@ -672,7 +672,7 @@ public class CustomEditorTests { patternEditor = new PatternEditor(); assertEquals("", patternEditor.getAsText()); - + patternEditor = new PatternEditor(); patternEditor.setAsText(null); assertEquals("", patternEditor.getAsText()); diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/PropertiesEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/PropertiesEditorTests.java index 3e8266ea2d2..e2baf255306 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/PropertiesEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/PropertiesEditorTests.java @@ -40,7 +40,7 @@ public class PropertiesEditorTests extends TestCase { assertTrue("contains one entry", p.entrySet().size() == 1); assertTrue("foo=bar", p.get("foo").equals("bar")); } - + public void testTwoProperties() { String s = "foo=bar with whitespace\n" + "me=mi"; @@ -51,7 +51,7 @@ public class PropertiesEditorTests extends TestCase { assertTrue("foo=bar with whitespace", p.get("foo").equals("bar with whitespace")); assertTrue("me=mi", p.get("me").equals("mi")); } - + public void testHandlesEqualsInValue() { String s = "foo=bar\n" + "me=mi\n" + @@ -64,7 +64,7 @@ public class PropertiesEditorTests extends TestCase { assertTrue("me=mi", p.get("me").equals("mi")); assertTrue("x='y=z'", p.get("x").equals("y=z")); } - + public void testHandlesEmptyProperty() { String s = "foo=bar\nme=mi\nx="; PropertiesEditor pe= new PropertiesEditor(); @@ -75,7 +75,7 @@ public class PropertiesEditorTests extends TestCase { assertTrue("me=mi", p.get("me").equals("mi")); assertTrue("x='y=z'", p.get("x").equals("")); } - + public void testHandlesEmptyPropertyWithoutEquals() { String s = "foo\nme=mi\nx=x"; PropertiesEditor pe= new PropertiesEditor(); @@ -85,7 +85,7 @@ public class PropertiesEditorTests extends TestCase { assertTrue("foo is empty", p.get("foo").equals("")); assertTrue("me=mi", p.get("me").equals("mi")); } - + /** * Comments begin with # */ @@ -124,14 +124,14 @@ public class PropertiesEditorTests extends TestCase { assertTrue("foo is bar", p.get("foo").equals("bar")); assertTrue("me=mi", p.get("me").equals("mi")); } - + public void testNull() { PropertiesEditor pe= new PropertiesEditor(); pe.setAsText(null); Properties p = (Properties) pe.getValue(); assertEquals(0, p.size()); } - + public void testEmptyString() { PropertiesEditor pe = new PropertiesEditor(); pe.setAsText(""); diff --git a/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java b/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java index 0d1712048fa..4e478abb6db 100644 --- a/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/test/java/org/springframework/beans/support/PropertyComparatorTests.java b/spring-beans/src/test/java/org/springframework/beans/support/PropertyComparatorTests.java index 6d74ebe7396..34bfbac3b9a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/support/PropertyComparatorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/support/PropertyComparatorTests.java @@ -23,9 +23,9 @@ import org.springframework.util.comparator.CompoundComparator; /** * Unit tests for {@link PropertyComparator} - * + * * @see org.springframework.util.comparator.ComparatorTests - * + * * @author Keith Donald * @author Chris Beams */ diff --git a/spring-beans/src/test/java/test/beans/BooleanTestBean.java b/spring-beans/src/test/java/test/beans/BooleanTestBean.java index 37a022b6614..c6f32d1f91d 100644 --- a/spring-beans/src/test/java/test/beans/BooleanTestBean.java +++ b/spring-beans/src/test/java/test/beans/BooleanTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/test/java/test/beans/DummyBean.java b/spring-beans/src/test/java/test/beans/DummyBean.java index 54ae5e65d6d..6c83aed2098 100644 --- a/spring-beans/src/test/java/test/beans/DummyBean.java +++ b/spring-beans/src/test/java/test/beans/DummyBean.java @@ -1,12 +1,12 @@ /* * Copyright 2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,7 +24,7 @@ public class DummyBean { private String name; private int age; private TestBean spouse; - + public DummyBean(Object value) { this.value = value; } diff --git a/spring-beans/src/test/java/test/beans/INestedTestBean.java b/spring-beans/src/test/java/test/beans/INestedTestBean.java index 228109c284a..87bfc267738 100644 --- a/spring-beans/src/test/java/test/beans/INestedTestBean.java +++ b/spring-beans/src/test/java/test/beans/INestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/test/java/test/beans/IOther.java b/spring-beans/src/test/java/test/beans/IOther.java index 734235aa068..e5b576de3b1 100644 --- a/spring-beans/src/test/java/test/beans/IOther.java +++ b/spring-beans/src/test/java/test/beans/IOther.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/test/java/test/beans/NestedTestBean.java b/spring-beans/src/test/java/test/beans/NestedTestBean.java index d3fde438b67..a630f8662a7 100644 --- a/spring-beans/src/test/java/test/beans/NestedTestBean.java +++ b/spring-beans/src/test/java/test/beans/NestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/test/java/test/beans/NumberTestBean.java b/spring-beans/src/test/java/test/beans/NumberTestBean.java index 2a4db759b66..e739da47385 100644 --- a/spring-beans/src/test/java/test/beans/NumberTestBean.java +++ b/spring-beans/src/test/java/test/beans/NumberTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-beans/src/test/java/test/beans/PackageLevelVisibleBean.java b/spring-beans/src/test/java/test/beans/PackageLevelVisibleBean.java index 167211091f5..a77af92d129 100644 --- a/spring-beans/src/test/java/test/beans/PackageLevelVisibleBean.java +++ b/spring-beans/src/test/java/test/beans/PackageLevelVisibleBean.java @@ -25,5 +25,5 @@ package test.beans; class PackageLevelVisibleBean { public static final String CONSTANT = "Wuby"; - + } diff --git a/spring-beans/src/test/java/test/util/TestResourceUtils.java b/spring-beans/src/test/java/test/util/TestResourceUtils.java index 410788d2c15..cad4aeae224 100644 --- a/spring-beans/src/test/java/test/util/TestResourceUtils.java +++ b/spring-beans/src/test/java/test/util/TestResourceUtils.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,12 +30,12 @@ public class TestResourceUtils { /** * Loads a {@link ClassPathResource} qualified by the simple name of clazz, * and relative to the package for clazz. - * + * *

      Example: given a clazz 'com.foo.BarTests' and a resourceSuffix of 'context.xml', * this method will return a ClassPathResource representing com/foo/BarTests-context.xml - * + * *

      Intended for use loading context configuration XML files within JUnit tests. - * + * * @param clazz * @param resourceSuffix */ diff --git a/spring-context-support/src/main/java/org/springframework/mail/MailSender.java b/spring-context-support/src/main/java/org/springframework/mail/MailSender.java index 390b9508715..fb44ac572e7 100644 --- a/spring-context-support/src/main/java/org/springframework/mail/MailSender.java +++ b/spring-context-support/src/main/java/org/springframework/mail/MailSender.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -30,7 +30,7 @@ package org.springframework.mail; * @see org.springframework.mail.javamail.JavaMailSender */ public interface MailSender { - + /** * Send the given simple mail message. * @param simpleMessage the message to send diff --git a/spring-context-support/src/main/java/org/springframework/mail/SimpleMailMessage.java b/spring-context-support/src/main/java/org/springframework/mail/SimpleMailMessage.java index e5e5fe73b8c..518d846c1e9 100644 --- a/spring-context-support/src/main/java/org/springframework/mail/SimpleMailMessage.java +++ b/spring-context-support/src/main/java/org/springframework/mail/SimpleMailMessage.java @@ -67,7 +67,7 @@ public class SimpleMailMessage implements MailMessage, Serializable { /** * Copy constructor for creating a new SimpleMailMessage from the state * of an existing SimpleMailMessage instance. - * @throws IllegalArgumentException if the supplied message is null + * @throws IllegalArgumentException if the supplied message is null */ public SimpleMailMessage(SimpleMailMessage original) { Assert.notNull(original, "The 'original' message argument cannot be null"); @@ -168,7 +168,7 @@ public class SimpleMailMessage implements MailMessage, Serializable { /** * Copy the contents of this message to the given target message. * @param target the MailMessage to copy to - * @throws IllegalArgumentException if the supplied target is null + * @throws IllegalArgumentException if the supplied target is null */ public void copyTo(MailMessage target) { Assert.notNull(target, "The 'target' message argument cannot be null"); diff --git a/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerTemplateUtils.java b/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerTemplateUtils.java index f4ba0677529..acc1e30b21d 100644 --- a/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerTemplateUtils.java +++ b/spring-context-support/src/main/java/org/springframework/ui/freemarker/FreeMarkerTemplateUtils.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context-support/src/test/java/org/springframework/beans/INestedTestBean.java b/spring-context-support/src/test/java/org/springframework/beans/INestedTestBean.java index 7d87547b5f7..c5c4ed5e679 100644 --- a/spring-context-support/src/test/java/org/springframework/beans/INestedTestBean.java +++ b/spring-context-support/src/test/java/org/springframework/beans/INestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context-support/src/test/java/org/springframework/beans/IOther.java b/spring-context-support/src/test/java/org/springframework/beans/IOther.java index 797486ec44e..6a8f74187cb 100644 --- a/spring-context-support/src/test/java/org/springframework/beans/IOther.java +++ b/spring-context-support/src/test/java/org/springframework/beans/IOther.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context-support/src/test/java/org/springframework/beans/NestedTestBean.java b/spring-context-support/src/test/java/org/springframework/beans/NestedTestBean.java index a06e15d150b..0eb8df5c8ae 100644 --- a/spring-context-support/src/test/java/org/springframework/beans/NestedTestBean.java +++ b/spring-context-support/src/test/java/org/springframework/beans/NestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java b/spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java index 3e6e49d760a..6017ca6df2c 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/CacheEvict.java @@ -38,7 +38,7 @@ public @interface CacheEvict { /** * Qualifier value for the specified cached operation. - *

      May be used to determine the target cache (or caches), matching the qualifier + *

      May be used to determine the target cache (or caches), matching the qualifier * value (or the bean name(s)) of (a) specific bean definition. */ String[] value(); @@ -50,7 +50,7 @@ public @interface CacheEvict { String key() default ""; /** - * Spring Expression Language (SpEL) attribute used for conditioning the method caching. + * Spring Expression Language (SpEL) attribute used for conditioning the method caching. *

      Default is "", meaning the method is always cached. */ String condition() default ""; diff --git a/spring-context/src/main/java/org/springframework/cache/annotation/Cacheable.java b/spring-context/src/main/java/org/springframework/cache/annotation/Cacheable.java index 447ce62b4f8..7116955e829 100644 --- a/spring-context/src/main/java/org/springframework/cache/annotation/Cacheable.java +++ b/spring-context/src/main/java/org/springframework/cache/annotation/Cacheable.java @@ -52,7 +52,7 @@ public @interface Cacheable { String key() default ""; /** - * Spring Expression Language (SpEL) attribute used for conditioning the method caching. + * Spring Expression Language (SpEL) attribute used for conditioning the method caching. *

      Default is "", meaning the method is always cached. */ String condition() default ""; diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java index 1a600193b93..cda9352b529 100644 --- a/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java +++ b/spring-context/src/main/java/org/springframework/cache/interceptor/CacheAspectSupport.java @@ -223,7 +223,7 @@ public abstract class CacheAspectSupport implements InitializingBean { return invoker.invoke(); } - + private void inspectBeforeCacheEvicts(Collection evictions) { inspectCacheEvicts(evictions, true); } @@ -326,7 +326,7 @@ public abstract class CacheAspectSupport implements InitializingBean { } } } - + // return a status only if at least on cacheable matched if (atLeastOnePassed) { return new CacheStatus(cUpdates, updateRequire, retVal); diff --git a/spring-context/src/main/java/org/springframework/context/ApplicationContext.java b/spring-context/src/main/java/org/springframework/context/ApplicationContext.java index 85336bc43ac..2ded4390688 100644 --- a/spring-context/src/main/java/org/springframework/context/ApplicationContext.java +++ b/spring-context/src/main/java/org/springframework/context/ApplicationContext.java @@ -22,7 +22,7 @@ import org.springframework.beans.factory.config.AutowireCapableBeanFactory; import org.springframework.core.env.EnvironmentCapable; import org.springframework.core.io.support.ResourcePatternResolver; -/** +/** * Central interface to provide configuration for an application. * This is read-only while the application is running, but may be * reloaded if the implementation supports this. diff --git a/spring-context/src/main/java/org/springframework/context/ApplicationContextAware.java b/spring-context/src/main/java/org/springframework/context/ApplicationContextAware.java index 07a7f7f3ec8..8c74f2974a4 100644 --- a/spring-context/src/main/java/org/springframework/context/ApplicationContextAware.java +++ b/spring-context/src/main/java/org/springframework/context/ApplicationContextAware.java @@ -57,8 +57,8 @@ import org.springframework.beans.factory.Aware; * @see org.springframework.beans.factory.BeanFactoryAware */ public interface ApplicationContextAware extends Aware { - - /** + + /** * Set the ApplicationContext that this object runs in. * Normally this call will be used to initialize the object. *

      Invoked after population of normal bean properties but before an init callback such diff --git a/spring-context/src/main/java/org/springframework/context/HierarchicalMessageSource.java b/spring-context/src/main/java/org/springframework/context/HierarchicalMessageSource.java index 45ef4243c76..dc15274a85a 100644 --- a/spring-context/src/main/java/org/springframework/context/HierarchicalMessageSource.java +++ b/spring-context/src/main/java/org/springframework/context/HierarchicalMessageSource.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,8 +24,8 @@ package org.springframework.context; * @author Juergen Hoeller */ public interface HierarchicalMessageSource extends MessageSource { - - /** + + /** * Set the parent that will be used to try to resolve messages * that this object can't resolve. * @param parent the parent MessageSource that will be used to diff --git a/spring-context/src/main/java/org/springframework/context/MessageSourceResolvable.java b/spring-context/src/main/java/org/springframework/context/MessageSourceResolvable.java index b6441e59d72..6590f111d52 100644 --- a/spring-context/src/main/java/org/springframework/context/MessageSourceResolvable.java +++ b/spring-context/src/main/java/org/springframework/context/MessageSourceResolvable.java @@ -19,7 +19,7 @@ package org.springframework.context; /** * Interface for objects that are suitable for message resolution in a * {@link MessageSource}. - * + * *

      Spring's own validation error classes implement this interface. * * @author Juergen Hoeller diff --git a/spring-context/src/main/java/org/springframework/context/NoSuchMessageException.java b/spring-context/src/main/java/org/springframework/context/NoSuchMessageException.java index b2ab999a3f5..38bb09b9351 100644 --- a/spring-context/src/main/java/org/springframework/context/NoSuchMessageException.java +++ b/spring-context/src/main/java/org/springframework/context/NoSuchMessageException.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/main/java/org/springframework/context/Phased.java b/spring-context/src/main/java/org/springframework/context/Phased.java index 3d262233b94..b4b84d86d94 100644 --- a/spring-context/src/main/java/org/springframework/context/Phased.java +++ b/spring-context/src/main/java/org/springframework/context/Phased.java @@ -19,7 +19,7 @@ package org.springframework.context; /** * Interface for objects that may participate in a phased * process such as lifecycle management. - * + * * @author Mark Fisher * @since 3.0 * @see SmartLifecycle diff --git a/spring-context/src/main/java/org/springframework/context/ResourceLoaderAware.java b/spring-context/src/main/java/org/springframework/context/ResourceLoaderAware.java index 3491cd047ba..6b413e62045 100644 --- a/spring-context/src/main/java/org/springframework/context/ResourceLoaderAware.java +++ b/spring-context/src/main/java/org/springframework/context/ResourceLoaderAware.java @@ -46,7 +46,7 @@ import org.springframework.core.io.ResourceLoader; *

      As alternative to a ResourcePatternResolver dependency, consider exposing * bean properties of type Resource array, populated via pattern Strings with * automatic type conversion by the bean factory. - * + * * @author Juergen Hoeller * @author Chris Beams * @since 10.03.2004 diff --git a/spring-context/src/main/java/org/springframework/context/access/ContextBeanFactoryReference.java b/spring-context/src/main/java/org/springframework/context/access/ContextBeanFactoryReference.java index fe56c165ae1..43d674367dd 100644 --- a/spring-context/src/main/java/org/springframework/context/access/ContextBeanFactoryReference.java +++ b/spring-context/src/main/java/org/springframework/context/access/ContextBeanFactoryReference.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -59,7 +59,7 @@ public class ContextBeanFactoryReference implements BeanFactoryReference { public void release() { if (this.applicationContext != null) { ApplicationContext savedCtx; - + // We don't actually guarantee thread-safety, but it's not a lot of extra work. synchronized (this) { savedCtx = this.applicationContext; diff --git a/spring-context/src/main/java/org/springframework/context/access/DefaultLocatorFactory.java b/spring-context/src/main/java/org/springframework/context/access/DefaultLocatorFactory.java index 66e88b6bfc8..9b550724893 100644 --- a/spring-context/src/main/java/org/springframework/context/access/DefaultLocatorFactory.java +++ b/spring-context/src/main/java/org/springframework/context/access/DefaultLocatorFactory.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/main/java/org/springframework/context/access/package-info.java b/spring-context/src/main/java/org/springframework/context/access/package-info.java index eeceb70a9f0..bcf7238ac6d 100644 --- a/spring-context/src/main/java/org/springframework/context/access/package-info.java +++ b/spring-context/src/main/java/org/springframework/context/access/package-info.java @@ -2,7 +2,7 @@ /** * * Helper infrastructure to locate and access shared application contexts. - * + * *

      Note: This package is only relevant for special sharing of application * contexts, for example behind EJB facades. It is not used in a typical * web application or standalone application. diff --git a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java index 60a05635aa9..1a185248bac 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/AnnotationBeanNameGenerator.java @@ -37,7 +37,7 @@ import org.springframework.util.StringUtils; * {@link org.springframework.stereotype.Component @Component} as a * meta-annotation. For example, Spring's stereotype annotations (such as * {@link org.springframework.stereotype.Repository @Repository}) are - * themselves annotated with + * themselves annotated with * {@link org.springframework.stereotype.Component @Component}. * *

      Also supports Java EE 6's {@link javax.annotation.ManagedBean} and diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Bean.java b/spring-context/src/main/java/org/springframework/context/annotation/Bean.java index 900584037d1..4f40ea26aeb 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/Bean.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/Bean.java @@ -118,7 +118,7 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition; * the invocation via a CGLIB proxy. This is analogous to inter-{@code @Transactional} * method calls where in proxy mode, Spring does not intercept the invocation — * Spring does so only in AspectJ mode. - * + * *

      For example: * *

      diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java b/spring-context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java
      index a06bd3d7706..bc2ed4e63cb 100644
      --- a/spring-context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java
      +++ b/spring-context/src/main/java/org/springframework/context/annotation/ClassPathBeanDefinitionScanner.java
      @@ -256,7 +256,7 @@ public class ClassPathBeanDefinitionScanner extends ClassPathScanningCandidateCo
       					beanDefinitions.add(definitionHolder);
       					registerBeanDefinition(definitionHolder, this.registry);
       				}
      -			}						
      +			}
       		}
       		return beanDefinitions;
       	}
      diff --git a/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java b/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java
      index 295ebb500f8..4de429f2c4a 100644
      --- a/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java
      +++ b/spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java
      @@ -127,7 +127,7 @@ import org.springframework.util.StringUtils;
        * to specify a custom CommonAnnotationBeanPostProcessor bean definition!
        * 

      NOTE: Annotation injection will be performed before XML injection; thus * the latter configuration will override the former for properties wired through - * both approaches. + * both approaches. * * @author Juergen Hoeller * @since 2.5 diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClass.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClass.java index 5268e633aa0..a25fdcf4ced 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClass.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClass.java @@ -178,7 +178,7 @@ final class ConfigurationClass { int newCount = currentCount != null ? currentCount + 1 : 1; methodNameCounts.put(fqMethodName, newCount); } - + for (String methodName : methodNameCounts.keySet()) { int count = methodNameCounts.get(methodName); if (count > 1) { @@ -186,7 +186,7 @@ final class ConfigurationClass { problemReporter.error(new BeanMethodOverloadingProblem(shortMethodName, count)); } } - + // A configuration class may not be final (CGLIB limitation) if (getMetadata().isAnnotated(Configuration.class.getName())) { if (getMetadata().isFinal()) { diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassBeanDefinitionReader.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassBeanDefinitionReader.java index e7fa93a246c..e41aca17280 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassBeanDefinitionReader.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassBeanDefinitionReader.java @@ -333,7 +333,7 @@ class ConfigurationClassBeanDefinitionReader { } } - + /** * Configuration classes must be annotated with {@link Configuration @Configuration} or * declare at least one {@link Bean @Bean} method. diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java index f2fa6273e68..7afbc027337 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassPostProcessor.java @@ -79,7 +79,7 @@ import static org.springframework.context.annotation.AnnotationConfigUtils.*; * that any {@link Bean} methods declared in Configuration classes have their * respective bean definitions registered before any other BeanFactoryPostProcessor * executes. - * + * * @author Chris Beams * @author Juergen Hoeller * @since 3.0 diff --git a/spring-context/src/main/java/org/springframework/context/annotation/Scope.java b/spring-context/src/main/java/org/springframework/context/annotation/Scope.java index b62c3ca6ecc..bcb433f5caf 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/Scope.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/Scope.java @@ -29,7 +29,7 @@ import org.springframework.stereotype.Component; * When used as a type-level annotation in conjunction with the {@link Component} * annotation, indicates the name of a scope to use for instances of the annotated * type. - * + * *

      When used as a method-level annotation in conjunction with the * {@link Bean} annotation, indicates the name of a scope to use for * the instance returned from the method. diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadata.java b/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadata.java index 07b41d1000d..2f67592b0fd 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadata.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadata.java @@ -35,7 +35,7 @@ import org.springframework.util.Assert; public class ScopeMetadata { private String scopeName = BeanDefinition.SCOPE_SINGLETON; - + private ScopedProxyMode scopedProxyMode = ScopedProxyMode.NO; diff --git a/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadataResolver.java b/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadataResolver.java index e9cbcb25f7b..54bafe39a56 100644 --- a/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadataResolver.java +++ b/spring-context/src/main/java/org/springframework/context/annotation/ScopeMetadataResolver.java @@ -20,7 +20,7 @@ import org.springframework.beans.factory.config.BeanDefinition; /** * Strategy interface for resolving the scope of bean definitions. - * + * * @author Mark Fisher * @since 2.5 * @see org.springframework.context.annotation.Scope @@ -40,5 +40,5 @@ public interface ScopeMetadataResolver { * @return the relevant scope metadata; never null */ ScopeMetadata resolveScopeMetadata(BeanDefinition definition); - + } diff --git a/spring-context/src/main/java/org/springframework/context/config/PropertyOverrideBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/context/config/PropertyOverrideBeanDefinitionParser.java index d48ad706b86..256ee620649 100644 --- a/spring-context/src/main/java/org/springframework/context/config/PropertyOverrideBeanDefinitionParser.java +++ b/spring-context/src/main/java/org/springframework/context/config/PropertyOverrideBeanDefinitionParser.java @@ -34,7 +34,7 @@ class PropertyOverrideBeanDefinitionParser extends AbstractPropertyLoadingBeanDe protected Class getBeanClass(Element element) { return PropertyOverrideConfigurer.class; } - + @Override protected void doParse(Element element, BeanDefinitionBuilder builder) { diff --git a/spring-context/src/main/java/org/springframework/context/expression/StandardBeanExpressionResolver.java b/spring-context/src/main/java/org/springframework/context/expression/StandardBeanExpressionResolver.java index 8537e050876..fff09d2da44 100644 --- a/spring-context/src/main/java/org/springframework/context/expression/StandardBeanExpressionResolver.java +++ b/spring-context/src/main/java/org/springframework/context/expression/StandardBeanExpressionResolver.java @@ -38,7 +38,7 @@ import org.springframework.util.StringUtils; * Standard implementation of the * {@link org.springframework.beans.factory.config.BeanExpressionResolver} * interface, parsing and evaluating Spring EL using Spring's expression module. - * + * * @author Juergen Hoeller * @since 3.0 * @see org.springframework.expression.ExpressionParser diff --git a/spring-context/src/main/java/org/springframework/context/package-info.java b/spring-context/src/main/java/org/springframework/context/package-info.java index c7ae35d00ee..3a09bc5a584 100644 --- a/spring-context/src/main/java/org/springframework/context/package-info.java +++ b/spring-context/src/main/java/org/springframework/context/package-info.java @@ -5,7 +5,7 @@ * message sources and for the Observer design pattern, and the * ability for application objects to obtain resources using a * consistent API. - * + * *

      There is no necessity for Spring applications to depend * on ApplicationContext or even BeanFactory functionality * explicitly. One of the strengths of the Spring architecture diff --git a/spring-context/src/main/java/org/springframework/context/support/ApplicationContextAwareProcessor.java b/spring-context/src/main/java/org/springframework/context/support/ApplicationContextAwareProcessor.java index 83b7aec7253..a2ce34e6ad6 100644 --- a/spring-context/src/main/java/org/springframework/context/support/ApplicationContextAwareProcessor.java +++ b/spring-context/src/main/java/org/springframework/context/support/ApplicationContextAwareProcessor.java @@ -91,10 +91,10 @@ class ApplicationContextAwareProcessor implements BeanPostProcessor { else { invokeAwareInterfaces(bean); } - + return bean; } - + private void invokeAwareInterfaces(Object bean) { if (bean instanceof Aware) { if (bean instanceof EnvironmentAware) { diff --git a/spring-context/src/main/java/org/springframework/context/support/ApplicationObjectSupport.java b/spring-context/src/main/java/org/springframework/context/support/ApplicationObjectSupport.java index 0a0acb70f7b..675cb8f200a 100644 --- a/spring-context/src/main/java/org/springframework/context/support/ApplicationObjectSupport.java +++ b/spring-context/src/main/java/org/springframework/context/support/ApplicationObjectSupport.java @@ -45,10 +45,10 @@ import org.springframework.context.ApplicationContextException; * @see org.springframework.web.context.support.WebApplicationObjectSupport */ public abstract class ApplicationObjectSupport implements ApplicationContextAware { - + /** Logger that is available to subclasses */ protected final Log logger = LogFactory.getLog(getClass()); - + /** ApplicationContext this object runs in */ private ApplicationContext applicationContext; diff --git a/spring-context/src/main/java/org/springframework/context/support/ConversionServiceFactoryBean.java b/spring-context/src/main/java/org/springframework/context/support/ConversionServiceFactoryBean.java index a4fb136b2b1..32bb029c0a6 100644 --- a/spring-context/src/main/java/org/springframework/context/support/ConversionServiceFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/context/support/ConversionServiceFactoryBean.java @@ -81,7 +81,7 @@ public class ConversionServiceFactoryBean implements FactoryBeanSee {@link org.springframework.jndi.JndiObjectLocator} for info on * how to specify the JNDI location of the target EJB. - * + * *

      If you want control over interceptor chaining, use an AOP ProxyFactoryBean * with LocalSlsbInvokerInterceptor rather than rely on this class. * @@ -41,7 +41,7 @@ import org.springframework.util.ClassUtils; * bound at the target location yet. The best solution is to set the "lookupHomeOnStartup" * property to "false", in which case the home will be fetched on first access to the EJB. * (This flag is only true by default for backwards compatibility reasons). - * + * * @author Rod Johnson * @author Colin Sampaleanu * @since 09.05.2003 diff --git a/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBean.java b/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBean.java index 84e9eb6b3e2..6bcb7753195 100644 --- a/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBean.java @@ -29,7 +29,7 @@ import org.springframework.util.ClassUtils; * *

      See {@link org.springframework.jndi.JndiObjectLocator} for info on * how to specify the JNDI location of the target EJB. - * + * *

      If you want control over interceptor chaining, use an AOP ProxyFactoryBean * with SimpleRemoteSlsbInvokerInterceptor rather than rely on this class. * @@ -41,7 +41,7 @@ import org.springframework.util.ClassUtils; * bound at the target location yet. The best solution is to set the lookupHomeOnStartup * property to false, in which case the home will be fetched on first access to the EJB. * (This flag is only true by default for backwards compatibility reasons). - * + * *

      This proxy factory is typically used with an RMI business interface, which serves * as super-interface of the EJB component interface. Alternatively, this factory * can also proxy a remote SLSB with a matching non-RMI business interface, i.e. an diff --git a/spring-context/src/main/java/org/springframework/ejb/access/package-info.java b/spring-context/src/main/java/org/springframework/ejb/access/package-info.java index 608bd665ae4..9615bb81469 100644 --- a/spring-context/src/main/java/org/springframework/ejb/access/package-info.java +++ b/spring-context/src/main/java/org/springframework/ejb/access/package-info.java @@ -12,11 +12,11 @@ * or may not be EJBs). This gives us the choice of introducing EJB * into an application (or removing EJB from an application) without * affecting code using business objects. - * + * *

      The motivation for the classes in this package are discussed in Chapter 11 of * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). - * + * *

      However, the implementation and naming of classes in this package has changed. * It now uses FactoryBeans and AOP, rather than the custom bean definitions described in * Expert One-on-One J2EE. diff --git a/spring-context/src/main/java/org/springframework/ejb/support/AbstractJmsMessageDrivenBean.java b/spring-context/src/main/java/org/springframework/ejb/support/AbstractJmsMessageDrivenBean.java index 4d2b613d39f..cb9db418a52 100644 --- a/spring-context/src/main/java/org/springframework/ejb/support/AbstractJmsMessageDrivenBean.java +++ b/spring-context/src/main/java/org/springframework/ejb/support/AbstractJmsMessageDrivenBean.java @@ -18,7 +18,7 @@ package org.springframework.ejb.support; import javax.jms.MessageListener; -/** +/** * Convenient base class for JMS-based EJB 2.x MDBs. Requires subclasses * to implement the JMS javax.jms.MessageListener interface. * @@ -31,4 +31,4 @@ public abstract class AbstractJmsMessageDrivenBean extends AbstractMessageDriven // Empty: The purpose of this class is to ensure // that subclasses implement javax.jms.MessageListener. -} +} diff --git a/spring-context/src/main/java/org/springframework/ejb/support/AbstractMessageDrivenBean.java b/spring-context/src/main/java/org/springframework/ejb/support/AbstractMessageDrivenBean.java index 3b5167adc38..8d661b480c6 100644 --- a/spring-context/src/main/java/org/springframework/ejb/support/AbstractMessageDrivenBean.java +++ b/spring-context/src/main/java/org/springframework/ejb/support/AbstractMessageDrivenBean.java @@ -22,7 +22,7 @@ import javax.ejb.MessageDrivenContext; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -/** +/** * Convenient base class for EJB 2.x MDBs. * Doesn't require JMS, as EJB 2.1 MDBs are no longer JMS-specific; * see the {@link AbstractJmsMessageDrivenBean} subclass. diff --git a/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatefulSessionBean.java b/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatefulSessionBean.java index a5a009d57ff..b36b8fcb4cb 100644 --- a/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatefulSessionBean.java +++ b/spring-context/src/main/java/org/springframework/ejb/support/AbstractStatefulSessionBean.java @@ -29,7 +29,7 @@ import org.springframework.beans.FatalBeanException; * method in their custom ejbCreate() and ejbActivate() * methods, and should invoke the unloadBeanFactory() method in * their ejbPassivate method. - * + * *

      Note: The default BeanFactoryLocator used by this class's superclass * (ContextJndiBeanFactoryLocator) is not serializable. Therefore, * when using the default BeanFactoryLocator, or another variant which is diff --git a/spring-context/src/main/java/org/springframework/ejb/support/package-info.java b/spring-context/src/main/java/org/springframework/ejb/support/package-info.java index 02433e4439e..185a3a50025 100644 --- a/spring-context/src/main/java/org/springframework/ejb/support/package-info.java +++ b/spring-context/src/main/java/org/springframework/ejb/support/package-info.java @@ -6,17 +6,17 @@ * This promotes good EJB practice, with EJB services used for transaction * management, thread management, and (possibly) remoting, while * business logic is implemented in easily testable POJOs.

      - * + * *

      In this model, the EJB is a facade, with as many POJO helpers * behind the BeanFactory as required.

      - * + * *

      Note that the default behavior is to look for an EJB environment variable * with name ejb/BeanFactoryPath that specifies the * location on the classpath of an XML bean factory definition * file (such as /com/mycom/mypackage/mybeans.xml). * If this JNDI key is missing, your EJB subclass won't successfully * initialize in the container.

      - * + * *

      Check out the org.springframework.ejb.interceptor * package for equivalent support for the EJB 3 component model, * providing annotation-based autowiring using an EJB 3 interceptor.

      diff --git a/spring-context/src/main/java/org/springframework/format/AnnotationFormatterFactory.java b/spring-context/src/main/java/org/springframework/format/AnnotationFormatterFactory.java index 2a267d1e5ab..454649b2a46 100644 --- a/spring-context/src/main/java/org/springframework/format/AnnotationFormatterFactory.java +++ b/spring-context/src/main/java/org/springframework/format/AnnotationFormatterFactory.java @@ -25,7 +25,7 @@ import java.util.Set; * that formats Date values set on fields annotated with @DateTimeFormat. * * @author Keith Donald - * @since 3.0 + * @since 3.0 * @param the annotation type that should trigger formatting */ public interface AnnotationFormatterFactory { @@ -52,5 +52,5 @@ public interface AnnotationFormatterFactory { * @return the parser */ Parser getParser(A annotation, Class fieldType); - + } diff --git a/spring-context/src/main/java/org/springframework/format/Formatter.java b/spring-context/src/main/java/org/springframework/format/Formatter.java index 67723c89dd5..83d26b13a75 100644 --- a/spring-context/src/main/java/org/springframework/format/Formatter.java +++ b/spring-context/src/main/java/org/springframework/format/Formatter.java @@ -21,7 +21,7 @@ package org.springframework.format; * A Formatter is both a Printer and a Parser for an object type. * * @author Keith Donald - * @since 3.0 + * @since 3.0 * @param the type of object this Formatter formats */ public interface Formatter extends Printer, Parser { diff --git a/spring-context/src/main/java/org/springframework/format/FormatterRegistrar.java b/spring-context/src/main/java/org/springframework/format/FormatterRegistrar.java index 16b2208b1ae..b754a738d10 100644 --- a/spring-context/src/main/java/org/springframework/format/FormatterRegistrar.java +++ b/spring-context/src/main/java/org/springframework/format/FormatterRegistrar.java @@ -20,14 +20,14 @@ import org.springframework.core.convert.converter.Converter; /** * Registers {@link Converter Converters} and {@link Formatter Formatters} with * a FormattingConversionService through the {@link FormatterRegistry} SPI. - * + * * @author Keith Donald * @since 3.1 */ public interface FormatterRegistrar { /** - * Register Formatters and Converters with a FormattingConversionService + * Register Formatters and Converters with a FormattingConversionService * through a FormatterRegistry SPI. * @param registry the FormatterRegistry instance to use. */ diff --git a/spring-context/src/main/java/org/springframework/format/Parser.java b/spring-context/src/main/java/org/springframework/format/Parser.java index 63e71ba77e1..276a509305a 100644 --- a/spring-context/src/main/java/org/springframework/format/Parser.java +++ b/spring-context/src/main/java/org/springframework/format/Parser.java @@ -23,7 +23,7 @@ import java.util.Locale; * Parses text strings to produce instances of T. * * @author Keith Donald - * @since 3.0 + * @since 3.0 * @param the type of object this Parser produces */ public interface Parser { diff --git a/spring-context/src/main/java/org/springframework/format/Printer.java b/spring-context/src/main/java/org/springframework/format/Printer.java index 00b8c6ec700..c8528398584 100644 --- a/spring-context/src/main/java/org/springframework/format/Printer.java +++ b/spring-context/src/main/java/org/springframework/format/Printer.java @@ -22,7 +22,7 @@ import java.util.Locale; * Prints objects of type T for display. * * @author Keith Donald - * @since 3.0 + * @since 3.0 * @param the type of object this Printer prints */ public interface Printer { diff --git a/spring-context/src/main/java/org/springframework/format/annotation/NumberFormat.java b/spring-context/src/main/java/org/springframework/format/annotation/NumberFormat.java index 21881a2bbb8..60761a254e0 100644 --- a/spring-context/src/main/java/org/springframework/format/annotation/NumberFormat.java +++ b/spring-context/src/main/java/org/springframework/format/annotation/NumberFormat.java @@ -26,13 +26,13 @@ import java.lang.annotation.Target; * Supports formatting by style or custom pattern string. * Can be applied to any JDK java.lang.Number type. *

      - * For style-based formatting, set the {@link #style()} attribute to be the desired {@link Style}. + * For style-based formatting, set the {@link #style()} attribute to be the desired {@link Style}. * For custom formatting, set the {@link #pattern()} attribute to be the number pattern, such as #,###.##. *

      * Each attribute is mutually exclusive, so only set one attribute per annotation instance (the one most convenient one for your formatting needs). * When the pattern attribute is specified, it takes precedence over the style attribute. * When no annotation attributes are specified, the default format applied is style-based with a style of {@link Style#NUMBER}. - * + * * @author Keith Donald * @since 3.0 * @see java.text.NumberFormat @@ -67,7 +67,7 @@ public @interface NumberFormat { * The general-purpose number format for the current locale. */ NUMBER, - + /** * The currency format for the current locale. */ diff --git a/spring-context/src/main/java/org/springframework/format/number/NumberFormatAnnotationFormatterFactory.java b/spring-context/src/main/java/org/springframework/format/number/NumberFormatAnnotationFormatterFactory.java index 7ae4021945a..00c14d8a7d2 100644 --- a/spring-context/src/main/java/org/springframework/format/number/NumberFormatAnnotationFormatterFactory.java +++ b/spring-context/src/main/java/org/springframework/format/number/NumberFormatAnnotationFormatterFactory.java @@ -76,7 +76,7 @@ public class NumberFormatAnnotationFormatterFactory public Printer getPrinter(NumberFormat annotation, Class fieldType) { return configureFormatterFrom(annotation); } - + public Parser getParser(NumberFormat annotation, Class fieldType) { return configureFormatterFrom(annotation); } diff --git a/spring-context/src/main/java/org/springframework/format/support/FormattingConversionServiceFactoryBean.java b/spring-context/src/main/java/org/springframework/format/support/FormattingConversionServiceFactoryBean.java index e577c0619ca..410c63cf91c 100644 --- a/spring-context/src/main/java/org/springframework/format/support/FormattingConversionServiceFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/format/support/FormattingConversionServiceFactoryBean.java @@ -96,15 +96,15 @@ public class FormattingConversionServiceFactoryBean } /** - *

      Configure the set of FormatterRegistrars to invoke to register - * Converters and Formatters in addition to those added declaratively + *

      Configure the set of FormatterRegistrars to invoke to register + * Converters and Formatters in addition to those added declaratively * via {@link #setConverters(Set)} and {@link #setFormatters(Set)}. - *

      FormatterRegistrars are useful when registering multiple related - * converters and formatters for a formatting category, such as Date - * formatting. All types related needed to support the formatting + *

      FormatterRegistrars are useful when registering multiple related + * converters and formatters for a formatting category, such as Date + * formatting. All types related needed to support the formatting * category can be registered from one place. - *

      FormatterRegistrars can also be used to register Formatters - * indexed under a specific field type different from its own <T>, + *

      FormatterRegistrars can also be used to register Formatters + * indexed under a specific field type different from its own <T>, * or when registering a Formatter from a Printer/Parser pair. * @see FormatterRegistry#addFormatterForFieldType(Class, Formatter) * @see FormatterRegistry#addFormatterForFieldType(Class, Printer, Parser) diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoader.java b/spring-context/src/main/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoader.java index 8f8447aef6a..7cf9200abc4 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoader.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoader.java @@ -34,7 +34,7 @@ import org.springframework.util.Assert; * @since 2.0 */ public class ResourceOverridingShadowingClassLoader extends ShadowingClassLoader { - + private static final Enumeration EMPTY_URL_ENUMERATION = new Enumeration() { public boolean hasMoreElements() { return false; @@ -43,7 +43,7 @@ public class ResourceOverridingShadowingClassLoader extends ShadowingClassLoader throw new UnsupportedOperationException("Should not be called. I am empty."); } }; - + /** * Key is asked for value: value is actual value @@ -59,7 +59,7 @@ public class ResourceOverridingShadowingClassLoader extends ShadowingClassLoader public ResourceOverridingShadowingClassLoader(ClassLoader enclosingClassLoader) { super(enclosingClassLoader); } - + /** * Return the resource (if any) at the new path @@ -70,7 +70,7 @@ public class ResourceOverridingShadowingClassLoader extends ShadowingClassLoader public void override(String oldPath, String newPath) { this.overrides.put(oldPath, newPath); } - + /** * Ensure that a resource with the given path is not found. * @param oldPath the path of the resource to hide even if @@ -111,7 +111,7 @@ public class ResourceOverridingShadowingClassLoader extends ShadowingClassLoader return super.getResourceAsStream(requestedPath); } } - + @Override public Enumeration getResources(String requestedPath) throws IOException { if (this.overrides.containsKey(requestedPath)) { diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/GlassFishClassLoaderAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/GlassFishClassLoaderAdapter.java index 8d114b2bec2..d5568e3b8d3 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/GlassFishClassLoaderAdapter.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/glassfish/GlassFishClassLoaderAdapter.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,9 +24,9 @@ import java.lang.reflect.Method; * Reflective wrapper around the GlassFish class loader. Used to * encapsulate the classloader-specific methods (discovered and * called through reflection) from the load-time weaver. - * + * *

      Supports GlassFish V1, V2 and V3 (currently in beta). - * + * * @author Costin Leau * @since 3.0 */ diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCAdapter.java index 5216b5cd508..0777391ad51 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCAdapter.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCAdapter.java @@ -26,7 +26,7 @@ import org.springframework.util.ReflectionUtils; /** * Reflective wrapper around a JBoss 5 and 6 class loader methods (discovered and called * through reflection) for load time weaving. - * + * * @author Costin Leau * @since 3.1 */ diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCTranslatorAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCTranslatorAdapter.java index 794864e5f6e..4dffbe6f5dc 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCTranslatorAdapter.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/jboss/JBossMCTranslatorAdapter.java @@ -23,10 +23,10 @@ import java.security.ProtectionDomain; /** * Adapter that implements JBoss Translator interface, delegating to a * standard JDK {@link ClassFileTransformer} underneath. - * + * *

      To avoid compile time checks again the vendor API, a dynamic proxy is * being used. - * + * * @author Costin Leau * @since 3.1 */ diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassLoaderAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassLoaderAdapter.java index c1383385182..d3821e795e0 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassLoaderAdapter.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassLoaderAdapter.java @@ -1,12 +1,12 @@ /* * Copyright 2006-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,7 +26,7 @@ import org.springframework.util.Assert; * Reflective wrapper around a OC4J class loader. Used to * encapsulate the classloader-specific methods (discovered and * called through reflection) from the load-time weaver. - * + * * @author Costin Leau */ class OC4JClassLoaderAdapter { diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassPreprocessorAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassPreprocessorAdapter.java index 540aed883e7..75f1ea6865f 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassPreprocessorAdapter.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JClassPreprocessorAdapter.java @@ -1,12 +1,12 @@ /* * Copyright 2006-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -27,7 +27,7 @@ import java.security.ProtectionDomain; * *

      To avoid compile time checks again the vendor API, a dynamic proxy is * being used. - * + * * @author Costin Leau */ class OC4JClassPreprocessorAdapter implements InvocationHandler { diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java index 8e0a2511155..f96e8d73b0b 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/oc4j/OC4JLoadTimeWeaver.java @@ -45,7 +45,7 @@ public class OC4JLoadTimeWeaver implements LoadTimeWeaver { /** * Creates a new instance of thie {@link OC4JLoadTimeWeaver} class * using the default {@link ClassLoader class loader}. - * @see org.springframework.util.ClassUtils#getDefaultClassLoader() + * @see org.springframework.util.ClassUtils#getDefaultClassLoader() */ public OC4JLoadTimeWeaver() { this(ClassUtils.getDefaultClassLoader()); diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicClassLoaderAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicClassLoaderAdapter.java index fc198635a42..eb6f98b7dc0 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicClassLoaderAdapter.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicClassLoaderAdapter.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2007 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,7 +29,7 @@ import org.springframework.util.Assert; * Reflective wrapper around a WebLogic 10 class loader. Used to * encapsulate the classloader-specific methods (discovered and * called through reflection) from the load-time weaver. - * + * * @author Costin Leau * @author Juergen Hoeller * @since 2.5 diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicLoadTimeWeaver.java b/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicLoadTimeWeaver.java index ef1baa9912f..e60ceb81e93 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicLoadTimeWeaver.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/weblogic/WebLogicLoadTimeWeaver.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2007 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassLoaderAdapter.java b/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassLoaderAdapter.java index 798393676b0..26a7b4ec47b 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassLoaderAdapter.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassLoaderAdapter.java @@ -28,11 +28,11 @@ import java.util.List; import org.springframework.util.Assert; /** - * + * * Reflective wrapper around a WebSphere 7 class loader. Used to * encapsulate the classloader-specific methods (discovered and * called through reflection) from the load-time weaver. - * + * * @author Costin Leau * @since 3.1 */ diff --git a/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassPreDefinePlugin.java b/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassPreDefinePlugin.java index 748ba182a45..32227c0b475 100644 --- a/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassPreDefinePlugin.java +++ b/spring-context/src/main/java/org/springframework/instrument/classloading/websphere/WebSphereClassPreDefinePlugin.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2011 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,10 +25,10 @@ import org.springframework.util.FileCopyUtils; /** * Adapter that implements WebSphere 7.0 ClassPreProcessPlugin interface, * delegating to a standard JDK {@link ClassFileTransformer} underneath. - * + * *

      To avoid compile time checks again the vendor API, a dynamic proxy is * being used. - * + * * @author Costin Leau * @since 3.1 */ diff --git a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java index 6b02d5b92de..ac847a193a8 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/MBeanExporter.java @@ -603,7 +603,7 @@ public class MBeanExporter extends MBeanRegistrationSupport "Unable to register MBean [" + mapValue + "] with key '" + beanKey + "'", ex); } } - + /** * Replaces any bean names used as keys in the NotificationListener * mappings with their corresponding ObjectName values. @@ -782,8 +782,8 @@ public class MBeanExporter extends MBeanRegistrationSupport * interface for the supplied managed resource. * @param managedResource the resource that is to be exported as an MBean * @param beanKey the key associated with the managed bean - * @see #createModelMBean() - * @see #getMBeanInfo(Object, String) + * @see #createModelMBean() + * @see #getMBeanInfo(Object, String) */ protected ModelMBean createAndConfigureMBean(Object managedResource, String beanKey) throws MBeanExportException { @@ -1072,7 +1072,7 @@ public class MBeanExporter extends MBeanRegistrationSupport private class NotificationPublisherAwareLazyTargetSource extends LazyInitTargetSource { private ModelMBean modelMBean; - + private ObjectName objectName; public void setModelMBean(ModelMBean modelMBean) { diff --git a/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedMetric.java b/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedMetric.java index b2a1d26338b..f6868aeb9f9 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedMetric.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/annotation/ManagedMetric.java @@ -28,7 +28,7 @@ import org.springframework.jmx.support.MetricType; * JDK 1.5+ method-level annotation that indicates to expose a given bean * property as JMX attribute, with added Descriptor properties to indicate that * it is a metric. Only valid when used on a JavaBean getter. - * + * * @author Jennifer Hickey * @since 3.0 * @see org.springframework.jmx.export.metadata.ManagedMetric diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java index a701a5d0f62..c346c10d545 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/AbstractReflectiveMBeanInfoAssembler.java @@ -108,12 +108,12 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean * Constant identifier for the log field in a JMX {@link Descriptor}. */ protected static final String FIELD_LOG = "log"; - + /** * Constant identifier for the logfile field in a JMX {@link Descriptor}. */ protected static final String FIELD_LOG_FILE = "logFile"; - + /** * Constant identifier for the currency time limit field in a JMX {@link Descriptor}. */ @@ -143,12 +143,12 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean * Constant identifier for the persistName field in a JMX {@link Descriptor}. */ protected static final String FIELD_PERSIST_NAME = "persistName"; - + /** * Constant identifier for the displayName field in a JMX {@link Descriptor}. */ protected static final String FIELD_DISPLAY_NAME = "displayName"; - + /** * Constant identifier for the units field in a JMX {@link Descriptor}. */ @@ -158,7 +158,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean * Constant identifier for the metricType field in a JMX {@link Descriptor}. */ protected static final String FIELD_METRIC_TYPE = "metricType"; - + /** * Constant identifier for the custom metricCategory field in a JMX {@link Descriptor}. */ diff --git a/spring-context/src/main/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssembler.java b/spring-context/src/main/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssembler.java index ba77fd95b9a..5672cda2583 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssembler.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssembler.java @@ -30,7 +30,7 @@ import org.springframework.util.StringUtils; /** * AbstractReflectiveMBeanInfoAssembler subclass that allows * method names to be explicitly excluded as MBean operations and attributes. - * + * *

      Any method not explicitly excluded from the management interface will be exposed to * JMX. JavaBean getters and setters will automatically be exposed as JMX attributes. * diff --git a/spring-context/src/main/java/org/springframework/jmx/export/metadata/JmxAttributeSource.java b/spring-context/src/main/java/org/springframework/jmx/export/metadata/JmxAttributeSource.java index 6feb65bca81..2a18efa50da 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/metadata/JmxAttributeSource.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/metadata/JmxAttributeSource.java @@ -49,7 +49,7 @@ public interface JmxAttributeSource { * @throws InvalidMetadataException in case of invalid attributes */ ManagedAttribute getManagedAttribute(Method method) throws InvalidMetadataException; - + /** * Implementations should return an instance of ManagedMetric * if the supplied Method has the corresponding metadata. @@ -89,7 +89,7 @@ public interface JmxAttributeSource { * @throws InvalidMetadataException in the case of invalid metadata */ ManagedNotification[] getManagedNotifications(Class clazz) throws InvalidMetadataException; - - - + + + } diff --git a/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java b/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java index cd70b6b67e0..27e58109a1f 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/naming/KeyNamingStrategy.java @@ -35,7 +35,7 @@ import org.springframework.util.CollectionUtils; * ObjectNamingStrategy implementation that builds * ObjectName instances from the key used in the * "beans" map passed to MBeanExporter. - * + * *

      Can also check object name mappings, given as Properties * or as mappingLocations of properties files. The key used * to look up is the key used in MBeanExporter's "beans" map. @@ -123,7 +123,7 @@ public class KeyNamingStrategy implements ObjectNamingStrategy, InitializingBean } } } - + /** * Attempts to retrieve the ObjectName via the given key, trying to diff --git a/spring-context/src/main/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisher.java b/spring-context/src/main/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisher.java index b4c50d237e2..29d87d7ab31 100644 --- a/spring-context/src/main/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisher.java +++ b/spring-context/src/main/java/org/springframework/jmx/export/notification/ModelMBeanNotificationPublisher.java @@ -64,7 +64,7 @@ public class ModelMBeanNotificationPublisher implements NotificationPublisher { * @param modelMBean the target {@link ModelMBean}; must not be null * @param objectName the {@link ObjectName} of the source {@link ModelMBean} * @param managedResource the managed resource exposed by the supplied {@link ModelMBean} - * @throws IllegalArgumentException if any of the parameters is null + * @throws IllegalArgumentException if any of the parameters is null */ public ModelMBeanNotificationPublisher( ModelMBeanNotificationBroadcaster modelMBean, ObjectName objectName, Object managedResource) { diff --git a/spring-context/src/main/java/org/springframework/jndi/JndiTemplate.java b/spring-context/src/main/java/org/springframework/jndi/JndiTemplate.java index ad9fbf09a34..c3e1f65a9cf 100644 --- a/spring-context/src/main/java/org/springframework/jndi/JndiTemplate.java +++ b/spring-context/src/main/java/org/springframework/jndi/JndiTemplate.java @@ -39,7 +39,7 @@ import org.springframework.util.CollectionUtils; * @see #execute */ public class JndiTemplate { - + protected final Log logger = LogFactory.getLog(getClass()); private Properties environment; @@ -200,7 +200,7 @@ public class JndiTemplate { } }); } - + /** * Rebind the given object to the current JNDI context, using the given name. * Overwrites any existing binding. @@ -236,5 +236,5 @@ public class JndiTemplate { } }); } - + } diff --git a/spring-context/src/main/java/org/springframework/jndi/JndiTemplateEditor.java b/spring-context/src/main/java/org/springframework/jndi/JndiTemplateEditor.java index 1110a40bc9c..dd4f4e2d279 100644 --- a/spring-context/src/main/java/org/springframework/jndi/JndiTemplateEditor.java +++ b/spring-context/src/main/java/org/springframework/jndi/JndiTemplateEditor.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/main/java/org/springframework/jndi/package-info.java b/spring-context/src/main/java/org/springframework/jndi/package-info.java index f215120d6ab..eb6ebde08a8 100644 --- a/spring-context/src/main/java/org/springframework/jndi/package-info.java +++ b/spring-context/src/main/java/org/springframework/jndi/package-info.java @@ -4,7 +4,7 @@ * The classes in this package make JNDI easier to use, * facilitating the accessing of configuration stored in JNDI, * and provide useful superclasses for JNDI access classes. - * + * *

      The classes in this package are discussed in Chapter 11 of * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). diff --git a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiProxyFactoryBean.java b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiProxyFactoryBean.java index 0e718d72b3a..fb8ced62264 100644 --- a/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiProxyFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/remoting/rmi/JndiRmiProxyFactoryBean.java @@ -25,7 +25,7 @@ import org.springframework.util.ClassUtils; /** * {@link FactoryBean} for RMI proxies from JNDI. - * + * *

      Typically used for RMI-IIOP (CORBA), but can also be used for EJB home objects * (for example, a Stateful Session Bean home). In contrast to a plain JNDI lookup, * this accessor also performs narrowing through {@link javax.rmi.PortableRemoteObject}. diff --git a/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationUtils.java b/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationUtils.java index 7eb5c58c399..67a0d3ade56 100644 --- a/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationUtils.java +++ b/spring-context/src/main/java/org/springframework/remoting/support/RemoteInvocationUtils.java @@ -23,7 +23,7 @@ import org.springframework.core.JdkVersion; /** * General utilities for handling remote invocations. - * + * *

      Mainly intended for use within the remoting framework. * * @author Juergen Hoeller diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/AnnotationDrivenBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/scheduling/config/AnnotationDrivenBeanDefinitionParser.java index db440ed6ed2..009a163c28b 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/config/AnnotationDrivenBeanDefinitionParser.java +++ b/spring-context/src/main/java/org/springframework/scheduling/config/AnnotationDrivenBeanDefinitionParser.java @@ -32,7 +32,7 @@ import org.springframework.util.StringUtils; /** * Parser for the 'annotation-driven' element of the 'task' namespace. - * + * * @author Mark Fisher * @author Juergen Hoeller * @author Ramnivas Laddad diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTasksBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTasksBeanDefinitionParser.java index 828528afab4..a892eb414b1 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTasksBeanDefinitionParser.java +++ b/spring-context/src/main/java/org/springframework/scheduling/config/ScheduledTasksBeanDefinitionParser.java @@ -30,7 +30,7 @@ import org.w3c.dom.NodeList; /** * Parser for the 'scheduled-tasks' element of the scheduling namespace. - * + * * @author Mark Fisher * @author Chris Beams * @since 3.0 diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/SchedulerBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/scheduling/config/SchedulerBeanDefinitionParser.java index dba85fca505..be34e5ad191 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/config/SchedulerBeanDefinitionParser.java +++ b/spring-context/src/main/java/org/springframework/scheduling/config/SchedulerBeanDefinitionParser.java @@ -24,7 +24,7 @@ import org.springframework.util.StringUtils; /** * Parser for the 'scheduler' element of the 'task' namespace. - * + * * @author Mark Fisher * @since 3.0 */ diff --git a/spring-context/src/main/java/org/springframework/scheduling/config/TaskNamespaceHandler.java b/spring-context/src/main/java/org/springframework/scheduling/config/TaskNamespaceHandler.java index b4c356da64b..ee08a4c9774 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/config/TaskNamespaceHandler.java +++ b/spring-context/src/main/java/org/springframework/scheduling/config/TaskNamespaceHandler.java @@ -19,8 +19,8 @@ package org.springframework.scheduling.config; import org.springframework.beans.factory.xml.NamespaceHandlerSupport; /** - * NamespaceHandler for the 'task' namespace. - * + * NamespaceHandler for the 'task' namespace. + * * @author Mark Fisher * @since 3.0 */ diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java b/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java index b1753f92757..3f5459e61e8 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java @@ -104,7 +104,7 @@ public class CronSequenceGenerator { 4 If hour matches move on, otherwise find the next match 4.1 If next match is in the next day then roll forwards, 4.2 Reset the minutes and seconds and go to 2 - + ... */ diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/CronTrigger.java b/spring-context/src/main/java/org/springframework/scheduling/support/CronTrigger.java index f23b327cf80..09df2374daa 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/CronTrigger.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/CronTrigger.java @@ -86,7 +86,7 @@ public class CronTrigger implements Trigger { public int hashCode() { return this.sequenceGenerator.hashCode(); } - + @Override public String toString() { return sequenceGenerator.toString(); diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java b/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java index fe45ac21212..91a5b42e551 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/PeriodicTrigger.java @@ -39,7 +39,7 @@ import org.springframework.util.Assert; * within components that rely on the Trigger abstraction. For example, it may * be convenient to allow periodic triggers, cron-based triggers, and even * custom Trigger implementations to be used interchangeably. - * + * * @author Mark Fisher * @since 3.0 */ @@ -76,7 +76,7 @@ public class PeriodicTrigger implements Trigger { /** * Specify the delay for the initial execution. It will be evaluated in * terms of this trigger's {@link TimeUnit}. If no time unit was explicitly - * provided upon instantiation, the default is milliseconds. + * provided upon instantiation, the default is milliseconds. */ public void setInitialDelay(long initialDelay) { this.initialDelay = this.timeUnit.toMillis(initialDelay); @@ -122,7 +122,7 @@ public class PeriodicTrigger implements Trigger { public int hashCode() { return (this.fixedRate ? 17 : 29) + (int) (37 * this.period) + - (int) (41 * this.initialDelay); + (int) (41 * this.initialDelay); } } diff --git a/spring-context/src/main/java/org/springframework/scheduling/support/TaskUtils.java b/spring-context/src/main/java/org/springframework/scheduling/support/TaskUtils.java index 2d0dcdbed6a..4800543853b 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/support/TaskUtils.java +++ b/spring-context/src/main/java/org/springframework/scheduling/support/TaskUtils.java @@ -31,7 +31,7 @@ import org.springframework.util.ReflectionUtils; * implementations. It is only public so that it may be accessed from * implementations within other packages. It is not intended for general * use and may change in the future. - * + * * @author Mark Fisher * @since 3.0 */ diff --git a/spring-context/src/main/java/org/springframework/scripting/config/LangNamespaceHandler.java b/spring-context/src/main/java/org/springframework/scripting/config/LangNamespaceHandler.java index 6c826fc1412..b222d23f16a 100644 --- a/spring-context/src/main/java/org/springframework/scripting/config/LangNamespaceHandler.java +++ b/spring-context/src/main/java/org/springframework/scripting/config/LangNamespaceHandler.java @@ -23,7 +23,7 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport; * objects backed by dynamic languages such as Groovy, JRuby and * BeanShell. The following is an example (from the reference * documentation) that details the wiring of a Groovy backed bean: - * + * *

        * <lang:groovy id="messenger"
        *     refresh-check-delay="5000"
      @@ -31,7 +31,7 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
        * <lang:property name="message" value="I Can Do The Frug"/>
        * </lang:groovy>
        * 
      - * + * * @author Rob Harrop * @author Juergen Hoeller * @author Mark Fisher diff --git a/spring-context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java b/spring-context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java index 487cd066bf3..f5bfb4a7343 100644 --- a/spring-context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java +++ b/spring-context/src/main/java/org/springframework/scripting/config/ScriptBeanDefinitionParser.java @@ -114,7 +114,7 @@ class ScriptBeanDefinitionParser extends AbstractBeanDefinitionParser { bd.setBeanClassName(this.scriptFactoryClassName); bd.setSource(parserContext.extractSource(element)); bd.setAttribute(ScriptFactoryPostProcessor.LANGUAGE_ATTRIBUTE, element.getLocalName()); - + // Determine bean scope. String scope = element.getAttribute(SCOPE_ATTRIBUTE); if (StringUtils.hasLength(scope)) { diff --git a/spring-context/src/main/java/org/springframework/scripting/config/ScriptingDefaultsParser.java b/spring-context/src/main/java/org/springframework/scripting/config/ScriptingDefaultsParser.java index 8f91d49083c..ee87c286783 100644 --- a/spring-context/src/main/java/org/springframework/scripting/config/ScriptingDefaultsParser.java +++ b/spring-context/src/main/java/org/springframework/scripting/config/ScriptingDefaultsParser.java @@ -36,7 +36,7 @@ public class ScriptingDefaultsParser implements BeanDefinitionParser { public BeanDefinition parse(Element element, ParserContext parserContext) { - BeanDefinition bd = + BeanDefinition bd = LangNamespaceUtils.registerScriptFactoryPostProcessorIfNecessary(parserContext.getRegistry()); String refreshCheckDelay = element.getAttribute(REFRESH_CHECK_DELAY_ATTRIBUTE); if (StringUtils.hasText(refreshCheckDelay)) { diff --git a/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java b/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java index e94152011b7..b55d507bafb 100644 --- a/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java +++ b/spring-context/src/main/java/org/springframework/scripting/groovy/GroovyScriptFactory.java @@ -53,7 +53,7 @@ import org.springframework.util.ClassUtils; public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, BeanClassLoaderAware { private final String scriptSourceLocator; - + private final GroovyObjectCustomizer groovyObjectCustomizer; private GroovyClassLoader groovyClassLoader; diff --git a/spring-context/src/main/java/org/springframework/scripting/support/ResourceScriptSource.java b/spring-context/src/main/java/org/springframework/scripting/support/ResourceScriptSource.java index 13ab4dc9075..c3cce13a7f1 100644 --- a/spring-context/src/main/java/org/springframework/scripting/support/ResourceScriptSource.java +++ b/spring-context/src/main/java/org/springframework/scripting/support/ResourceScriptSource.java @@ -115,7 +115,7 @@ public class ResourceScriptSource implements ScriptSource { /** * Sets the encoding used for reading the script resource. The default value is "UTF-8". * A null value, implies the platform default. - * + * * @param encoding charset encoding used for reading the script. */ public void setEncoding(String encoding) { diff --git a/spring-context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java b/spring-context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java index 90626e55435..1902621315b 100644 --- a/spring-context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java +++ b/spring-context/src/main/java/org/springframework/scripting/support/ScriptFactoryPostProcessor.java @@ -193,7 +193,7 @@ public class ScriptFactoryPostProcessor extends InstantiationAwareBeanPostProces } /** - * Flag to signal that refreshable proxies should be created to proxy the target class not its interfaces. + * Flag to signal that refreshable proxies should be created to proxy the target class not its interfaces. * @param defaultProxyTargetClass the flag value to set */ public void setDefaultProxyTargetClass(boolean defaultProxyTargetClass) { diff --git a/spring-context/src/main/java/org/springframework/stereotype/package-info.java b/spring-context/src/main/java/org/springframework/stereotype/package-info.java index ca9644652af..420bb190971 100644 --- a/spring-context/src/main/java/org/springframework/stereotype/package-info.java +++ b/spring-context/src/main/java/org/springframework/stereotype/package-info.java @@ -3,7 +3,7 @@ * * Annotations denoting the roles of types or methods in the overall architecture * (at a conceptual, rather than implementation, level). - * + * *

      Intended for use by tools and aspects (making an ideal target for pointcuts). * */ diff --git a/spring-context/src/main/java/org/springframework/ui/context/HierarchicalThemeSource.java b/spring-context/src/main/java/org/springframework/ui/context/HierarchicalThemeSource.java index a67fc7f09a0..13c92582db8 100644 --- a/spring-context/src/main/java/org/springframework/ui/context/HierarchicalThemeSource.java +++ b/spring-context/src/main/java/org/springframework/ui/context/HierarchicalThemeSource.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/main/java/org/springframework/ui/context/package-info.java b/spring-context/src/main/java/org/springframework/ui/context/package-info.java index 0fae9ff8134..a00d7c3fa09 100644 --- a/spring-context/src/main/java/org/springframework/ui/context/package-info.java +++ b/spring-context/src/main/java/org/springframework/ui/context/package-info.java @@ -3,7 +3,7 @@ * * Contains classes defining the application context subinterface * for UI applications. The theme feature is added here. - * + * *

        *
      • If no UiApplicationContextUtils.THEME_SOURCE_BEAN_NAME * bean is available in the context or parent context, a default ResourceBundleThemeSource @@ -24,7 +24,7 @@ *
      • If messages in the resource bundles are in fact paths to resources(css, images, ...), make sure these resources * are directly available for the user and not, for example, under the WEB-INF directory.
      • *
      - * + * *
      Web packages add the resolution and the setting of the user current theme. * */ diff --git a/spring-context/src/main/java/org/springframework/validation/BeanPropertyBindingResult.java b/spring-context/src/main/java/org/springframework/validation/BeanPropertyBindingResult.java index a2a82a12268..53311e519fd 100644 --- a/spring-context/src/main/java/org/springframework/validation/BeanPropertyBindingResult.java +++ b/spring-context/src/main/java/org/springframework/validation/BeanPropertyBindingResult.java @@ -27,7 +27,7 @@ import org.springframework.util.Assert; * Default implementation of the {@link Errors} and {@link BindingResult} * interfaces, for the registration and evaluation of binding errors on * JavaBean objects. - * + * *

      Performs standard JavaBean property access, also supporting nested * properties. Normally, application code will work with the * Errors interface or the BindingResult interface. diff --git a/spring-context/src/main/java/org/springframework/validation/Errors.java b/spring-context/src/main/java/org/springframework/validation/Errors.java index edd61ee7c59..2a4f4ce2685 100644 --- a/spring-context/src/main/java/org/springframework/validation/Errors.java +++ b/spring-context/src/main/java/org/springframework/validation/Errors.java @@ -199,14 +199,14 @@ public interface Errors { /** * Are there any global errors? * @return true if there are any global errors - * @see #hasFieldErrors() + * @see #hasFieldErrors() */ boolean hasGlobalErrors(); /** * Return the number of global errors. * @return the number of global errors - * @see #getFieldErrorCount() + * @see #getFieldErrorCount() */ int getGlobalErrorCount(); @@ -225,14 +225,14 @@ public interface Errors { /** * Are there any field errors? * @return true if there are any errors associated with a field - * @see #hasGlobalErrors() + * @see #hasGlobalErrors() */ boolean hasFieldErrors(); /** * Return the number of errors associated with a field. * @return the number of errors associated with a field - * @see #getGlobalErrorCount() + * @see #getGlobalErrorCount() */ int getFieldErrorCount(); diff --git a/spring-context/src/main/java/org/springframework/validation/ObjectError.java b/spring-context/src/main/java/org/springframework/validation/ObjectError.java index b0398754db4..fb774d8496b 100644 --- a/spring-context/src/main/java/org/springframework/validation/ObjectError.java +++ b/spring-context/src/main/java/org/springframework/validation/ObjectError.java @@ -22,7 +22,7 @@ import org.springframework.util.Assert; /** * Encapsulates an object error, that is, a global reason for rejecting * an object. - * + * *

      See the {@link DefaultMessageCodesResolver} javadoc for details on * how a message code list is built for an ObjectError. * diff --git a/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java b/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java index e7867a7633a..914318e2548 100644 --- a/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java +++ b/spring-context/src/main/java/org/springframework/validation/ValidationUtils.java @@ -26,7 +26,7 @@ import org.springframework.util.StringUtils; /** * Utility class offering convenient methods for invoking a {@link Validator} * and for rejecting empty fields. - * + * *

      Checks for an empty field in Validator implementations can become * one-liners when using {@link #rejectIfEmpty} or {@link #rejectIfEmptyOrWhitespace}. * @@ -96,7 +96,7 @@ public abstract class ValidationUtils { /** * Reject the given field with the given error code if the value is empty. *

      An 'empty' value in this context means either null or - * the empty string "". + * the empty string "". *

      The object whose field is being validated does not need to be passed * in because the {@link Errors} instance can resolve field values by itself * (it will usually hold an internal reference to the target object). @@ -112,7 +112,7 @@ public abstract class ValidationUtils { * Reject the given field with the given error code and default message * if the value is empty. *

      An 'empty' value in this context means either null or - * the empty string "". + * the empty string "". *

      The object whose field is being validated does not need to be passed * in because the {@link Errors} instance can resolve field values by itself * (it will usually hold an internal reference to the target object). @@ -147,7 +147,7 @@ public abstract class ValidationUtils { * Reject the given field with the given error code, error arguments * and default message if the value is empty. *

      An 'empty' value in this context means either null or - * the empty string "". + * the empty string "". *

      The object whose field is being validated does not need to be passed * in because the {@link Errors} instance can resolve field values by itself * (it will usually hold an internal reference to the target object). diff --git a/spring-context/src/main/java/org/springframework/validation/Validator.java b/spring-context/src/main/java/org/springframework/validation/Validator.java index c67c5ea8e9e..671cd90bf6f 100644 --- a/spring-context/src/main/java/org/springframework/validation/Validator.java +++ b/spring-context/src/main/java/org/springframework/validation/Validator.java @@ -34,13 +34,13 @@ package org.springframework.validation; * at least 'MINIMUM_PASSWORD_LENGTH' characters in length. * *

       public class UserLoginValidator implements Validator {
      - * 
      + *
        *    private static final int MINIMUM_PASSWORD_LENGTH = 6;
      - * 
      + *
        *    public boolean supports(Class clazz) {
        *       return UserLogin.class.isAssignableFrom(clazz);
        *    }
      - * 
      + *
        *    public void validate(Object target, Errors errors) {
        *       ValidationUtils.rejectIfEmptyOrWhitespace(errors, "userName", "field.required");
        *       ValidationUtils.rejectIfEmptyOrWhitespace(errors, "password", "field.required");
      @@ -56,7 +56,7 @@ package org.springframework.validation;
        *
        * 

      See also the Spring reference manual for a fuller discussion of * the Validator interface and it's role in an enterprise - * application. + * application. * * @author Rod Johnson * @see Errors @@ -75,7 +75,7 @@ public interface Validator { * being asked if it can {@link #validate(Object, Errors) validate} * @return true if this {@link Validator} can indeed * {@link #validate(Object, Errors) validate} instances of the - * supplied clazz + * supplied clazz */ boolean supports(Class clazz); @@ -85,8 +85,8 @@ public interface Validator { * typically has (or would) return true. *

      The supplied {@link Errors errors} instance can be used to report * any resulting validation errors. - * @param target the object that is to be validated (can be null) - * @param errors contextual state about the validation process (never null) + * @param target the object that is to be validated (can be null) + * @param errors contextual state about the validation process (never null) * @see ValidationUtils */ void validate(Object target, Errors errors); diff --git a/spring-context/src/test/java/example/scannable/MessageBean.java b/spring-context/src/test/java/example/scannable/MessageBean.java index a1035f114fb..9a3311ac193 100644 --- a/spring-context/src/test/java/example/scannable/MessageBean.java +++ b/spring-context/src/test/java/example/scannable/MessageBean.java @@ -23,7 +23,7 @@ package example.scannable; public class MessageBean { private String message; - + public MessageBean() { this.message = "DEFAULT MESSAGE"; } @@ -31,7 +31,7 @@ public class MessageBean { public MessageBean(String message) { this.message = message; } - + public String getMessage() { return this.message; } diff --git a/spring-context/src/test/java/example/scannable/ServiceInvocationCounter.java b/spring-context/src/test/java/example/scannable/ServiceInvocationCounter.java index 257a2d8bc52..fbaf713374c 100644 --- a/spring-context/src/test/java/example/scannable/ServiceInvocationCounter.java +++ b/spring-context/src/test/java/example/scannable/ServiceInvocationCounter.java @@ -43,7 +43,7 @@ public class ServiceInvocationCounter { this.threadLocalCount.set(this.useCount); System.out.println(""); } - + public int getCount() { return this.useCount; } 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 36a60c2c682..2bf712344ed 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 @@ -38,9 +38,9 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; public final class AfterAdviceBindingTests { private AdviceBindingCollaborator mockCollaborator; - + private ITestBean testBeanProxy; - + private TestBean testBeanTarget; @Before @@ -48,13 +48,13 @@ public final class AfterAdviceBindingTests { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass()); AdviceBindingTestAspect afterAdviceAspect = (AdviceBindingTestAspect) ctx.getBean("testAspect"); - + testBeanProxy = (ITestBean) ctx.getBean("testBean"); assertTrue(AopUtils.isAopProxy(testBeanProxy)); - + // we need the real target too, not just the proxy... testBeanTarget = (TestBean) ((Advised) testBeanProxy).getTargetSource().getTarget(); - + mockCollaborator = createNiceMock(AdviceBindingCollaborator.class); afterAdviceAspect.setCollaborator(mockCollaborator); } @@ -66,7 +66,7 @@ public final class AfterAdviceBindingTests { testBeanProxy.setAge(5); verify(mockCollaborator); } - + @Test public void testOneObjectArgBindingProxyWithThis() { mockCollaborator.oneObjectArg(this.testBeanProxy); @@ -74,7 +74,7 @@ public final class AfterAdviceBindingTests { testBeanProxy.getAge(); verify(mockCollaborator); } - + @Test public void testOneObjectArgBindingTarget() { mockCollaborator.oneObjectArg(this.testBeanTarget); @@ -82,7 +82,7 @@ public final class AfterAdviceBindingTests { testBeanProxy.getDoctor(); verify(mockCollaborator); } - + @Test public void testOneIntAndOneObjectArgs() { mockCollaborator.oneIntAndOneObject(5,this.testBeanProxy); @@ -90,7 +90,7 @@ public final class AfterAdviceBindingTests { testBeanProxy.setAge(5); verify(mockCollaborator); } - + @Test public void testNeedsJoinPoint() { mockCollaborator.needsJoinPoint("getAge"); @@ -98,7 +98,7 @@ public final class AfterAdviceBindingTests { testBeanProxy.getAge(); verify(mockCollaborator); } - + @Test public void testNeedsJoinPointStaticPart() { mockCollaborator.needsJoinPointStaticPart("getAge"); @@ -106,5 +106,5 @@ public final class AfterAdviceBindingTests { testBeanProxy.getAge(); verify(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 a89b37711b5..690e0355a7e 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 @@ -45,7 +45,7 @@ public final class AfterReturningAdviceBindingTests { private TestBean testBeanTarget; private AfterReturningAdviceBindingCollaborator mockCollaborator; - + public void setAfterReturningAdviceAspect(AfterReturningAdviceBindingTestAspect anAspect) { this.afterAdviceAspect = anAspect; @@ -55,15 +55,15 @@ public final class AfterReturningAdviceBindingTests { public void setUp() throws Exception { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass()); - + afterAdviceAspect = (AfterReturningAdviceBindingTestAspect) ctx.getBean("testAspect"); - + mockCollaborator = createNiceMock(AfterReturningAdviceBindingCollaborator.class); afterAdviceAspect.setCollaborator(mockCollaborator); - + testBeanProxy = (ITestBean) ctx.getBean("testBean"); assertTrue(AopUtils.isAopProxy(testBeanProxy)); - + // we need the real target too, not just the proxy... this.testBeanTarget = (TestBean) ((Advised)testBeanProxy).getTargetSource().getTarget(); } @@ -76,7 +76,7 @@ public final class AfterReturningAdviceBindingTests { testBeanProxy.setAge(5); verify(mockCollaborator); } - + @Test public void testOneObjectArg() { mockCollaborator.oneObjectArg(this.testBeanProxy); @@ -84,7 +84,7 @@ public final class AfterReturningAdviceBindingTests { testBeanProxy.getAge(); verify(mockCollaborator); } - + @Test public void testOneIntAndOneObjectArgs() { mockCollaborator.oneIntAndOneObject(5,this.testBeanProxy); @@ -92,7 +92,7 @@ public final class AfterReturningAdviceBindingTests { testBeanProxy.setAge(5); verify(mockCollaborator); } - + @Test public void testNeedsJoinPoint() { mockCollaborator.needsJoinPoint("getAge"); @@ -100,7 +100,7 @@ public final class AfterReturningAdviceBindingTests { testBeanProxy.getAge(); verify(mockCollaborator); } - + @Test public void testNeedsJoinPointStaticPart() { mockCollaborator.needsJoinPointStaticPart("getAge"); @@ -117,7 +117,7 @@ public final class AfterReturningAdviceBindingTests { testBeanProxy.getName(); verify(mockCollaborator); } - + @Test public void testReturningObject() { mockCollaborator.oneObjectArg(this.testBeanTarget); @@ -125,7 +125,7 @@ public final class AfterReturningAdviceBindingTests { testBeanProxy.returnsThis(); verify(mockCollaborator); } - + @Test public void testReturningBean() { mockCollaborator.oneTestBeanArg(this.testBeanTarget); @@ -133,7 +133,7 @@ public final class AfterReturningAdviceBindingTests { testBeanProxy.returnsThis(); verify(mockCollaborator); } - + @Test public void testReturningBeanArray() { this.testBeanTarget.setSpouse(new TestBean()); @@ -149,13 +149,13 @@ public final class AfterReturningAdviceBindingTests { // we need a strict mock for this... mockCollaborator = createMock(AfterReturningAdviceBindingCollaborator.class); afterAdviceAspect.setCollaborator(mockCollaborator); - + replay(mockCollaborator); testBeanProxy.setSpouse(this.testBeanProxy); testBeanProxy.getSpouse(); verify(mockCollaborator); } - + @Test public void testReturningByType() { mockCollaborator.objectMatchNoArgs(); @@ -163,7 +163,7 @@ public final class AfterReturningAdviceBindingTests { testBeanProxy.returnsThis(); verify(mockCollaborator); } - + @Test public void testReturningPrimitive() { mockCollaborator.oneInt(20); @@ -181,15 +181,15 @@ final class AfterReturningAdviceBindingTestAspect extends AdviceBindingTestAspec private AfterReturningAdviceBindingCollaborator getCollaborator() { return (AfterReturningAdviceBindingCollaborator) this.collaborator; } - + public void oneString(String name) { getCollaborator().oneString(name); } - + public void oneTestBeanArg(TestBean bean) { getCollaborator().oneTestBeanArg(bean); } - + public void testBeanArrayArg(ITestBean[] beans) { getCollaborator().testBeanArrayArg(beans); } @@ -197,11 +197,11 @@ final class AfterReturningAdviceBindingTestAspect extends AdviceBindingTestAspec public void objectMatchNoArgs() { getCollaborator().objectMatchNoArgs(); } - + public void stringMatchNoArgs() { getCollaborator().stringMatchNoArgs(); } - + public void oneInt(int result) { getCollaborator().oneInt(result); } 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 5798fa688dc..0424250ca52 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 @@ -43,14 +43,14 @@ public final class AfterThrowingAdviceBindingTests { public void setUp() { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass()); - + testBean = (ITestBean) ctx.getBean("testBean"); afterThrowingAdviceAspect = (AfterThrowingAdviceBindingTestAspect) ctx.getBean("testAspect"); - + mockCollaborator = createNiceMock(AfterThrowingAdviceBindingCollaborator.class); afterThrowingAdviceAspect.setCollaborator(mockCollaborator); } - + @After public void tearDown() { verify(mockCollaborator); @@ -62,7 +62,7 @@ public final class AfterThrowingAdviceBindingTests { replay(mockCollaborator); this.testBean.exceptional(new Throwable()); } - + @Test(expected=Throwable.class) public void testAfterThrowingWithBinding() throws Throwable { Throwable t = new Throwable(); @@ -70,14 +70,14 @@ public final class AfterThrowingAdviceBindingTests { replay(mockCollaborator); this.testBean.exceptional(t); } - + @Test(expected=Throwable.class) public void testAfterThrowingWithNamedTypeRestriction() throws Throwable { Throwable t = new Throwable(); // need a strict mock for this test... mockCollaborator = createMock(AfterThrowingAdviceBindingCollaborator.class); afterThrowingAdviceAspect.setCollaborator(mockCollaborator); - + mockCollaborator.noArgs(); mockCollaborator.oneThrowable(t); mockCollaborator.noArgsOnThrowableMatch(); @@ -113,7 +113,7 @@ public final class AfterThrowingAdviceBindingTests { final class AfterThrowingAdviceBindingTestAspect { - // collaborator interface that makes it easy to test this aspect is + // collaborator interface that makes it easy to test this aspect is // working as expected through mocking. public interface AfterThrowingAdviceBindingCollaborator { void noArgs(); @@ -122,29 +122,29 @@ final class AfterThrowingAdviceBindingTestAspect { void noArgsOnThrowableMatch(); void noArgsOnRuntimeExceptionMatch(); } - + protected AfterThrowingAdviceBindingCollaborator collaborator = null; - + public void setCollaborator(AfterThrowingAdviceBindingCollaborator aCollaborator) { this.collaborator = aCollaborator; } - + public void noArgs() { this.collaborator.noArgs(); } - + public void oneThrowable(Throwable t) { this.collaborator.oneThrowable(t); } - + public void oneRuntimeException(RuntimeException ex) { this.collaborator.oneRuntimeException(ex); } - + public void noArgsOnThrowableMatch() { this.collaborator.noArgsOnThrowableMatch(); } - + public void noArgsOnRuntimeExceptionMatch() { this.collaborator.noArgsOnRuntimeExceptionMatch(); } diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java index 04d0a666b01..05b171f6bb3 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java @@ -39,27 +39,27 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; public class AroundAdviceBindingTests { private AroundAdviceBindingCollaborator mockCollaborator; - + private ITestBean testBeanProxy; - + private TestBean testBeanTarget; - + protected ApplicationContext ctx; @Before public void onSetUp() throws Exception { ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass()); - + AroundAdviceBindingTestAspect aroundAdviceAspect = ((AroundAdviceBindingTestAspect) ctx.getBean("testAspect")); - + ITestBean injectedTestBean = (ITestBean) ctx.getBean("testBean"); assertTrue(AopUtils.isAopProxy(injectedTestBean)); - + this.testBeanProxy = injectedTestBean; // we need the real target too, not just the proxy... - + this.testBeanTarget = (TestBean) ((Advised) testBeanProxy).getTargetSource().getTarget(); - + mockCollaborator = createNiceMock(AroundAdviceBindingCollaborator.class); aroundAdviceAspect.setCollaborator(mockCollaborator); } @@ -71,7 +71,7 @@ public class AroundAdviceBindingTests { testBeanProxy.setAge(5); verify(mockCollaborator); } - + @Test public void testOneObjectArgBoundToTarget() { mockCollaborator.oneObjectArg(this.testBeanTarget); @@ -79,7 +79,7 @@ public class AroundAdviceBindingTests { testBeanProxy.getAge(); verify(mockCollaborator); } - + @Test public void testOneIntAndOneObjectArgs() { mockCollaborator.oneIntAndOneObject(5, this.testBeanProxy); @@ -87,7 +87,7 @@ public class AroundAdviceBindingTests { testBeanProxy.setAge(5); verify(mockCollaborator); } - + @Test public void testJustJoinPoint() { mockCollaborator.justJoinPoint("getAge"); @@ -95,7 +95,7 @@ public class AroundAdviceBindingTests { testBeanProxy.getAge(); verify(mockCollaborator); } - + } 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 1cff726a581..0355c8f7c37 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 @@ -36,15 +36,15 @@ import org.springframework.core.Ordered; public final class AspectAndAdvicePrecedenceTests { private PrecedenceTestAspect highPrecedenceAspect; - + private PrecedenceTestAspect lowPrecedenceAspect; - + private SimpleSpringBeforeAdvice highPrecedenceSpringAdvice; - + private SimpleSpringBeforeAdvice lowPrecedenceSpringAdvice; - + private ITestBean testBean; - + @Before public void setUp() { @@ -176,7 +176,7 @@ class PrecedenceTestAspect implements BeanNameAware, Ordered { this.collaborator.aroundAdviceOne(this.name); try { ret = ((Integer)pjp.proceed()).intValue(); - } + } catch(Throwable t) { throw new RuntimeException(t); } this.collaborator.aroundAdviceOne(this.name); return ret; @@ -187,7 +187,7 @@ class PrecedenceTestAspect implements BeanNameAware, Ordered { this.collaborator.aroundAdviceTwo(this.name); try { ret = ((Integer)pjp.proceed()).intValue(); - } + } catch(Throwable t) {throw new RuntimeException(t);} this.collaborator.aroundAdviceTwo(this.name); return ret; @@ -219,7 +219,7 @@ class SimpleSpringBeforeAdvice implements MethodBeforeAdvice, BeanNameAware { private PrecedenceTestAspect.Collaborator collaborator; private String name; - + /* (non-Javadoc) * @see org.springframework.aop.MethodBeforeAdvice#before(java.lang.reflect.Method, java.lang.Object[], java.lang.Object) */ diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.java index c2f76603b16..4b1d267b615 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.java @@ -100,5 +100,5 @@ class CounterAspect { public void increment1ForAnonymousPointcut() { count++; } - + } 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 8d43600ab90..2e998b24df3 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 @@ -48,7 +48,7 @@ public final class BeanNamePointcutTests { private ITestBean interceptThis; private ITestBean dontInterceptThis; private TestInterceptor testInterceptor; - + private ClassPathXmlApplicationContext ctx; @@ -64,7 +64,7 @@ public final class BeanNamePointcutTests { interceptThis = (ITestBean) ctx.getBean("interceptThis"); dontInterceptThis = (ITestBean) ctx.getBean("dontInterceptThis"); testInterceptor = (TestInterceptor) ctx.getBean("testInterceptor"); - + counterAspect.reset(); } @@ -90,7 +90,7 @@ public final class BeanNamePointcutTests { public void testNonMatchingNestedBeanName() { assertFalse("Non-matching bean must *not* be advised (proxied)", this.testBeanContainingNestedBean.getDoctor() instanceof Advised); } - + @Test public void testMatchingFactoryBeanObject() { assertTrue("Matching bean must be advised (proxied)", this.testFactoryBean1 instanceof Advised); @@ -125,7 +125,7 @@ public final class BeanNamePointcutTests { public static class TestInterceptor implements MethodBeforeAdvice { private int interceptionCount; - + public void before(Method method, Object[] args, Object target) throws Throwable { interceptionCount++; } 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 adabfcc5ea2..a1f2fe9736f 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 @@ -38,28 +38,28 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; public final class BeforeAdviceBindingTests { private AdviceBindingCollaborator mockCollaborator; - + private ITestBean testBeanProxy; - + private TestBean testBeanTarget; protected String getConfigPath() { return "before-advice-tests.xml"; } - + @Before public void setUp() throws Exception { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass()); - + testBeanProxy = (ITestBean) ctx.getBean("testBean"); assertTrue(AopUtils.isAopProxy(testBeanProxy)); - + // we need the real target too, not just the proxy... testBeanTarget = (TestBean) ((Advised) testBeanProxy).getTargetSource().getTarget(); - + AdviceBindingTestAspect beforeAdviceAspect = (AdviceBindingTestAspect) ctx.getBean("testAspect"); - + mockCollaborator = createNiceMock(AdviceBindingCollaborator.class); beforeAdviceAspect.setCollaborator(mockCollaborator); } @@ -72,7 +72,7 @@ public final class BeforeAdviceBindingTests { testBeanProxy.setAge(5); verify(mockCollaborator); } - + @Test public void testOneObjectArgBoundToProxyUsingThis() { mockCollaborator.oneObjectArg(this.testBeanProxy); @@ -80,7 +80,7 @@ public final class BeforeAdviceBindingTests { testBeanProxy.getAge(); verify(mockCollaborator); } - + @Test public void testOneIntAndOneObjectArgs() { mockCollaborator.oneIntAndOneObject(5,this.testBeanTarget); @@ -88,7 +88,7 @@ public final class BeforeAdviceBindingTests { testBeanProxy.setAge(5); verify(mockCollaborator); } - + @Test public void testNeedsJoinPoint() { mockCollaborator.needsJoinPoint("getAge"); @@ -96,7 +96,7 @@ public final class BeforeAdviceBindingTests { testBeanProxy.getAge(); verify(mockCollaborator); } - + @Test public void testNeedsJoinPointStaticPart() { mockCollaborator.needsJoinPointStaticPart("getAge"); @@ -105,7 +105,7 @@ public final class BeforeAdviceBindingTests { verify(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 b37f8fba371..cfeb2ca217c 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 @@ -35,7 +35,7 @@ public final class DeclarationOrderIndependenceTests { private TopsyTurvyAspect aspect; private TopsyTurvyTarget target; - + @Before public void setUp() { @@ -49,12 +49,12 @@ public final class DeclarationOrderIndependenceTests { public void testTargetIsSerializable() { assertTrue("target bean is serializable",this.target instanceof Serializable); } - + @Test public void testTargetIsBeanNameAware() { assertTrue("target bean is bean name aware",this.target instanceof BeanNameAware); } - + @Test public void testBeforeAdviceFiringOk() { AspectCollaborator collab = new AspectCollaborator(); @@ -62,7 +62,7 @@ public final class DeclarationOrderIndependenceTests { this.target.doSomething(); assertTrue("before advice fired",collab.beforeFired); } - + @Test public void testAroundAdviceFiringOk() { AspectCollaborator collab = new AspectCollaborator(); @@ -70,30 +70,30 @@ public final class DeclarationOrderIndependenceTests { this.target.getX(); assertTrue("around advice fired",collab.aroundFired); } - + @Test public void testAfterReturningFiringOk() { AspectCollaborator collab = new AspectCollaborator(); this.aspect.setCollaborator(collab); this.target.getX(); - assertTrue("after returning advice fired",collab.afterReturningFired); + assertTrue("after returning advice fired",collab.afterReturningFired); } - - + + /** public visibility is required */ public static class BeanNameAwareMixin implements BeanNameAware { - + private String beanName; - + /* (non-Javadoc) * @see org.springframework.beans.factory.BeanNameAware#setBeanName(java.lang.String) */ public void setBeanName(String name) { this.beanName = name; } - + } - + /** public visibility is required */ @SuppressWarnings("serial") public static class SerializableMixin implements Serializable { @@ -103,15 +103,15 @@ public final class DeclarationOrderIndependenceTests { class TopsyTurvyAspect { - + interface Collaborator { void beforeAdviceFired(); void afterReturningAdviceFired(); void aroundAdviceFired(); } - + private Collaborator collaborator; - + public void setCollaborator(Collaborator collaborator) { this.collaborator = collaborator; } @@ -119,11 +119,11 @@ class TopsyTurvyAspect { public void before() { this.collaborator.beforeAdviceFired(); } - + public void afterReturning() { this.collaborator.afterReturningAdviceFired(); } - + public Object around(ProceedingJoinPoint pjp) throws Throwable { Object ret = pjp.proceed(); this.collaborator.aroundAdviceFired(); @@ -144,21 +144,21 @@ interface TopsyTurvyTarget { class TopsyTurvyTargetImpl implements TopsyTurvyTarget { private int x = 5; - + /* (non-Javadoc) * @see org.springframework.aop.aspectj.TopsyTurvyTarget#doSomething() */ public void doSomething() { this.x = 10; } - + /* (non-Javadoc) * @see org.springframework.aop.aspectj.TopsyTurvyTarget#getX() */ public int getX() { return x; } - + } @@ -167,7 +167,7 @@ class AspectCollaborator implements TopsyTurvyAspect.Collaborator { public boolean afterReturningFired = false; public boolean aroundFired = false; public boolean beforeFired = false; - + /* (non-Javadoc) * @see org.springframework.aop.aspectj.TopsyTurvyAspect.Collaborator#afterReturningAdviceFired() */ @@ -188,5 +188,5 @@ class AspectCollaborator implements TopsyTurvyAspect.Collaborator { public void beforeAdviceFired() { this.beforeFired = true; } - + } diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsDelegateRefTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsDelegateRefTests.java index 599fa63ee99..cde853bf6ae 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsDelegateRefTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsDelegateRefTests.java @@ -31,7 +31,7 @@ public class DeclareParentsDelegateRefTests { protected NoMethodsBean noMethodsBean; protected Counter counter; - + @Before public void setUp() { @@ -46,7 +46,7 @@ public class DeclareParentsDelegateRefTests { public void testIntroductionWasMade() { assertTrue("Introduction must have been made", noMethodsBean instanceof ICounter); } - + @Test public void testIntroductionDelegation() { ((ICounter)noMethodsBean).increment(); @@ -62,4 +62,4 @@ interface NoMethodsBean { class NoMethodsBeanImpl implements NoMethodsBean { } - + 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 d4b9926cd4d..c3e652a3a33 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 @@ -36,7 +36,7 @@ import test.mixin.Lockable; public final class DeclareParentsTests { private ITestBean testBeanProxy; - + private TestBean testBeanTarget; private ApplicationContext ctx; @@ -44,14 +44,14 @@ public final class DeclareParentsTests { @Before public void setUp() throws Exception { ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass()); - + testBeanProxy = (ITestBean) ctx.getBean("testBean"); assertTrue(AopUtils.isAopProxy(testBeanProxy)); - + // we need the real target too, not just the proxy... testBeanTarget = (TestBean) ((Advised) testBeanProxy).getTargetSource().getTarget(); } - + @Test public void testIntroductionWasMade() { assertTrue("Introduction must have been made", testBeanProxy instanceof Lockable); 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 ca987a04a4c..4740e656777 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 @@ -25,18 +25,18 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Tests to check if the first implicit join point argument is correctly processed. * See SPR-3723 for more details. - * + * * @author Ramnivas Laddad * @author Chris Beams */ public final class ImplicitJPArgumentMatchingAtAspectJTests { - + @Test public void testAspect() { // nothing to really test; it is enough if we don't get error while creating app context new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass()); } - + @Aspect static class CounterAtAspectJAspect { @Around(value="execution(* org.springframework.beans.TestBean.*(..)) and this(bean) and args(argument)", 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 8cd94420ee7..fc02024d763 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 @@ -22,18 +22,18 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Tests to check if the first implicit join point argument is correctly processed. * See SPR-3723 for more details. - * + * * @author Ramnivas Laddad * @author Chris Beams */ public final class ImplicitJPArgumentMatchingTests { - + @Test public void testAspect() { // nothing to really test; it is enough if we don't get error while creating app context new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass()); } - + static class CounterAspect { public void increment(ProceedingJoinPoint pjp, Object bean, Object argument) throws Throwable { pjp.proceed(); 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 9eac5f45d4b..c5512be61d5 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 @@ -64,7 +64,7 @@ class OverloadedAdviceTestAspect { public void myBeforeAdvice(String name) { // no-op } - + public void myBeforeAdvice(int age) { // no-op } 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 14a52c18d1c..70464c53128 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 @@ -82,7 +82,7 @@ public final class ProceedTests { interface SimpleBean { - + void setName(String name); String getName(); void setAge(int age); @@ -100,7 +100,7 @@ class SimpleBeanImpl implements SimpleBean { private float aFloat; private String name; private String sex; - + public int getAge() { return age; } @@ -136,30 +136,30 @@ class SimpleBeanImpl implements SimpleBean { class ProceedTestingAspect implements Ordered { - + private String lastBeforeStringValue; private String lastAroundStringValue; private float lastBeforeFloatValue; private int order; - + public void setOrder(int order) { this.order = order; } public int getOrder() { return this.order; } - + public Object capitalize(ProceedingJoinPoint pjp, String value) throws Throwable { return pjp.proceed(new Object[] {value.toUpperCase()}); } - + public Object doubleOrQuits(ProceedingJoinPoint pjp) throws Throwable { int value = ((Integer) pjp.getArgs()[0]).intValue(); pjp.getArgs()[0] = new Integer(value * 2); return pjp.proceed(); } - + public Object addOne(ProceedingJoinPoint pjp, Float value) throws Throwable { float fv = value.floatValue(); return pjp.proceed(new Object[] {new Float(fv + 1.0F)}); } - + public void captureStringArgument(JoinPoint tjp, String arg) { if (!tjp.getArgs()[0].equals(arg)) { throw new IllegalStateException( @@ -169,7 +169,7 @@ class ProceedTestingAspect implements Ordered { } this.lastBeforeStringValue = arg; } - + public Object captureStringArgumentInAround(ProceedingJoinPoint pjp, String arg) throws Throwable { if (!pjp.getArgs()[0].equals(arg)) { throw new IllegalStateException( @@ -179,7 +179,7 @@ class ProceedTestingAspect implements Ordered { this.lastAroundStringValue = arg; return pjp.proceed(); } - + public void captureFloatArgument(JoinPoint tjp, float arg) { float tjpArg = ((Float) tjp.getArgs()[0]).floatValue(); if (Math.abs(tjpArg - arg) > 0.000001) { @@ -190,15 +190,15 @@ class ProceedTestingAspect implements Ordered { } this.lastBeforeFloatValue = arg; } - + public String getLastBeforeStringValue() { return this.lastBeforeStringValue; } - + public String getLastAroundStringValue() { return this.lastAroundStringValue; } - + public float getLastBeforeFloatValue() { return this.lastBeforeFloatValue; } 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 39cc9b3486c..bc6a0a1b41f 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 @@ -90,7 +90,7 @@ class JoinPointMonitorAspect { * is sufficient to reproduce the bug. */ private ICounter counter; - + int beforeExecutions; int aroundExecutions; @@ -121,7 +121,7 @@ class JoinPointMonitorAtAspectJAspect { * is sufficient to reproduce the bug. */ private ICounter counter; - + int beforeExecutions; int aroundExecutions; 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 53700685629..93fd2a2b596 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 @@ -22,7 +22,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; /** * See SPR-1682. - * + * * @author Adrian Colyer * @author Chris Beams */ @@ -30,7 +30,7 @@ public final class SharedPointcutWithArgsMismatchTests { private ToBeAdvised toBeAdvised; - + @Before public void setUp() { ClassPathXmlApplicationContext ctx = 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 d587ab8ccf5..bcd1234398d 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 @@ -36,7 +36,7 @@ public final class SubtypeSensitiveMatchingTests { private SerializableFoo serializableBean; private Bar bar; - + @Before public void setUp() { @@ -52,13 +52,13 @@ public final class SubtypeSensitiveMatchingTests { assertTrue("bean with serializable type should be proxied", this.serializableBean instanceof Advised); } - + @Test public void testBeansThatDoNotMatchBasedSolelyOnRuntimeTypeAreNotProxied() { assertFalse("bean with non-serializable type should not be proxied", - this.nonSerializableBean instanceof Advised); + this.nonSerializableBean instanceof Advised); } - + @Test public void testBeansThatDoNotMatchBasedOnOtherTestAreProxied() { assertTrue("bean with args check should be proxied", @@ -73,14 +73,14 @@ interface NonSerializableFoo { void foo(); } interface SerializableFoo extends Serializable { void foo(); } class SubtypeMatchingTestClassA implements NonSerializableFoo { - + public void foo() {} - + } @SuppressWarnings("serial") class SubtypeMatchingTestClassB implements SerializableFoo { - + public void foo() {} } @@ -90,5 +90,5 @@ interface Bar { void bar(Object o); } class SubtypeMatchingTestClassC implements Bar { public void bar(Object o) {} - + } \ No newline at end of file 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 c20e47a55af..f440f0490b0 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 @@ -38,7 +38,7 @@ public final class TargetPointcutSelectionTests { public TestAspect testAspectForTestImpl1; public TestAspect testAspectForAbstractTestImpl; public TestInterceptor testInterceptor; - + @Before public void setUp() { @@ -49,12 +49,12 @@ public final class TargetPointcutSelectionTests { testAspectForTestImpl1 = (TestAspect) ctx.getBean("testAspectForTestImpl1"); testAspectForAbstractTestImpl = (TestAspect) ctx.getBean("testAspectForAbstractTestImpl"); testInterceptor = (TestInterceptor) ctx.getBean("testInterceptor"); - + testAspectForTestImpl1.count = 0; testAspectForAbstractTestImpl.count = 0; testInterceptor.count = 0; } - + @Test public void testTargetSelectionForMatchedType() { testImpl1.interfaceMethod(); @@ -76,7 +76,7 @@ public final class TargetPointcutSelectionTests { public void interfaceMethod(); } - + // Reproducing bug requires that the class specified in target() pointcut doesn't // include the advised method's implementation (instead a base class should include it) @@ -85,7 +85,7 @@ public final class TargetPointcutSelectionTests { public void interfaceMethod() { } } - + public static class TestImpl1 extends AbstractTestImpl { } @@ -98,12 +98,12 @@ public final class TargetPointcutSelectionTests { public static class TestAspect { public int count; - + public void increment() { count++; } } - + public static class TestInterceptor extends TestAspect implements MethodInterceptor { 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 8008dbccfd1..6633bb808ea 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 @@ -34,9 +34,9 @@ public final class ThisAndTargetSelectionOnlyPointcutsAtAspectJTests { public TestInterface testBean; public TestInterface testAnnotatedClassBean; public TestInterface testAnnotatedMethodBean; - + protected Counter counter; - + @org.junit.Before public void setUp() { ClassPathXmlApplicationContext ctx = @@ -89,8 +89,8 @@ public final class ThisAndTargetSelectionOnlyPointcutsAtAspectJTests { testBean.doIt(); assertEquals(1, counter.thisAsInterfaceAndTargetAsInterfaceCounter); } - - + + @Test public void testAtTargetClassAnnotationMatch() { testAnnotatedClassBean.doIt(); @@ -102,7 +102,7 @@ public final class ThisAndTargetSelectionOnlyPointcutsAtAspectJTests { testAnnotatedMethodBean.doIt(); assertEquals(1, counter.atAnnotationMethodAnnotationCounter); } - + public static interface TestInterface { public void doIt(); } @@ -111,12 +111,12 @@ public final class ThisAndTargetSelectionOnlyPointcutsAtAspectJTests { public void doIt() { } } - + @Retention(RetentionPolicy.RUNTIME) public static @interface TestAnnotation { - + } - + @TestAnnotation public static class AnnotatedClassTestImpl implements TestInterface { public void doIt() { @@ -128,7 +128,7 @@ public final class ThisAndTargetSelectionOnlyPointcutsAtAspectJTests { public void doIt() { } } - + @Aspect public static class Counter { int thisAsClassCounter; @@ -140,7 +140,7 @@ public final class ThisAndTargetSelectionOnlyPointcutsAtAspectJTests { int thisAsInterfaceAndTargetAsClassCounter; int atTargetClassAnnotationCounter; int atAnnotationMethodAnnotationCounter; - + public void reset() { thisAsClassCounter = 0; thisAsInterfaceCounter = 0; @@ -152,7 +152,7 @@ public final class ThisAndTargetSelectionOnlyPointcutsAtAspectJTests { atTargetClassAnnotationCounter = 0; atAnnotationMethodAnnotationCounter = 0; } - + @Before("this(org.springframework.aop.aspectj.ThisAndTargetSelectionOnlyPointcutsAtAspectJTests.TestImpl)") public void incrementThisAsClassCounter() { thisAsClassCounter++; @@ -162,7 +162,7 @@ public final class ThisAndTargetSelectionOnlyPointcutsAtAspectJTests { public void incrementThisAsInterfaceCounter() { thisAsInterfaceCounter++; } - + @Before("target(org.springframework.aop.aspectj.ThisAndTargetSelectionOnlyPointcutsAtAspectJTests.TestImpl)") public void incrementTargetAsClassCounter() { targetAsClassCounter++; @@ -184,22 +184,22 @@ public final class ThisAndTargetSelectionOnlyPointcutsAtAspectJTests { public void incrementThisAsInterfaceAndTargetAsInterfaceCounter() { thisAsInterfaceAndTargetAsInterfaceCounter++; } - + @Before("this(org.springframework.aop.aspectj.ThisAndTargetSelectionOnlyPointcutsAtAspectJTests.TestInterface) " + "&& target(org.springframework.aop.aspectj.ThisAndTargetSelectionOnlyPointcutsAtAspectJTests.TestImpl)") public void incrementThisAsInterfaceAndTargetAsClassCounter() { thisAsInterfaceAndTargetAsClassCounter++; } - + @Before("@target(org.springframework.aop.aspectj.ThisAndTargetSelectionOnlyPointcutsAtAspectJTests.TestAnnotation)") public void incrementAtTargetClassAnnotationCounter() { atTargetClassAnnotationCounter++; } - + @Before("@annotation(org.springframework.aop.aspectj.ThisAndTargetSelectionOnlyPointcutsAtAspectJTests.TestAnnotation)") public void incrementAtAnnotationMethodAnnotationCounter() { atAnnotationMethodAnnotationCounter++; } - + } } 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 398046ddb2f..bcd93c0523e 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,9 +27,9 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; * @author Chris Beams */ public final class ThisAndTargetSelectionOnlyPointcutsTests { - + private TestInterface testBean; - + private Counter thisAsClassCounter; private Counter thisAsInterfaceCounter; private Counter targetAsClassCounter; @@ -37,28 +37,28 @@ public final class ThisAndTargetSelectionOnlyPointcutsTests { private Counter thisAsClassAndTargetAsClassCounter; private Counter thisAsInterfaceAndTargetAsInterfaceCounter; private Counter thisAsInterfaceAndTargetAsClassCounter; - + @Before public void setUp() { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass()); testBean = (TestInterface) ctx.getBean("testBean"); - + thisAsClassCounter = (Counter) ctx.getBean("thisAsClassCounter"); thisAsInterfaceCounter = (Counter) ctx.getBean("thisAsInterfaceCounter"); targetAsClassCounter = (Counter) ctx.getBean("targetAsClassCounter"); targetAsInterfaceCounter = (Counter) ctx.getBean("targetAsInterfaceCounter"); - + thisAsClassAndTargetAsClassCounter = (Counter) ctx.getBean("thisAsClassAndTargetAsClassCounter"); thisAsInterfaceAndTargetAsInterfaceCounter = (Counter) ctx.getBean("thisAsInterfaceAndTargetAsInterfaceCounter"); thisAsInterfaceAndTargetAsClassCounter = (Counter) ctx.getBean("thisAsInterfaceAndTargetAsClassCounter"); - + thisAsClassCounter.reset(); thisAsInterfaceCounter.reset(); targetAsClassCounter.reset(); targetAsInterfaceCounter.reset(); - + thisAsClassAndTargetAsClassCounter.reset(); thisAsInterfaceAndTargetAsInterfaceCounter.reset(); thisAsInterfaceAndTargetAsClassCounter.reset(); @@ -105,7 +105,7 @@ public final class ThisAndTargetSelectionOnlyPointcutsTests { testBean.doIt(); assertEquals(1, thisAsInterfaceAndTargetAsInterfaceCounter.getCount()); } - + } diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/_TestTypes.java b/spring-context/src/test/java/org/springframework/aop/aspectj/_TestTypes.java index 3ad14e51d5e..935cf4bd583 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/_TestTypes.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/_TestTypes.java @@ -26,7 +26,7 @@ import org.aspectj.lang.JoinPoint; * intention of reducing the surface area of java files within this * package. This allows developers to think about tests first, and deal * with these second class testing artifacts on an as-needed basis. - * + * * Types here should be defined as package-private top level classes in * order to avoid needing to fully qualify, e.g.: _TestTypes$Foo. * @@ -49,24 +49,24 @@ class AdviceBindingTestAspect { public void setCollaborator(AdviceBindingCollaborator aCollaborator) { this.collaborator = aCollaborator; } - + // "advice" methods public void oneIntArg(int age) { this.collaborator.oneIntArg(age); } - + public void oneObjectArg(Object bean) { this.collaborator.oneObjectArg(bean); } - + public void oneIntAndOneObject(int x, Object o) { this.collaborator.oneIntAndOneObject(x,o); } - + public void needsJoinPoint(JoinPoint tjp) { this.collaborator.needsJoinPoint(tjp.getSignature().getName()); } - + public void needsJoinPointStaticPart(JoinPoint.StaticPart tjpsp) { this.collaborator.needsJoinPointStaticPart(tjpsp.getSignature().getName()); } @@ -108,7 +108,7 @@ interface ICounter { /** * A simple counter for use in simple tests (for example, how many times an advice was executed) - * + * * @author Ramnivas Laddad */ final class Counter implements ICounter { @@ -121,7 +121,7 @@ final class Counter implements ICounter { public void increment() { count++; } - + public void decrement() { count--; } @@ -133,7 +133,7 @@ final class Counter implements ICounter { public void setCount(int counter) { this.count = counter; } - + public void reset() { this.count = 0; } diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AnnotationBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AnnotationBindingTests.java index af3310eaa35..0829446808f 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AnnotationBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AnnotationBindingTests.java @@ -34,7 +34,7 @@ public final class AnnotationBindingTests { public void setUp() { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-context.xml", getClass()); - + testBean = (AnnotatedTestBean) ctx.getBean("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 b2bf8acec7a..925038414ec 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 @@ -36,7 +36,7 @@ public final class AnnotationPointcutTests { public void setUp() { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-context.xml", getClass()); - + testBean = (AnnotatedTestBean) ctx.getBean("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 9507d488916..e88d5ada0b4 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 @@ -36,10 +36,10 @@ public final class AspectImplementingInterfaceTests { public void testProxyCreation() { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-context.xml", getClass()); - + ITestBean testBean = (ITestBean) ctx.getBean("testBean"); AnInterface interfaceExtendingAspect = (AnInterface) ctx.getBean("interfaceExtendingAspect"); - + assertTrue(testBean instanceof Advised); assertFalse(interfaceExtendingAspect instanceof Advised); } 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 9524e6dce3e..227903bab0b 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 @@ -34,7 +34,7 @@ public final class AspectJAutoProxyCreatorAndLazyInitTargetSourceTests { public void testAdrian() { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-context.xml", getClass()); - + ITestBean adrian = (ITestBean) ctx.getBean("adrian"); assertEquals(0, LazyTestBean.instantiations); assertNotNull(adrian); 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 96b55873b7b..9bb9c8d83a3 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 @@ -180,7 +180,7 @@ public final class AspectJAutoProxyCreatorTests { public void testAspectsAndAdvisorAreAppliedEvenIfComingFromParentFactory() { ClassPathXmlApplicationContext ac = newContext("aspectsPlusAdvisor.xml"); GenericApplicationContext childAc = new GenericApplicationContext(ac); - // Create a child factory with a bean that should be woven + // Create a child factory with a bean that should be woven RootBeanDefinition bd = new RootBeanDefinition(TestBean.class); bd.getPropertyValues().addPropertyValue(new PropertyValue("name", "Adrian")) .addPropertyValue(new PropertyValue("age", new Integer(34))); @@ -297,7 +297,7 @@ public final class AspectJAutoProxyCreatorTests { adrian1.getAge(); AdviceUsingThisJoinPoint aspectInstance = (AdviceUsingThisJoinPoint) bf.getBean("aspect"); //(AdviceUsingThisJoinPoint) Aspects.aspectOf(AdviceUsingThisJoinPoint.class); - //assertEquals("method-execution(int TestBean.getAge())",aspectInstance.getLastMethodEntered()); + //assertEquals("method-execution(int TestBean.getAge())",aspectInstance.getLastMethodEntered()); assertTrue(aspectInstance.getLastMethodEntered().indexOf("TestBean.getAge())") != 0); } 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 29867330f83..1868a63a3d0 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 @@ -76,8 +76,8 @@ class AtAspectJAnnotationBindingTestAspect { Object result = pjp.proceed(); return (result instanceof String ? annValue + " " + result : result); } - -} + +} class ResourceArrayFactoryBean implements FactoryBean { diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/_TestTypes.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/_TestTypes.java index 78eede824c6..66897ba62de 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/_TestTypes.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/_TestTypes.java @@ -30,7 +30,7 @@ import org.aspectj.lang.ProceedingJoinPoint; * intention of reducing the surface area of java files within this * package. This allows developers to think about tests first, and deal * with these second class testing artifacts on an as-needed basis. - * + * * Types here should be defined as package-private top level classes in * order to avoid needing to fully qualify, e.g.: _TestTypes$Foo. * 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 5051cac166e..918dd87535b 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 @@ -38,14 +38,14 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.util.StopWatch; /** - * Integration tests for AspectJ auto proxying. Includes mixing with Spring AOP + * Integration tests for AspectJ auto proxying. Includes mixing with Spring AOP * Advisors to demonstrate that existing autoproxying contract is honoured. * * @author Rod Johnson * @author Chris Beams */ public final class BenchmarkTests { - + private static final Class CLASS = BenchmarkTests.class; private static final String ASPECTJ_CONTEXT = CLASS.getSimpleName() + "-aspectj.xml"; @@ -56,27 +56,27 @@ public final class BenchmarkTests { public void testRepeatedAroundAdviceInvocationsWithAspectJ() { testRepeatedAroundAdviceInvocations(ASPECTJ_CONTEXT, getCount(), "AspectJ"); } - + @Test public void testRepeatedAroundAdviceInvocationsWithSpringAop() { testRepeatedAroundAdviceInvocations(SPRING_AOP_CONTEXT, getCount(), "Spring AOP"); } - + @Test public void testRepeatedBeforeAdviceInvocationsWithAspectJ() { testBeforeAdviceWithoutJoinPoint(ASPECTJ_CONTEXT, getCount(), "AspectJ"); } - + @Test public void testRepeatedBeforeAdviceInvocationsWithSpringAop() { testBeforeAdviceWithoutJoinPoint(SPRING_AOP_CONTEXT, getCount(), "Spring AOP"); } - + @Test public void testRepeatedAfterReturningAdviceInvocationsWithAspectJ() { testAfterReturningAdviceWithoutJoinPoint(ASPECTJ_CONTEXT, getCount(), "AspectJ"); } - + @Test public void testRepeatedAfterReturningAdviceInvocationsWithSpringAop() { testAfterReturningAdviceWithoutJoinPoint(SPRING_AOP_CONTEXT, getCount(), "Spring AOP"); @@ -86,12 +86,12 @@ public final class BenchmarkTests { public void testRepeatedMixWithAspectJ() { testMix(ASPECTJ_CONTEXT, getCount(), "AspectJ"); } - + @Test public void testRepeatedMixWithSpringAop() { testMix(SPRING_AOP_CONTEXT, getCount(), "Spring AOP"); } - + /** * Change the return number to a higher number to make this test useful. */ @@ -105,85 +105,85 @@ public final class BenchmarkTests { StopWatch sw = new StopWatch(); sw.start(howmany + " repeated around advice invocations with " + technology); ITestBean adrian = (ITestBean) bf.getBean("adrian"); - + assertTrue(AopUtils.isAopProxy(adrian)); assertEquals(68, adrian.getAge()); - + for (int i = 0; i < howmany; i++) { adrian.getAge(); } - + sw.stop(); System.out.println(sw.prettyPrint()); return sw.getLastTaskTimeMillis(); } - + private long testBeforeAdviceWithoutJoinPoint(String file, int howmany, String technology) { ClassPathXmlApplicationContext bf = new ClassPathXmlApplicationContext(file, CLASS); StopWatch sw = new StopWatch(); sw.start(howmany + " repeated before advice invocations with " + technology); ITestBean adrian = (ITestBean) bf.getBean("adrian"); - + assertTrue(AopUtils.isAopProxy(adrian)); Advised a = (Advised) adrian; assertTrue(a.getAdvisors().length >= 3); assertEquals("adrian", adrian.getName()); - + for (int i = 0; i < howmany; i++) { adrian.getName(); } - + sw.stop(); System.out.println(sw.prettyPrint()); return sw.getLastTaskTimeMillis(); } - + private long testAfterReturningAdviceWithoutJoinPoint(String file, int howmany, String technology) { ClassPathXmlApplicationContext bf = new ClassPathXmlApplicationContext(file, CLASS); StopWatch sw = new StopWatch(); sw.start(howmany + " repeated after returning advice invocations with " + technology); ITestBean adrian = (ITestBean) bf.getBean("adrian"); - + assertTrue(AopUtils.isAopProxy(adrian)); Advised a = (Advised) adrian; assertTrue(a.getAdvisors().length >= 3); // Hits joinpoint adrian.setAge(25); - + for (int i = 0; i < howmany; i++) { adrian.setAge(i); } - + sw.stop(); System.out.println(sw.prettyPrint()); return sw.getLastTaskTimeMillis(); } - + private long testMix(String file, int howmany, String technology) { ClassPathXmlApplicationContext bf = new ClassPathXmlApplicationContext(file, CLASS); StopWatch sw = new StopWatch(); sw.start(howmany + " repeated mixed invocations with " + technology); ITestBean adrian = (ITestBean) bf.getBean("adrian"); - + assertTrue(AopUtils.isAopProxy(adrian)); Advised a = (Advised) adrian; assertTrue(a.getAdvisors().length >= 3); - + for (int i = 0; i < howmany; i++) { // Hit all 3 joinpoints adrian.getAge(); adrian.getName(); adrian.setAge(i); - + // Invoke three non-advised methods adrian.getDoctor(); adrian.getLawyer(); adrian.getSpouse(); } - + sw.stop(); System.out.println(sw.prettyPrint()); return sw.getLastTaskTimeMillis(); @@ -193,19 +193,19 @@ public final class BenchmarkTests { class MultiplyReturnValueInterceptor implements MethodInterceptor { - + private int multiple = 2; - + public int invocations; - + public void setMultiple(int multiple) { this.multiple = multiple; } - + public int getMultiple() { return this.multiple; } - + public Object invoke(MethodInvocation mi) throws Throwable { ++invocations; int result = (Integer) mi.proceed(); @@ -216,13 +216,13 @@ class MultiplyReturnValueInterceptor implements MethodInterceptor { class TraceAfterReturningAdvice implements AfterReturningAdvice { - + public int afterTakesInt; - + public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable { ++afterTakesInt; } - + public static Advisor advisor() { return new DefaultPointcutAdvisor( new StaticMethodMatcherPointcut() { @@ -239,16 +239,16 @@ class TraceAfterReturningAdvice implements AfterReturningAdvice { @Aspect class TraceAspect { - + public int beforeStringReturn; - + public int afterTakesInt; - + @Before("execution(String *.*(..))") public void traceWithoutJoinPoint() { ++beforeStringReturn; } - + @AfterReturning("execution(void *.*(int))") public void traceWithoutJoinPoint2() { ++afterTakesInt; @@ -258,13 +258,13 @@ class TraceAspect { class TraceBeforeAdvice implements MethodBeforeAdvice { - + public int beforeStringReturn; - + public void before(Method method, Object[] args, Object target) throws Throwable { ++beforeStringReturn; } - + public static Advisor advisor() { return new DefaultPointcutAdvisor( new StaticMethodMatcherPointcut() { 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 e2e6b5270ff..17e5943b3a0 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 @@ -34,14 +34,14 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; public final class SPR3064Tests { private Service service; - + @Test public void testServiceIsAdvised() { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass()); - + service = (Service) ctx.getBean("service"); - + try { this.service.serveMe(); fail("service operation has not been advised by transaction interceptor"); @@ -50,7 +50,7 @@ public final class SPR3064Tests { assertEquals("advice invoked",ex.getMessage()); } } - + } @@ -62,7 +62,7 @@ public final class SPR3064Tests { @Aspect class TransactionInterceptor { - + @Around(value="execution(* *..Service.*(..)) && @annotation(transaction)") public Object around(ProceedingJoinPoint pjp, Transaction transaction) throws Throwable { throw new RuntimeException("advice invoked"); @@ -73,7 +73,7 @@ class TransactionInterceptor { interface Service { - + void serveMe(); } 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 8e2d35d9d2e..336523137ae 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 @@ -51,10 +51,10 @@ public final class AfterReturningGenericTypeMatchingTests { public void setUp() { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-context.xml", getClass()); - + counterAspect = (CounterAspect) ctx.getBean("counterAspect"); counterAspect.reset(); - + testBean = (GenericReturnTypeVariationClass) ctx.getBean("testBean"); } diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericBridgeMethodMatchingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericBridgeMethodMatchingTests.java index ce7790ab768..b8c85fbef33 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericBridgeMethodMatchingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/generic/GenericBridgeMethodMatchingTests.java @@ -50,10 +50,10 @@ public class GenericBridgeMethodMatchingTests { public void setUp() { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-context.xml", getClass()); - + counterAspect = (GenericCounterAspect) ctx.getBean("counterAspect"); counterAspect.count = 0; - + testBean = (DerivedInterface) ctx.getBean("testBean"); } 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 011095b95db..6260e98b061 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 @@ -45,14 +45,14 @@ public final class GenericParameterMatchingTests { public void setUp() { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-context.xml", getClass()); - + counterAspect = (CounterAspect) ctx.getBean("counterAspect"); counterAspect.reset(); - + testBean = (GenericInterface) ctx.getBean("testBean"); } - + @Test public void testGenericInterfaceGenericArgExecution() { testBean.save(""); @@ -64,7 +64,7 @@ public final class GenericParameterMatchingTests { testBean.saveAll(null); assertEquals(1, counterAspect.genericInterfaceGenericCollectionArgExecutionCount); } - + @Test public void testGenericInterfaceSubtypeGenericCollectionArgExecution() { testBean.saveAll(null); @@ -96,21 +96,21 @@ public final class GenericParameterMatchingTests { int genericInterfaceGenericArgExecutionCount; int genericInterfaceGenericCollectionArgExecutionCount; int genericInterfaceSubtypeGenericCollectionArgExecutionCount; - + public void reset() { genericInterfaceGenericArgExecutionCount = 0; genericInterfaceGenericCollectionArgExecutionCount = 0; genericInterfaceSubtypeGenericCollectionArgExecutionCount = 0; } - + @Pointcut("execution(* org.springframework.aop.aspectj.generic.GenericParameterMatchingTests.GenericInterface.save(..))") - public void genericInterfaceGenericArgExecution() {} - + public void genericInterfaceGenericArgExecution() {} + @Pointcut("execution(* org.springframework.aop.aspectj.generic.GenericParameterMatchingTests.GenericInterface.saveAll(..))") - public void GenericInterfaceGenericCollectionArgExecution() {} + public void GenericInterfaceGenericCollectionArgExecution() {} @Pointcut("execution(* org.springframework.aop.aspectj.generic.GenericParameterMatchingTests.GenericInterface+.saveAll(..))") - public void genericInterfaceSubtypeGenericCollectionArgExecution() {} + public void genericInterfaceSubtypeGenericCollectionArgExecution() {} @Before("genericInterfaceGenericArgExecution()") public void incrementGenericInterfaceGenericArgExecution() { 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 01ffc09ec77..f2c174522bd 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 @@ -33,7 +33,7 @@ public final class AopNamespaceHandlerAdviceTypeTests { public void testParsingOfAdviceTypes() { new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-ok.xml", getClass()); } - + @Test public void testParsingOfAdviceTypesWithError() { try { 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 030d2539e2e..453040fe3d0 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 @@ -32,7 +32,7 @@ public final class AopNamespaceHandlerArgNamesTests { public void testArgNamesOK() { new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-ok.xml", getClass()); } - + @Test public void testArgNamesError() { try { 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 3e1d3f0a47f..f7f4d3e8123 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 @@ -33,7 +33,7 @@ public final class AopNamespaceHandlerReturningTests { public void testReturningOnReturningAdvice() { new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-ok.xml", getClass()); } - + @Test public void testParseReturningOnOtherAdviceType() { try { diff --git a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java index 14620bafaa3..09d3dacd844 100644 --- a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java +++ b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java @@ -33,7 +33,7 @@ import static org.junit.Assert.*; /** * Unit tests for aop namespace. - * + * * @author Rob Harrop * @author Chris Beams */ @@ -41,7 +41,7 @@ public class AopNamespaceHandlerTests { private ApplicationContext context; - + @Before public void setUp() { this.context = @@ -149,7 +149,7 @@ class CountingAspectJAdvice { this.aroundCount++; pjp.proceed(); } - + public void myAfterReturningAdvice(int age) { this.afterCount++; } @@ -157,11 +157,11 @@ class CountingAspectJAdvice { public void myAfterThrowingAdvice(RuntimeException ex) { this.afterCount++; } - + public void mySetAgeAdvice(int newAge, ITestBean bean) { // no-op } - + public int getBeforeCount() { return this.beforeCount; } 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 7533dc41966..dcb1d9c3830 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 @@ -33,7 +33,7 @@ public final class AopNamespaceHandlerThrowingTests { public void testThrowingOnThrowingAdvice() { new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-ok.xml", getClass()); } - + @Test public void testParseThrowingOnOtherAdviceType() { try { 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 2a469823c93..26c0f0cd3fe 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 @@ -35,15 +35,15 @@ public final class MethodLocatingFactoryBeanTests { private static final String BEAN_NAME = "string"; private MethodLocatingFactoryBean factory; private BeanFactory beanFactory; - + @Before public void setUp() { factory = new MethodLocatingFactoryBean(); - + // methods must set up expectations and call replay() manually for this mock beanFactory = createMock(BeanFactory.class); } - + @After public void tearDown() { verify(beanFactory); @@ -64,7 +64,7 @@ public final class MethodLocatingFactoryBeanTests { @Test(expected=IllegalArgumentException.class) public void testWithNullTargetBeanName() { replay(beanFactory); - + factory.setMethodName("toString()"); factory.setBeanFactory(beanFactory); } @@ -72,7 +72,7 @@ public final class MethodLocatingFactoryBeanTests { @Test(expected=IllegalArgumentException.class) public void testWithEmptyTargetBeanName() { replay(beanFactory); - + factory.setTargetBeanName(""); factory.setMethodName("toString()"); factory.setBeanFactory(beanFactory); @@ -81,7 +81,7 @@ public final class MethodLocatingFactoryBeanTests { @Test(expected=IllegalArgumentException.class) public void testWithNullTargetMethodName() { replay(beanFactory); - + factory.setTargetBeanName(BEAN_NAME); factory.setBeanFactory(beanFactory); } @@ -89,7 +89,7 @@ public final class MethodLocatingFactoryBeanTests { @Test(expected=IllegalArgumentException.class) public void testWithEmptyTargetMethodName() { replay(beanFactory); - + factory.setTargetBeanName(BEAN_NAME); factory.setMethodName(""); factory.setBeanFactory(beanFactory); @@ -99,7 +99,7 @@ public final class MethodLocatingFactoryBeanTests { public void testWhenTargetBeanClassCannotBeResolved() { expect(beanFactory.getType(BEAN_NAME)).andReturn(null); replay(beanFactory); - + factory.setTargetBeanName(BEAN_NAME); factory.setMethodName("toString()"); factory.setBeanFactory(beanFactory); @@ -109,7 +109,7 @@ public final class MethodLocatingFactoryBeanTests { public void testSunnyDayPath() throws Exception { expect((Class) beanFactory.getType(BEAN_NAME)).andReturn(String.class); replay(beanFactory); - + factory.setTargetBeanName(BEAN_NAME); factory.setMethodName("toString()"); factory.setBeanFactory(beanFactory); @@ -124,7 +124,7 @@ public final class MethodLocatingFactoryBeanTests { public void testWhereMethodCannotBeResolved() { expect((Class) beanFactory.getType(BEAN_NAME)).andReturn(String.class); replay(beanFactory); - + factory.setTargetBeanName(BEAN_NAME); factory.setMethodName("loadOfOld()"); factory.setBeanFactory(beanFactory); diff --git a/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java index 622805857d1..ea2b39088c1 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java @@ -797,7 +797,7 @@ public abstract class AbstractAopProxyTests { } /** - * Note that an introduction can't throw an unexpected checked exception, + * Note that an introduction can't throw an unexpected checked exception, * as it's constained by the interface. */ @Test @@ -1268,8 +1268,8 @@ public abstract class AbstractAopProxyTests { return target; } - public void releaseTarget(Object target) throws Exception { - } + public void releaseTarget(Object target) throws Exception { + } }); // Just test anything: it will fail if context wasn't found @@ -1422,7 +1422,7 @@ public abstract class AbstractAopProxyTests { } assertEquals(6, cca.getCalls()); } - + @Test public void testBeforeAdviceThrowsException() { final RuntimeException rex = new RuntimeException(); @@ -1909,31 +1909,31 @@ public abstract class AbstractAopProxyTests { } } - + @SuppressWarnings("serial") public static class CountingMultiAdvice extends MethodCounter implements MethodBeforeAdvice, AfterReturningAdvice, ThrowsAdvice { - + public void before(Method m, Object[] args, Object target) throws Throwable { count(m); } - + public void afterReturning(Object o, Method m, Object[] args, Object target) throws Throwable { count(m); } - + public void afterThrowing(IOException ex) throws Throwable { count(IOException.class.getName()); } - + public void afterThrowing(UncheckedException ex) throws Throwable { count(UncheckedException.class.getName()); } - + } - - + + @SuppressWarnings("serial") public static class CountingThrowsAdvice extends MethodCounter implements ThrowsAdvice { @@ -1946,36 +1946,36 @@ public abstract class AbstractAopProxyTests { } } - + @SuppressWarnings("serial") static class UncheckedException extends RuntimeException { - + } - + @SuppressWarnings("serial") static class SpecializedUncheckedException extends UncheckedException { public SpecializedUncheckedException(String string, SQLException exception) { } - + } - - + + static class MockTargetSource implements TargetSource { - + private Object target; - + public int gets; - + public int releases; - + public void reset() { this.target = null; gets = releases = 0; } - + public void setTarget(Object target) { this.target = target; } @@ -2003,7 +2003,7 @@ public abstract class AbstractAopProxyTests { throw new RuntimeException("Released wrong target"); ++releases; } - + /** * Check that gets and releases match * @@ -2021,8 +2021,8 @@ public abstract class AbstractAopProxyTests { } } - - + + static abstract class ExposedInvocationTestBean extends TestBean { public String getName() { @@ -2036,18 +2036,18 @@ public abstract class AbstractAopProxyTests { assertions(invocation); super.absquatulate(); } - + protected abstract void assertions(MethodInvocation invocation); } - - + + static class InvocationCheckExposedInvocationTestBean extends ExposedInvocationTestBean { protected void assertions(MethodInvocation invocation) { TestCase.assertTrue(invocation.getThis() == this); - TestCase.assertTrue("Invocation should be on ITestBean: " + invocation.getMethod(), + TestCase.assertTrue("Invocation should be on ITestBean: " + invocation.getMethod(), ITestBean.class.isAssignableFrom(invocation.getMethod().getDeclaringClass())); } } - + } diff --git a/spring-context/src/test/java/org/springframework/aop/framework/CglibProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/CglibProxyTests.java index 8a2106c58fd..a1abd8e2fe8 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/CglibProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/CglibProxyTests.java @@ -227,7 +227,7 @@ public final class CglibProxyTests extends AbstractAopProxyTests implements Seri return (ITestBean) pf.getProxy(); } - + @Test public void testMultipleProxiesForIntroductionAdvisor() { TestBean target = new TestBean(); @@ -243,7 +243,7 @@ public final class CglibProxyTests extends AbstractAopProxyTests implements Seri private ITestBean getIntroductionAdvisorProxy(TestBean target) { ProxyFactory pf = new ProxyFactory(new Class[]{ITestBean.class}); pf.setProxyTargetClass(true); - + pf.addAdvisor(new LockMixinAdvisor()); pf.setTarget(target); pf.setFrozen(true); @@ -462,15 +462,15 @@ class CglibTestBean { class NoArgCtorTestBean { private boolean called = false; - + public NoArgCtorTestBean(String x, int y) { called = true; } - + public boolean wasCalled() { return called; } - + public void reset() { called = false; } diff --git a/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java index 2e394ed68f7..422517273f6 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java @@ -48,16 +48,16 @@ public final class JdkDynamicProxyTests extends AbstractAopProxyTests implements assertTrue("Should be a JDK proxy: " + proxy.getClass(), AopUtils.isJdkDynamicProxy(proxy)); return proxy; } - + protected AopProxy createAopProxy(AdvisedSupport as) { return new JdkDynamicAopProxy(as); } - + public void testNullConfig() { try { new JdkDynamicAopProxy(null); fail("Shouldn't allow null interceptors"); - } + } catch (IllegalArgumentException ex) { // Ok } @@ -91,16 +91,16 @@ public final class JdkDynamicProxyTests extends AbstractAopProxyTests implements assertTrue("correct return value", tb.getAge() == age); verify(mi); } - + public void testTargetCanGetInvocationWithPrivateClass() throws Throwable { final ExposedInvocationTestBean expectedTarget = new ExposedInvocationTestBean() { protected void assertions(MethodInvocation invocation) { assertTrue(invocation.getThis() == this); - assertTrue("Invocation should be on ITestBean: " + invocation.getMethod(), + assertTrue("Invocation should be on ITestBean: " + invocation.getMethod(), invocation.getMethod().getDeclaringClass() == ITestBean.class); } }; - + AdvisedSupport pc = new AdvisedSupport(new Class[] { ITestBean.class, IOther.class }); pc.addAdvice(ExposeInvocationInterceptor.INSTANCE); TrapTargetInterceptor tii = new TrapTargetInterceptor() { @@ -118,7 +118,7 @@ public final class JdkDynamicProxyTests extends AbstractAopProxyTests implements tb.getName(); // Not safe to trap invocation //assertTrue(tii.invocation == target.invocation); - + //assertTrue(target.invocation.getProxy() == tb); // ((IOther) tb).absquatulate(); 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 45d575bb4ae..ff3e33442e8 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 @@ -71,10 +71,10 @@ import test.beans.SideEffectBean; * @author Chris Beams */ public final class ProxyFactoryBeanTests { - + private static final Class CLASS = ProxyFactoryBeanTests.class; private static final String CLASSNAME = CLASS.getSimpleName(); - + private static final String CONTEXT = CLASSNAME + "-context.xml"; private static final String SERIALIZATION_CONTEXT = CLASSNAME + "-serialization.xml"; private static final String AUTOWIRING_CONTEXT = CLASSNAME + "-autowiring.xml"; @@ -86,7 +86,7 @@ public final class ProxyFactoryBeanTests { private static final String PROTOTYPE_CONTEXT = CLASSNAME + "-prototype.xml"; private static final String THROWS_ADVICE_CONTEXT = CLASSNAME + "-throws-advice.xml"; private static final String INNER_BEAN_TARGET_CONTEXT = CLASSNAME + "-inner-bean-target.xml"; - + private BeanFactory factory; @Before @@ -243,7 +243,7 @@ public final class ProxyFactoryBeanTests { * be a prototype */ private Object testPrototypeInstancesAreIndependent(String beanName) { - // Initial count value set in bean factory XML + // Initial count value set in bean factory XML int INITIAL_COUNT = 10; BeanFactory bf = new XmlBeanFactory(new ClassPathResource(PROTOTYPE_CONTEXT, CLASS)); @@ -301,7 +301,7 @@ public final class ProxyFactoryBeanTests { assertTrue("Has correct object type", ITestBean.class.isAssignableFrom(factory.getType("test1"))); ITestBean tb = (ITestBean) factory.getBean("test1"); - // no exception + // no exception tb.hashCode(); final Exception ex = new UnsupportedOperationException("invoke"); @@ -313,12 +313,12 @@ public final class ProxyFactoryBeanTests { }); assertEquals("Have correct advisor count", 2, config.getAdvisors().length); - tb = (ITestBean) factory.getBean("test1"); + tb = (ITestBean) factory.getBean("test1"); try { // Will fail now tb.toString(); fail("Evil interceptor added programmatically should fail all method calls"); - } + } catch (Exception thrown) { assertTrue(thrown == ex); } @@ -570,7 +570,7 @@ public final class ProxyFactoryBeanTests { // Remove offending interceptor... assertTrue(((Advised) p).removeAdvice(nop)); - assertTrue("Serializable again because offending interceptor was removed", SerializationTestUtils.isSerializable(p)); + assertTrue("Serializable again because offending interceptor was removed", SerializationTestUtils.isSerializable(p)); } @Test @@ -728,7 +728,7 @@ public final class ProxyFactoryBeanTests { /** - * Use as a global interceptor. Checks that + * Use as a global interceptor. Checks that * global interceptors can add aspect interfaces. * NB: Add only via global interceptors in XML file. */ diff --git a/spring-context/src/test/java/org/springframework/aop/framework/_TestTypes.java b/spring-context/src/test/java/org/springframework/aop/framework/_TestTypes.java index ea9f35a7889..216510950ed 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/_TestTypes.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/_TestTypes.java @@ -8,7 +8,7 @@ package org.springframework.aop.framework; * intention of reducing the surface area of java files within this * package. This allows developers to think about tests first, and deal * with these second class testing artifacts on an as-needed basis. - * + * * Types here should be defined as package-private top level classes in * order to avoid needing to fully qualify, e.g.: _TestTypes$Foo. * @@ -26,7 +26,7 @@ interface IEcho { class Echo implements IEcho { private int a; - + public int echoException(int i, Throwable t) throws Throwable { if (t != null) throw t; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java index 675c2c79af6..478a68aafdd 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java @@ -40,7 +40,7 @@ import test.mixin.Lockable; /** * Tests for auto proxy creation by advisor recognition. - * + * * @see org.springframework.aop.framework.autoproxy.AdvisorAutoProxyCreatorIntegrationTests; * * @author Rod Johnson @@ -51,7 +51,7 @@ public final class AdvisorAutoProxyCreatorTests { private static final Class CLASS = AdvisorAutoProxyCreatorTests.class; private static final String CLASSNAME = CLASS.getSimpleName(); - + private static final String DEFAULT_CONTEXT = CLASSNAME + "-context.xml"; private static final String COMMON_INTERCEPTORS_CONTEXT = CLASSNAME + "-common-interceptors.xml"; private static final String CUSTOM_TARGETSOURCE_CONTEXT = CLASSNAME + "-custom-targetsource.xml"; @@ -85,7 +85,7 @@ public final class AdvisorAutoProxyCreatorTests { ITestBean test2 = (ITestBean) bf.getBean("test2"); Lockable lockable2 = (Lockable) test2; - + // Locking should be independent; nop is shared assertFalse(lockable1.locked()); assertFalse(lockable2.locked()); @@ -151,7 +151,7 @@ public final class AdvisorAutoProxyCreatorTests { assertEquals("Rod", test.getName()); // Check that references survived pooling assertEquals("Kerry", test.getSpouse().getName()); - + // Now test the pooled one test = (ITestBean) bf.getBean(":test"); assertTrue(AopUtils.isAopProxy(test)); @@ -160,7 +160,7 @@ public final class AdvisorAutoProxyCreatorTests { assertEquals("Rod", test.getName()); // Check that references survived pooling assertEquals("Kerry", test.getSpouse().getName()); - + // Now test the ThreadLocal one test = (ITestBean) bf.getBean("%test"); assertTrue(AopUtils.isAopProxy(test)); @@ -169,7 +169,7 @@ public final class AdvisorAutoProxyCreatorTests { assertEquals("Rod", test.getName()); // Check that references survived pooling assertEquals("Kerry", test.getSpouse().getName()); - + // Now test the Prototype TargetSource test = (ITestBean) bf.getBean("!test"); assertTrue(AopUtils.isAopProxy(test)); @@ -186,7 +186,7 @@ public final class AdvisorAutoProxyCreatorTests { assertEquals("Kerry", test2.getSpouse().getName()); bf.close(); } - + @Test public void testWithOptimizedProxy() throws Exception { BeanFactory beanFactory = new ClassPathXmlApplicationContext(OPTIMIZED_CONTEXT, CLASS); diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java index 93a4b20b322..0b8f9a15cd2 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java @@ -85,7 +85,7 @@ public class BeanNameAutoProxyCreatorTests { assertEquals(age, tb.getAge()); assertTrue("Introduction was made", tb instanceof TimeStamped); assertEquals(0, ((TimeStamped) tb).getTimeStamp()); - assertEquals(3, nop.getCount()); + assertEquals(3, nop.getCount()); assertEquals("introductionUsingJdk", tb.getName()); ITestBean tb2 = (ITestBean) beanFactory.getBean("second-introductionUsingJdk"); @@ -124,10 +124,10 @@ public class BeanNameAutoProxyCreatorTests { assertEquals(age, tb.getAge()); assertTrue("Introduction was made", tb instanceof TimeStamped); assertEquals(0, ((TimeStamped) tb).getTimeStamp()); - assertEquals(3, nop.getCount()); - + assertEquals(3, nop.getCount()); + ITestBean tb2 = (ITestBean) beanFactory.getBean("second-introductionUsingJdk"); - + // Check two per-instance mixins were distinct Lockable lockable1 = (Lockable) tb; Lockable lockable2 = (Lockable) tb2; @@ -194,7 +194,7 @@ public class BeanNameAutoProxyCreatorTests { tb.setAge(age); assertEquals(age, tb.getAge()); assertEquals(2, nop.getCount()); - assertEquals(2, cba.getCalls()); + assertEquals(2, cba.getCalls()); } } diff --git a/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java b/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java index 8c3cfa094b1..6448a2d82bc 100644 --- a/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java @@ -39,10 +39,10 @@ import org.springframework.util.SerializationTestUtils; * @author Chris Beams */ public class ScopedProxyTests { - + private static final Class CLASS = ScopedProxyTests.class; private static final String CLASSNAME = CLASS.getSimpleName(); - + private static final ClassPathResource LIST_CONTEXT = new ClassPathResource(CLASSNAME + "-list.xml", CLASS); private static final ClassPathResource MAP_CONTEXT = new ClassPathResource(CLASSNAME + "-map.xml", CLASS); private static final ClassPathResource OVERRIDE_CONTEXT = new ClassPathResource(CLASSNAME + "-override.xml", CLASS); diff --git a/spring-context/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceTests.java b/spring-context/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceTests.java index 1cada3e6d8b..cf6e0789b6e 100644 --- a/spring-context/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/target/CommonsPoolTargetSourceTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/org/springframework/beans/INestedTestBean.java b/spring-context/src/test/java/org/springframework/beans/INestedTestBean.java index 7d87547b5f7..c5c4ed5e679 100644 --- a/spring-context/src/test/java/org/springframework/beans/INestedTestBean.java +++ b/spring-context/src/test/java/org/springframework/beans/INestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/org/springframework/beans/IOther.java b/spring-context/src/test/java/org/springframework/beans/IOther.java index 797486ec44e..6a8f74187cb 100644 --- a/spring-context/src/test/java/org/springframework/beans/IOther.java +++ b/spring-context/src/test/java/org/springframework/beans/IOther.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/org/springframework/beans/NestedTestBean.java b/spring-context/src/test/java/org/springframework/beans/NestedTestBean.java index a06e15d150b..0eb8df5c8ae 100644 --- a/spring-context/src/test/java/org/springframework/beans/NestedTestBean.java +++ b/spring-context/src/test/java/org/springframework/beans/NestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/org/springframework/beans/Person.java b/spring-context/src/test/java/org/springframework/beans/Person.java index 3ebce5e2ea0..a78998ad5d4 100644 --- a/spring-context/src/test/java/org/springframework/beans/Person.java +++ b/spring-context/src/test/java/org/springframework/beans/Person.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/org/springframework/beans/SerializablePerson.java b/spring-context/src/test/java/org/springframework/beans/SerializablePerson.java index 36351352aab..34d05120aaa 100644 --- a/spring-context/src/test/java/org/springframework/beans/SerializablePerson.java +++ b/spring-context/src/test/java/org/springframework/beans/SerializablePerson.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/org/springframework/beans/factory/DummyFactory.java b/spring-context/src/test/java/org/springframework/beans/factory/DummyFactory.java index 020e683d7d8..c5ee4d060b7 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/DummyFactory.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/DummyFactory.java @@ -33,7 +33,7 @@ import org.springframework.beans.factory.config.AutowireCapableBeanFactory; */ public class DummyFactory implements FactoryBean, BeanNameAware, BeanFactoryAware, InitializingBean, DisposableBean { - + public static final String SINGLETON_NAME = "Factory singleton"; private static boolean prototypeCreated; @@ -125,7 +125,7 @@ public class DummyFactory } this.initialized = true; } - + /** * Was this initialized by invocation of the * afterPropertiesSet() method from the InitializingBean interface? diff --git a/spring-context/src/test/java/org/springframework/beans/factory/HasMap.java b/spring-context/src/test/java/org/springframework/beans/factory/HasMap.java index 3bac49498b5..361746b32a2 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/HasMap.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/HasMap.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -27,17 +27,17 @@ import java.util.Set; * @since 05.06.2003 */ public class HasMap { - + private Map map; private Set set; private Properties props; - + private Object[] objectArray; - + private Class[] classArray; - + private Integer[] intArray; private HasMap() { diff --git a/spring-context/src/test/java/org/springframework/beans/factory/MustBeInitialized.java b/spring-context/src/test/java/org/springframework/beans/factory/MustBeInitialized.java index 1dedf6624c2..1dcc1aaf72d 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/MustBeInitialized.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/MustBeInitialized.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,15 +23,15 @@ package org.springframework.beans.factory; */ public class MustBeInitialized implements InitializingBean { - private boolean inited; - + private boolean inited; + /** * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() */ public void afterPropertiesSet() throws Exception { this.inited = true; } - + /** * Dummy business method that will fail unless the factory * managed the bean's lifecycle correctly diff --git a/spring-context/src/test/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocatorTests.java b/spring-context/src/test/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocatorTests.java index 9bdca2165cd..0e8a09a5a78 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocatorTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/access/SingletonBeanFactoryLocatorTests.java @@ -32,7 +32,7 @@ public class SingletonBeanFactoryLocatorTests { public void testBasicFunctionality() { SingletonBeanFactoryLocator facLoc = new SingletonBeanFactoryLocator( "classpath*:" + ClassUtils.addResourcePathToPackagePath(getClass(), "ref1.xml")); - + basicFunctionalityTest(facLoc); } @@ -75,7 +75,7 @@ public class SingletonBeanFactoryLocatorTests { BeanFactoryLocator facLoc = SingletonBeanFactoryLocator.getInstance( ClassUtils.addResourcePathToPackagePath(getClass(), "ref1.xml")); getInstanceTest1(facLoc); - + facLoc = SingletonBeanFactoryLocator.getInstance( "classpath*:/" + ClassUtils.addResourcePathToPackagePath(getClass(), "ref1.xml")); getInstanceTest2(facLoc); @@ -84,7 +84,7 @@ public class SingletonBeanFactoryLocatorTests { facLoc = SingletonBeanFactoryLocator.getInstance( "classpath:" + ClassUtils.addResourcePathToPackagePath(getClass(), "ref1.xml")); getInstanceTest3(facLoc); - + } /** @@ -103,12 +103,12 @@ public class SingletonBeanFactoryLocatorTests { fac = bfr3.getFactory(); tb = (TestBean) fac.getBean("beans1.bean1"); assertTrue(tb.getName().equals("was beans1.bean1")); - + BeanFactoryReference bfr4 = facLoc.useBeanFactory("a.qualified.name.which.is.an.alias"); fac = bfr4.getFactory(); tb = (TestBean) fac.getBean("beans1.bean1"); assertTrue(tb.getName().equals("was beans1.bean1")); - + bfr.release(); bfr3.release(); bfr2.release(); @@ -146,7 +146,7 @@ public class SingletonBeanFactoryLocatorTests { bfr4.release(); bfr3.release(); } - + /** * Worker method so subclass can use it too */ diff --git a/spring-context/src/test/java/org/springframework/beans/factory/access/TestBean.java b/spring-context/src/test/java/org/springframework/beans/factory/access/TestBean.java index eaf1d5ec0b0..3a77af2f711 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/access/TestBean.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/access/TestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,7 @@ import java.util.List; /** * Scrap bean for use in tests. - * + * * @author Colin Sampaleanu */ public class TestBean { diff --git a/spring-context/src/test/java/org/springframework/beans/factory/support/InjectAnnotationAutowireContextTests.java b/spring-context/src/test/java/org/springframework/beans/factory/support/InjectAnnotationAutowireContextTests.java index 92921dbfb19..4a32d4582cf 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/support/InjectAnnotationAutowireContextTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/support/InjectAnnotationAutowireContextTests.java @@ -43,7 +43,7 @@ import org.springframework.context.support.GenericApplicationContext; * @since 3.0 */ public class InjectAnnotationAutowireContextTests { - + private static final String JUERGEN = "juergen"; private static final String MARK = "mark"; @@ -56,7 +56,7 @@ public class InjectAnnotationAutowireContextTests { cavs.addGenericArgumentValue(JUERGEN); RootBeanDefinition person = new RootBeanDefinition(Person.class, cavs, null); context.registerBeanDefinition(JUERGEN, person); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -76,7 +76,7 @@ public class InjectAnnotationAutowireContextTests { cavs.addGenericArgumentValue(JUERGEN); RootBeanDefinition person = new RootBeanDefinition(Person.class, cavs, null); context.registerBeanDefinition(JUERGEN, person); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedMethodParameterTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -96,7 +96,7 @@ public class InjectAnnotationAutowireContextTests { cavs.addGenericArgumentValue(JUERGEN); RootBeanDefinition person = new RootBeanDefinition(Person.class, cavs, null); context.registerBeanDefinition(JUERGEN, person); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedConstructorArgumentTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -132,11 +132,11 @@ public class InjectAnnotationAutowireContextTests { RootBeanDefinition person = new RootBeanDefinition(Person.class, cavs, null); person.addQualifier(new AutowireCandidateQualifier(TestQualifier.class)); context.registerBeanDefinition(JUERGEN, person); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedMethodParameterTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedMethodParameterTestBean bean = + QualifiedMethodParameterTestBean bean = (QualifiedMethodParameterTestBean) context.getBean("autowired"); assertEquals(JUERGEN, bean.getPerson().getName()); } @@ -186,11 +186,11 @@ public class InjectAnnotationAutowireContextTests { RootBeanDefinition person = new RootBeanDefinition(Person.class, cavs, null); person.addQualifier(new AutowireCandidateQualifier(TestQualifier.class)); context.registerBeanDefinition(JUERGEN, person); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedConstructorArgumentTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedConstructorArgumentTestBean bean = + QualifiedConstructorArgumentTestBean bean = (QualifiedConstructorArgumentTestBean) context.getBean("autowired"); assertEquals(JUERGEN, bean.getPerson().getName()); } @@ -206,7 +206,7 @@ public class InjectAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -230,7 +230,7 @@ public class InjectAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedMethodParameterTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -254,7 +254,7 @@ public class InjectAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedConstructorArgumentTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -279,7 +279,7 @@ public class InjectAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); @@ -299,11 +299,11 @@ public class InjectAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedMethodParameterTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedMethodParameterTestBean bean = + QualifiedMethodParameterTestBean bean = (QualifiedMethodParameterTestBean) context.getBean("autowired"); assertEquals(JUERGEN, bean.getPerson().getName()); } @@ -320,11 +320,11 @@ public class InjectAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedConstructorArgumentTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedConstructorArgumentTestBean bean = + QualifiedConstructorArgumentTestBean bean = (QualifiedConstructorArgumentTestBean) context.getBean("autowired"); assertEquals(JUERGEN, bean.getPerson().getName()); } @@ -342,11 +342,11 @@ public class InjectAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithDefaultValueTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedFieldWithDefaultValueTestBean bean = + QualifiedFieldWithDefaultValueTestBean bean = (QualifiedFieldWithDefaultValueTestBean) context.getBean("autowired"); assertEquals(JUERGEN, bean.getPerson().getName()); } @@ -364,7 +364,7 @@ public class InjectAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithDefaultValueTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -390,11 +390,11 @@ public class InjectAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithDefaultValueTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedFieldWithDefaultValueTestBean bean = + QualifiedFieldWithDefaultValueTestBean bean = (QualifiedFieldWithDefaultValueTestBean) context.getBean("autowired"); assertEquals(JUERGEN, bean.getPerson().getName()); } @@ -416,11 +416,11 @@ public class InjectAnnotationAutowireContextTests { person2.addQualifier(qualifier2); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithMultipleAttributesTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedFieldWithMultipleAttributesTestBean bean = + QualifiedFieldWithMultipleAttributesTestBean bean = (QualifiedFieldWithMultipleAttributesTestBean) context.getBean("autowired"); assertEquals(MARK, bean.getPerson().getName()); } @@ -443,7 +443,7 @@ public class InjectAnnotationAutowireContextTests { person2.addQualifier(qualifier2); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithMultipleAttributesTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -474,11 +474,11 @@ public class InjectAnnotationAutowireContextTests { person2.addQualifier(qualifier2); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithMultipleAttributesTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedFieldWithMultipleAttributesTestBean bean = + QualifiedFieldWithMultipleAttributesTestBean bean = (QualifiedFieldWithMultipleAttributesTestBean) context.getBean("autowired"); assertEquals(MARK, bean.getPerson().getName()); } @@ -501,7 +501,7 @@ public class InjectAnnotationAutowireContextTests { person2.addQualifier(qualifier2); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithMultipleAttributesTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -527,7 +527,7 @@ public class InjectAnnotationAutowireContextTests { person2.addQualifier(new AutowireCandidateQualifier(Qualifier.class, "juergen")); context.registerBeanDefinition("juergen1", person1); context.registerBeanDefinition("juergen2", person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedConstructorArgumentWithBaseQualifierNonDefaultValueTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -546,7 +546,7 @@ public class InjectAnnotationAutowireContextTests { @Inject @TestQualifier private Person person; - + public Person getPerson() { return this.person; } @@ -556,7 +556,7 @@ public class InjectAnnotationAutowireContextTests { private static class QualifiedMethodParameterTestBean { private Person person; - + @Inject public void setPerson(@TestQualifier Person person) { this.person = person; @@ -566,17 +566,17 @@ public class InjectAnnotationAutowireContextTests { return this.person; } } - - + + private static class QualifiedConstructorArgumentTestBean { private Person person; - + @Inject public QualifiedConstructorArgumentTestBean(@TestQualifier Person person) { this.person = person; } - + public Person getPerson() { return this.person; } @@ -589,7 +589,7 @@ public class InjectAnnotationAutowireContextTests { @Inject @TestQualifierWithDefaultValue private Person person; - + public Person getPerson() { return this.person; } @@ -601,7 +601,7 @@ public class InjectAnnotationAutowireContextTests { @Inject @TestQualifierWithMultipleAttributes(number=123) private Person person; - + public Person getPerson() { return this.person; } @@ -612,7 +612,7 @@ public class InjectAnnotationAutowireContextTests { @Inject private Person person; - + public Person getPerson() { return this.person; } @@ -628,7 +628,7 @@ public class InjectAnnotationAutowireContextTests { @Named("juergen") Person person) { this.person = person; } - + public Person getPerson() { return this.person; } diff --git a/spring-context/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireContextTests.java b/spring-context/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireContextTests.java index e5c14903e22..b86f148037a 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireContextTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/support/QualifierAnnotationAutowireContextTests.java @@ -38,13 +38,13 @@ import static org.junit.Assert.*; /** * Integration tests for handling {@link Qualifier} annotations. - * + * * @author Mark Fisher * @author Juergen Hoeller * @author Chris Beams */ public class QualifierAnnotationAutowireContextTests { - + private static final String JUERGEN = "juergen"; private static final String MARK = "mark"; @@ -57,7 +57,7 @@ public class QualifierAnnotationAutowireContextTests { cavs.addGenericArgumentValue(JUERGEN); RootBeanDefinition person = new RootBeanDefinition(Person.class, cavs, null); context.registerBeanDefinition(JUERGEN, person); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -77,7 +77,7 @@ public class QualifierAnnotationAutowireContextTests { cavs.addGenericArgumentValue(JUERGEN); RootBeanDefinition person = new RootBeanDefinition(Person.class, cavs, null); context.registerBeanDefinition(JUERGEN, person); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedMethodParameterTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -97,7 +97,7 @@ public class QualifierAnnotationAutowireContextTests { cavs.addGenericArgumentValue(JUERGEN); RootBeanDefinition person = new RootBeanDefinition(Person.class, cavs, null); context.registerBeanDefinition(JUERGEN, person); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedConstructorArgumentTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -133,11 +133,11 @@ public class QualifierAnnotationAutowireContextTests { RootBeanDefinition person = new RootBeanDefinition(Person.class, cavs, null); person.addQualifier(new AutowireCandidateQualifier(TestQualifier.class)); context.registerBeanDefinition(JUERGEN, person); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedMethodParameterTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedMethodParameterTestBean bean = + QualifiedMethodParameterTestBean bean = (QualifiedMethodParameterTestBean) context.getBean("autowired"); assertEquals(JUERGEN, bean.getPerson().getName()); } @@ -187,11 +187,11 @@ public class QualifierAnnotationAutowireContextTests { RootBeanDefinition person = new RootBeanDefinition(Person.class, cavs, null); person.addQualifier(new AutowireCandidateQualifier(TestQualifier.class)); context.registerBeanDefinition(JUERGEN, person); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedConstructorArgumentTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedConstructorArgumentTestBean bean = + QualifiedConstructorArgumentTestBean bean = (QualifiedConstructorArgumentTestBean) context.getBean("autowired"); assertEquals(JUERGEN, bean.getPerson().getName()); } @@ -207,7 +207,7 @@ public class QualifierAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -231,7 +231,7 @@ public class QualifierAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedMethodParameterTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -255,7 +255,7 @@ public class QualifierAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedConstructorArgumentTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -320,11 +320,11 @@ public class QualifierAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedMethodParameterTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedMethodParameterTestBean bean = + QualifiedMethodParameterTestBean bean = (QualifiedMethodParameterTestBean) context.getBean("autowired"); assertEquals(JUERGEN, bean.getPerson().getName()); } @@ -341,11 +341,11 @@ public class QualifierAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedConstructorArgumentTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedConstructorArgumentTestBean bean = + QualifiedConstructorArgumentTestBean bean = (QualifiedConstructorArgumentTestBean) context.getBean("autowired"); assertEquals(JUERGEN, bean.getPerson().getName()); } @@ -363,11 +363,11 @@ public class QualifierAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithDefaultValueTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedFieldWithDefaultValueTestBean bean = + QualifiedFieldWithDefaultValueTestBean bean = (QualifiedFieldWithDefaultValueTestBean) context.getBean("autowired"); assertEquals(JUERGEN, bean.getPerson().getName()); } @@ -385,7 +385,7 @@ public class QualifierAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithDefaultValueTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -411,11 +411,11 @@ public class QualifierAnnotationAutowireContextTests { RootBeanDefinition person2 = new RootBeanDefinition(Person.class, cavs2, null); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithDefaultValueTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedFieldWithDefaultValueTestBean bean = + QualifiedFieldWithDefaultValueTestBean bean = (QualifiedFieldWithDefaultValueTestBean) context.getBean("autowired"); assertEquals(JUERGEN, bean.getPerson().getName()); } @@ -437,11 +437,11 @@ public class QualifierAnnotationAutowireContextTests { person2.addQualifier(qualifier2); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithMultipleAttributesTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedFieldWithMultipleAttributesTestBean bean = + QualifiedFieldWithMultipleAttributesTestBean bean = (QualifiedFieldWithMultipleAttributesTestBean) context.getBean("autowired"); assertEquals(MARK, bean.getPerson().getName()); } @@ -464,7 +464,7 @@ public class QualifierAnnotationAutowireContextTests { person2.addQualifier(qualifier2); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithMultipleAttributesTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -495,11 +495,11 @@ public class QualifierAnnotationAutowireContextTests { person2.addQualifier(qualifier2); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithMultipleAttributesTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedFieldWithMultipleAttributesTestBean bean = + QualifiedFieldWithMultipleAttributesTestBean bean = (QualifiedFieldWithMultipleAttributesTestBean) context.getBean("autowired"); assertEquals(MARK, bean.getPerson().getName()); } @@ -522,7 +522,7 @@ public class QualifierAnnotationAutowireContextTests { person2.addQualifier(qualifier2); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithMultipleAttributesTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -547,11 +547,11 @@ public class QualifierAnnotationAutowireContextTests { person2.addQualifier(new AutowireCandidateQualifier(Qualifier.class)); context.registerBeanDefinition(JUERGEN, person1); context.registerBeanDefinition(MARK, person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedFieldWithBaseQualifierDefaultValueTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedFieldWithBaseQualifierDefaultValueTestBean bean = + QualifiedFieldWithBaseQualifierDefaultValueTestBean bean = (QualifiedFieldWithBaseQualifierDefaultValueTestBean) context.getBean("autowired"); assertEquals(MARK, bean.getPerson().getName()); } @@ -569,11 +569,11 @@ public class QualifierAnnotationAutowireContextTests { person2.addQualifier(new AutowireCandidateQualifier(Qualifier.class, "not really juergen")); context.registerBeanDefinition("juergen1", person1); context.registerBeanDefinition("juergen2", person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedConstructorArgumentWithBaseQualifierNonDefaultValueTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); context.refresh(); - QualifiedConstructorArgumentWithBaseQualifierNonDefaultValueTestBean bean = + QualifiedConstructorArgumentWithBaseQualifierNonDefaultValueTestBean bean = (QualifiedConstructorArgumentWithBaseQualifierNonDefaultValueTestBean) context.getBean("autowired"); assertEquals("the real juergen", bean.getPerson().getName()); } @@ -591,7 +591,7 @@ public class QualifierAnnotationAutowireContextTests { person2.addQualifier(new AutowireCandidateQualifier(Qualifier.class, "juergen")); context.registerBeanDefinition("juergen1", person1); context.registerBeanDefinition("juergen2", person2); - context.registerBeanDefinition("autowired", + context.registerBeanDefinition("autowired", new RootBeanDefinition(QualifiedConstructorArgumentWithBaseQualifierNonDefaultValueTestBean.class)); AnnotationConfigUtils.registerAnnotationConfigProcessors(context); try { @@ -610,7 +610,7 @@ public class QualifierAnnotationAutowireContextTests { @Autowired @TestQualifier private Person person; - + public Person getPerson() { return this.person; } @@ -638,7 +638,7 @@ public class QualifierAnnotationAutowireContextTests { private static class QualifiedMethodParameterTestBean { private Person person; - + @Autowired public void setPerson(@TestQualifier Person person) { this.person = person; @@ -648,17 +648,17 @@ public class QualifierAnnotationAutowireContextTests { return this.person; } } - - + + private static class QualifiedConstructorArgumentTestBean { private Person person; - + @Autowired public QualifiedConstructorArgumentTestBean(@TestQualifier Person person) { this.person = person; } - + public Person getPerson() { return this.person; } @@ -671,7 +671,7 @@ public class QualifierAnnotationAutowireContextTests { @Autowired @TestQualifierWithDefaultValue private Person person; - + public Person getPerson() { return this.person; } @@ -683,7 +683,7 @@ public class QualifierAnnotationAutowireContextTests { @Autowired @TestQualifierWithMultipleAttributes(number=123) private Person person; - + public Person getPerson() { return this.person; } @@ -695,7 +695,7 @@ public class QualifierAnnotationAutowireContextTests { @Autowired @Qualifier private Person person; - + public Person getPerson() { return this.person; } @@ -711,7 +711,7 @@ public class QualifierAnnotationAutowireContextTests { @Qualifier("juergen") Person person) { this.person = person; } - + public Person getPerson() { return this.person; } diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/DependenciesBean.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/DependenciesBean.java index ff45fc57007..f17b3dfc89e 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/DependenciesBean.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/DependenciesBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,7 +22,7 @@ import org.springframework.beans.factory.BeanFactoryAware; /** * Simple bean used to test dependency checking. - * + * * Note: would be defined within {@link XmlBeanFactoryTestTypes}, but must be a public type * in order to satisfy test dependencies. * @@ -31,11 +31,11 @@ import org.springframework.beans.factory.BeanFactoryAware; * @since 04.09.2003 */ public final class DependenciesBean implements BeanFactoryAware { - + private int age; - + private String name; - + private TestBean spouse; private BeanFactory beanFactory; 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 ceb416775fd..96adebee0f7 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,10 +33,10 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; * @author Chris Beams */ public final class LookupMethodWrappedByCglibProxyTests { - + private static final Class CLASS = LookupMethodWrappedByCglibProxyTests.class; private static final String CLASSNAME = CLASS.getSimpleName(); - + private static final String CONTEXT = CLASSNAME + "-context.xml"; private ApplicationContext applicationContext; 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 587b492fd2a..09bd64d34df 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 @@ -120,7 +120,7 @@ public final class QualifierAnnotationTests { context.refresh(); QualifiedByAliasTestBean testBean = (QualifiedByAliasTestBean) context.getBean("testBean"); Person person = testBean.getStooge(); - assertEquals("LarryBean", person.getName()); + assertEquals("LarryBean", person.getName()); } @Test diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java index f4ee8ec4055..d2366862757 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java @@ -63,18 +63,18 @@ import org.springframework.core.io.Resource; /** * Unit tests for custom XML namespace handler implementations. - * + * * @author Rob Harrop * @author Rick Evans * @author Chris Beams * @author Juergen Hoeller */ public class CustomNamespaceHandlerTests { - + private static final Class CLASS = CustomNamespaceHandlerTests.class; private static final String CLASSNAME = CLASS.getSimpleName(); private static final String FQ_PATH = "org/springframework/beans/factory/xml/support"; - + private static final String NS_PROPS = format("%s/%s.properties", FQ_PATH, CLASSNAME); private static final String NS_XML = format("%s/%s-context.xml", FQ_PATH, CLASSNAME); private static final String TEST_XSD = format("%s/%s.xsd", FQ_PATH, CLASSNAME); @@ -211,7 +211,7 @@ public class CustomNamespaceHandlerTests { /** * Custom namespace handler implementation. - * + * * @author Rob Harrop */ final class TestNamespaceHandler extends NamespaceHandlerSupport { diff --git a/spring-context/src/test/java/org/springframework/cache/config/CacheableService.java b/spring-context/src/test/java/org/springframework/cache/config/CacheableService.java index 870bdde66ba..09e2fc4c4b1 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/CacheableService.java +++ b/spring-context/src/test/java/org/springframework/cache/config/CacheableService.java @@ -18,7 +18,7 @@ package org.springframework.cache.config; /** * Basic service interface. - * + * * @author Costin Leau */ public interface CacheableService { @@ -59,11 +59,11 @@ public interface CacheableService { // multi annotations T multiCache(Object arg1); - + T multiEvict(Object arg1); T multiCacheAndEvict(Object arg1); - + T multiConditionalCacheAndEvict(Object arg1); T multiUpdate(Object arg1); diff --git a/spring-context/src/test/java/org/springframework/cache/config/DefaultCacheableService.java b/spring-context/src/test/java/org/springframework/cache/config/DefaultCacheableService.java index fc754b6c3d1..fc46127cd47 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/DefaultCacheableService.java +++ b/spring-context/src/test/java/org/springframework/cache/config/DefaultCacheableService.java @@ -25,7 +25,7 @@ import org.springframework.cache.annotation.Caching; /** * Simple cacheable service - * + * * @author Costin Leau */ public class DefaultCacheableService implements CacheableService { diff --git a/spring-context/src/test/java/org/springframework/context/ACATester.java b/spring-context/src/test/java/org/springframework/context/ACATester.java index 1bda64a785f..3faf3ba364b 100644 --- a/spring-context/src/test/java/org/springframework/context/ACATester.java +++ b/spring-context/src/test/java/org/springframework/context/ACATester.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,7 +19,7 @@ package org.springframework.context; import java.util.Locale; public class ACATester implements ApplicationContextAware { - + private ApplicationContext ac; public void setApplicationContext(ApplicationContext ctx) throws ApplicationContextException { diff --git a/spring-context/src/test/java/org/springframework/context/AbstractApplicationContextTests.java b/spring-context/src/test/java/org/springframework/context/AbstractApplicationContextTests.java index d014d770e16..619bfba6fbd 100644 --- a/spring-context/src/test/java/org/springframework/context/AbstractApplicationContextTests.java +++ b/spring-context/src/test/java/org/springframework/context/AbstractApplicationContextTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/org/springframework/context/LifecycleContextBean.java b/spring-context/src/test/java/org/springframework/context/LifecycleContextBean.java index c3aba92b5f8..720a7cd9b4b 100644 --- a/spring-context/src/test/java/org/springframework/context/LifecycleContextBean.java +++ b/spring-context/src/test/java/org/springframework/context/LifecycleContextBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,12 +22,12 @@ import org.springframework.beans.factory.LifecycleBean; /** * Simple bean to test ApplicationContext lifecycle methods for beans - * + * * @author Colin Sampaleanu * @since 03.07.2004 */ public class LifecycleContextBean extends LifecycleBean implements ApplicationContextAware { - + protected ApplicationContext owningContext; public void setBeanFactory(BeanFactory beanFactory) { @@ -35,18 +35,18 @@ public class LifecycleContextBean extends LifecycleBean implements ApplicationCo if (this.owningContext != null) throw new RuntimeException("Factory called setBeanFactory after setApplicationContext"); } - + public void afterPropertiesSet() { super.afterPropertiesSet(); if (this.owningContext == null) throw new RuntimeException("Factory didn't call setAppliationContext before afterPropertiesSet on lifecycle bean"); } - + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { if (this.owningFactory == null) throw new RuntimeException("Factory called setApplicationContext before setBeanFactory"); - + this.owningContext = applicationContext; } - + } diff --git a/spring-context/src/test/java/org/springframework/context/access/ContextBeanFactoryReferenceTests.java b/spring-context/src/test/java/org/springframework/context/access/ContextBeanFactoryReferenceTests.java index ca79f530b3f..c93760bf67e 100644 --- a/spring-context/src/test/java/org/springframework/context/access/ContextBeanFactoryReferenceTests.java +++ b/spring-context/src/test/java/org/springframework/context/access/ContextBeanFactoryReferenceTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,12 +24,12 @@ import org.springframework.context.ConfigurableApplicationContext; /** * Unit test for {@link ContextBeanFactoryReference} - * + * * @author Colin Sampaleanu * @author Chris Beams */ public class ContextBeanFactoryReferenceTests { - + @Test public void testAllOperations() { ConfigurableApplicationContext ctx = createMock(ConfigurableApplicationContext.class); 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 2f6728e96d1..eb3bc80d39b 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,15 +35,15 @@ import org.springframework.mock.jndi.SimpleNamingContextBuilder; public final class ContextJndiBeanFactoryLocatorTests extends TestCase { private static final String BEAN_FACTORY_PATH_ENVIRONMENT_KEY = "java:comp/env/ejb/BeanFactoryPath"; - + private static final Class CLASS = ContextJndiBeanFactoryLocatorTests.class; private static final String CLASSNAME = CLASS.getSimpleName(); - + private static final String FQ_PATH = "/org/springframework/context/access/"; - + private static final String COLLECTIONS_CONTEXT = FQ_PATH + CLASSNAME + "-collections.xml"; private static final String PARENT_CONTEXT = FQ_PATH + CLASSNAME + "-parent.xml"; - + public void testBeanFactoryPathRequiredFromJndiEnvironment() throws Exception { // Set up initial context but don't bind anything diff --git a/spring-context/src/test/java/org/springframework/context/access/ContextSingletonBeanFactoryLocatorTests.java b/spring-context/src/test/java/org/springframework/context/access/ContextSingletonBeanFactoryLocatorTests.java index 6d2b96e92b7..96750057f5c 100644 --- a/spring-context/src/test/java/org/springframework/context/access/ContextSingletonBeanFactoryLocatorTests.java +++ b/spring-context/src/test/java/org/springframework/context/access/ContextSingletonBeanFactoryLocatorTests.java @@ -34,10 +34,10 @@ import org.springframework.util.ClassUtils; * @author Chris Beams */ public class ContextSingletonBeanFactoryLocatorTests extends SingletonBeanFactoryLocatorTests { - + private static final Class CLASS = ContextSingletonBeanFactoryLocatorTests.class; private static final String CONTEXT = CLASS.getSimpleName() + "-context.xml"; - + @Test public void testBaseBeanFactoryDefs() { @@ -51,7 +51,7 @@ public class ContextSingletonBeanFactoryLocatorTests extends SingletonBeanFactor public void testBasicFunctionality() { ContextSingletonBeanFactoryLocator facLoc = new ContextSingletonBeanFactoryLocator( "classpath*:" + ClassUtils.addResourcePathToPackagePath(CLASS, CONTEXT)); - + basicFunctionalityTest(facLoc); BeanFactoryReference bfr = facLoc.useBeanFactory("a.qualified.name.of.some.sort"); @@ -77,7 +77,7 @@ public class ContextSingletonBeanFactoryLocatorTests extends SingletonBeanFactor BeanFactoryLocator facLoc = ContextSingletonBeanFactoryLocator.getInstance( ClassUtils.addResourcePathToPackagePath(CLASS, CONTEXT)); getInstanceTest1(facLoc); - + facLoc = ContextSingletonBeanFactoryLocator.getInstance( "classpath*:" + ClassUtils.addResourcePathToPackagePath(CLASS, CONTEXT)); getInstanceTest2(facLoc); diff --git a/spring-context/src/test/java/org/springframework/context/access/DefaultLocatorFactoryTests.java b/spring-context/src/test/java/org/springframework/context/access/DefaultLocatorFactoryTests.java index 6b5eafee15b..eee36e9d9bc 100644 --- a/spring-context/src/test/java/org/springframework/context/access/DefaultLocatorFactoryTests.java +++ b/spring-context/src/test/java/org/springframework/context/access/DefaultLocatorFactoryTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java index 57d42c88c8e..50ed95df10d 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java @@ -29,7 +29,7 @@ import test.beans.TestBean; /** * TCK-style unit tests for handling circular use of the {@link Import} annotation. Explore * subclass hierarchy for specific concrete implementations. - * + * * @author Chris Beams */ public abstract class AbstractCircularImportDetectionTests { @@ -37,7 +37,7 @@ public abstract class AbstractCircularImportDetectionTests { protected abstract ConfigurationClassParser newParser(); protected abstract String loadAsConfigurationSource(Class clazz) throws Exception; - + @Test public void simpleCircularImportIsDetected() throws Exception { boolean threw = false; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java index fe528621aac..a829ee49f97 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationConfigApplicationContextTests.java @@ -43,7 +43,7 @@ public class AnnotationConfigApplicationContextTests { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(Config.class); context.getBean((Class)null); } - + @Test public void scanAndRefresh() { AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AsmCircularImportDetectionTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AsmCircularImportDetectionTests.java index 36a9b1eed8e..01e25e80300 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AsmCircularImportDetectionTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AsmCircularImportDetectionTests.java @@ -24,11 +24,11 @@ import org.springframework.core.type.classreading.CachingMetadataReaderFactory; /** * Unit test proving that ASM-based {@link ConfigurationClassParser} correctly detects circular use of * the {@link Import @Import} annotation. - * + * *

      While this test is the only subclass of {@link AbstractCircularImportDetectionTests}, the * hierarchy remains in place in case a JDT-based ConfigurationParser implementation needs to be * developed. - * + * * @author Chris Beams */ public class AsmCircularImportDetectionTests extends AbstractCircularImportDetectionTests { diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java index 36d950e1102..1f81d31669d 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java @@ -57,7 +57,7 @@ public class ClassPathFactoryBeanDefinitionScannerTests extends TestCase { TestBean tb2 = (TestBean)context.getBean("publicInstance"); //2 assertEquals("publicInstance", tb2.getName()); assertSame(tb2, tb); - + tb = (TestBean)context.getBean("protectedInstance"); //3 assertEquals("protectedInstance", tb.getName()); assertSame(tb, context.getBean("protectedInstance")); @@ -72,7 +72,7 @@ public class ClassPathFactoryBeanDefinitionScannerTests extends TestCase { tb2 = context.getBean("privateInstance", TestBean.class); //4 assertEquals(2, tb2.getAge()); assertNotSame(tb2, tb); - + Object bean = context.getBean("requestScopedInstance"); //5 assertTrue(AopUtils.isCglibProxy(bean)); assertTrue(bean instanceof ScopedObject); diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserTests.java index 4181cc2233c..75bef42a0f8 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserTests.java @@ -124,7 +124,7 @@ public class ComponentScanParserTests { @Target({ElementType.TYPE, ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) - public static @interface CustomAnnotation { + public static @interface CustomAnnotation { } @@ -141,7 +141,7 @@ public class ComponentScanParserTests { @CustomAnnotation - public static class CustomAnnotationDependencyBean { + public static class CustomAnnotationDependencyBean { } diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java index 1925dd4afce..c7237a2f6ba 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java @@ -68,5 +68,5 @@ public class ComponentScanParserWithUserDefinedStrategiesTests { // expected } } - + } \ No newline at end of file diff --git a/spring-context/src/test/java/org/springframework/context/annotation/SimpleConfigTests.java b/spring-context/src/test/java/org/springframework/context/annotation/SimpleConfigTests.java index fc186b8e434..c07ded41548 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/SimpleConfigTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/SimpleConfigTests.java @@ -31,7 +31,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; * @author Juergen Hoeller */ public class SimpleConfigTests { - + @Test public void testFooService() throws Exception { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getConfigLocations(), getClass()); diff --git a/spring-context/src/test/java/org/springframework/context/annotation/SimpleScanTests.java b/spring-context/src/test/java/org/springframework/context/annotation/SimpleScanTests.java index d0bb3a8c594..d3a14c0ab38 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/SimpleScanTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/SimpleScanTests.java @@ -38,10 +38,10 @@ public class SimpleScanTests { @Test public void testFooService() throws Exception { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(getConfigLocations(), getClass()); - + FooService fooService = (FooService) ctx.getBean("fooServiceImpl"); ServiceInvocationCounter serviceInvocationCounter = (ServiceInvocationCounter) ctx.getBean("serviceInvocationCounter"); - + assertEquals(0, serviceInvocationCounter.getCount()); assertTrue(fooService.isInitCalled()); @@ -50,7 +50,7 @@ public class SimpleScanTests { String value = fooService.foo(1); assertEquals("bar", value); assertEquals(2, serviceInvocationCounter.getCount()); - + fooService.foo(1); assertEquals(3, serviceInvocationCounter.getCount()); } diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/AutowiredConfigurationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/AutowiredConfigurationTests.java index da56d717dab..71f2f9e3d59 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/AutowiredConfigurationTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/AutowiredConfigurationTests.java @@ -37,13 +37,13 @@ import org.springframework.core.io.ClassPathResource; /** * System tests covering use of {@link Autowired} and {@link Value} within * {@link Configuration} classes. - * + * * @author Chris Beams * @author Juergen Hoeller */ public class AutowiredConfigurationTests { - @Test + @Test public void testAutowiredConfigurationDependencies() { ClassPathXmlApplicationContext factory = new ClassPathXmlApplicationContext( AutowiredConfigurationTests.class.getSimpleName() + ".xml", AutowiredConfigurationTests.class); diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/BeanAnnotationAttributePropagationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/BeanAnnotationAttributePropagationTests.java index 1eddf67a4f8..da770cb924e 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/BeanAnnotationAttributePropagationTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/BeanAnnotationAttributePropagationTests.java @@ -34,7 +34,7 @@ import org.springframework.context.annotation.DependsOn; * Unit tests proving that the various attributes available via the {@link Bean} * annotation are correctly reflected in the {@link BeanDefinition} created when * processing the {@link Configuration} class. - * + * *

      Also includes tests proving that using {@link Lazy} and {@link Primary} * annotations in conjunction with Bean propagate their respective metadata * correctly into the resulting BeanDefinition diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/BeanMethodQualificationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/BeanMethodQualificationTests.java index 872cc9281af..5e6fc1b125a 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/BeanMethodQualificationTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/BeanMethodQualificationTests.java @@ -36,9 +36,9 @@ import static org.hamcrest.CoreMatchers.*; import static org.junit.Assert.*; /** - * Tests proving that @Qualifier annotations work when used + * Tests proving that @Qualifier annotations work when used * with @Configuration classes on @Bean methods. - * + * * @author Chris Beams * @author Juergen Hoeller */ @@ -69,7 +69,7 @@ public class BeanMethodQualificationTests { public TestBean testBean1() { return new TestBean("interesting"); } - + @Bean @Qualifier("boring") public TestBean testBean2() { return new TestBean("boring"); diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassAspectIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassAspectIntegrationTests.java index 2b3924bb4f4..c983ea4e3ac 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassAspectIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ConfigurationClassAspectIntegrationTests.java @@ -38,7 +38,7 @@ import test.beans.TestBean; * {@link Bean} methods may return aspects, or Configuration classes may themselves be annotated with Aspect. * In the latter case, advice methods are declared inline within the Configuration class. This makes for a * particularly convenient syntax requiring no extra artifact for the aspect. - * + * *

      Currently it is assumed that the user is bootstrapping Configuration class processing via XML (using * annotation-config or component-scan), and thus will also use {@code } to enable * processing of the Aspect annotation. diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportResourceTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportResourceTests.java index 745cd792fbd..9dc9e980d4a 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportResourceTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportResourceTests.java @@ -78,81 +78,81 @@ public class ImportResourceTests { return new TestBean("java.declared"); } } - + @Ignore // TODO: SPR-6310 @Test public void testImportXmlByConvention() { ApplicationContext ctx = new AnnotationConfigApplicationContext(ImportXmlByConventionConfig.class); assertTrue("context does not contain xml-declared bean", ctx.containsBean("xmlDeclaredBean")); } - + @Configuration //@ImportXml static class ImportXmlByConventionConfig { } - + @Test public void testImportXmlIsInheritedFromSuperclassDeclarations() { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(FirstLevelSubConfig.class); assertTrue(ctx.containsBean("xmlDeclaredBean")); } - + @Test public void testImportXmlIsMergedFromSuperclassDeclarations() { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(SecondLevelSubConfig.class); assertTrue("failed to pick up second-level-declared XML bean", ctx.containsBean("secondLevelXmlDeclaredBean")); assertTrue("failed to pick up parent-declared XML bean", ctx.containsBean("xmlDeclaredBean")); } - + @Configuration @ImportResource("classpath:org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml") static class BaseConfig { } - + @Configuration static class FirstLevelSubConfig extends BaseConfig { } - + @Configuration @ImportResource("classpath:org/springframework/context/annotation/configuration/SecondLevelSubConfig-context.xml") static class SecondLevelSubConfig extends BaseConfig { } - + @Test public void testImportXmlWithNamespaceConfig() { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImportXmlWithAopNamespaceConfig.class); Object bean = ctx.getBean("proxiedXmlBean"); assertTrue(AopUtils.isAopProxy(bean)); } - + @Configuration @ImportResource("classpath:org/springframework/context/annotation/configuration/ImportXmlWithAopNamespace-context.xml") static class ImportXmlWithAopNamespaceConfig { } - + @Aspect static class AnAspect { @Before("execution(* test.beans.TestBean.*(..))") public void advice() { } } - + @Test public void testImportXmlWithAutowiredConfig() { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImportXmlAutowiredConfig.class); String name = ctx.getBean("xmlBeanName", String.class); assertThat(name, equalTo("xml.declared")); } - + @Configuration @ImportResource(value="classpath:org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml") static class ImportXmlAutowiredConfig { @Autowired TestBean xmlDeclaredBean; - + public @Bean String xmlBeanName() { return xmlDeclaredBean.getName(); } } - + @Test public void testImportNonXmlResource() { AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(ImportNonXmlResourceConfig.class); @@ -164,7 +164,7 @@ public class ImportResourceTests { reader=PropertiesBeanDefinitionReader.class) static class ImportNonXmlResourceConfig { } - + @Ignore // TODO: SPR-6327 @Test public void testImportDifferentResourceTypes() { @@ -172,7 +172,7 @@ public class ImportResourceTests { assertTrue(ctx.containsBean("propertiesDeclaredBean")); assertTrue(ctx.containsBean("xmlDeclaredBean")); } - + @Configuration @ImportResource(value="classpath:org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml", reader=XmlBeanDefinitionReader.class) diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportTests.java index 1866ea80405..c27d84c1310 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportTests.java @@ -34,7 +34,7 @@ import org.springframework.context.annotation.Import; /** * System tests for {@link Import} annotation support. - * + * * @author Chris Beams */ public class ImportTests { @@ -125,7 +125,7 @@ public class ImportTests { @Configuration @Import(DataSourceConfig.class) static class AppConfig { - + @Bean public ITestBean transferService() { return new TestBean(accountRepository()); diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportedConfigurationClassEnhancementTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportedConfigurationClassEnhancementTests.java index 208516f99bb..2d4783496a1 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportedConfigurationClassEnhancementTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ImportedConfigurationClassEnhancementTests.java @@ -39,7 +39,7 @@ import test.beans.TestBean; */ public class ImportedConfigurationClassEnhancementTests { - + @Test public void autowiredConfigClassIsEnhancedWhenImported() { autowiredConfigClassIsEnhanced(ConfigThatDoesImport.class); @@ -49,25 +49,25 @@ public class ImportedConfigurationClassEnhancementTests { public void autowiredConfigClassIsEnhancedWhenRegisteredViaConstructor() { autowiredConfigClassIsEnhanced(ConfigThatDoesNotImport.class, ConfigToBeAutowired.class); } - + private void autowiredConfigClassIsEnhanced(Class... configClasses) { ApplicationContext ctx = new AnnotationConfigApplicationContext(configClasses); Config config = ctx.getBean(Config.class); assertTrue("autowired config class has not been enhanced", ClassUtils.isCglibProxy(config.autowiredConfig)); } - - + + @Test public void autowiredConfigClassBeanMethodsRespectScopingWhenImported() { autowiredConfigClassBeanMethodsRespectScoping(ConfigThatDoesImport.class); } - + @Test public void autowiredConfigClassBeanMethodsRespectScopingWhenRegisteredViaConstructor() { autowiredConfigClassBeanMethodsRespectScoping(ConfigThatDoesNotImport.class, ConfigToBeAutowired.class); } - + private void autowiredConfigClassBeanMethodsRespectScoping(Class... configClasses) { ApplicationContext ctx = new AnnotationConfigApplicationContext(configClasses); Config config = ctx.getBean(Config.class); diff --git a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ScopingTests.java b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ScopingTests.java index c0d14156366..b0d617e9cf3 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/configuration/ScopingTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/configuration/ScopingTests.java @@ -196,7 +196,7 @@ public class ScopingTests { // 6 @Beans + 1 Configuration + 2 scoped proxy + 1 importRegistry assertEquals(10, ctx.getBeanDefinitionCount()); } - + // /** // * SJC-254 caught a regression in handling scoped proxies starting in 1.0 m4. // * The ScopedProxyFactoryBean object was having its scope set to that of its delegate @@ -207,10 +207,10 @@ public class ScopingTests { // JavaConfigWebApplicationContext ctx = new JavaConfigWebApplicationContext(); // ctx.setConfigLocations(new String[] { ScopeTestConfiguration.class.getName() }); // ctx.refresh(); -// +// // // should be fine // ctx.getBean(Bar.class); -// +// // boolean threw = false; // try { // ctx.getBean(Foo.class); @@ -221,7 +221,7 @@ public class ScopingTests { // } // assertTrue(threw); // } - + @Configuration static class ScopeTestConfiguration { @@ -236,30 +236,30 @@ public class ScopingTests { return new Bar(foo()); } } - + static class Foo { public Foo() { //System.out.println("created foo: " + this.getClass().getName()); } - + public void doSomething() { //System.out.println("interesting: " + this); } } - + static class Bar { - + private final Foo foo; - + public Bar(Foo foo) { this.foo = foo; //System.out.println("created bar: " + this); } - + public Foo getFoo() { return foo; } - + } private void genericTestScope(String beanName) throws Exception { diff --git a/spring-context/src/test/java/org/springframework/context/annotation/spr8761/Spr8761Tests.java b/spring-context/src/test/java/org/springframework/context/annotation/spr8761/Spr8761Tests.java index c37c22106cd..be87313477b 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/spr8761/Spr8761Tests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/spr8761/Spr8761Tests.java @@ -53,5 +53,5 @@ class WithNestedAnnotation { @Retention(RetentionPolicy.RUNTIME) @Component public static @interface MyComponent { - } + } } diff --git a/spring-context/src/test/java/org/springframework/context/conversionservice/Bar.java b/spring-context/src/test/java/org/springframework/context/conversionservice/Bar.java index b89f6274adb..80949157002 100644 --- a/spring-context/src/test/java/org/springframework/context/conversionservice/Bar.java +++ b/spring-context/src/test/java/org/springframework/context/conversionservice/Bar.java @@ -20,13 +20,13 @@ package org.springframework.context.conversionservice; * @author Keith Donald */ public class Bar { - + private String value; - + public Bar(String value) { this.value = value; } - + public String getValue() { return value; } diff --git a/spring-context/src/test/java/org/springframework/context/conversionservice/ConversionServiceContextConfigTests.java b/spring-context/src/test/java/org/springframework/context/conversionservice/ConversionServiceContextConfigTests.java index 60dd150dcbd..c319cde5203 100644 --- a/spring-context/src/test/java/org/springframework/context/conversionservice/ConversionServiceContextConfigTests.java +++ b/spring-context/src/test/java/org/springframework/context/conversionservice/ConversionServiceContextConfigTests.java @@ -25,7 +25,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; * @author Keith Donald */ public class ConversionServiceContextConfigTests { - + @Test public void testConfigOk() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("org/springframework/context/conversionservice/conversionService.xml"); 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 eeeee80b1ee..2d8d8f4bd05 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 @@ -39,7 +39,7 @@ import org.springframework.context.support.StaticApplicationContext; * @author Rick Evans */ public class EventPublicationInterceptorTests { - + private ApplicationEventPublisher publisher; @@ -48,7 +48,7 @@ public class EventPublicationInterceptorTests { publisher = createMock(ApplicationEventPublisher.class); replay(publisher); } - + @After public void tearDown() { verify(publisher); diff --git a/spring-context/src/test/java/org/springframework/context/event/LifecycleEventTests.java b/spring-context/src/test/java/org/springframework/context/event/LifecycleEventTests.java index 5fa2f37ccf5..d5cc8f790f0 100644 --- a/spring-context/src/test/java/org/springframework/context/event/LifecycleEventTests.java +++ b/spring-context/src/test/java/org/springframework/context/event/LifecycleEventTests.java @@ -55,7 +55,7 @@ public class LifecycleEventTests extends TestCase { assertFalse(lifecycleBean.isRunning()); context.start(); assertTrue(lifecycleBean.isRunning()); - assertEquals(0, listener.getStoppedCount()); + assertEquals(0, listener.getStoppedCount()); context.stop(); assertFalse(lifecycleBean.isRunning()); assertEquals(1, listener.getStoppedCount()); diff --git a/spring-context/src/test/java/org/springframework/context/support/Assembler.java b/spring-context/src/test/java/org/springframework/context/support/Assembler.java index f3171912192..60df14aeb85 100644 --- a/spring-context/src/test/java/org/springframework/context/support/Assembler.java +++ b/spring-context/src/test/java/org/springframework/context/support/Assembler.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,24 +22,24 @@ package org.springframework.context.support; public class Assembler implements TestIF { private Service service; - private Logic l; + private Logic l; private String name; public void setService(Service service) { this.service = service; } - + public void setLogic(Logic l) { this.l = l; } - + public void setBeanName(String name) { this.name = name; } public void test() { } - + public void output() { System.out.println("Bean " + name); l.output(); diff --git a/spring-context/src/test/java/org/springframework/context/support/AutowiredService.java b/spring-context/src/test/java/org/springframework/context/support/AutowiredService.java index 285e8348bde..3ab4a12d959 100644 --- a/spring-context/src/test/java/org/springframework/context/support/AutowiredService.java +++ b/spring-context/src/test/java/org/springframework/context/support/AutowiredService.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/org/springframework/context/support/BeanFactoryPostProcessorTests.java b/spring-context/src/test/java/org/springframework/context/support/BeanFactoryPostProcessorTests.java index c50e7941dd5..2e36dde141e 100644 --- a/spring-context/src/test/java/org/springframework/context/support/BeanFactoryPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/BeanFactoryPostProcessorTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,7 +35,7 @@ import org.springframework.context.support.StaticApplicationContext; * any registered {@link BeanFactoryPostProcessor} implementations. Specifically * {@link StaticApplicationContext} is used for the tests, but what's represented * here is any {@link AbstractApplicationContext} implementation. - * + * * @author Colin Sampaleanu * @author Juergen Hoeller * @author Chris Beams @@ -54,7 +54,7 @@ public class BeanFactoryPostProcessorTests { ac.refresh(); assertTrue(bfpp.wasCalled); } - + @Test public void testDefinedBeanFactoryPostProcessor() { StaticApplicationContext ac = new StaticApplicationContext(); @@ -93,7 +93,7 @@ public class BeanFactoryPostProcessorTests { assertFalse(bfpp.wasCalled); } - + public static class TestBeanFactoryPostProcessor implements BeanFactoryPostProcessor { public String initValue; @@ -103,10 +103,10 @@ public class BeanFactoryPostProcessorTests { } public boolean wasCalled = false; - + public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) { wasCalled = true; } } - + } diff --git a/spring-context/src/test/java/org/springframework/context/support/ClassPathXmlApplicationContextTests.java b/spring-context/src/test/java/org/springframework/context/support/ClassPathXmlApplicationContextTests.java index 1fdec145cc6..f55a47870cc 100644 --- a/spring-context/src/test/java/org/springframework/context/support/ClassPathXmlApplicationContextTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/ClassPathXmlApplicationContextTests.java @@ -71,7 +71,7 @@ public final class ClassPathXmlApplicationContextTests { private static final String TEST_PROPERTIES = "test.properties"; private static final String FQ_TEST_PROPERTIES = "classpath:org/springframework/beans/factory/xml/" + TEST_PROPERTIES; - + @Test public void testSingleConfigLocation() { ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(FQ_SIMPLE_CONTEXT); 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 7f88ebfd578..5a779f0d3a5 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 @@ -48,7 +48,7 @@ public class ConversionServiceFactoryBeanTests { ConversionService service = factory.getObject(); assertTrue(service.canConvert(String.class, Integer.class)); } - + @Test public void createDefaultConversionServiceWithSupplements() { ConversionServiceFactoryBean factory = new ConversionServiceFactoryBean(); @@ -81,7 +81,7 @@ public class ConversionServiceFactoryBeanTests { assertTrue(service.canConvert(String.class, Integer.class)); assertTrue(service.canConvert(String.class, Foo.class)); assertTrue(service.canConvert(String.class, Bar.class)); - assertTrue(service.canConvert(String.class, Baz.class)); + assertTrue(service.canConvert(String.class, Baz.class)); } @Test(expected=IllegalArgumentException.class) @@ -119,10 +119,10 @@ public class ConversionServiceFactoryBeanTests { public static class Foo { } - + public static class Bar { } - + public static class Baz { } diff --git a/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java b/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java index 18bd081d2df..61615a2b591 100644 --- a/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java @@ -295,7 +295,7 @@ public class DefaultLifecycleProcessorTests { @Test public void singleLifecycleShutdown() throws Exception { CopyOnWriteArrayList stoppedBeans = new CopyOnWriteArrayList(); - Lifecycle bean = new TestLifecycleBean(null, stoppedBeans); + Lifecycle bean = new TestLifecycleBean(null, stoppedBeans); StaticApplicationContext context = new StaticApplicationContext(); context.getBeanFactory().registerSingleton("bean", bean); context.refresh(); @@ -636,7 +636,7 @@ public class DefaultLifecycleProcessorTests { } public void setAutoStartup(boolean autoStartup) { - this.autoStartup = autoStartup; + this.autoStartup = autoStartup; } public void stop(final Runnable callback) { diff --git a/spring-context/src/test/java/org/springframework/context/support/LifecycleTestBean.java b/spring-context/src/test/java/org/springframework/context/support/LifecycleTestBean.java index 8c220888378..44dcf38bd68 100644 --- a/spring-context/src/test/java/org/springframework/context/support/LifecycleTestBean.java +++ b/spring-context/src/test/java/org/springframework/context/support/LifecycleTestBean.java @@ -54,7 +54,7 @@ public class LifecycleTestBean implements Lifecycle { public void stop() { this.stopOrder = ++stopCounter; - this.running = false; + this.running = false; } } diff --git a/spring-context/src/test/java/org/springframework/context/support/Logic.java b/spring-context/src/test/java/org/springframework/context/support/Logic.java index ee1974670ce..325ebc10a48 100644 --- a/spring-context/src/test/java/org/springframework/context/support/Logic.java +++ b/spring-context/src/test/java/org/springframework/context/support/Logic.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,24 +22,24 @@ import org.springframework.beans.factory.BeanNameAware; public class Logic implements BeanNameAware { - + private Log log = LogFactory.getLog(Logic.class); private String name; private Assembler a; - + public void setAssembler(Assembler a) { this.a = a; } - + /* (non-Javadoc) * @see org.springframework.beans.factory.BeanNameAware#setBeanName(java.lang.String) */ public void setBeanName(String name) { this.name = name; } - + public void output() { - System.out.println("Bean " + name); + System.out.println("Bean " + name); } } diff --git a/spring-context/src/test/java/org/springframework/context/support/PropertyResourceConfigurerIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/support/PropertyResourceConfigurerIntegrationTests.java index 0884859f23a..e3f9ada36f0 100644 --- a/spring-context/src/test/java/org/springframework/context/support/PropertyResourceConfigurerIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/PropertyResourceConfigurerIntegrationTests.java @@ -38,12 +38,12 @@ import org.springframework.util.StringUtils; * interaction with an {@link ApplicationContext}. For example, a {@link PropertyPlaceholderConfigurer} * that contains ${..} tokens in its 'location' property requires being tested through an ApplicationContext * as opposed to using only a BeanFactory during testing. - * + * * @author Chris Beams * @see org.springframework.beans.factory.config.PropertyResourceConfigurerTests */ public class PropertyResourceConfigurerIntegrationTests { - + @Test public void testPropertyPlaceholderConfigurerWithSystemPropertyInLocation() { StaticApplicationContext ac = new StaticApplicationContext(); @@ -85,14 +85,14 @@ public class PropertyResourceConfigurerIntegrationTests { catch (BeanInitializationException ex) { // expected assertTrue(ex.getCause() instanceof FileNotFoundException); - // slight hack for Linux/Unix systems + // slight hack for Linux/Unix systems String userDir = StringUtils.cleanPath(System.getProperty("user.dir")); if (userDir.startsWith("/")) { userDir = userDir.substring(1); } /* the above hack doesn't work since the exception message is created without the leading / stripped so the test fails. Changed 17/11/04. DD */ - //assertTrue(ex.getMessage().indexOf(userDir + "/test/" + userDir) != -1); + //assertTrue(ex.getMessage().indexOf(userDir + "/test/" + userDir) != -1); assertTrue(ex.getMessage().contains(userDir + "/test/" + userDir) || ex.getMessage().contains(userDir + "/test//" + userDir)); } diff --git a/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java b/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java index 8226dae1864..bfb2adc69af 100644 --- a/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java @@ -40,7 +40,7 @@ import test.beans.TestBean; /** * Unit tests for {@link PropertySourcesPlaceholderConfigurer}. - * + * * @author Chris Beams * @since 3.1 */ diff --git a/spring-context/src/test/java/org/springframework/context/support/Spr7283Tests.java b/spring-context/src/test/java/org/springframework/context/support/Spr7283Tests.java index 40255c0e684..910200918a4 100644 --- a/spring-context/src/test/java/org/springframework/context/support/Spr7283Tests.java +++ b/spring-context/src/test/java/org/springframework/context/support/Spr7283Tests.java @@ -44,5 +44,5 @@ public class Spr7283Tests { public static class B { public B() {} } - + } diff --git a/spring-context/src/test/java/org/springframework/context/support/Spr7816Tests.java b/spring-context/src/test/java/org/springframework/context/support/Spr7816Tests.java index 998049819c7..9c7e9a2319b 100644 --- a/spring-context/src/test/java/org/springframework/context/support/Spr7816Tests.java +++ b/spring-context/src/test/java/org/springframework/context/support/Spr7816Tests.java @@ -37,13 +37,13 @@ public class Spr7816Tests { assertEquals(Entrance.class, adapter.getSupportedTypes().get("Entrance")); assertEquals(Dwelling.class, adapter.getSupportedTypes().get("Dwelling")); } - + public static class FilterAdapter { - + private String extensionPrefix; - + private Map> supportedTypes; - + public FilterAdapter(final String extensionPrefix, final Map> supportedTypes) { this.extensionPrefix = extensionPrefix; this.supportedTypes = supportedTypes; @@ -58,17 +58,17 @@ public class Spr7816Tests { } } - + public static class Building extends DomainEntity { } - + public static class Entrance extends DomainEntity { } - + public static class Dwelling extends DomainEntity { } - + public abstract static class DomainEntity { - + } } diff --git a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java index 9bfe88b2cc2..089072fb3c8 100644 --- a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java index d98528b2306..431325062ed 100644 --- a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/org/springframework/context/support/TestIF.java b/spring-context/src/test/java/org/springframework/context/support/TestIF.java index d458965dc3d..7ee7a9c0069 100644 --- a/spring-context/src/test/java/org/springframework/context/support/TestIF.java +++ b/spring-context/src/test/java/org/springframework/context/support/TestIF.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptorTests.java b/spring-context/src/test/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptorTests.java index 3743579d002..11a20f3cd6e 100644 --- a/spring-context/src/test/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptorTests.java +++ b/spring-context/src/test/java/org/springframework/ejb/access/LocalSlsbInvokerInterceptorTests.java @@ -186,7 +186,7 @@ public class LocalSlsbInvokerInterceptorTests { } - /** + /** * Needed so that we can mock the create() method. */ private interface SlsbHome extends EJBLocalHome { diff --git a/spring-context/src/test/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBeanTests.java index 0b8d488a52e..c2c9e07aaaf 100644 --- a/spring-context/src/test/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/ejb/access/LocalStatelessSessionProxyFactoryBeanTests.java @@ -41,16 +41,16 @@ public class LocalStatelessSessionProxyFactoryBeanTests { public void testInvokesMethod() throws Exception { final int value = 11; final String jndiName = "foo"; - + MyEjb myEjb = createMock(MyEjb.class); expect(myEjb.getValue()).andReturn(value); myEjb.remove(); replay(myEjb); - + final MyHome home = createMock(MyHome.class); expect(home.create()).andReturn(myEjb); replay(home); - + JndiTemplate jt = new JndiTemplate() { public Object lookup(String name) throws NamingException { // parameterize @@ -58,13 +58,13 @@ public class LocalStatelessSessionProxyFactoryBeanTests { return home; } }; - + LocalStatelessSessionProxyFactoryBean fb = new LocalStatelessSessionProxyFactoryBean(); fb.setJndiName(jndiName); fb.setResourceRef(true); fb.setBusinessInterface(MyBusinessMethods.class); fb.setJndiTemplate(jt); - + // Need lifecycle methods fb.afterPropertiesSet(); @@ -72,9 +72,9 @@ public class LocalStatelessSessionProxyFactoryBeanTests { assertTrue(Proxy.isProxyClass(mbm.getClass())); assertTrue(mbm.getValue() == value); verify(myEjb); - verify(home); + verify(home); } - + @Test public void testInvokesMethodOnEjb3StyleBean() throws Exception { final int value = 11; @@ -110,12 +110,12 @@ public class LocalStatelessSessionProxyFactoryBeanTests { @Test public void testCreateException() throws Exception { final String jndiName = "foo"; - + final CreateException cex = new CreateException(); final MyHome home = createMock(MyHome.class); expect(home.create()).andThrow(cex); replay(home); - + JndiTemplate jt = new JndiTemplate() { public Object lookup(String name) throws NamingException { // parameterize @@ -123,20 +123,20 @@ public class LocalStatelessSessionProxyFactoryBeanTests { return home; } }; - + LocalStatelessSessionProxyFactoryBean fb = new LocalStatelessSessionProxyFactoryBean(); fb.setJndiName(jndiName); fb.setResourceRef(false); // no java:comp/env prefix fb.setBusinessInterface(MyBusinessMethods.class); assertEquals(fb.getBusinessInterface(), MyBusinessMethods.class); fb.setJndiTemplate(jt); - + // Need lifecycle methods fb.afterPropertiesSet(); MyBusinessMethods mbm = (MyBusinessMethods) fb.getObject(); assertTrue(Proxy.isProxyClass(mbm.getClass())); - + try { mbm.getValue(); fail("Should have failed to create EJB"); @@ -144,10 +144,10 @@ public class LocalStatelessSessionProxyFactoryBeanTests { catch (EjbAccessException ex) { assertSame(cex, ex.getCause()); } - - verify(home); + + verify(home); } - + @Test public void testNoBusinessInterfaceSpecified() throws Exception { // Will do JNDI lookup to get home but won't call create @@ -162,7 +162,7 @@ public class LocalStatelessSessionProxyFactoryBeanTests { // parameterize assertTrue(name.equals("java:comp/env/" + jndiName)); return home; - } + } }; LocalStatelessSessionProxyFactoryBean fb = new LocalStatelessSessionProxyFactoryBean(); @@ -184,10 +184,10 @@ public class LocalStatelessSessionProxyFactoryBeanTests { } // Expect no methods on home - verify(home); + verify(home); } - - + + public static interface MyHome extends EJBLocalHome { MyBusinessMethods create() throws CreateException; diff --git a/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBeanTests.java index a3d570c3f18..396d347b178 100644 --- a/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/ejb/access/SimpleRemoteStatelessSessionProxyFactoryBeanTests.java @@ -53,16 +53,16 @@ public class SimpleRemoteStatelessSessionProxyFactoryBeanTests extends SimpleRem public void testInvokesMethod() throws Exception { final int value = 11; final String jndiName = "foo"; - + MyEjb myEjb = createMock(MyEjb.class); expect(myEjb.getValue()).andReturn(value); myEjb.remove(); replay(myEjb); - + final MyHome home = createMock(MyHome.class); expect(home.create()).andReturn(myEjb); replay(home); - + JndiTemplate jt = new JndiTemplate() { public Object lookup(String name) { // parameterize @@ -70,7 +70,7 @@ public class SimpleRemoteStatelessSessionProxyFactoryBeanTests extends SimpleRem return home; } }; - + SimpleRemoteStatelessSessionProxyFactoryBean fb = new SimpleRemoteStatelessSessionProxyFactoryBean(); fb.setJndiName(jndiName); fb.setResourceRef(true); @@ -83,10 +83,10 @@ public class SimpleRemoteStatelessSessionProxyFactoryBeanTests extends SimpleRem MyBusinessMethods mbm = (MyBusinessMethods) fb.getObject(); assertTrue(Proxy.isProxyClass(mbm.getClass())); assertEquals("Returns expected value", value, mbm.getValue()); - verify(myEjb); - verify(home); + verify(myEjb); + verify(home); } - + @Test public void testInvokesMethodOnEjb3StyleBean() throws Exception { final int value = 11; @@ -123,18 +123,18 @@ public class SimpleRemoteStatelessSessionProxyFactoryBeanTests extends SimpleRem public void testRemoteException() throws Exception { final RemoteException rex = new RemoteException(); final String jndiName = "foo"; - + MyEjb myEjb = createMock(MyEjb.class); expect(myEjb.getValue()).andThrow(rex); // TODO might want to control this behaviour... // Do we really want to call remove after a remote exception? myEjb.remove(); replay(myEjb); - + final MyHome home = createMock(MyHome.class); expect(home.create()).andReturn(myEjb); replay(home); - + JndiTemplate jt = new JndiTemplate() { public Object lookup(String name) { // parameterize @@ -142,13 +142,13 @@ public class SimpleRemoteStatelessSessionProxyFactoryBeanTests extends SimpleRem return home; } }; - + SimpleRemoteStatelessSessionProxyFactoryBean fb = new SimpleRemoteStatelessSessionProxyFactoryBean(); fb.setJndiName(jndiName); fb.setResourceRef(true); fb.setBusinessInterface(MyBusinessMethods.class); fb.setJndiTemplate(jt); - + // Need lifecycle methods fb.afterPropertiesSet(); @@ -161,19 +161,19 @@ public class SimpleRemoteStatelessSessionProxyFactoryBeanTests extends SimpleRem catch (RemoteException ex) { assertSame("Threw expected RemoteException", rex, ex); } - verify(myEjb); - verify(home); + verify(myEjb); + verify(home); } - + @Test public void testCreateException() throws Exception { final String jndiName = "foo"; - + final CreateException cex = new CreateException(); final MyHome home = createMock(MyHome.class); expect(home.create()).andThrow(cex); replay(home); - + JndiTemplate jt = new JndiTemplate() { public Object lookup(String name) { // parameterize @@ -181,20 +181,20 @@ public class SimpleRemoteStatelessSessionProxyFactoryBeanTests extends SimpleRem return home; } }; - + SimpleRemoteStatelessSessionProxyFactoryBean fb = new SimpleRemoteStatelessSessionProxyFactoryBean(); fb.setJndiName(jndiName); // rely on default setting of resourceRef=false, no auto addition of java:/comp/env prefix fb.setBusinessInterface(MyBusinessMethods.class); assertEquals(fb.getBusinessInterface(), MyBusinessMethods.class); fb.setJndiTemplate(jt); - + // Need lifecycle methods fb.afterPropertiesSet(); MyBusinessMethods mbm = (MyBusinessMethods) fb.getObject(); assertTrue(Proxy.isProxyClass(mbm.getClass())); - + try { mbm.getValue(); fail("Should have failed to create EJB"); @@ -202,10 +202,10 @@ public class SimpleRemoteStatelessSessionProxyFactoryBeanTests extends SimpleRem catch (RemoteException ex) { // expected } - - verify(home); + + verify(home); } - + @Test public void testCreateExceptionWithLocalBusinessInterface() throws Exception { final String jndiName = "foo"; @@ -269,7 +269,7 @@ public class SimpleRemoteStatelessSessionProxyFactoryBeanTests extends SimpleRem // rely on default setting of resourceRef=false, no auto addition of java:/comp/env prefix // Don't set business interface fb.setJndiTemplate(jt); - + // Check it's a singleton assertTrue(fb.isSingleton()); @@ -281,12 +281,12 @@ public class SimpleRemoteStatelessSessionProxyFactoryBeanTests extends SimpleRem // TODO more appropriate exception? assertTrue(ex.getMessage().indexOf("businessInterface") != 1); } - + // Expect no methods on home - verify(home); + verify(home); } - - + + protected static interface MyHome extends EJBHome { MyBusinessMethods create() throws CreateException, RemoteException; @@ -306,7 +306,7 @@ public class SimpleRemoteStatelessSessionProxyFactoryBeanTests extends SimpleRem protected static interface MyEjb extends EJBObject, MyBusinessMethods { - + } } diff --git a/spring-context/src/test/java/org/springframework/format/number/CurrencyFormatterTests.java b/spring-context/src/test/java/org/springframework/format/number/CurrencyFormatterTests.java index d10259b11b0..4cb1bfdd589 100644 --- a/spring-context/src/test/java/org/springframework/format/number/CurrencyFormatterTests.java +++ b/spring-context/src/test/java/org/springframework/format/number/CurrencyFormatterTests.java @@ -32,7 +32,7 @@ import org.springframework.format.number.CurrencyFormatter; public class CurrencyFormatterTests { private CurrencyFormatter formatter = new CurrencyFormatter(); - + @Test public void formatValue() { assertEquals("$23.00", formatter.print(new BigDecimal("23"), Locale.US)); diff --git a/spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceFactoryBeanTests.java index abd5e87e3ce..a5c07dbe80c 100644 --- a/spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/format/support/FormattingConversionServiceFactoryBeanTests.java @@ -195,7 +195,7 @@ public class FormattingConversionServiceFactoryBeanTests { public void registerFormatters(FormatterRegistry registry) { registry.addFormatter(new TestBeanFormatter()); } - + } - + } 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 e6e0d82a5e1..c620be5b741 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 @@ -219,7 +219,7 @@ public class FormattingConversionServiceTests { assertEquals(new LocalDate(2009, 10, 2), new LocalDate(dates.get(2))); } } - + @Test public void testPrintNull() throws ParseException { formattingService.addFormatterForFieldType(Number.class, new NumberFormatter()); @@ -324,7 +324,7 @@ public class FormattingConversionServiceTests { @org.springframework.format.annotation.DateTimeFormat(style="S-") public Date date; - + @org.springframework.format.annotation.DateTimeFormat(pattern="M-d-yy") public List dates; @@ -371,7 +371,7 @@ public class FormattingConversionServiceTests { public Integer parse(String text, Locale locale) throws ParseException { return null; } - + } diff --git a/spring-context/src/test/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoaderTests.java b/spring-context/src/test/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoaderTests.java index a5a7fc2d41a..506a883136b 100644 --- a/spring-context/src/test/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoaderTests.java +++ b/spring-context/src/test/java/org/springframework/instrument/classloading/ResourceOverridingShadowingClassLoaderTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2006 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,47 +29,47 @@ import org.junit.Test; * @since 2.0 */ public class ResourceOverridingShadowingClassLoaderTests { - + private static final String EXISTING_RESOURCE = "org/springframework/instrument/classloading/testResource.xml"; - + private ClassLoader thisClassLoader = getClass().getClassLoader(); - + private ResourceOverridingShadowingClassLoader overridingLoader = new ResourceOverridingShadowingClassLoader(thisClassLoader); - - + + @Test public void testFindsExistingResourceWithGetResourceAndNoOverrides() { assertNotNull(thisClassLoader.getResource(EXISTING_RESOURCE)); assertNotNull(overridingLoader.getResource(EXISTING_RESOURCE)); } - + @Test public void testDoesNotFindExistingResourceWithGetResourceAndNullOverride() { assertNotNull(thisClassLoader.getResource(EXISTING_RESOURCE)); overridingLoader.override(EXISTING_RESOURCE, null); assertNull(overridingLoader.getResource(EXISTING_RESOURCE)); } - + @Test public void testFindsExistingResourceWithGetResourceAsStreamAndNoOverrides() { assertNotNull(thisClassLoader.getResourceAsStream(EXISTING_RESOURCE)); assertNotNull(overridingLoader.getResourceAsStream(EXISTING_RESOURCE)); } - + @Test public void testDoesNotFindExistingResourceWithGetResourceAsStreamAndNullOverride() { assertNotNull(thisClassLoader.getResourceAsStream(EXISTING_RESOURCE)); overridingLoader.override(EXISTING_RESOURCE, null); assertNull(overridingLoader.getResourceAsStream(EXISTING_RESOURCE)); } - + @Test public void testFindsExistingResourceWithGetResourcesAndNoOverrides() throws IOException { assertNotNull(thisClassLoader.getResources(EXISTING_RESOURCE)); assertNotNull(overridingLoader.getResources(EXISTING_RESOURCE)); assertEquals(1, countElements(overridingLoader.getResources(EXISTING_RESOURCE))); } - + @Test public void testDoesNotFindExistingResourceWithGetResourcesAndNullOverride() throws IOException { assertNotNull(thisClassLoader.getResources(EXISTING_RESOURCE)); diff --git a/spring-context/src/test/java/org/springframework/jmx/IJmxTestBean.java b/spring-context/src/test/java/org/springframework/jmx/IJmxTestBean.java index 74d579fb8a7..0a6ba490356 100644 --- a/spring-context/src/test/java/org/springframework/jmx/IJmxTestBean.java +++ b/spring-context/src/test/java/org/springframework/jmx/IJmxTestBean.java @@ -36,5 +36,5 @@ public interface IJmxTestBean { // used to test invalid methods that exist in the proxy interface public void dontExposeMe(); - + } diff --git a/spring-context/src/test/java/org/springframework/jmx/export/DateRange.java b/spring-context/src/test/java/org/springframework/jmx/export/DateRange.java index a9e7f84df6b..5603c43abd1 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/DateRange.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/DateRange.java @@ -24,7 +24,7 @@ import java.util.Date; public class DateRange { private Date startDate; - + private Date endDate; public Date getStartDate() { diff --git a/spring-context/src/test/java/org/springframework/jmx/export/ExceptionOnInitBean.java b/spring-context/src/test/java/org/springframework/jmx/export/ExceptionOnInitBean.java index d11bee12ace..c61cd388aa2 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/ExceptionOnInitBean.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/ExceptionOnInitBean.java @@ -22,7 +22,7 @@ package org.springframework.jmx.export; public class ExceptionOnInitBean { private boolean exceptOnInit = false; - + private String name; public String getName() { diff --git a/spring-context/src/test/java/org/springframework/jmx/export/annotation/AnnotationTestBean.java b/spring-context/src/test/java/org/springframework/jmx/export/annotation/AnnotationTestBean.java index 1971dddc57d..97a3581954e 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/annotation/AnnotationTestBean.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/annotation/AnnotationTestBean.java @@ -66,7 +66,7 @@ public class AnnotationTestBean implements IJmxTestBean { public String getName() { return name; } - + @ManagedAttribute(description = "The Nick Name Attribute") public void setNickName(String nickName) { this.nickName = nickName; @@ -98,18 +98,18 @@ public class AnnotationTestBean implements IJmxTestBean { public void dontExposeMe() { throw new RuntimeException(); } - - @ManagedMetric(description="The QueueSize metric", currencyTimeLimit = 20, persistPolicy="OnUpdate", persistPeriod=300, + + @ManagedMetric(description="The QueueSize metric", currencyTimeLimit = 20, persistPolicy="OnUpdate", persistPeriod=300, category="utilization", metricType = MetricType.COUNTER, displayName="Queue Size", unit="messages") public long getQueueSize() { return 100l; } - + @ManagedMetric public int getCacheEntries() { return 3; } - + } diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractMetadataAssemblerTests.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractMetadataAssemblerTests.java index 3c15e835ee0..bfbd928382f 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractMetadataAssemblerTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractMetadataAssemblerTests.java @@ -41,9 +41,9 @@ import test.interceptor.NopInterceptor; * @author Chris Beams */ public abstract class AbstractMetadataAssemblerTests extends AbstractJmxAssemblerTests { - + protected static final String QUEUE_SIZE_METRIC = "QueueSize"; - + protected static final String CACHE_ENTRIES_METRIC = "CacheEntries"; public void testDescription() throws Exception { @@ -170,7 +170,7 @@ public abstract class AbstractMetadataAssemblerTests extends AbstractJmxAssemble assertTrue("Not included in autodetection", assembler.includeBean(proxy.getClass(), "some bean name")); } - + public void testMetricDescription() throws Exception { ModelMBeanInfo inf = getMBeanInfoFromAssembler(); ModelMBeanAttributeInfo metric = inf.getAttribute(QUEUE_SIZE_METRIC); @@ -180,7 +180,7 @@ public abstract class AbstractMetadataAssemblerTests extends AbstractJmxAssemble assertEquals("The description for the getter operation of the queue size metric is incorrect", "The QueueSize metric", operation.getDescription()); } - + public void testMetricDescriptor() throws Exception { ModelMBeanInfo info = getMBeanInfoFromAssembler(); Descriptor desc = info.getAttribute(QUEUE_SIZE_METRIC).getDescriptor(); @@ -192,7 +192,7 @@ public abstract class AbstractMetadataAssemblerTests extends AbstractJmxAssemble assertEquals("Metric Type should be COUNTER", "COUNTER",desc.getFieldValue("metricType")); assertEquals("Metric Category should be utilization", "utilization",desc.getFieldValue("metricCategory")); } - + public void testMetricDescriptorDefaults() throws Exception { ModelMBeanInfo info = getMBeanInfoFromAssembler(); Descriptor desc = info.getAttribute(CACHE_ENTRIES_METRIC).getDescriptor(); diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/IAdditionalTestMethods.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/IAdditionalTestMethods.java index 4c7e41c7472..d6b59fc5ffa 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/IAdditionalTestMethods.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/IAdditionalTestMethods.java @@ -9,5 +9,5 @@ public interface IAdditionalTestMethods { String getNickName(); void setNickName(String nickName); - + } diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/ICustomJmxBean.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/ICustomJmxBean.java index f3676ba5b8e..1d74177d3b4 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/ICustomJmxBean.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/ICustomJmxBean.java @@ -20,7 +20,7 @@ package org.springframework.jmx.export.assembler; * @author Rob Harrop */ public interface ICustomJmxBean extends ICustomBase { - + String getName(); void setName(String name); diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssemblerCustomTests.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssemblerCustomTests.java index 713263171be..bb9dc939122 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssemblerCustomTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/InterfaceBasedMBeanInfoAssemblerCustomTests.java @@ -57,5 +57,5 @@ public class InterfaceBasedMBeanInfoAssemblerCustomTests extends AbstractJmxAsse protected String getApplicationContextPath() { return "org/springframework/jmx/export/assembler/interfaceAssemblerCustom.xml"; } - + } diff --git a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java index 64c6bb7f395..3363f4f5853 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/assembler/MethodExclusionMBeanInfoAssemblerTests.java @@ -67,7 +67,7 @@ public class MethodExclusionMBeanInfoAssemblerTests extends AbstractJmxAssembler * http://opensource.atlassian.com/projects/spring/browse/SPR-2754 */ public void testIsNotIgnoredDoesntIgnoreUnspecifiedBeanMethods() throws Exception { - final String beanKey = "myTestBean"; + final String beanKey = "myTestBean"; MethodExclusionMBeanInfoAssembler assembler = new MethodExclusionMBeanInfoAssembler(); Properties ignored = new Properties(); ignored.setProperty(beanKey, "dontExposeMe,setSuperman"); diff --git a/spring-context/src/test/java/org/springframework/jmx/export/naming/KeyNamingStrategyTests.java b/spring-context/src/test/java/org/springframework/jmx/export/naming/KeyNamingStrategyTests.java index 0342d3b2cb7..c98f88489f8 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/naming/KeyNamingStrategyTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/naming/KeyNamingStrategyTests.java @@ -38,5 +38,5 @@ public class KeyNamingStrategyTests extends AbstractNamingStrategyTests { protected String getCorrectObjectName() { return OBJECT_NAME; } - + } diff --git a/spring-context/src/test/java/org/springframework/jndi/JndiTemplateEditorTests.java b/spring-context/src/test/java/org/springframework/jndi/JndiTemplateEditorTests.java index 9a9a6dfb385..cf2c73b5068 100644 --- a/spring-context/src/test/java/org/springframework/jndi/JndiTemplateEditorTests.java +++ b/spring-context/src/test/java/org/springframework/jndi/JndiTemplateEditorTests.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/org/springframework/mock/env/MockEnvironment.java b/spring-context/src/test/java/org/springframework/mock/env/MockEnvironment.java index 9759c99c551..a53fd65f89f 100644 --- a/spring-context/src/test/java/org/springframework/mock/env/MockEnvironment.java +++ b/spring-context/src/test/java/org/springframework/mock/env/MockEnvironment.java @@ -23,7 +23,7 @@ import org.springframework.core.env.ConfigurableEnvironment; * Simple {@link ConfigurableEnvironment} implementation exposing * {@link #setProperty(String, String)} and {@link #withProperty(String, String)} * methods for testing purposes. - * + * * @author Chris Beams * @author Sam Brannen * @since 3.2 diff --git a/spring-context/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java b/spring-context/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java index 8b816b45d0d..f6c3f0a3761 100644 --- a/spring-context/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java +++ b/spring-context/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java @@ -52,7 +52,7 @@ import org.springframework.util.ClassUtils; * DataSource ds = new DriverManagerDataSource(...); * builder.bind("java:comp/env/jdbc/myds", ds); * builder.activate(); - * + * * Note that it's impossible to activate multiple builders within the same JVM, * due to JNDI restrictions. Thus to configure a fresh builder repeatedly, use * the following code to get a reference to either an already activated builder diff --git a/spring-context/src/test/java/org/springframework/remoting/rmi/RmiSupportTests.java b/spring-context/src/test/java/org/springframework/remoting/rmi/RmiSupportTests.java index 2f2b1e81559..aebf7d8e419 100644 --- a/spring-context/src/test/java/org/springframework/remoting/rmi/RmiSupportTests.java +++ b/spring-context/src/test/java/org/springframework/remoting/rmi/RmiSupportTests.java @@ -273,7 +273,7 @@ public class RmiSupportTests extends TestCase { private void doTestRmiProxyFactoryBeanWithBusinessInterfaceAndExceptionAndRefresh( Class rmiExceptionClass, Class springExceptionClass) throws Exception { - + CountingRmiProxyFactoryBean factory = new CountingRmiProxyFactoryBean(); factory.setServiceInterface(IBusinessBean.class); factory.setServiceUrl("rmi://localhost:1090/test"); @@ -309,7 +309,7 @@ public class RmiSupportTests extends TestCase { try { client.afterPropertiesSet(); fail("url isn't set, expected IllegalArgumentException"); - } + } catch(IllegalArgumentException e){ // expected } diff --git a/spring-context/src/test/java/org/springframework/scheduling/concurrent/ThreadPoolTaskSchedulerTests.java b/spring-context/src/test/java/org/springframework/scheduling/concurrent/ThreadPoolTaskSchedulerTests.java index dbf22d24a9c..7d3b05f6319 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/concurrent/ThreadPoolTaskSchedulerTests.java +++ b/spring-context/src/test/java/org/springframework/scheduling/concurrent/ThreadPoolTaskSchedulerTests.java @@ -229,7 +229,7 @@ public class ThreadPoolTaskSchedulerTests { private final int expectedRunCount; private final AtomicInteger actualRunCount = new AtomicInteger(); - + private final CountDownLatch latch; private Thread lastThread; @@ -254,7 +254,7 @@ public class ThreadPoolTaskSchedulerTests { private final int expectedRunCount; private final AtomicInteger actualRunCount = new AtomicInteger(); - + TestCallable(int expectedRunCount) { this.expectedRunCount = expectedRunCount; } diff --git a/spring-context/src/test/java/org/springframework/scripting/ScriptBean.java b/spring-context/src/test/java/org/springframework/scripting/ScriptBean.java index ca2f6e476ce..95e40c10980 100644 --- a/spring-context/src/test/java/org/springframework/scripting/ScriptBean.java +++ b/spring-context/src/test/java/org/springframework/scripting/ScriptBean.java @@ -18,7 +18,7 @@ package org.springframework.scripting; /** * Simple interface used in testing the scripted beans support. - * + * * @author Rick Evans */ public interface ScriptBean { diff --git a/spring-context/src/test/java/org/springframework/scripting/config/ScriptingDefaultsTests.java b/spring-context/src/test/java/org/springframework/scripting/config/ScriptingDefaultsTests.java index 2aa12752903..fc19107ced6 100644 --- a/spring-context/src/test/java/org/springframework/scripting/config/ScriptingDefaultsTests.java +++ b/spring-context/src/test/java/org/springframework/scripting/config/ScriptingDefaultsTests.java @@ -42,7 +42,7 @@ public class ScriptingDefaultsTests extends TestCase { public void testDefaultRefreshCheckDelay() throws Exception { ApplicationContext context = new ClassPathXmlApplicationContext(CONFIG); Advised advised = (Advised) context.getBean("testBean"); - AbstractRefreshableTargetSource targetSource = + AbstractRefreshableTargetSource targetSource = ((AbstractRefreshableTargetSource) advised.getTargetSource()); Field field = AbstractRefreshableTargetSource.class.getDeclaredField("refreshCheckDelay"); field.setAccessible(true); diff --git a/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyAspectIntegrationTests.java b/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyAspectIntegrationTests.java index 62f2d3223cc..b0373d46a44 100644 --- a/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyAspectIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyAspectIntegrationTests.java @@ -23,7 +23,7 @@ public class GroovyAspectIntegrationTests { @Test public void testJavaBean() { - + context = new GenericXmlApplicationContext(getClass(), getClass().getSimpleName()+"-java-context.xml"); TestService bean = context.getBean("javaBean", TestService.class); diff --git a/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyScriptFactoryTests.java b/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyScriptFactoryTests.java index 0450ac80123..d43f90950b8 100644 --- a/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyScriptFactoryTests.java +++ b/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyScriptFactoryTests.java @@ -384,7 +384,7 @@ public class GroovyScriptFactoryTests { assertEquals("Hello World!", messenger.getMessage()); assertTrue(ctx.getBeansOfType(ConcreteMessenger.class).values().contains(messenger)); - + // Check that AnnotationUtils works with concrete proxied script classes assertNotNull(AnnotationUtils.findAnnotation(messenger.getClass(), Component.class)); } diff --git a/spring-context/src/test/java/org/springframework/scripting/groovy/LogUserAdvice.java b/spring-context/src/test/java/org/springframework/scripting/groovy/LogUserAdvice.java index 53ade227752..f3be4d65c45 100644 --- a/spring-context/src/test/java/org/springframework/scripting/groovy/LogUserAdvice.java +++ b/spring-context/src/test/java/org/springframework/scripting/groovy/LogUserAdvice.java @@ -6,11 +6,11 @@ import org.springframework.aop.MethodBeforeAdvice; import org.springframework.aop.ThrowsAdvice; public class LogUserAdvice implements MethodBeforeAdvice, ThrowsAdvice { - + private int countBefore = 0; - + private int countThrows = 0; - + public void before(Method method, Object[] objects, Object o) throws Throwable { countBefore++; System.out.println("Method:"+method.getName()); @@ -32,7 +32,7 @@ public class LogUserAdvice implements MethodBeforeAdvice, ThrowsAdvice { public int getCountThrows() { return countThrows; } - + public void reset() { countThrows = 0; countBefore = 0; diff --git a/spring-context/src/test/java/org/springframework/scripting/support/ScriptFactoryPostProcessorTests.java b/spring-context/src/test/java/org/springframework/scripting/support/ScriptFactoryPostProcessorTests.java index 8aebff6f7b7..db4323a318d 100644 --- a/spring-context/src/test/java/org/springframework/scripting/support/ScriptFactoryPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/scripting/support/ScriptFactoryPostProcessorTests.java @@ -216,7 +216,7 @@ public class ScriptFactoryPostProcessorTests extends TestCase { ctx.registerBeanDefinition(BEAN_WITH_DEPENDENCY_NAME, scriptedBeanBuilder.getBeanDefinition()); ctx.registerBeanDefinition("scriptProcessor", createScriptFactoryPostProcessor(true)); ctx.refresh(); - + Messenger messenger1 = (Messenger) ctx.getBean(BEAN_WITH_DEPENDENCY_NAME); Messenger messenger2 = (Messenger) ctx.getBean(BEAN_WITH_DEPENDENCY_NAME); assertNotSame(messenger1, messenger2); diff --git a/spring-context/src/test/java/org/springframework/util/SerializationTestUtils.java b/spring-context/src/test/java/org/springframework/util/SerializationTestUtils.java index f42512ccb00..9ae4f54ec24 100644 --- a/spring-context/src/test/java/org/springframework/util/SerializationTestUtils.java +++ b/spring-context/src/test/java/org/springframework/util/SerializationTestUtils.java @@ -31,13 +31,13 @@ import java.io.OutputStream; * @author Rod Johnson */ public class SerializationTestUtils { - + public static void testSerialization(Object o) throws IOException { OutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(o); } - + public static boolean isSerializable(Object o) throws IOException { try { testSerialization(o); @@ -47,7 +47,7 @@ public class SerializationTestUtils { return false; } } - + public static Object serializeAndDeserialize(Object o) throws IOException, ClassNotFoundException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); @@ -55,7 +55,7 @@ public class SerializationTestUtils { oos.flush(); baos.flush(); byte[] bytes = baos.toByteArray(); - + ByteArrayInputStream is = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(is); Object o2 = ois.readObject(); 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 329e886577a..11235906e3f 100644 --- a/spring-context/src/test/java/org/springframework/validation/ValidationUtilsTests.java +++ b/spring-context/src/test/java/org/springframework/validation/ValidationUtilsTests.java @@ -23,7 +23,7 @@ import org.springframework.beans.TestBean; /** * Unit tests for {@link ValidationUtils}. - * + * * @author Juergen Hoeller * @author Rick Evans * @author Chris Beams diff --git a/spring-context/src/test/java/test/advice/CountingAfterReturningAdvice.java b/spring-context/src/test/java/test/advice/CountingAfterReturningAdvice.java index 12010bee5ca..2e9aaa5a15b 100644 --- a/spring-context/src/test/java/test/advice/CountingAfterReturningAdvice.java +++ b/spring-context/src/test/java/test/advice/CountingAfterReturningAdvice.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/test/advice/CountingBeforeAdvice.java b/spring-context/src/test/java/test/advice/CountingBeforeAdvice.java index cade9a18321..3dc49faf24f 100644 --- a/spring-context/src/test/java/test/advice/CountingBeforeAdvice.java +++ b/spring-context/src/test/java/test/advice/CountingBeforeAdvice.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/test/advice/MethodCounter.java b/spring-context/src/test/java/test/advice/MethodCounter.java index c7f660a511a..8c29886a3df 100644 --- a/spring-context/src/test/java/test/advice/MethodCounter.java +++ b/spring-context/src/test/java/test/advice/MethodCounter.java @@ -22,7 +22,7 @@ import java.util.HashMap; /** * Abstract superclass for counting advices etc. - * + * * @author Rod Johnson * @author Chris Beams */ diff --git a/spring-context/src/test/java/test/advice/MyThrowsHandler.java b/spring-context/src/test/java/test/advice/MyThrowsHandler.java index 1856821a580..abe79f9dc32 100644 --- a/spring-context/src/test/java/test/advice/MyThrowsHandler.java +++ b/spring-context/src/test/java/test/advice/MyThrowsHandler.java @@ -1,5 +1,5 @@ /** - * + * */ package test.advice; @@ -19,7 +19,7 @@ public class MyThrowsHandler extends MethodCounter implements ThrowsAdvice { public void afterThrowing(RemoteException ex) throws Throwable { count("remoteException"); } - + /** Not valid, wrong number of arguments */ public void afterThrowing(Method m, Exception ex) throws Throwable { throw new UnsupportedOperationException("Shouldn't be called"); diff --git a/spring-context/src/test/java/test/advice/TimestampIntroductionAdvisor.java b/spring-context/src/test/java/test/advice/TimestampIntroductionAdvisor.java index c0e70dd28e9..fc0794c17f7 100644 --- a/spring-context/src/test/java/test/advice/TimestampIntroductionAdvisor.java +++ b/spring-context/src/test/java/test/advice/TimestampIntroductionAdvisor.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,7 +22,7 @@ import org.springframework.aop.support.DefaultIntroductionAdvisor; import test.interceptor.TimestampIntroductionInterceptor; /** - * + * * @author Rod Johnson */ public class TimestampIntroductionAdvisor extends DefaultIntroductionAdvisor { diff --git a/spring-context/src/test/java/test/aspect/PerTargetAspect.java b/spring-context/src/test/java/test/aspect/PerTargetAspect.java index 79977f0cb1d..47fb82e40bc 100644 --- a/spring-context/src/test/java/test/aspect/PerTargetAspect.java +++ b/spring-context/src/test/java/test/aspect/PerTargetAspect.java @@ -1,5 +1,5 @@ /** - * + * */ package test.aspect; diff --git a/spring-context/src/test/java/test/beans/Employee.java b/spring-context/src/test/java/test/beans/Employee.java index db4d5fb5950..d93ca6ed60a 100644 --- a/spring-context/src/test/java/test/beans/Employee.java +++ b/spring-context/src/test/java/test/beans/Employee.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,7 @@ package test.beans; import org.springframework.beans.TestBean; public class Employee extends TestBean { - + private String co; /** @@ -29,11 +29,11 @@ public class Employee extends TestBean { public Employee() { super(); } - + public String getCompany() { return co; } - + public void setCompany(String co) { this.co = co; } diff --git a/spring-context/src/test/java/test/beans/FactoryMethods.java b/spring-context/src/test/java/test/beans/FactoryMethods.java index d3040c39b6a..ee25e7042b1 100644 --- a/spring-context/src/test/java/test/beans/FactoryMethods.java +++ b/spring-context/src/test/java/test/beans/FactoryMethods.java @@ -25,7 +25,7 @@ package test.beans; * @author Chris Beams */ public final class FactoryMethods { - + public static FactoryMethods nullInstance() { return null; } diff --git a/spring-context/src/test/java/test/beans/ITestBean.java b/spring-context/src/test/java/test/beans/ITestBean.java index 76b0ce68f83..81c0e45e3b5 100644 --- a/spring-context/src/test/java/test/beans/ITestBean.java +++ b/spring-context/src/test/java/test/beans/ITestBean.java @@ -21,7 +21,7 @@ import java.io.IOException; /** * Interface used for test beans. Two methods are the same as on Person, but if this extends * person it breaks quite a few tests - * + * * @author Rod Johnson */ public interface ITestBean { @@ -53,7 +53,7 @@ public interface ITestBean { /** * Increment the age by one. - * + * * @return the previous age */ int haveBirthday(); diff --git a/spring-context/src/test/java/test/beans/NestedTestBean.java b/spring-context/src/test/java/test/beans/NestedTestBean.java index e87c2c46ccc..2a37c6b8c1c 100644 --- a/spring-context/src/test/java/test/beans/NestedTestBean.java +++ b/spring-context/src/test/java/test/beans/NestedTestBean.java @@ -17,7 +17,7 @@ package test.beans; /** * Simple nested test bean used for testing bean factories, AOP framework etc. - * + * * @author Trevor D. Cook * @since 30.09.2003 */ diff --git a/spring-context/src/test/java/test/beans/SideEffectBean.java b/spring-context/src/test/java/test/beans/SideEffectBean.java index 33619a48b1c..990989bb19c 100644 --- a/spring-context/src/test/java/test/beans/SideEffectBean.java +++ b/spring-context/src/test/java/test/beans/SideEffectBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,21 +19,21 @@ package test.beans; /** * Bean that changes state on a business invocation, so that * we can check whether it's been invoked - * + * * @author Rod Johnson */ public class SideEffectBean { - + private int count; - + public void setCount(int count) { this.count = count; } - + public int getCount() { return this.count; } - + public void doWork() { ++count; } diff --git a/spring-context/src/test/java/test/beans/TestBean.java b/spring-context/src/test/java/test/beans/TestBean.java index 0911566a3f8..c528573e4df 100644 --- a/spring-context/src/test/java/test/beans/TestBean.java +++ b/spring-context/src/test/java/test/beans/TestBean.java @@ -37,7 +37,7 @@ import java.util.Set; /** * Simple test bean used for testing bean factories, AOP framework etc. - * + * * @author Rod Johnson * @since 15 April 2001 */ diff --git a/spring-context/src/test/java/test/interceptor/NopInterceptor.java b/spring-context/src/test/java/test/interceptor/NopInterceptor.java index 223a5f1a75c..79158e74ea4 100644 --- a/spring-context/src/test/java/test/interceptor/NopInterceptor.java +++ b/spring-context/src/test/java/test/interceptor/NopInterceptor.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,7 +26,7 @@ import org.aopalliance.intercept.MethodInvocation; * @author Rod Johnson */ public class NopInterceptor implements MethodInterceptor { - + private int count; /** @@ -36,11 +36,11 @@ public class NopInterceptor implements MethodInterceptor { increment(); return invocation.proceed(); } - + public int getCount() { return this.count; } - + protected void increment() { ++count; } diff --git a/spring-context/src/test/java/test/interceptor/SerializableNopInterceptor.java b/spring-context/src/test/java/test/interceptor/SerializableNopInterceptor.java index 3af0cbc2962..b706cc47955 100644 --- a/spring-context/src/test/java/test/interceptor/SerializableNopInterceptor.java +++ b/spring-context/src/test/java/test/interceptor/SerializableNopInterceptor.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,24 +22,24 @@ import java.io.Serializable; /** * Subclass of NopInterceptor that is serializable and * can be used to test proxy serialization. - * + * * @author Rod Johnson */ public class SerializableNopInterceptor extends NopInterceptor implements Serializable { - + /** * We must override this field and the related methods as * otherwise count won't be serialized from the non-serializable * NopInterceptor superclass. */ private int count; - + public int getCount() { return this.count; } - + protected void increment() { ++count; } - + } \ No newline at end of file diff --git a/spring-context/src/test/java/test/interceptor/TimestampIntroductionInterceptor.java b/spring-context/src/test/java/test/interceptor/TimestampIntroductionInterceptor.java index 960be703f66..4039d228391 100644 --- a/spring-context/src/test/java/test/interceptor/TimestampIntroductionInterceptor.java +++ b/spring-context/src/test/java/test/interceptor/TimestampIntroductionInterceptor.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,7 +31,7 @@ public class TimestampIntroductionInterceptor extends DelegatingIntroductionInte public TimestampIntroductionInterceptor(long ts) { this.ts = ts; } - + public void setTime(long ts) { this.ts = ts; } diff --git a/spring-context/src/test/java/test/mixin/DefaultLockable.java b/spring-context/src/test/java/test/mixin/DefaultLockable.java index a85fb94678b..2510395bf6c 100644 --- a/spring-context/src/test/java/test/mixin/DefaultLockable.java +++ b/spring-context/src/test/java/test/mixin/DefaultLockable.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,7 +19,7 @@ /** * Simple implementation of Lockable interface for use in mixins. - * + * * @author Rod Johnson */ public class DefaultLockable implements Lockable { diff --git a/spring-context/src/test/java/test/mixin/LockMixin.java b/spring-context/src/test/java/test/mixin/LockMixin.java index d4d9292ee4a..bdfafc45e5f 100644 --- a/spring-context/src/test/java/test/mixin/LockMixin.java +++ b/spring-context/src/test/java/test/mixin/LockMixin.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,19 +24,19 @@ import org.springframework.aop.support.DelegatingIntroductionInterceptor; * Mixin to provide stateful locking functionality. * Test/demonstration of AOP mixin support rather than a * useful interceptor in its own right. - * + * * @author Rod Johnson * @since 10.07.2003 */ public class LockMixin extends DelegatingIntroductionInterceptor implements Lockable { - + /** This field demonstrates additional state in the mixin */ private boolean locked; - + public void lock() { this.locked = true; } - + public void unlock() { this.locked = false; } diff --git a/spring-context/src/test/java/test/mixin/LockMixinAdvisor.java b/spring-context/src/test/java/test/mixin/LockMixinAdvisor.java index ba28e9dd4de..f82eef32947 100644 --- a/spring-context/src/test/java/test/mixin/LockMixinAdvisor.java +++ b/spring-context/src/test/java/test/mixin/LockMixinAdvisor.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,7 +24,7 @@ import org.springframework.aop.support.DefaultIntroductionAdvisor; * @author Rod Johnson */ public class LockMixinAdvisor extends DefaultIntroductionAdvisor { - + public LockMixinAdvisor() { super(new LockMixin(), Lockable.class); } diff --git a/spring-context/src/test/java/test/mixin/Lockable.java b/spring-context/src/test/java/test/mixin/Lockable.java index 6db63281d7c..dd006ad449a 100644 --- a/spring-context/src/test/java/test/mixin/Lockable.java +++ b/spring-context/src/test/java/test/mixin/Lockable.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,15 +19,15 @@ package test.mixin; /** * Simple interface to use for mixins - * + * * @author Rod Johnson * */ public interface Lockable { - + void lock(); - + void unlock(); - + boolean locked(); } \ No newline at end of file diff --git a/spring-context/src/test/java/test/mixin/LockedException.java b/spring-context/src/test/java/test/mixin/LockedException.java index f00ac9507b9..68d428fece6 100644 --- a/spring-context/src/test/java/test/mixin/LockedException.java +++ b/spring-context/src/test/java/test/mixin/LockedException.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-context/src/test/java/test/util/TimeStamped.java b/spring-context/src/test/java/test/util/TimeStamped.java index 958d8b21f9a..2de8e381e2a 100644 --- a/spring-context/src/test/java/test/util/TimeStamped.java +++ b/spring-context/src/test/java/test/util/TimeStamped.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,7 +23,7 @@ package test.util; * @author Rod Johnson */ public interface TimeStamped { - + /** * Return the timestamp for this object. * @return long the timestamp for this object, diff --git a/spring-core/src/main/java/org/springframework/core/ConstantException.java b/spring-core/src/main/java/org/springframework/core/ConstantException.java index 938667454bb..454a8abb5af 100644 --- a/spring-core/src/main/java/org/springframework/core/ConstantException.java +++ b/spring-core/src/main/java/org/springframework/core/ConstantException.java @@ -25,7 +25,7 @@ package org.springframework.core; * @see org.springframework.core.Constants */ public class ConstantException extends IllegalArgumentException { - + /** * Thrown when an invalid constant name is requested. * @param className name of the class containing the constant definitions diff --git a/spring-core/src/main/java/org/springframework/core/Constants.java b/spring-core/src/main/java/org/springframework/core/Constants.java index 9fb1e2cc5f8..792c1a20569 100644 --- a/spring-core/src/main/java/org/springframework/core/Constants.java +++ b/spring-core/src/main/java/org/springframework/core/Constants.java @@ -207,7 +207,7 @@ public class Constants { * in accordance with the standard Java convention for constant * values (i.e. all uppercase). The supplied namePrefix * will be uppercased (in a locale-insensitive fashion) prior to - * the main logic of this method kicking in. + * the main logic of this method kicking in. * @param namePrefix prefix of the constant names to search (may be null) * @return the set of values */ diff --git a/spring-core/src/main/java/org/springframework/core/ControlFlow.java b/spring-core/src/main/java/org/springframework/core/ControlFlow.java index 4875f1c191f..908501d12a0 100644 --- a/spring-core/src/main/java/org/springframework/core/ControlFlow.java +++ b/spring-core/src/main/java/org/springframework/core/ControlFlow.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-core/src/main/java/org/springframework/core/ErrorCoded.java b/spring-core/src/main/java/org/springframework/core/ErrorCoded.java index 6b75babe921..722dcdb98ac 100644 --- a/spring-core/src/main/java/org/springframework/core/ErrorCoded.java +++ b/spring-core/src/main/java/org/springframework/core/ErrorCoded.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -27,9 +27,9 @@ package org.springframework.core; * @see org.springframework.context.MessageSource */ public interface ErrorCoded { - + /** - * Return the error code associated with this failure. + * Return the error code associated with this failure. * The GUI can render this any way it pleases, allowing for localization etc. * @return a String error code associated with this failure, * or null if not error-coded diff --git a/spring-core/src/main/java/org/springframework/core/ParameterNameDiscoverer.java b/spring-core/src/main/java/org/springframework/core/ParameterNameDiscoverer.java index 59f03a59391..67152fc974c 100644 --- a/spring-core/src/main/java/org/springframework/core/ParameterNameDiscoverer.java +++ b/spring-core/src/main/java/org/springframework/core/ParameterNameDiscoverer.java @@ -32,7 +32,7 @@ import java.lang.reflect.Method; * @since 2.0 */ public interface ParameterNameDiscoverer { - + /** * Return parameter names for this method, * or null if they cannot be determined. @@ -41,7 +41,7 @@ public interface ParameterNameDiscoverer { * or null if they cannot */ String[] getParameterNames(Method method); - + /** * Return parameter names for this constructor, * or null if they cannot be determined. diff --git a/spring-core/src/main/java/org/springframework/core/PrioritizedParameterNameDiscoverer.java b/spring-core/src/main/java/org/springframework/core/PrioritizedParameterNameDiscoverer.java index e2cb227b83c..f15a8922082 100644 --- a/spring-core/src/main/java/org/springframework/core/PrioritizedParameterNameDiscoverer.java +++ b/spring-core/src/main/java/org/springframework/core/PrioritizedParameterNameDiscoverer.java @@ -35,7 +35,7 @@ import java.util.List; * @since 2.0 */ public class PrioritizedParameterNameDiscoverer implements ParameterNameDiscoverer { - + private final List parameterNameDiscoverers = new LinkedList(); diff --git a/spring-core/src/main/java/org/springframework/core/enums/AbstractGenericLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/AbstractGenericLabeledEnum.java index 41611b285a2..e73babe3ae4 100644 --- a/spring-core/src/main/java/org/springframework/core/enums/AbstractGenericLabeledEnum.java +++ b/spring-core/src/main/java/org/springframework/core/enums/AbstractGenericLabeledEnum.java @@ -48,6 +48,6 @@ public abstract class AbstractGenericLabeledEnum extends AbstractLabeledEnum { else { return getCode().toString(); } - } + } } diff --git a/spring-core/src/main/java/org/springframework/core/enums/LetterCodedLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/LetterCodedLabeledEnum.java index b8bd13a49af..31abeab0c8f 100644 --- a/spring-core/src/main/java/org/springframework/core/enums/LetterCodedLabeledEnum.java +++ b/spring-core/src/main/java/org/springframework/core/enums/LetterCodedLabeledEnum.java @@ -50,7 +50,7 @@ public class LetterCodedLabeledEnum extends AbstractGenericLabeledEnum { this.code = new Character(code); } - + public Comparable getCode() { return code; } diff --git a/spring-core/src/main/java/org/springframework/core/enums/ShortCodedLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/ShortCodedLabeledEnum.java index b3a129d99f2..f0aab91544e 100644 --- a/spring-core/src/main/java/org/springframework/core/enums/ShortCodedLabeledEnum.java +++ b/spring-core/src/main/java/org/springframework/core/enums/ShortCodedLabeledEnum.java @@ -46,7 +46,7 @@ public class ShortCodedLabeledEnum extends AbstractGenericLabeledEnum { this.code = new Short((short) code); } - + public Comparable getCode() { return code; } diff --git a/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnum.java b/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnum.java index 0c167cf49b6..3dad2edda58 100644 --- a/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnum.java +++ b/spring-core/src/main/java/org/springframework/core/enums/StaticLabeledEnum.java @@ -18,9 +18,9 @@ package org.springframework.core.enums; /** * Base class for static type-safe labeled enum instances. - * + * * Usage example: - * + * *

        * public class FlowSessionStatus extends StaticLabeledEnum {
        *
      @@ -30,15 +30,15 @@ package org.springframework.core.enums;
        *     public static FlowSessionStatus PAUSED = new FlowSessionStatus(2, "Paused");
        *     public static FlowSessionStatus SUSPENDED = new FlowSessionStatus(3, "Suspended");
        *     public static FlowSessionStatus ENDED = new FlowSessionStatus(4, "Ended");
      - *     
      + *
        *     // private constructor!
        *     private FlowSessionStatus(int code, String label) {
        *         super(code, label);
        *     }
      - *     
      + *
        *     // custom behavior
        * }
      - * + * * @author Keith Donald * @since 1.2.6 * @deprecated as of Spring 3.0, in favor of Java 5 enums. diff --git a/spring-core/src/main/java/org/springframework/core/env/EnvironmentCapable.java b/spring-core/src/main/java/org/springframework/core/env/EnvironmentCapable.java index 6e96cb26d02..3c53c712757 100644 --- a/spring-core/src/main/java/org/springframework/core/env/EnvironmentCapable.java +++ b/spring-core/src/main/java/org/springframework/core/env/EnvironmentCapable.java @@ -18,7 +18,7 @@ package org.springframework.core.env; /** - * Interface indicating a component contains and makes available an {@link Environment} object. + * Interface indicating a component contains and makes available an {@link Environment} object. * *

      All Spring application contexts are EnvironmentCapable, and the interface is used primarily * for performing {@code instanceof} checks in framework methods that accept BeanFactory diff --git a/spring-core/src/main/java/org/springframework/core/io/InputStreamSource.java b/spring-core/src/main/java/org/springframework/core/io/InputStreamSource.java index 7e1f58a0c71..3b1ca88ea2f 100644 --- a/spring-core/src/main/java/org/springframework/core/io/InputStreamSource.java +++ b/spring-core/src/main/java/org/springframework/core/io/InputStreamSource.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,7 +29,7 @@ import java.io.InputStream; * file-based Resource implementation can be used as a concrete * instance, allowing one to read the underlying content stream multiple times. * This makes this interface useful as an abstract content source for mail - * attachments, for example. + * attachments, for example. * * @author Juergen Hoeller * @since 20.01.2004 diff --git a/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java b/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java index f9a3645a3e2..61a56cdaff2 100644 --- a/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java +++ b/spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java @@ -66,7 +66,7 @@ import org.springframework.util.StringUtils; * Examples are real URLs such as "file:C:/context.xml", pseudo-URLs * such as "classpath:/context.xml", and simple unprefixed paths * such as "/WEB-INF/context.xml". The latter will resolve in a - * fashion specific to the underlying ResourceLoader (e.g. + * fashion specific to the underlying ResourceLoader (e.g. * ServletContextResource for a WebApplicationContext). * *

      Ant-style Patterns: @@ -147,7 +147,7 @@ import org.springframework.util.StringUtils; * com/mycompany/package1/service-context.xml * may be in only one location, but when a path such as

        *     classpath:com/mycompany/**/service-context.xml
      - * 
      is used to try to resolve it, the resolver will work off the (first) URL + * is used to try to resolve it, the resolver will work off the (first) URL * returned by getResource("com/mycompany");. If this base package * node exists in multiple classloader locations, the actual end resource may * not be underneath. Therefore, preferably, use "classpath*:" with the same @@ -695,7 +695,7 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol else if ("toString".equals(methodName)) { return toString(); } - + throw new IllegalStateException("Unexpected method invocation: " + method); } diff --git a/spring-core/src/main/java/org/springframework/core/serializer/DefaultDeserializer.java b/spring-core/src/main/java/org/springframework/core/serializer/DefaultDeserializer.java index a50fbea4463..a247769a7ae 100644 --- a/spring-core/src/main/java/org/springframework/core/serializer/DefaultDeserializer.java +++ b/spring-core/src/main/java/org/springframework/core/serializer/DefaultDeserializer.java @@ -24,12 +24,12 @@ import org.springframework.core.NestedIOException; /** * Deserializer that reads an input stream using Java Serialization. - * + * * @author Gary Russell * @author Mark Fisher * @since 3.0.5 */ -public class DefaultDeserializer implements Deserializer { +public class DefaultDeserializer implements Deserializer { /** * Reads the input stream and deserializes into an object. diff --git a/spring-core/src/main/java/org/springframework/core/serializer/DefaultSerializer.java b/spring-core/src/main/java/org/springframework/core/serializer/DefaultSerializer.java index 792be40ad30..8e03728e8c2 100644 --- a/spring-core/src/main/java/org/springframework/core/serializer/DefaultSerializer.java +++ b/spring-core/src/main/java/org/springframework/core/serializer/DefaultSerializer.java @@ -23,7 +23,7 @@ import java.io.Serializable; /** * Serializer that writes an object to an output stream using Java Serialization. - * + * * @author Gary Russell * @author Mark Fisher * @since 3.0.5 diff --git a/spring-core/src/main/java/org/springframework/core/serializer/Deserializer.java b/spring-core/src/main/java/org/springframework/core/serializer/Deserializer.java index 02958ac5b33..0219a70e429 100644 --- a/spring-core/src/main/java/org/springframework/core/serializer/Deserializer.java +++ b/spring-core/src/main/java/org/springframework/core/serializer/Deserializer.java @@ -21,7 +21,7 @@ import java.io.InputStream; /** * A strategy interface for converting from data in an InputStream to an Object. - * + * * @author Gary Russell * @author Mark Fisher * @since 3.0.5 diff --git a/spring-core/src/main/java/org/springframework/core/serializer/Serializer.java b/spring-core/src/main/java/org/springframework/core/serializer/Serializer.java index 88ec0d4f40e..b1e0bb95e07 100644 --- a/spring-core/src/main/java/org/springframework/core/serializer/Serializer.java +++ b/spring-core/src/main/java/org/springframework/core/serializer/Serializer.java @@ -21,7 +21,7 @@ import java.io.OutputStream; /** * A strategy interface for streaming an object to an OutputStream. - * + * * @author Gary Russell * @author Mark Fisher * @since 3.0.5 diff --git a/spring-core/src/main/java/org/springframework/core/serializer/package-info.java b/spring-core/src/main/java/org/springframework/core/serializer/package-info.java index f94296f9ca6..36a79f4151a 100644 --- a/spring-core/src/main/java/org/springframework/core/serializer/package-info.java +++ b/spring-core/src/main/java/org/springframework/core/serializer/package-info.java @@ -1,7 +1,7 @@ /** * - * Root package for Spring's serializer interfaces and implementations. + * Root package for Spring's serializer interfaces and implementations. * Provides an abstraction over various serialization techniques. * Includes exceptions for serialization and deserialization failures. * diff --git a/spring-core/src/main/java/org/springframework/core/style/StylerUtils.java b/spring-core/src/main/java/org/springframework/core/style/StylerUtils.java index 1457589bf19..a49fa804611 100644 --- a/spring-core/src/main/java/org/springframework/core/style/StylerUtils.java +++ b/spring-core/src/main/java/org/springframework/core/style/StylerUtils.java @@ -17,7 +17,7 @@ package org.springframework.core.style; /** - * Simple utility class to allow for convenient access to value + * Simple utility class to allow for convenient access to value * styling logic, mainly to support descriptive logging messages. * *

      For more sophisticated needs, use the {@link ValueStyler} abstraction @@ -30,7 +30,7 @@ package org.springframework.core.style; * @see DefaultValueStyler */ public abstract class StylerUtils { - + /** * Default ValueStyler instance used by the style method. * Also available for the {@link ToStringCreator} class in this package. diff --git a/spring-core/src/main/java/org/springframework/core/style/ToStringCreator.java b/spring-core/src/main/java/org/springframework/core/style/ToStringCreator.java index fcf1d27584b..51441951d51 100644 --- a/spring-core/src/main/java/org/springframework/core/style/ToStringCreator.java +++ b/spring-core/src/main/java/org/springframework/core/style/ToStringCreator.java @@ -22,7 +22,7 @@ import org.springframework.util.Assert; * Utility class that builds pretty-printing toString() methods * with pluggable styling conventions. By default, ToStringCreator adheres * to Spring's toString() styling conventions. - * + * * @author Keith Donald * @author Juergen Hoeller * @since 1.2.2 diff --git a/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java index 4830730c754..d79cb3e5335 100644 --- a/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java +++ b/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java @@ -41,7 +41,7 @@ public class SyncTaskExecutor implements TaskExecutor, Serializable { /** * Executes the given task synchronously, through direct * invocation of it's {@link Runnable#run() run()} method. - * @throws IllegalArgumentException if the given task is null + * @throws IllegalArgumentException if the given task is null */ public void execute(Runnable task) { Assert.notNull(task, "Runnable must not be null"); diff --git a/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java index a13738578a2..71956bf2242 100644 --- a/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java +++ b/spring-core/src/main/java/org/springframework/core/task/TaskExecutor.java @@ -21,7 +21,7 @@ import java.util.concurrent.Executor; /** * Simple task executor interface that abstracts the execution * of a {@link Runnable}. - * + * *

      Implementations can use all sorts of different execution strategies, * such as: synchronous, asynchronous, using a thread pool, and more. * diff --git a/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java b/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java index aca42b9d946..a9e89dff149 100644 --- a/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java +++ b/spring-core/src/main/java/org/springframework/core/type/StandardMethodMetadata.java @@ -67,11 +67,11 @@ public class StandardMethodMetadata implements MethodMetadata { return this.introspectedMethod; } - + public String getMethodName() { return this.introspectedMethod.getName(); } - + public String getDeclaringClassName() { return this.introspectedMethod.getDeclaringClass().getName(); } diff --git a/spring-core/src/main/java/org/springframework/core/type/classreading/package-info.java b/spring-core/src/main/java/org/springframework/core/type/classreading/package-info.java index 5a8afa0838d..62b269f4863 100644 --- a/spring-core/src/main/java/org/springframework/core/type/classreading/package-info.java +++ b/spring-core/src/main/java/org/springframework/core/type/classreading/package-info.java @@ -1,8 +1,8 @@ /** - * + * * Support classes for reading annotation and class-level metadata. - * + * */ package org.springframework.core.type.classreading; diff --git a/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java b/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java index bebdb7dd88d..1a218fb70da 100644 --- a/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java +++ b/spring-core/src/main/java/org/springframework/core/type/filter/AbstractTypeHierarchyTraversingFilter.java @@ -24,12 +24,12 @@ import org.springframework.core.type.classreading.MetadataReader; /** * Type filter that is aware of traversing over hierarchy. - * + * *

      This filter is useful when matching needs to be made based on potentially the * whole class/interface hierarchy. The algorithm employed uses a succeed-fast * strategy: if at any time a match is declared, no further processing is * carried out. - * + * * @author Ramnivas Laddad * @author Mark Fisher * @since 2.5 diff --git a/spring-core/src/main/java/org/springframework/core/type/filter/AnnotationTypeFilter.java b/spring-core/src/main/java/org/springframework/core/type/filter/AnnotationTypeFilter.java index e0a1aba156e..73c494b458e 100644 --- a/spring-core/src/main/java/org/springframework/core/type/filter/AnnotationTypeFilter.java +++ b/spring-core/src/main/java/org/springframework/core/type/filter/AnnotationTypeFilter.java @@ -78,7 +78,7 @@ public class AnnotationTypeFilter extends AbstractTypeHierarchyTraversingFilter @Override protected boolean matchSelf(MetadataReader metadataReader) { AnnotationMetadata metadata = metadataReader.getAnnotationMetadata(); - return metadata.hasAnnotation(this.annotationType.getName()) || + return metadata.hasAnnotation(this.annotationType.getName()) || (this.considerMetaAnnotations && metadata.hasMetaAnnotation(this.annotationType.getName())); } diff --git a/spring-core/src/main/java/org/springframework/core/type/filter/AssignableTypeFilter.java b/spring-core/src/main/java/org/springframework/core/type/filter/AssignableTypeFilter.java index 8fb8ecd3f7d..7d0f4574529 100644 --- a/spring-core/src/main/java/org/springframework/core/type/filter/AssignableTypeFilter.java +++ b/spring-core/src/main/java/org/springframework/core/type/filter/AssignableTypeFilter.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2007 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-core/src/main/java/org/springframework/util/CachingMapDecorator.java b/spring-core/src/main/java/org/springframework/util/CachingMapDecorator.java index 832b4a1f55b..b8a615150bc 100644 --- a/spring-core/src/main/java/org/springframework/util/CachingMapDecorator.java +++ b/spring-core/src/main/java/org/springframework/util/CachingMapDecorator.java @@ -37,7 +37,7 @@ import java.util.WeakHashMap; *

      This class is an abstract template. Caching Map implementations * should subclass and override the create(key) method which * encapsulates expensive creation of a new object. - * + * * @author Keith Donald * @author Juergen Hoeller * @since 1.2.2 diff --git a/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java b/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java index 172359c351e..a845c061c8d 100644 --- a/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java +++ b/spring-core/src/main/java/org/springframework/util/ConcurrencyThrottleSupport.java @@ -54,7 +54,7 @@ public abstract class ConcurrencyThrottleSupport implements Serializable { * Switch concurrency 'off': that is, don't allow any concurrent invocations. */ public static final int NO_CONCURRENCY = 0; - + /** Transient to optimize serialization */ protected transient Log logger = LogFactory.getLog(getClass()); @@ -99,7 +99,7 @@ public abstract class ConcurrencyThrottleSupport implements Serializable { /** * To be invoked before the main execution logic of concrete subclasses. *

      This implementation applies the concurrency throttle. - * @see #afterAccess() + * @see #afterAccess() */ protected void beforeAccess() { if (this.concurrencyLimit == NO_CONCURRENCY) { diff --git a/spring-core/src/main/java/org/springframework/util/DigestUtils.java b/spring-core/src/main/java/org/springframework/util/DigestUtils.java index 200c73b7e6d..0328c0fdd6f 100644 --- a/spring-core/src/main/java/org/springframework/util/DigestUtils.java +++ b/spring-core/src/main/java/org/springframework/util/DigestUtils.java @@ -67,7 +67,7 @@ public abstract class DigestUtils { } /** - * Creates a new {@link MessageDigest} with the given algorithm. Necessary + * Creates a new {@link MessageDigest} with the given algorithm. Necessary * because {@code MessageDigest} is not thread-safe. */ private static MessageDigest getDigest(String algorithm) { diff --git a/spring-core/src/main/java/org/springframework/util/PropertiesPersister.java b/spring-core/src/main/java/org/springframework/util/PropertiesPersister.java index 9fb5c755a40..a8edf970607 100644 --- a/spring-core/src/main/java/org/springframework/util/PropertiesPersister.java +++ b/spring-core/src/main/java/org/springframework/util/PropertiesPersister.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-core/src/main/java/org/springframework/util/SystemPropertyUtils.java b/spring-core/src/main/java/org/springframework/util/SystemPropertyUtils.java index 6e8eaff2f13..7506863875b 100644 --- a/spring-core/src/main/java/org/springframework/util/SystemPropertyUtils.java +++ b/spring-core/src/main/java/org/springframework/util/SystemPropertyUtils.java @@ -22,7 +22,7 @@ import org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver; * Helper class for resolving placeholders in texts. Usually applied to file paths. * *

      A text may contain ${...} placeholders, to be resolved as system properties: e.g. - * ${user.dir}. Default values can be supplied using the ":" separator between key + * ${user.dir}. Default values can be supplied using the ":" separator between key * and value. * * @author Juergen Hoeller diff --git a/spring-core/src/main/java/org/springframework/util/TypeUtils.java b/spring-core/src/main/java/org/springframework/util/TypeUtils.java index 6c98fb26f61..0f0125cf41e 100644 --- a/spring-core/src/main/java/org/springframework/util/TypeUtils.java +++ b/spring-core/src/main/java/org/springframework/util/TypeUtils.java @@ -212,7 +212,7 @@ public abstract class TypeUtils { return true; } - + public static boolean isAssignableBound(Type lhsType, Type rhsType) { if (rhsType == null) { return true; diff --git a/spring-core/src/main/java/org/springframework/util/comparator/ComparableComparator.java b/spring-core/src/main/java/org/springframework/util/comparator/ComparableComparator.java index 269fddb4b9b..40e4e7af933 100644 --- a/spring-core/src/main/java/org/springframework/util/comparator/ComparableComparator.java +++ b/spring-core/src/main/java/org/springframework/util/comparator/ComparableComparator.java @@ -22,7 +22,7 @@ import java.util.Comparator; * Comparator that adapts Comparables to the Comparator interface. * Mainly for internal use in other Comparators, when supposed * to work on Comparables. - * + * * @author Keith Donald * @since 1.2.2 * @see Comparable diff --git a/spring-core/src/main/java/org/springframework/util/comparator/CompoundComparator.java b/spring-core/src/main/java/org/springframework/util/comparator/CompoundComparator.java index 4e1a6189afd..ba56bd54d15 100644 --- a/spring-core/src/main/java/org/springframework/util/comparator/CompoundComparator.java +++ b/spring-core/src/main/java/org/springframework/util/comparator/CompoundComparator.java @@ -32,7 +32,7 @@ import org.springframework.util.Assert; * *

      This facilitates in-memory sorting similar to multi-column sorting in SQL. * The order of any single Comparator in the list can also be reversed. - * + * * @author Keith Donald * @author Juergen Hoeller * @since 1.2.2 diff --git a/spring-core/src/main/java/org/springframework/util/xml/DomUtils.java b/spring-core/src/main/java/org/springframework/util/xml/DomUtils.java index 62e1328fcfd..d34943281b8 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/DomUtils.java +++ b/spring-core/src/main/java/org/springframework/util/xml/DomUtils.java @@ -119,7 +119,7 @@ public abstract class DomUtils { } /** - * Retrieve all child elements of the given DOM element + * Retrieve all child elements of the given DOM element * @param ele the DOM element to analyze * @return a List of child org.w3c.dom.Element instances diff --git a/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamWriter.java b/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamWriter.java index c2f8b8509d5..37dff4fb810 100644 --- a/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamWriter.java +++ b/spring-core/src/main/java/org/springframework/util/xml/XMLEventStreamWriter.java @@ -36,7 +36,7 @@ import org.springframework.util.Assert; * * @author Arjen Poutsma * @since 3.0.5 - * @see StaxUtils#createEventStreamWriter(javax.xml.stream.XMLEventWriter, javax.xml.stream.XMLEventFactory) + * @see StaxUtils#createEventStreamWriter(javax.xml.stream.XMLEventWriter, javax.xml.stream.XMLEventFactory) */ class XMLEventStreamWriter implements XMLStreamWriter { @@ -51,7 +51,7 @@ class XMLEventStreamWriter implements XMLStreamWriter { public XMLEventStreamWriter(XMLEventWriter eventWriter, XMLEventFactory eventFactory) { Assert.notNull(eventWriter, "'eventWriter' must not be null"); Assert.notNull(eventFactory, "'eventFactory' must not be null"); - + this.eventWriter = eventWriter; this.eventFactory = eventFactory; } diff --git a/spring-core/src/test/java/org/springframework/beans/INestedTestBean.java b/spring-core/src/test/java/org/springframework/beans/INestedTestBean.java index 7d87547b5f7..c5c4ed5e679 100644 --- a/spring-core/src/test/java/org/springframework/beans/INestedTestBean.java +++ b/spring-core/src/test/java/org/springframework/beans/INestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-core/src/test/java/org/springframework/beans/IOther.java b/spring-core/src/test/java/org/springframework/beans/IOther.java index 797486ec44e..6a8f74187cb 100644 --- a/spring-core/src/test/java/org/springframework/beans/IOther.java +++ b/spring-core/src/test/java/org/springframework/beans/IOther.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-core/src/test/java/org/springframework/beans/NestedTestBean.java b/spring-core/src/test/java/org/springframework/beans/NestedTestBean.java index a06e15d150b..0eb8df5c8ae 100644 --- a/spring-core/src/test/java/org/springframework/beans/NestedTestBean.java +++ b/spring-core/src/test/java/org/springframework/beans/NestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-core/src/test/java/org/springframework/core/AbstractControlFlowTests.java b/spring-core/src/test/java/org/springframework/core/AbstractControlFlowTests.java index 2136a269d9f..4df72c30916 100644 --- a/spring-core/src/test/java/org/springframework/core/AbstractControlFlowTests.java +++ b/spring-core/src/test/java/org/springframework/core/AbstractControlFlowTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2006 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,7 +33,7 @@ public abstract class AbstractControlFlowTests extends TestCase { new Two().testing(); new Three().test(); } - + /* public void testUnderPackage() { ControlFlow cflow = new ControlFlow(); @@ -43,7 +43,7 @@ public abstract class AbstractControlFlowTests extends TestCase { } */ - + public class One { public void test() { diff --git a/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java b/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java index 95f93a430d1..98c4a543148 100644 --- a/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java +++ b/spring-core/src/test/java/org/springframework/core/BridgeMethodResolverTests.java @@ -882,7 +882,7 @@ public class BridgeMethodResolverTests { } - public class GenericHibernateRepository + public class GenericHibernateRepository implements ConvenientGenericRepository { /** diff --git a/spring-core/src/test/java/org/springframework/core/ConstantsTests.java b/spring-core/src/test/java/org/springframework/core/ConstantsTests.java index 68fe5cd7475..2dc85aae319 100644 --- a/spring-core/src/test/java/org/springframework/core/ConstantsTests.java +++ b/spring-core/src/test/java/org/springframework/core/ConstantsTests.java @@ -33,7 +33,7 @@ public class ConstantsTests extends TestCase { Constants c = new Constants(A.class); assertEquals(A.class.getName(), c.getClassName()); assertEquals(9, c.getSize()); - + assertEquals(c.asNumber("DOG").intValue(), A.DOG); assertEquals(c.asNumber("dog").intValue(), A.DOG); assertEquals(c.asNumber("cat").intValue(), A.CAT); diff --git a/spring-core/src/test/java/org/springframework/core/DefaultControlFlowTests.java b/spring-core/src/test/java/org/springframework/core/DefaultControlFlowTests.java index d527f769eac..ea011aa984d 100644 --- a/spring-core/src/test/java/org/springframework/core/DefaultControlFlowTests.java +++ b/spring-core/src/test/java/org/springframework/core/DefaultControlFlowTests.java @@ -22,7 +22,7 @@ package org.springframework.core; * @author Rod Johnson */ public class DefaultControlFlowTests extends AbstractControlFlowTests { - + /** * Necessary only because Eclipse won't run test suite unless * it declares some methods as well as inherited methods. diff --git a/spring-core/src/test/java/org/springframework/core/Jdk14ControlFlowTests.java b/spring-core/src/test/java/org/springframework/core/Jdk14ControlFlowTests.java index 040a6fcf20b..281141361ea 100644 --- a/spring-core/src/test/java/org/springframework/core/Jdk14ControlFlowTests.java +++ b/spring-core/src/test/java/org/springframework/core/Jdk14ControlFlowTests.java @@ -22,7 +22,7 @@ package org.springframework.core; * @author Rod Johnson */ public class Jdk14ControlFlowTests extends AbstractControlFlowTests { - + /** * Necessary only because Eclipse won't run test suite unless it declares * some methods as well as inherited methods diff --git a/spring-core/src/test/java/org/springframework/core/LocalVariableTableParameterNameDiscovererTests.java b/spring-core/src/test/java/org/springframework/core/LocalVariableTableParameterNameDiscovererTests.java index 5951028343f..4239e38e29b 100644 --- a/spring-core/src/test/java/org/springframework/core/LocalVariableTableParameterNameDiscovererTests.java +++ b/spring-core/src/test/java/org/springframework/core/LocalVariableTableParameterNameDiscovererTests.java @@ -189,7 +189,7 @@ public class LocalVariableTableParameterNameDiscovererTests extends TestCase { m = clazz.getMethod("getDate", null); names = discoverer.getParameterNames(m); assertEquals(0, names.length); - + //System.in.read(); } diff --git a/spring-core/src/test/java/org/springframework/core/NestedExceptionTests.java b/spring-core/src/test/java/org/springframework/core/NestedExceptionTests.java index 7d86d86071f..4873105ce22 100644 --- a/spring-core/src/test/java/org/springframework/core/NestedExceptionTests.java +++ b/spring-core/src/test/java/org/springframework/core/NestedExceptionTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -70,7 +70,7 @@ public class NestedExceptionTests extends TestCase { NestedCheckedException nex = new NestedCheckedException(mesg) {}; assertNull(nex.getCause()); assertEquals(nex.getMessage(), mesg); - + // Check printStackTrace ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintWriter pw = new PrintWriter(baos); @@ -79,7 +79,7 @@ public class NestedExceptionTests extends TestCase { String stackTrace = new String(baos.toByteArray()); assertFalse(stackTrace.indexOf(mesg) == -1); } - + public void testNestedCheckedExceptionWithRootCause() { String myMessage = "mesg for this exception"; String rootCauseMesg = "this is the obscure message of the root cause"; @@ -89,7 +89,7 @@ public class NestedExceptionTests extends TestCase { Assert.assertEquals(nex.getCause(), rootCause); assertTrue(nex.getMessage().indexOf(myMessage) != -1); assertTrue(nex.getMessage().indexOf(rootCauseMesg) != -1); - + // check PrintStackTrace ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintWriter pw = new PrintWriter(baos); diff --git a/spring-core/src/test/java/org/springframework/core/PrioritizedParameterNameDiscovererTests.java b/spring-core/src/test/java/org/springframework/core/PrioritizedParameterNameDiscovererTests.java index c51d8c1dbfa..b5480482e4b 100644 --- a/spring-core/src/test/java/org/springframework/core/PrioritizedParameterNameDiscovererTests.java +++ b/spring-core/src/test/java/org/springframework/core/PrioritizedParameterNameDiscovererTests.java @@ -25,11 +25,11 @@ import junit.framework.TestCase; import org.springframework.beans.TestBean; public class PrioritizedParameterNameDiscovererTests extends TestCase { - + private static final String[] FOO_BAR = new String[] { "foo", "bar" }; - + private static final String[] SOMETHING_ELSE = new String[] { "something", "else" }; - + ParameterNameDiscoverer returnsFooBar = new ParameterNameDiscoverer() { public String[] getParameterNames(Method m) { return FOO_BAR; @@ -38,7 +38,7 @@ public class PrioritizedParameterNameDiscovererTests extends TestCase { return FOO_BAR; } }; - + ParameterNameDiscoverer returnsSomethingElse = new ParameterNameDiscoverer() { public String[] getParameterNames(Method m) { return SOMETHING_ELSE; @@ -47,20 +47,20 @@ public class PrioritizedParameterNameDiscovererTests extends TestCase { return SOMETHING_ELSE; } }; - + private final Method anyMethod; private final Class anyClass = Object.class; - + public PrioritizedParameterNameDiscovererTests() throws SecurityException, NoSuchMethodException { anyMethod = TestBean.class.getMethod("getAge", (Class[]) null); } - + public void testNoParametersDiscoverers() { ParameterNameDiscoverer pnd = new PrioritizedParameterNameDiscoverer(); assertNull(pnd.getParameterNames(anyMethod)); assertNull(pnd.getParameterNames((Constructor) null)); } - + public void testOrderedParameterDiscoverers1() { PrioritizedParameterNameDiscoverer pnd = new PrioritizedParameterNameDiscoverer(); pnd.addDiscoverer(returnsFooBar); @@ -70,7 +70,7 @@ public class PrioritizedParameterNameDiscovererTests extends TestCase { assertTrue(Arrays.equals(FOO_BAR, pnd.getParameterNames(anyMethod))); assertTrue(Arrays.equals(FOO_BAR, pnd.getParameterNames((Constructor) null))); } - + public void testOrderedParameterDiscoverers2() { PrioritizedParameterNameDiscoverer pnd = new PrioritizedParameterNameDiscoverer(); pnd.addDiscoverer(returnsSomethingElse); diff --git a/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java index 7ae70078635..b02c6c3aaa1 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java @@ -363,5 +363,5 @@ public class AnnotationUtilsTests { @Retention(RetentionPolicy.RUNTIME) @Inherited @interface Transactional { - + } diff --git a/spring-core/src/test/java/org/springframework/core/env/PropertySourceTests.java b/spring-core/src/test/java/org/springframework/core/env/PropertySourceTests.java index 3717edb38eb..f430a29935f 100644 --- a/spring-core/src/test/java/org/springframework/core/env/PropertySourceTests.java +++ b/spring-core/src/test/java/org/springframework/core/env/PropertySourceTests.java @@ -32,7 +32,7 @@ import org.junit.Test; /** * Unit tests for {@link AbstractPropertySource} implementations. - * + * * @author Chris Beams * @since 3.1 */ diff --git a/spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java b/spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java index 0db7b301ff5..694335eeb4d 100644 --- a/spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java +++ b/spring-core/src/test/java/org/springframework/core/io/support/PathMatchingResourcePatternResolverTests.java @@ -137,14 +137,14 @@ public class PathMatchingResourcePatternResolverTests { // List expectedNames = new LinkedList(Arrays.asList(fileNames)); // Collections.sort(sortedActualNames); // Collections.sort(expectedNames); -// +// // System.out.println("-----------"); // System.out.println("Expected: " + StringUtils.collectionToCommaDelimitedString(expectedNames)); // System.out.println("Actual: " + StringUtils.collectionToCommaDelimitedString(sortedActualNames)); // for (int i = 0; i < resources.length; i++) { // System.out.println(resources[i]); // } - + assertEquals("Correct number of files found", fileNames.length, resources.length); for (int i = 0; i < resources.length; i++) { Resource resource = resources[i]; 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 c12bd5b8e7e..235d2f54863 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 @@ -40,7 +40,7 @@ public class ResourceArrayPropertyEditorTests { @Test public void testPatternResource() throws Exception { - // N.B. this will sometimes fail if you use classpath: instead of classpath*:. + // N.B. this will sometimes fail if you use classpath: instead of classpath*:. // The result depends on the classpath - if test-classes are segregated from classes // and they come first on the classpath (like in Maven) then it breaks, if classes // comes first (like in Spring Build) then it is OK. diff --git a/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java b/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java index 6f051a16e70..ca52e93e38c 100644 --- a/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java +++ b/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java @@ -214,7 +214,7 @@ public class AnnotationMetadataTests { }) @SuppressWarnings({"serial", "unused"}) private static class AnnotatedComponent implements Serializable { - + @TestAutowired public void doWork(@TestQualifier("myColor") java.awt.Color color) { } diff --git a/spring-core/src/test/java/org/springframework/core/type/AssignableTypeFilterTests.java b/spring-core/src/test/java/org/springframework/core/type/AssignableTypeFilterTests.java index ef547f5fb81..1e99fa0299f 100644 --- a/spring-core/src/test/java/org/springframework/core/type/AssignableTypeFilterTests.java +++ b/spring-core/src/test/java/org/springframework/core/type/AssignableTypeFilterTests.java @@ -39,7 +39,7 @@ public class AssignableTypeFilterTests extends TestCase { assertFalse(notMatchingFilter.match(metadataReader, metadataReaderFactory)); assertTrue(matchingFilter.match(metadataReader, metadataReaderFactory)); } - + public void testInterfaceMatch() throws Exception { MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory(); String classUnderTest = "org.springframework.core.type.AssignableTypeFilterTests$TestInterfaceImpl"; @@ -49,7 +49,7 @@ public class AssignableTypeFilterTests extends TestCase { assertTrue(filter.match(metadataReader, metadataReaderFactory)); ClassloadingAssertions.assertClassNotLoaded(classUnderTest); } - + public void testSuperClassMatch() throws Exception { MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory(); String classUnderTest = "org.springframework.core.type.AssignableTypeFilterTests$SomeDaoLikeImpl"; @@ -59,7 +59,7 @@ public class AssignableTypeFilterTests extends TestCase { assertTrue(filter.match(metadataReader, metadataReaderFactory)); ClassloadingAssertions.assertClassNotLoaded(classUnderTest); } - + public void testInterfaceThroughSuperClassMatch() throws Exception { MetadataReaderFactory metadataReaderFactory = new SimpleMetadataReaderFactory(); String classUnderTest = "org.springframework.core.type.AssignableTypeFilterTests$SomeDaoLikeImpl"; diff --git a/spring-core/src/test/java/org/springframework/core/type/CachingMetadataReaderLeakTest.java b/spring-core/src/test/java/org/springframework/core/type/CachingMetadataReaderLeakTest.java index e6128c35bfb..c3cc1a806fe 100644 --- a/spring-core/src/test/java/org/springframework/core/type/CachingMetadataReaderLeakTest.java +++ b/spring-core/src/test/java/org/springframework/core/type/CachingMetadataReaderLeakTest.java @@ -1,12 +1,12 @@ /* * Copyright 2006-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,8 +32,8 @@ import org.springframework.core.type.classreading.SimpleMetadataReaderFactory; /** * Unit test checking the behaviour of {@link CachingMetadataReaderFactory under load. * If the cache is not controller, this test should fail with an out of memory exception around entry - * 5k. - * + * 5k. + * * @author Costin Leau */ public class CachingMetadataReaderLeakTest { diff --git a/spring-core/src/test/java/org/springframework/util/CompositeIteratorTests.java b/spring-core/src/test/java/org/springframework/util/CompositeIteratorTests.java index 451005558e3..d27cb931098 100644 --- a/spring-core/src/test/java/org/springframework/util/CompositeIteratorTests.java +++ b/spring-core/src/test/java/org/springframework/util/CompositeIteratorTests.java @@ -9,7 +9,7 @@ import junit.framework.TestCase; /** * Test case for {@link CompositeIterator}. - * + * * @author Erwin Vervaet */ public class CompositeIteratorTests extends TestCase { diff --git a/spring-core/src/test/java/org/springframework/util/FileSystemUtilsTests.java b/spring-core/src/test/java/org/springframework/util/FileSystemUtilsTests.java index f15b52ffc4d..5eaa203ef5a 100644 --- a/spring-core/src/test/java/org/springframework/util/FileSystemUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/util/FileSystemUtilsTests.java @@ -24,51 +24,51 @@ import junit.framework.TestCase; * @author Rob Harrop */ public class FileSystemUtilsTests extends TestCase { - + public void testDeleteRecursively() throws Exception { File root = new File("./tmp/root"); File child = new File(root, "child"); File grandchild = new File(child, "grandchild"); - + grandchild.mkdirs(); - + File bar = new File(child, "bar.txt"); bar.createNewFile(); - + assertTrue(root.exists()); assertTrue(child.exists()); assertTrue(grandchild.exists()); assertTrue(bar.exists()); - + FileSystemUtils.deleteRecursively(root); - + assertFalse(root.exists()); assertFalse(child.exists()); assertFalse(grandchild.exists()); assertFalse(bar.exists()); } - + public void testCopyRecursively() throws Exception { File src = new File("./tmp/src"); File child = new File(src, "child"); File grandchild = new File(child, "grandchild"); - + grandchild.mkdirs(); - + File bar = new File(child, "bar.txt"); bar.createNewFile(); - + assertTrue(src.exists()); assertTrue(child.exists()); assertTrue(grandchild.exists()); assertTrue(bar.exists()); - + File dest = new File("./dest"); FileSystemUtils.copyRecursively(src, dest); - + assertTrue(dest.exists()); assertTrue(new File(dest, child.getName()).exists()); - + FileSystemUtils.deleteRecursively(src); assertTrue(!src.exists()); } diff --git a/spring-core/src/test/java/org/springframework/util/Log4jConfigurerTests.java b/spring-core/src/test/java/org/springframework/util/Log4jConfigurerTests.java index 1b75fd96e9d..b71c516c8c5 100644 --- a/spring-core/src/test/java/org/springframework/util/Log4jConfigurerTests.java +++ b/spring-core/src/test/java/org/springframework/util/Log4jConfigurerTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-core/src/test/java/org/springframework/util/MockLog4jAppender.java b/spring-core/src/test/java/org/springframework/util/MockLog4jAppender.java index 18bc8b2d5b2..13e662d381d 100644 --- a/spring-core/src/test/java/org/springframework/util/MockLog4jAppender.java +++ b/spring-core/src/test/java/org/springframework/util/MockLog4jAppender.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,11 +26,11 @@ import org.apache.log4j.spi.LoggingEvent; * @author Alef Arendsen */ public class MockLog4jAppender extends AppenderSkeleton { - + public static final List loggingStrings = new ArrayList(); - + public static boolean closeCalled = false; - + /* (non-Javadoc) * @see org.apache.log4j.AppenderSkeleton#append(org.apache.log4j.spi.LoggingEvent) */ @@ -38,7 +38,7 @@ public class MockLog4jAppender extends AppenderSkeleton { //System.out.println("Adding " + evt.getMessage()); loggingStrings.add(evt.getMessage()); } - + /* (non-Javadoc) * @see org.apache.log4j.Appender#close() */ @@ -49,11 +49,11 @@ public class MockLog4jAppender extends AppenderSkeleton { /* (non-Javadoc) * @see org.apache.log4j.Appender#requiresLayout() */ - public boolean requiresLayout() { + public boolean requiresLayout() { return false; } - - + + } 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 58f8f14af35..d353cb9e0a9 100644 --- a/spring-core/src/test/java/org/springframework/util/PropertyPlaceholderHelperTests.java +++ b/spring-core/src/test/java/org/springframework/util/PropertyPlaceholderHelperTests.java @@ -98,7 +98,7 @@ public class PropertyPlaceholderHelperTests { String text = "foo=${foo},bar=${bar}"; Properties props = new Properties(); props.setProperty("foo", "bar"); - + assertEquals("foo=bar,bar=${bar}", this.helper.replacePlaceholders(text, props)); } diff --git a/spring-core/src/test/java/org/springframework/util/SerializationTestUtils.java b/spring-core/src/test/java/org/springframework/util/SerializationTestUtils.java index bdffe7578da..39a7582e831 100644 --- a/spring-core/src/test/java/org/springframework/util/SerializationTestUtils.java +++ b/spring-core/src/test/java/org/springframework/util/SerializationTestUtils.java @@ -27,13 +27,13 @@ import org.springframework.beans.TestBean; * @author Rod Johnson */ public class SerializationTestUtils extends TestCase { - + public static void testSerialization(Object o) throws IOException { OutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(o); } - + public static boolean isSerializable(Object o) throws IOException { try { testSerialization(o); @@ -43,7 +43,7 @@ public class SerializationTestUtils extends TestCase { return false; } } - + public static Object serializeAndDeserialize(Object o) throws IOException, ClassNotFoundException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream oos = new ObjectOutputStream(baos); @@ -51,24 +51,24 @@ public class SerializationTestUtils extends TestCase { oos.flush(); baos.flush(); byte[] bytes = baos.toByteArray(); - + ByteArrayInputStream is = new ByteArrayInputStream(bytes); ObjectInputStream ois = new ObjectInputStream(is); Object o2 = ois.readObject(); - + return o2; } - + public SerializationTestUtils(String s) { super(s); } - + public void testWithNonSerializableObject() throws IOException { TestBean o = new TestBean(); assertFalse(o instanceof Serializable); - + assertFalse(isSerializable(o)); - + try { testSerialization(o); fail(); @@ -77,17 +77,17 @@ public class SerializationTestUtils extends TestCase { // Ok } } - + public void testWithSerializableObject() throws Exception { int x = 5; int y = 10; Point p = new Point(x, y); assertTrue(p instanceof Serializable); - + testSerialization(p); - + assertTrue(isSerializable(p)); - + Point p2 = (Point) serializeAndDeserialize(p); assertNotSame(p, p2); assertEquals(x, (int) p2.getX()); diff --git a/spring-core/src/test/java/org/springframework/util/SerializationUtilsTests.java b/spring-core/src/test/java/org/springframework/util/SerializationUtilsTests.java index 46a1287f5c7..630568b8185 100644 --- a/spring-core/src/test/java/org/springframework/util/SerializationUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/util/SerializationUtilsTests.java @@ -28,7 +28,7 @@ import org.springframework.util.SerializationUtils; /** * Test for static utility to help with serialization. - * + * * @author Dave Syer * @since 3.0.5 */ diff --git a/spring-core/src/test/java/org/springframework/util/StopWatchTests.java b/spring-core/src/test/java/org/springframework/util/StopWatchTests.java index a066318ebf8..83029423f28 100644 --- a/spring-core/src/test/java/org/springframework/util/StopWatchTests.java +++ b/spring-core/src/test/java/org/springframework/util/StopWatchTests.java @@ -1,13 +1,13 @@ - + /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,17 +33,17 @@ public class StopWatchTests extends TestCase { long int2 = 45L; String name1 = "Task 1"; String name2 = "Task 2"; - + long fudgeFactor = 5L; assertFalse(sw.isRunning()); sw.start(name1); Thread.sleep(int1); assertTrue(sw.isRunning()); sw.stop(); - + // TODO are timings off in JUnit? Why do these assertions sometimes fail // under both Ant and Eclipse? - + //assertTrue("Unexpected timing " + sw.getTotalTime(), sw.getTotalTime() >= int1); //assertTrue("Unexpected timing " + sw.getTotalTime(), sw.getTotalTime() <= int1 + fudgeFactor); sw.start(name2); @@ -51,19 +51,19 @@ public class StopWatchTests extends TestCase { sw.stop(); //assertTrue("Unexpected timing " + sw.getTotalTime(), sw.getTotalTime() >= int1 + int2); //assertTrue("Unexpected timing " + sw.getTotalTime(), sw.getTotalTime() <= int1 + int2 + fudgeFactor); - + assertTrue(sw.getTaskCount() == 2); String pp = sw.prettyPrint(); assertTrue(pp.indexOf(name1) != -1); assertTrue(pp.indexOf(name2) != -1); - + StopWatch.TaskInfo[] tasks = sw.getTaskInfo(); assertTrue(tasks.length == 2); assertTrue(tasks[0].getTaskName().equals(name1)); assertTrue(tasks[1].getTaskName().equals(name2)); sw.toString(); } - + public void testValidUsageNotKeepingTaskList() throws Exception { StopWatch sw = new StopWatch(); sw.setKeepTaskList(false); @@ -71,17 +71,17 @@ public class StopWatchTests extends TestCase { long int2 = 45L; String name1 = "Task 1"; String name2 = "Task 2"; - + long fudgeFactor = 5L; assertFalse(sw.isRunning()); sw.start(name1); Thread.sleep(int1); assertTrue(sw.isRunning()); sw.stop(); - + // TODO are timings off in JUnit? Why do these assertions sometimes fail // under both Ant and Eclipse? - + //assertTrue("Unexpected timing " + sw.getTotalTime(), sw.getTotalTime() >= int1); //assertTrue("Unexpected timing " + sw.getTotalTime(), sw.getTotalTime() <= int1 + fudgeFactor); sw.start(name2); @@ -89,12 +89,12 @@ public class StopWatchTests extends TestCase { sw.stop(); //assertTrue("Unexpected timing " + sw.getTotalTime(), sw.getTotalTime() >= int1 + int2); //assertTrue("Unexpected timing " + sw.getTotalTime(), sw.getTotalTime() <= int1 + int2 + fudgeFactor); - + assertTrue(sw.getTaskCount() == 2); String pp = sw.prettyPrint(); assertTrue(pp.indexOf("kept") != -1); sw.toString(); - + try { sw.getTaskInfo(); fail(); @@ -103,7 +103,7 @@ public class StopWatchTests extends TestCase { // Ok } } - + public void testFailureToStartBeforeGettingTimings() { StopWatch sw = new StopWatch(); try { @@ -114,7 +114,7 @@ public class StopWatchTests extends TestCase { // Ok } } - + public void testFailureToStartBeforeStop() { StopWatch sw = new StopWatch(); try { @@ -125,7 +125,7 @@ public class StopWatchTests extends TestCase { // Ok } } - + public void testRejectsStartTwice() { StopWatch sw = new StopWatch(); try { diff --git a/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamWriterTests.java b/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamWriterTests.java index 1cf4bf3c0a0..00fb47bddb7 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamWriterTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamWriterTests.java @@ -42,7 +42,7 @@ public class XMLEventStreamWriterTests { XMLEventWriter eventWriter = outputFactory.createXMLEventWriter(stringWriter); streamWriter = new XMLEventStreamWriter(eventWriter, XMLEventFactory.newInstance()); } - + @Test public void write() throws Exception { streamWriter.writeStartDocument(); diff --git a/spring-expression/src/main/java/org/springframework/expression/AccessException.java b/spring-expression/src/main/java/org/springframework/expression/AccessException.java index d0b41aab6dd..09efbbe45d5 100644 --- a/spring-expression/src/main/java/org/springframework/expression/AccessException.java +++ b/spring-expression/src/main/java/org/springframework/expression/AccessException.java @@ -18,7 +18,7 @@ package org.springframework.expression; /** * An AccessException is thrown by an accessor if it has an unexpected problem. - * + * * @author Andy Clement * @since 3.0 */ diff --git a/spring-expression/src/main/java/org/springframework/expression/BeanResolver.java b/spring-expression/src/main/java/org/springframework/expression/BeanResolver.java index c3857d8e98d..2b5e33d594c 100644 --- a/spring-expression/src/main/java/org/springframework/expression/BeanResolver.java +++ b/spring-expression/src/main/java/org/springframework/expression/BeanResolver.java @@ -35,4 +35,3 @@ public interface BeanResolver { Object resolve(EvaluationContext context, String beanName) throws AccessException; } - \ No newline at end of file diff --git a/spring-expression/src/main/java/org/springframework/expression/ConstructorExecutor.java b/spring-expression/src/main/java/org/springframework/expression/ConstructorExecutor.java index 34bda66d9e4..260f93e4d81 100644 --- a/spring-expression/src/main/java/org/springframework/expression/ConstructorExecutor.java +++ b/spring-expression/src/main/java/org/springframework/expression/ConstructorExecutor.java @@ -23,10 +23,10 @@ package org.springframework.expression; * back to the resolvers. For example, the particular constructor to run on a class may be discovered by the reflection * constructor resolver - it will then build a ConstructorExecutor that executes that constructor and the * ConstructorExecutor can be reused without needing to go back to the resolver to discover the constructor again. - * + * * They can become stale, and in that case should throw an AccessException - this will cause the infrastructure to go * back to the resolvers to ask for a new one. - * + * * @author Andy Clement * @since 3.0 */ diff --git a/spring-expression/src/main/java/org/springframework/expression/EvaluationException.java b/spring-expression/src/main/java/org/springframework/expression/EvaluationException.java index 995c65d0d3a..e082baec660 100644 --- a/spring-expression/src/main/java/org/springframework/expression/EvaluationException.java +++ b/spring-expression/src/main/java/org/springframework/expression/EvaluationException.java @@ -18,7 +18,7 @@ package org.springframework.expression; /** * Represent an exception that occurs during expression evaluation. - * + * * @author Andy Clement * @since 3.0 */ @@ -28,7 +28,7 @@ public class EvaluationException extends ExpressionException { * Creates a new expression evaluation exception. * @param position the position in the expression where the problem occurred * @param message description of the problem that occurred - */ + */ public EvaluationException(int position, String message) { super(position, message); } @@ -37,7 +37,7 @@ public class EvaluationException extends ExpressionException { * Creates a new expression evaluation exception. * @param expressionString the expression that could not be evaluated * @param message description of the problem that occurred - */ + */ public EvaluationException(String expressionString, String message) { super(expressionString, message); } @@ -47,7 +47,7 @@ public class EvaluationException extends ExpressionException { * @param position the position in the expression where the problem occurred * @param message description of the problem that occurred * @param cause the underlying cause of this exception - */ + */ public EvaluationException(int position, String message, Throwable cause) { super(position, message, cause); } @@ -55,7 +55,7 @@ public class EvaluationException extends ExpressionException { /** * Creates a new expression evaluation exception. * @param message description of the problem that occurred - */ + */ public EvaluationException(String message) { super(message); } diff --git a/spring-expression/src/main/java/org/springframework/expression/Expression.java b/spring-expression/src/main/java/org/springframework/expression/Expression.java index e0cddfa68a6..a353ab005d2 100644 --- a/spring-expression/src/main/java/org/springframework/expression/Expression.java +++ b/spring-expression/src/main/java/org/springframework/expression/Expression.java @@ -37,14 +37,14 @@ public interface Expression { */ Object getValue() throws EvaluationException; - /** + /** * Evaluate this expression against the specified root object * @param rootObject the root object against which properties/etc will be resolved * @return the evaluation result * @throws EvaluationException if there is a problem during evaluation */ Object getValue(Object rootObject) throws EvaluationException; - + /** * Evaluate the expression in the default context. If the result of the evaluation does not match (and * cannot be converted to) the expected result type then an exception will be returned. @@ -53,10 +53,10 @@ public interface Expression { * @throws EvaluationException if there is a problem during evaluation */ T getValue(Class desiredResultType) throws EvaluationException; - + /** - * Evaluate the expression in the default context against the specified root object. If the - * result of the evaluation does not match (and cannot be converted to) the expected result type + * Evaluate the expression in the default context against the specified root object. If the + * result of the evaluation does not match (and cannot be converted to) the expected result type * then an exception will be returned. * @param rootObject the root object against which properties/etc will be resolved * @param desiredResultType the class the caller would like the result to be @@ -82,7 +82,7 @@ public interface Expression { * @throws EvaluationException if there is a problem during evaluation */ Object getValue(EvaluationContext context, Object rootObject) throws EvaluationException; - + /** * Evaluate the expression in a specified context which can resolve references to properties, methods, types, etc - * the type of the evaluation result is expected to be of a particular class and an exception will be thrown if it @@ -132,7 +132,7 @@ public interface Expression { * @throws EvaluationException if there is a problem determining the type */ Class getValueType(EvaluationContext context) throws EvaluationException; - + /** * Returns the most general type that can be passed to the {@link #setValue(EvaluationContext, Object)} * method for the given context. The supplied root object overrides any specified in the context. @@ -150,7 +150,7 @@ public interface Expression { * @throws EvaluationException if there is a problem determining the type */ TypeDescriptor getValueTypeDescriptor() throws EvaluationException; - + /** * Returns the most general type that can be passed to the {@link #setValue(EvaluationContext, Object)} * method using the default context. @@ -207,13 +207,13 @@ public interface Expression { /** * Set this expression in the provided context to the value provided. - * + * * @param context the context in which to set the value of the expression * @param value the new value * @throws EvaluationException if there is a problem during evaluation */ void setValue(EvaluationContext context, Object value) throws EvaluationException; - + /** * Set this expression in the provided context to the value provided. * @param rootObject the root object against which to evaluate the expression @@ -231,7 +231,7 @@ public interface Expression { * @throws EvaluationException if there is a problem during evaluation */ void setValue(EvaluationContext context, Object rootObject, Object value) throws EvaluationException; - + /** * Returns the original string used to create this expression, unmodified. * @return the original expression string diff --git a/spring-expression/src/main/java/org/springframework/expression/ExpressionException.java b/spring-expression/src/main/java/org/springframework/expression/ExpressionException.java index b02852ddc0f..c04d03ae28d 100644 --- a/spring-expression/src/main/java/org/springframework/expression/ExpressionException.java +++ b/spring-expression/src/main/java/org/springframework/expression/ExpressionException.java @@ -38,7 +38,7 @@ public class ExpressionException extends RuntimeException { this.position = -1; this.expressionString = expressionString; } - + /** * Creates a new expression exception. * @param expressionString the expression string @@ -66,7 +66,7 @@ public class ExpressionException extends RuntimeException { * @param position the position in the expression string where the problem occurred * @param message a descriptive message * @param cause the underlying cause of this exception - */ + */ public ExpressionException(int position, String message, Throwable cause) { super(message,cause); this.position = position; @@ -75,7 +75,7 @@ public class ExpressionException extends RuntimeException { /** * Creates a new expression exception. * @param message a descriptive message - */ + */ public ExpressionException(String message) { super(message); } @@ -99,11 +99,11 @@ public class ExpressionException extends RuntimeException { output.append(getMessage()); return output.toString(); } - + public final String getExpressionString() { return this.expressionString; } - + public final int getPosition() { return position; } diff --git a/spring-expression/src/main/java/org/springframework/expression/ExpressionInvocationTargetException.java b/spring-expression/src/main/java/org/springframework/expression/ExpressionInvocationTargetException.java index 6668fff4150..00caf12c4f2 100644 --- a/spring-expression/src/main/java/org/springframework/expression/ExpressionInvocationTargetException.java +++ b/spring-expression/src/main/java/org/springframework/expression/ExpressionInvocationTargetException.java @@ -20,7 +20,7 @@ package org.springframework.expression; * It differs from a SpelEvaluationException because this indicates the occurrence of a checked exception * that the invoked method was defined to throw. SpelEvaluationExceptions are for handling (and wrapping) * unexpected exceptions. - * + * * @author Andy Clement * @since 3.0.3 */ diff --git a/spring-expression/src/main/java/org/springframework/expression/MethodFilter.java b/spring-expression/src/main/java/org/springframework/expression/MethodFilter.java index b2567425d42..bcc824e5a07 100644 --- a/spring-expression/src/main/java/org/springframework/expression/MethodFilter.java +++ b/spring-expression/src/main/java/org/springframework/expression/MethodFilter.java @@ -21,26 +21,26 @@ import java.util.List; /** * MethodFilter instances allow SpEL users to fine tune the behaviour of the method resolution * process. Method resolution (which translates from a method name in an expression to a real - * method to invoke) will normally retrieve candidate methods for invocation via a simple call - * to 'Class.getMethods()' and will choose the first one that is suitable for the - * input parameters. By registering a MethodFilter the user can receive a callback + * method to invoke) will normally retrieve candidate methods for invocation via a simple call + * to 'Class.getMethods()' and will choose the first one that is suitable for the + * input parameters. By registering a MethodFilter the user can receive a callback * and change the methods that will be considered suitable. - * + * * @author Andy Clement * @since 3.0.1 */ public interface MethodFilter { /** - * Called by the method resolver to allow the SpEL user to organize the list of candidate - * methods that may be invoked. The filter can remove methods that should not be - * considered candidates and it may sort the results. The resolver will then search - * through the methods as returned from the filter when looking for a suitable + * Called by the method resolver to allow the SpEL user to organize the list of candidate + * methods that may be invoked. The filter can remove methods that should not be + * considered candidates and it may sort the results. The resolver will then search + * through the methods as returned from the filter when looking for a suitable * candidate to invoke. - * + * * @param methods the full list of methods the resolver was going to choose from * @return a possible subset of input methods that may be sorted by order of relevance */ List filter(List methods); - + } \ No newline at end of file diff --git a/spring-expression/src/main/java/org/springframework/expression/Operation.java b/spring-expression/src/main/java/org/springframework/expression/Operation.java index 55055a5b4fe..27239c862e2 100644 --- a/spring-expression/src/main/java/org/springframework/expression/Operation.java +++ b/spring-expression/src/main/java/org/springframework/expression/Operation.java @@ -18,7 +18,7 @@ package org.springframework.expression; /** * Supported operations that an {@link OperatorOverloader} can implement for any pair of operands. - * + * * @author Andy Clement * @since 3.0 */ diff --git a/spring-expression/src/main/java/org/springframework/expression/OperatorOverloader.java b/spring-expression/src/main/java/org/springframework/expression/OperatorOverloader.java index 0dd7bd2e6c9..ff4a2f7eafd 100644 --- a/spring-expression/src/main/java/org/springframework/expression/OperatorOverloader.java +++ b/spring-expression/src/main/java/org/springframework/expression/OperatorOverloader.java @@ -19,7 +19,7 @@ package org.springframework.expression; /** * By default the mathematical operators {@link Operation} support simple types like numbers. By providing an * implementation of OperatorOverloader, a user of the expression language can support these operations on other types. - * + * * @author Andy Clement * @since 3.0 */ diff --git a/spring-expression/src/main/java/org/springframework/expression/ParseException.java b/spring-expression/src/main/java/org/springframework/expression/ParseException.java index cb0ff8ae882..722eb4d88e6 100644 --- a/spring-expression/src/main/java/org/springframework/expression/ParseException.java +++ b/spring-expression/src/main/java/org/springframework/expression/ParseException.java @@ -29,7 +29,7 @@ public class ParseException extends ExpressionException { * @param expressionString the expression string that could not be parsed * @param position the position in the expression string where the problem occurred * @param message description of the problem that occurred - */ + */ public ParseException(String expressionString, int position, String message) { super(expressionString, position, message); } @@ -39,16 +39,16 @@ public class ParseException extends ExpressionException { * @param position the position in the expression string where the problem occurred * @param message description of the problem that occurred * @param cause the underlying cause of this exception - */ + */ public ParseException(int position, String message, Throwable cause) { super(position, message, cause); } - + /** * Creates a new expression parsing exception. * @param position the position in the expression string where the problem occurred * @param message description of the problem that occurred - */ + */ public ParseException(int position, String message) { super(position, message); } diff --git a/spring-expression/src/main/java/org/springframework/expression/ParserContext.java b/spring-expression/src/main/java/org/springframework/expression/ParserContext.java index 2a32bb3dde1..a462c353124 100644 --- a/spring-expression/src/main/java/org/springframework/expression/ParserContext.java +++ b/spring-expression/src/main/java/org/springframework/expression/ParserContext.java @@ -28,13 +28,13 @@ public interface ParserContext { /** * Whether or not the expression being parsed is a template. A template expression consists of literal text that can * be mixed with evaluatable blocks. Some examples: - * + * *

       	 * 	   Some literal text
       	 *     Hello #{name.firstName}!
       	 *     #{3 + 4}
       	 * 
      - * + * * @return true if the expression is a template, false otherwise */ boolean isTemplate(); @@ -54,7 +54,7 @@ public interface ParserContext { * @return the suffix that identifies the end of an expression */ String getExpressionSuffix(); - + /** * The default ParserContext implementation that enables template expression parsing mode. * The expression prefix is #{ and the expression suffix is }. @@ -73,7 +73,7 @@ public interface ParserContext { public boolean isTemplate() { return true; } - + }; } diff --git a/spring-expression/src/main/java/org/springframework/expression/PropertyAccessor.java b/spring-expression/src/main/java/org/springframework/expression/PropertyAccessor.java index c5f474e3cac..041752988e4 100644 --- a/spring-expression/src/main/java/org/springframework/expression/PropertyAccessor.java +++ b/spring-expression/src/main/java/org/springframework/expression/PropertyAccessor.java @@ -25,7 +25,7 @@ package org.springframework.expression; * to determine if it can read or write them. Property resolvers are considered to be ordered and each will be called in * turn. The only rule that affects the call order is that any naming the target class directly in * getSpecifiedTargetClasses() will be called first, before the general resolvers. - * + * * @author Andy Clement * @since 3.0 */ diff --git a/spring-expression/src/main/java/org/springframework/expression/TypeComparator.java b/spring-expression/src/main/java/org/springframework/expression/TypeComparator.java index 117ac772ab1..6b0f61e8ce2 100644 --- a/spring-expression/src/main/java/org/springframework/expression/TypeComparator.java +++ b/spring-expression/src/main/java/org/springframework/expression/TypeComparator.java @@ -19,7 +19,7 @@ package org.springframework.expression; /** * Instances of a type comparator should be able to compare pairs of objects for equality, the specification of the * return value is the same as for {@link Comparable}. - * + * * @author Andy Clement * @since 3.0 */ diff --git a/spring-expression/src/main/java/org/springframework/expression/TypedValue.java b/spring-expression/src/main/java/org/springframework/expression/TypedValue.java index ec063ff54c6..c9db4a8f041 100644 --- a/spring-expression/src/main/java/org/springframework/expression/TypedValue.java +++ b/spring-expression/src/main/java/org/springframework/expression/TypedValue.java @@ -56,12 +56,12 @@ public class TypedValue { this.value = value; this.typeDescriptor = typeDescriptor; } - + public Object getValue() { return this.value; } - + public TypeDescriptor getTypeDescriptor() { if (this.typeDescriptor == null) { this.typeDescriptor = TypeDescriptor.forObject(this.value); @@ -76,5 +76,5 @@ public class TypedValue { str.append("TypedValue: '").append(this.value).append("' of [").append(getTypeDescriptor() + "]"); return str.toString(); } - + } diff --git a/spring-expression/src/main/java/org/springframework/expression/common/CompositeStringExpression.java b/spring-expression/src/main/java/org/springframework/expression/common/CompositeStringExpression.java index 04fc1a561ec..1a3ff0b6725 100644 --- a/spring-expression/src/main/java/org/springframework/expression/common/CompositeStringExpression.java +++ b/spring-expression/src/main/java/org/springframework/expression/common/CompositeStringExpression.java @@ -31,7 +31,7 @@ import org.springframework.expression.Expression; * which will be represented as a CompositeStringExpression of two parts. The first part being a * LiteralExpression representing 'Hello ' and the second part being a real expression that will * call getName() when invoked. - * + * * @author Andy Clement * @author Juergen Hoeller * @since 3.0 @@ -60,7 +60,7 @@ public class CompositeStringExpression implements Expression { String value = expression.getValue(String.class); if (value != null) { sb.append(value); - } + } } return sb.toString(); } @@ -71,7 +71,7 @@ public class CompositeStringExpression implements Expression { String value = expression.getValue(rootObject, String.class); if (value != null) { sb.append(value); - } + } } return sb.toString(); } @@ -93,7 +93,7 @@ public class CompositeStringExpression implements Expression { String value = expression.getValue(context, rootObject, String.class); if (value != null) { sb.append(value); - } + } } return sb.toString(); } @@ -131,7 +131,7 @@ public class CompositeStringExpression implements Expression { public boolean isWritable(EvaluationContext context) { return false; } - + public Expression[] getExpressions() { return expressions; } diff --git a/spring-expression/src/main/java/org/springframework/expression/common/LiteralExpression.java b/spring-expression/src/main/java/org/springframework/expression/common/LiteralExpression.java index 43d61bedfb7..c9b3c6041b6 100644 --- a/spring-expression/src/main/java/org/springframework/expression/common/LiteralExpression.java +++ b/spring-expression/src/main/java/org/springframework/expression/common/LiteralExpression.java @@ -52,7 +52,7 @@ public class LiteralExpression implements Expression { public String getValue(EvaluationContext context) { return this.literalValue; } - + public String getValue(Object rootObject) { return this.literalValue; } diff --git a/spring-expression/src/main/java/org/springframework/expression/common/TemplateParserContext.java b/spring-expression/src/main/java/org/springframework/expression/common/TemplateParserContext.java index c1ed129dec3..5df9c134fe1 100644 --- a/spring-expression/src/main/java/org/springframework/expression/common/TemplateParserContext.java +++ b/spring-expression/src/main/java/org/springframework/expression/common/TemplateParserContext.java @@ -38,7 +38,7 @@ public class TemplateParserContext implements ParserContext { public TemplateParserContext() { this("#{", "}"); } - + /** * Create a new TemplateParserContext for the given prefix and suffix. * @param expressionPrefix the expression prefix to use diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ExpressionState.java b/spring-expression/src/main/java/org/springframework/expression/spel/ExpressionState.java index 47ee693d826..85c1727c5c0 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ExpressionState.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ExpressionState.java @@ -36,22 +36,22 @@ import org.springframework.expression.TypedValue; * expressions but it gives a place to hold local variables and for component expressions in a compound expression to * communicate state. This is in contrast to the EvaluationContext, which is shared amongst expression evaluations, and * any changes to it will be seen by other expressions or any code that chooses to ask questions of the context. - * + * *

      It also acts as a place for to define common utility routines that the various Ast nodes might need. - * + * * @author Andy Clement * @since 3.0 */ public class ExpressionState { private final EvaluationContext relatedContext; - - private Stack variableScopes; + + private Stack variableScopes; private Stack contextObjects; - + private final TypedValue rootObject; - + private SpelParserConfiguration configuration; @@ -59,30 +59,30 @@ public class ExpressionState { this.relatedContext = context; this.rootObject = context.getRootObject(); } - + public ExpressionState(EvaluationContext context, SpelParserConfiguration configuration) { this.relatedContext = context; this.configuration = configuration; this.rootObject = context.getRootObject(); } - + public ExpressionState(EvaluationContext context, TypedValue rootObject) { this.relatedContext = context; this.rootObject = rootObject; } - + public ExpressionState(EvaluationContext context, TypedValue rootObject, SpelParserConfiguration configuration) { this.relatedContext = context; this.configuration = configuration; this.rootObject = rootObject; } - + private void ensureVariableScopesInitialized() { if (this.variableScopes == null) { this.variableScopes = new Stack(); // top level empty variable scope - this.variableScopes.add(new VariableScope()); + this.variableScopes.add(new VariableScope()); } } @@ -93,7 +93,7 @@ public class ExpressionState { if (this.contextObjects==null || this.contextObjects.isEmpty()) { return this.rootObject; } - + return this.contextObjects.peek(); } @@ -140,7 +140,7 @@ public class ExpressionState { public Object convertValue(Object value, TypeDescriptor targetTypeDescriptor) throws EvaluationException { return this.relatedContext.getTypeConverter().convertValue(value, TypeDescriptor.forObject(value), targetTypeDescriptor); } - + public TypeConverter getTypeConverter() { return this.relatedContext.getTypeConverter(); } @@ -153,7 +153,7 @@ public class ExpressionState { /* * A new scope is entered when a function is invoked */ - + public void enterScope(Map argMap) { ensureVariableScopesInitialized(); this.variableScopes.push(new VariableScope(argMap)); @@ -226,7 +226,7 @@ public class ExpressionState { this.vars.putAll(arguments); } } - + public VariableScope(String name, Object value) { this.vars.put(name,value); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/InternalParseException.java b/spring-expression/src/main/java/org/springframework/expression/spel/InternalParseException.java index fd3dcb5549c..7af1d21c8cd 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/InternalParseException.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/InternalParseException.java @@ -21,7 +21,7 @@ import org.springframework.expression.spel.SpelParseException; /** * Wraps a real parse exception. This exception flows to the top parse method and then * the wrapped exception is thrown as the real problem. - * + * * @author Andy Clement * @since 3.0 */ @@ -30,9 +30,9 @@ public class InternalParseException extends RuntimeException { public InternalParseException(SpelParseException cause) { super(cause); } - + public SpelParseException getCause() { return (SpelParseException) super.getCause(); } - + } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/SpelEvaluationException.java b/spring-expression/src/main/java/org/springframework/expression/spel/SpelEvaluationException.java index e736d3bf740..e5bb78e995b 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/SpelEvaluationException.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/SpelEvaluationException.java @@ -21,7 +21,7 @@ import org.springframework.expression.EvaluationException; * Root exception for Spring EL related exceptions. Rather than holding a hard coded string indicating the problem, it * records a message key and the inserts for the message. See {@link SpelMessage} for the list of all possible messages * that can occur. - * + * * @author Andy Clement * @since 3.0 */ @@ -37,7 +37,7 @@ public class SpelEvaluationException extends EvaluationException { } public SpelEvaluationException(int position, SpelMessage message, Object... inserts) { - super(position, message.formatMessage(position, inserts)); + super(position, message.formatMessage(position, inserts)); this.message = message; this.inserts = inserts; } @@ -75,7 +75,7 @@ public class SpelEvaluationException extends EvaluationException { /** * Set the position in the related expression which gave rise to this exception. - * + * * @param position the position in the expression that gave rise to the exception */ public void setPosition(int position) { diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/SpelMessage.java b/spring-expression/src/main/java/org/springframework/expression/spel/SpelMessage.java index 5ee88152eb2..a7f457e147d 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/SpelMessage.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/SpelMessage.java @@ -24,13 +24,13 @@ import java.text.MessageFormat; * enabling the message text to more easily be modified and the tests to run successfully in different locales. *

      * When a message is formatted, it will have this kind of form - * + * *

        * EL1004E: (pos 34): Type cannot be found 'String'
        * 
      - * + * * The prefix captures the code and the error kind, whilst the position is included if it is known. - * + * * @author Andy Clement * @since 3.0 */ @@ -39,7 +39,7 @@ public enum SpelMessage { TYPE_CONVERSION_ERROR(Kind.ERROR, 1001, "Type conversion problem, cannot convert from {0} to {1}"), // CONSTRUCTOR_NOT_FOUND(Kind.ERROR, 1002, "Constructor call: No suitable constructor found on type {0} for arguments {1}"), // CONSTRUCTOR_INVOCATION_PROBLEM(Kind.ERROR, 1003, "A problem occurred whilst attempting to construct an object of type ''{0}'' using arguments ''{1}''"), // - METHOD_NOT_FOUND(Kind.ERROR, 1004, "Method call: Method {0} cannot be found on {1} type"), // + METHOD_NOT_FOUND(Kind.ERROR, 1004, "Method call: Method {0} cannot be found on {1} type"), // TYPE_NOT_FOUND(Kind.ERROR, 1005, "Type cannot be found ''{0}''"), // FUNCTION_NOT_DEFINED(Kind.ERROR, 1006, "The function ''{0}'' could not be found"), // PROPERTY_OR_FIELD_NOT_READABLE_ON_NULL(Kind.ERROR, 1007, "Field or property ''{0}'' cannot be found on null"), // @@ -47,7 +47,7 @@ public enum SpelMessage { PROPERTY_OR_FIELD_NOT_WRITABLE_ON_NULL(Kind.ERROR, 1009, "Field or property ''{0}'' cannot be set on null"), // PROPERTY_OR_FIELD_NOT_WRITABLE(Kind.ERROR, 1010, "Field or property ''{0}'' cannot be set on object of type ''{1}''"), // METHOD_CALL_ON_NULL_OBJECT_NOT_ALLOWED(Kind.ERROR, 1011, "Method call: Attempted to call method {0} on null context object"), // - CANNOT_INDEX_INTO_NULL_VALUE(Kind.ERROR, 1012, "Cannot index into a null value"), + CANNOT_INDEX_INTO_NULL_VALUE(Kind.ERROR, 1012, "Cannot index into a null value"), NOT_COMPARABLE(Kind.ERROR, 1013, "Cannot compare instances of {0} and {1}"), // INCORRECT_NUMBER_OF_ARGUMENTS_TO_FUNCTION(Kind.ERROR, 1014, "Incorrect number of arguments for function, {0} supplied but function takes {1}"), // INVALID_TYPE_FOR_SELECTION(Kind.ERROR, 1015, "Cannot perform selection on input data of type ''{0}''"), // @@ -60,22 +60,22 @@ public enum SpelMessage { FUNCTION_REFERENCE_CANNOT_BE_INVOKED(Kind.ERROR, 1022, "The function ''{0}'' mapped to an object of type ''{1}'' which cannot be invoked"), // EXCEPTION_DURING_FUNCTION_CALL(Kind.ERROR, 1023, "A problem occurred whilst attempting to invoke the function ''{0}'': ''{1}''"), // ARRAY_INDEX_OUT_OF_BOUNDS(Kind.ERROR, 1024, "The array has ''{0}'' elements, index ''{1}'' is invalid"), // - COLLECTION_INDEX_OUT_OF_BOUNDS(Kind.ERROR, 1025, "The collection has ''{0}'' elements, index ''{1}'' is invalid"), // + COLLECTION_INDEX_OUT_OF_BOUNDS(Kind.ERROR, 1025, "The collection has ''{0}'' elements, index ''{1}'' is invalid"), // STRING_INDEX_OUT_OF_BOUNDS(Kind.ERROR, 1026, "The string has ''{0}'' characters, index ''{1}'' is invalid"), // INDEXING_NOT_SUPPORTED_FOR_TYPE(Kind.ERROR, 1027, "Indexing into type ''{0}'' is not supported"), // INSTANCEOF_OPERATOR_NEEDS_CLASS_OPERAND(Kind.ERROR, 1028, "The operator 'instanceof' needs the right operand to be a class, not a ''{0}''"), // - EXCEPTION_DURING_METHOD_INVOCATION(Kind.ERROR, 1029, "A problem occurred when trying to execute method ''{0}'' on object of type ''{1}'': ''{2}''"), // + EXCEPTION_DURING_METHOD_INVOCATION(Kind.ERROR, 1029, "A problem occurred when trying to execute method ''{0}'' on object of type ''{1}'': ''{2}''"), // OPERATOR_NOT_SUPPORTED_BETWEEN_TYPES(Kind.ERROR, 1030, "The operator ''{0}'' is not supported between objects of type ''{1}'' and ''{2}''"), // - PROBLEM_LOCATING_METHOD(Kind.ERROR, 1031, "Problem locating method {0} cannot on type {1}"), + PROBLEM_LOCATING_METHOD(Kind.ERROR, 1031, "Problem locating method {0} cannot on type {1}"), SETVALUE_NOT_SUPPORTED( Kind.ERROR, 1032, "setValue(ExpressionState, Object) not supported for ''{0}''"), // MULTIPLE_POSSIBLE_METHODS(Kind.ERROR, 1033, "Method call of ''{0}'' is ambiguous, supported type conversions allow multiple variants to match"), // EXCEPTION_DURING_PROPERTY_WRITE(Kind.ERROR, 1034, "A problem occurred whilst attempting to set the property ''{0}'': {1}"), // NOT_AN_INTEGER(Kind.ERROR, 1035, "The value ''{0}'' cannot be parsed as an int"), // - NOT_A_LONG(Kind.ERROR, 1036, "The value ''{0}'' cannot be parsed as a long"), // + NOT_A_LONG(Kind.ERROR, 1036, "The value ''{0}'' cannot be parsed as a long"), // INVALID_FIRST_OPERAND_FOR_MATCHES_OPERATOR(Kind.ERROR, 1037, "First operand to matches operator must be a string. ''{0}'' is not"), // INVALID_SECOND_OPERAND_FOR_MATCHES_OPERATOR(Kind.ERROR, 1038, "Second operand to matches operator must be a string. ''{0}'' is not"), // FUNCTION_MUST_BE_STATIC(Kind.ERROR, 1039, "Only static methods can be called via function references. The method ''{0}'' referred to by name ''{1}'' is not static."),// - NOT_A_REAL(Kind.ERROR, 1040, "The value ''{0}'' cannot be parsed as a double"), // + NOT_A_REAL(Kind.ERROR, 1040, "The value ''{0}'' cannot be parsed as a double"), // MORE_INPUT(Kind.ERROR,1041, "After parsing a valid expression, there is still more data in the expression: ''{0}''"), RIGHT_OPERAND_PROBLEM(Kind.ERROR,1042, "Problem parsing right operand"), NOT_EXPECTED_TOKEN(Kind.ERROR,1043,"Unexpected token. Expected ''{0}'' but was ''{1}''"), @@ -93,7 +93,7 @@ public enum SpelMessage { UNABLE_TO_CREATE_MAP_FOR_INDEXING(Kind.ERROR,1055,"Unable to dynamically create a Map to replace a null value"),// UNABLE_TO_DYNAMICALLY_CREATE_OBJECT(Kind.ERROR,1056,"Unable to dynamically create instance of ''{0}'' to replace a null value"),// NO_BEAN_RESOLVER_REGISTERED(Kind.ERROR,1057,"No bean resolver registered in the context to resolve access to bean ''{0}''"),// - EXCEPTION_DURING_BEAN_RESOLUTION(Kind.ERROR, 1058, "A problem occurred when trying to resolve bean ''{0}'':''{1}''"), // + EXCEPTION_DURING_BEAN_RESOLUTION(Kind.ERROR, 1058, "A problem occurred when trying to resolve bean ''{0}'':''{1}''"), // INVALID_BEAN_REFERENCE(Kind.ERROR,1059,"@ can only be followed by an identifier or a quoted name"),// TYPE_NAME_EXPECTED_FOR_ARRAY_CONSTRUCTION(Kind.ERROR, 1060, "Expected the type of the new array to be specified as a String but found ''{0}''"), // @@ -125,7 +125,7 @@ public enum SpelMessage { /** * Produce a complete message including the prefix, the position (if known) and with the inserts applied to the * message. - * + * * @param pos the position, if less than zero it is ignored and not included in the message * @param inserts the inserts to put into the formatted message * @return a formatted message diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/SpelParseException.java b/spring-expression/src/main/java/org/springframework/expression/spel/SpelParseException.java index 3b8c14ff130..86499273f8a 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/SpelParseException.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/SpelParseException.java @@ -22,7 +22,7 @@ import org.springframework.expression.ParseException; * Root exception for Spring EL related exceptions. Rather than holding a hard coded string indicating the problem, it * records a message key and the inserts for the message. See {@link SpelMessage} for the list of all possible messages * that can occur. - * + * * @author Andy Clement * @since 3.0 */ @@ -41,7 +41,7 @@ public class SpelParseException extends ParseException { super(expressionString, position, message.formatMessage(position,inserts)); this.position = position; this.message = message; - this.inserts = inserts; + this.inserts = inserts; } public SpelParseException(int position, SpelMessage message, Object... inserts) { diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/AstUtils.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/AstUtils.java index f3c4197377e..900270b62ea 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/AstUtils.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/AstUtils.java @@ -29,7 +29,7 @@ import org.springframework.expression.spel.ExpressionState; * @since 3.0.2 */ public class AstUtils { - + /** * Determines the set of property resolvers that should be used to try and access a property on the specified target * type. The resolvers are considered to be in an ordered list, however in the returned list any that are exact @@ -37,7 +37,7 @@ public class AstUtils { * the start of the list. In addition, there are specific resolvers that exactly name the class in question and * resolvers that name a specific class but it is a supertype of the class we have. These are put at the end of the * specific resolvers set and will be tried after exactly matching accessors but before generic accessors. - * + * * @param targetType the type upon which property access is being attempted * @return a list of resolvers that should be tried in order to access the property */ diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/BeanReference.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/BeanReference.java index e7c7eb850b4..09e4a0a1144 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/BeanReference.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/BeanReference.java @@ -26,13 +26,13 @@ import org.springframework.expression.spel.SpelMessage; /** * Represents a bean reference to a type, for example "@foo" or "@'foo.bar'" - * + * * @author Andy Clement */ public class BeanReference extends SpelNodeImpl { private String beanname; - + public BeanReference(int pos,String beanname) { super(pos); this.beanname = beanname; @@ -64,5 +64,5 @@ public class BeanReference extends SpelNodeImpl { } return sb.toString(); } - + } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/CompoundExpression.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/CompoundExpression.java index 7dfec0ca331..7ec464075d1 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/CompoundExpression.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/CompoundExpression.java @@ -23,7 +23,7 @@ import org.springframework.expression.spel.SpelEvaluationException; /** * Represents a DOT separated expression sequence, such as 'property1.property2.methodOne()' - * + * * @author Andy Clement * @since 3.0 */ diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/ConstructorReference.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/ConstructorReference.java index ceb1d401e9c..6558498b858 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/ConstructorReference.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/ConstructorReference.java @@ -44,7 +44,7 @@ import org.springframework.expression.spel.SpelNode; * new String('hello world')
      * new int[]{1,2,3,4}
      * new int[3] new int[3]{1,2,3} - * + * * @author Andy Clement * @author Juergen Hoeller * @since 3.0 @@ -137,7 +137,7 @@ public class ConstructorReference extends SpelNodeImpl { throw new SpelEvaluationException(getStartPosition(), rootCause, SpelMessage.CONSTRUCTOR_INVOCATION_PROBLEM, typename, FormatHelper .formatMethodForMessage("", argumentTypes)); - } + } } // at this point we know it wasn't a user problem so worth a retry if a better candidate can be found diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/FormatHelper.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/FormatHelper.java index 3983c207a2e..3f6a1f45edf 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/FormatHelper.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/FormatHelper.java @@ -22,7 +22,7 @@ import org.springframework.core.convert.TypeDescriptor; /** * Utility methods (formatters, etc) used during parsing and evaluation. - * + * * @author Andy Clement */ public class FormatHelper { @@ -46,7 +46,7 @@ public class FormatHelper { sb.append(formatClassNameForMessage(typeDescriptor.getType())); } else { - sb.append(formatClassNameForMessage(null)); + sb.append(formatClassNameForMessage(null)); } } sb.append(")"); @@ -60,7 +60,7 @@ public class FormatHelper { * @return a formatted string suitable for message inclusion */ public static String formatClassNameForMessage(Class clazz) { - if (clazz == null) { + if (clazz == null) { return "null"; } StringBuilder fmtd = new StringBuilder(); diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java index edac92f0953..1bc897efcc6 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/FunctionReference.java @@ -74,7 +74,7 @@ public class FunctionReference extends SpelNodeImpl { /** * Execute a function represented as a java.lang.reflect.Method. - * + * * @param state the expression evaluation state * @param the java method to invoke * @return the return value of the invoked Java method diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/InlineList.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/InlineList.java index ad7bf42a84c..e0b2b8d4def 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/InlineList.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/InlineList.java @@ -26,7 +26,7 @@ import org.springframework.expression.spel.SpelNode; /** * Represent a list in an expression, e.g. '{1,2,3}' - * + * * @author Andy Clement * @since 3.0.4 */ diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/IntLiteral.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/IntLiteral.java index 15dc80d2dbc..466e03e9d6f 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/IntLiteral.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/IntLiteral.java @@ -28,7 +28,7 @@ public class IntLiteral extends Literal { private final TypedValue value; IntLiteral(String payload, int pos, int value) { - super(payload, pos); + super(payload, pos); this.value = new TypedValue(value); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/Literal.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/Literal.java index 7a8cbdf47cc..19ddf7caacb 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/Literal.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/Literal.java @@ -21,13 +21,13 @@ import org.springframework.expression.spel.*; /** * Common superclass for nodes representing literals (boolean, string, number, etc). - * + * * @author Andy Clement */ public abstract class Literal extends SpelNodeImpl { protected String literalValue; - + public Literal(String payload, int pos) { super(pos); this.literalValue = payload; @@ -53,7 +53,7 @@ public abstract class Literal extends SpelNodeImpl { /** * Process the string form of a number, using the specified base if supplied and return an appropriate literal to * hold it. Any suffix to indicate a long will be taken into account (either 'l' or 'L' is supported). - * + * * @param numberToken the token holding the number as its payload (eg. 1234 or 0xCAFE) * @param radix the base of number * @return a subtype of Literal that can represent it @@ -84,7 +84,7 @@ public abstract class Literal extends SpelNodeImpl { return new FloatLiteral(numberToken, pos, value); } else { double value = Double.parseDouble(numberToken); - return new RealLiteral(numberToken, pos, value); + return new RealLiteral(numberToken, pos, value); } } catch (NumberFormatException nfe) { throw new InternalParseException(new SpelParseException(pos>>16, nfe, SpelMessage.NOT_A_REAL, numberToken)); diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/LongLiteral.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/LongLiteral.java index 6ac11d8372e..c6b1b303af4 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/LongLiteral.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/LongLiteral.java @@ -29,7 +29,7 @@ public class LongLiteral extends Literal { private final TypedValue value; LongLiteral(String payload, int pos, long value) { - super(payload, pos); + super(payload, pos); this.value = new TypedValue(value); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpLT.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpLT.java index 6fab393a19f..0f0e12d045e 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpLT.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpLT.java @@ -31,7 +31,7 @@ public class OpLT extends Operator { public OpLT(int pos, SpelNodeImpl... operands) { super("<", pos, operands); } - + @Override public BooleanTypedValue getValueInternal(ExpressionState state) throws EvaluationException { Object left = getLeftOperand().getValueInternal(state).getValue(); diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMultiply.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMultiply.java index 507acac3ad3..42b02594162 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMultiply.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpMultiply.java @@ -24,7 +24,7 @@ import org.springframework.expression.spel.ExpressionState; /** * Implements the {@code multiply} operator. * - *

      Conversions and promotions are handled as defined in + *

      Conversions and promotions are handled as defined in * Section 5.6.2 * of the Java Language Specification: * diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/Operator.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/Operator.java index 79c190f4640..b629ff54b7c 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/Operator.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/Operator.java @@ -27,12 +27,12 @@ package org.springframework.expression.spel.ast; public abstract class Operator extends SpelNodeImpl { String operatorName; - + public Operator(String payload,int pos,SpelNodeImpl... operands) { super(pos, operands); this.operatorName = payload; } - + public SpelNodeImpl getLeftOperand() { return children[0]; } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/OperatorBetween.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/OperatorBetween.java index 2095e64680e..d89e5bd6b84 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/OperatorBetween.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/OperatorBetween.java @@ -29,7 +29,7 @@ import org.springframework.expression.spel.support.BooleanTypedValue; * Represents the between operator. The left operand to between must be a single value and the right operand must be a * list - this operator returns true if the left operand is between (using the registered comparator) the two elements * in the list. The definition of between being inclusive follows the SQL BETWEEN definition. - * + * * @author Andy Clement * @since 3.0 */ diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/OperatorPower.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/OperatorPower.java index 41c5cee0371..0c41e6a8dc2 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/OperatorPower.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/OperatorPower.java @@ -23,7 +23,7 @@ import org.springframework.expression.spel.ExpressionState; /** * The power operator. - * + * * @author Andy Clement * @since 3.0 */ @@ -37,7 +37,7 @@ public class OperatorPower extends Operator { public TypedValue getValueInternal(ExpressionState state) throws EvaluationException { SpelNodeImpl leftOp = getLeftOperand(); SpelNodeImpl rightOp = getRightOperand(); - + Object operandOne = leftOp.getValueInternal(state).getValue(); Object operandTwo = rightOp.getValueInternal(state).getValue(); if (operandOne instanceof Number && operandTwo instanceof Number) { diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/Projection.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/Projection.java index 2d572e5d835..ffc5819367a 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/Projection.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/Projection.java @@ -32,7 +32,7 @@ import org.springframework.util.ClassUtils; import org.springframework.util.ObjectUtils; /** - * Represents projection, where a given operation is performed on all elements in some input sequence, returning + * Represents projection, where a given operation is performed on all elements in some input sequence, returning * a new sequence of the same size. For example: * "{1,2,3,4,5,6,7,8,9,10}.!{#isEven(#this)}" returns "[n, y, n, y, n, y, n, y, n, y]" * @@ -43,7 +43,7 @@ import org.springframework.util.ObjectUtils; public class Projection extends SpelNodeImpl { private final boolean nullSafe; - + public Projection(boolean nullSafe, int pos, SpelNodeImpl expression) { super(pos, expression); this.nullSafe = nullSafe; @@ -61,7 +61,7 @@ public class Projection extends SpelNodeImpl { Object operand = op.getValue(); boolean operandIsArray = ObjectUtils.isArray(operand); // TypeDescriptor operandTypeDescriptor = op.getTypeDescriptor(); - + // When the input is a map, we push a special context object on the stack // before calling the specified operation. This special context object // has two fields 'key' and 'value' that refer to the map entries key diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/PropertyOrFieldReference.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/PropertyOrFieldReference.java index c7f85333a01..99e79ff5048 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/PropertyOrFieldReference.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/PropertyOrFieldReference.java @@ -34,10 +34,10 @@ import org.springframework.expression.spel.support.ReflectivePropertyAccessor; /** * Represents a simple property or field reference. - * + * * @author Andy Clement * @author Juergen Hoeller - * @author Clark Duplichien + * @author Clark Duplichien * @since 3.0 */ public class PropertyOrFieldReference extends SpelNodeImpl { @@ -119,7 +119,7 @@ public class PropertyOrFieldReference extends SpelNodeImpl { if ((resultDescriptor.getType().equals(List.class) || resultDescriptor.getType().equals(Map.class))) { // Create a new collection or map ready for the indexer if (resultDescriptor.getType().equals(List.class)) { - try { + try { if (isWritableProperty(this.name,contextObject,eContext)) { List newList = ArrayList.class.newInstance(); writeProperty(contextObject, eContext, this.name, newList); @@ -136,7 +136,7 @@ public class PropertyOrFieldReference extends SpelNodeImpl { } } else { - try { + try { if (isWritableProperty(this.name,contextObject,eContext)) { Map newMap = HashMap.class.newInstance(); writeProperty(contextObject, eContext, name, newMap); @@ -155,7 +155,7 @@ public class PropertyOrFieldReference extends SpelNodeImpl { } else { // 'simple' object - try { + try { if (isWritableProperty(this.name,contextObject,eContext)) { Object newObject = result.getTypeDescriptor().getType().newInstance(); writeProperty(contextObject, eContext, name, newObject); @@ -169,7 +169,7 @@ public class PropertyOrFieldReference extends SpelNodeImpl { catch (IllegalAccessException ex) { throw new SpelEvaluationException(getStartPosition(), ex, SpelMessage.UNABLE_TO_DYNAMICALLY_CREATE_OBJECT, result.getTypeDescriptor().getType()); - } + } } } return result; @@ -249,7 +249,7 @@ public class PropertyOrFieldReference extends SpelNodeImpl { } private void writeProperty(TypedValue contextObject, EvaluationContext eContext, String name, Object newValue) throws SpelEvaluationException { - + if (contextObject.getValue() == null && nullSafe) { return; } @@ -339,7 +339,7 @@ public class PropertyOrFieldReference extends SpelNodeImpl { specificAccessors.add( resolver); break; } - else if (clazz.isAssignableFrom(targetType)) { + else if (clazz.isAssignableFrom(targetType)) { generalAccessors.add(resolver); } } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/RealLiteral.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/RealLiteral.java index c3a1566a1ca..194db8115d4 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/RealLiteral.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/RealLiteral.java @@ -27,7 +27,7 @@ public class RealLiteral extends Literal { private final TypedValue value; public RealLiteral(String payload, int pos, double value) { - super(payload, pos); + super(payload, pos); this.value = new TypedValue(value); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/Selection.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/Selection.java index 7c599c66054..e532aa9ebc1 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/Selection.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/Selection.java @@ -54,7 +54,7 @@ public class Selection extends SpelNodeImpl { private final boolean nullSafe; public Selection(boolean nullSafe, int variant,int pos,SpelNodeImpl expression) { - super(pos,expression); + super(pos,expression); this.nullSafe = nullSafe; this.variant = variant; } @@ -153,7 +153,7 @@ public class Selection extends SpelNodeImpl { } } else { if (operand==null) { - if (nullSafe) { + if (nullSafe) { return ValueRef.NullValueRef.instance; } else { throw new SpelEvaluationException(getStartPosition(), SpelMessage.INVALID_TYPE_FOR_SELECTION, @@ -162,7 +162,7 @@ public class Selection extends SpelNodeImpl { } else { throw new SpelEvaluationException(getStartPosition(), SpelMessage.INVALID_TYPE_FOR_SELECTION, operand.getClass().getName()); - } + } } } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/TypeCode.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/TypeCode.java index aeb7ca1cc6f..c91ccad4675 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/TypeCode.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/TypeCode.java @@ -18,7 +18,7 @@ package org.springframework.expression.spel.ast; /** * Captures primitive types and their corresponding class objects, plus one special entry that represents all reference * (non-primitive) types. - * + * * @author Andy Clement */ public enum TypeCode { diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/ast/VariableReference.java b/spring-expression/src/main/java/org/springframework/expression/spel/ast/VariableReference.java index 99aec584f08..785d317cacf 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/ast/VariableReference.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/ast/VariableReference.java @@ -23,7 +23,7 @@ import org.springframework.expression.spel.SpelEvaluationException; /** * Represents a variable reference, eg. #someVar. Note this is different to a *local* variable like $someVar - * + * * @author Andy Clement * @since 3.0 */ @@ -102,7 +102,7 @@ public class VariableReference extends SpelNodeImpl { } @Override - public String toStringAST() { + public String toStringAST() { return "#" + this.name; } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelExpression.java b/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelExpression.java index eac133e671a..ac52f98a55f 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelExpression.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelExpression.java @@ -34,12 +34,12 @@ import org.springframework.util.Assert; * to be evaluated in a specified context. An expression can be evaluated * standalone or in a specified context. During expression evaluation the context * may be asked to resolve references to types, beans, properties, and methods. - * + * * @author Andy Clement * @since 3.0 */ public class SpelExpression implements Expression { - + private final String expression; private final SpelNodeImpl ast; @@ -61,7 +61,7 @@ public class SpelExpression implements Expression { // implementing Expression - + public Object getValue() throws EvaluationException { ExpressionState expressionState = new ExpressionState(getEvaluationContext(), configuration); return ast.getValue(expressionState); @@ -88,7 +88,7 @@ public class SpelExpression implements Expression { Assert.notNull(context, "The EvaluationContext is required"); return ast.getValue(new ExpressionState(context, configuration)); } - + public Object getValue(EvaluationContext context, Object rootObject) throws EvaluationException { Assert.notNull(context, "The EvaluationContext is required"); return ast.getValue(new ExpressionState(context, toTypedValue(rootObject), configuration)); @@ -98,7 +98,7 @@ public class SpelExpression implements Expression { TypedValue typedResultValue = ast.getTypedValue(new ExpressionState(context, configuration)); return ExpressionUtils.convertTypedValue(context, typedResultValue, expectedResultType); } - + public T getValue(EvaluationContext context, Object rootObject, Class expectedResultType) throws EvaluationException { TypedValue typedResultValue = ast.getTypedValue(new ExpressionState(context, toTypedValue(rootObject), configuration)); return ExpressionUtils.convertTypedValue(context, typedResultValue, expectedResultType); @@ -128,56 +128,56 @@ public class SpelExpression implements Expression { public TypeDescriptor getValueTypeDescriptor() throws EvaluationException { return getValueTypeDescriptor(getEvaluationContext()); } - + public TypeDescriptor getValueTypeDescriptor(Object rootObject) throws EvaluationException { ExpressionState eState = new ExpressionState(getEvaluationContext(), toTypedValue(rootObject), configuration); return ast.getValueInternal(eState).getTypeDescriptor(); } - + public TypeDescriptor getValueTypeDescriptor(EvaluationContext context) throws EvaluationException { Assert.notNull(context, "The EvaluationContext is required"); ExpressionState eState = new ExpressionState(context, configuration); return ast.getValueInternal(eState).getTypeDescriptor(); } - + public TypeDescriptor getValueTypeDescriptor(EvaluationContext context, Object rootObject) throws EvaluationException { Assert.notNull(context, "The EvaluationContext is required"); ExpressionState eState = new ExpressionState(context, toTypedValue(rootObject), configuration); return ast.getValueInternal(eState).getTypeDescriptor(); } - + public String getExpressionString() { return expression; } public boolean isWritable(EvaluationContext context) throws EvaluationException { - Assert.notNull(context, "The EvaluationContext is required"); + Assert.notNull(context, "The EvaluationContext is required"); return ast.isWritable(new ExpressionState(context, configuration)); } public boolean isWritable(Object rootObject) throws EvaluationException { return ast.isWritable(new ExpressionState(getEvaluationContext(), toTypedValue(rootObject), configuration)); } - + public boolean isWritable(EvaluationContext context, Object rootObject) throws EvaluationException { - Assert.notNull(context, "The EvaluationContext is required"); + Assert.notNull(context, "The EvaluationContext is required"); return ast.isWritable(new ExpressionState(context, toTypedValue(rootObject), configuration)); } public void setValue(EvaluationContext context, Object value) throws EvaluationException { - Assert.notNull(context, "The EvaluationContext is required"); + Assert.notNull(context, "The EvaluationContext is required"); ast.setValue(new ExpressionState(context, configuration), value); } public void setValue(Object rootObject, Object value) throws EvaluationException { ast.setValue(new ExpressionState(getEvaluationContext(), toTypedValue(rootObject), configuration), value); } - + public void setValue(EvaluationContext context, Object rootObject, Object value) throws EvaluationException { - Assert.notNull(context, "The EvaluationContext is required"); + Assert.notNull(context, "The EvaluationContext is required"); ast.setValue(new ExpressionState(context, toTypedValue(rootObject), configuration), value); } - + // impl only /** @@ -196,7 +196,7 @@ public class SpelExpression implements Expression { public String toStringAST() { return ast.toStringAST(); } - + /** * Return the default evaluation context that will be used if none is supplied on an evaluation call * @return the default evaluation context @@ -207,7 +207,7 @@ public class SpelExpression implements Expression { } return defaultContext; } - + /** * Set the evaluation context that will be used if none is specified on an evaluation call. * @param context an evaluation context diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelExpressionParser.java b/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelExpressionParser.java index 7c6c6f987ea..7762d75c855 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelExpressionParser.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/standard/SpelExpressionParser.java @@ -24,7 +24,7 @@ import org.springframework.util.Assert; /** * SpEL parser. Instances are reusable and thread-safe. - * + * * @author Andy Clement * @author Juergen Hoeller * @since 3.0 diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/standard/Token.java b/spring-expression/src/main/java/org/springframework/expression/spel/standard/Token.java index 5d3d248fa0f..0bc2f0d91a0 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/standard/Token.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/standard/Token.java @@ -18,17 +18,17 @@ package org.springframework.expression.spel.standard; /** * Holder for a kind of token, the associated data and its position in the input data stream (start/end). - * + * * @author Andy Clement * @since 3.0 */ class Token { - + TokenKind kind; String data; int startpos; // index of first character int endpos; // index of char after the last character - + /** * Constructor for use when there is no particular data for the token (eg. TRUE or '+') * @param startpos the exact start @@ -39,17 +39,17 @@ class Token { this.startpos = startpos; this.endpos = endpos; } - + Token(TokenKind tokenKind, char[] tokenData, int pos, int endpos) { this(tokenKind,pos,endpos); this.data = new String(tokenData); } - - + + public TokenKind getKind() { return kind; } - + public String toString() { StringBuilder s = new StringBuilder(); s.append("[").append(kind.toString()); diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/standard/TokenKind.java b/spring-expression/src/main/java/org/springframework/expression/spel/standard/TokenKind.java index 6484a98fa21..ffa6ffa88c9 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/standard/TokenKind.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/standard/TokenKind.java @@ -22,9 +22,9 @@ package org.springframework.expression.spel.standard; */ enum TokenKind { // ordered by priority - operands first - LITERAL_INT, LITERAL_LONG, LITERAL_HEXINT, LITERAL_HEXLONG, LITERAL_STRING, LITERAL_REAL, LITERAL_REAL_FLOAT, + LITERAL_INT, LITERAL_LONG, LITERAL_HEXINT, LITERAL_HEXLONG, LITERAL_STRING, LITERAL_REAL, LITERAL_REAL_FLOAT, LPAREN("("), RPAREN(")"), COMMA(","), IDENTIFIER, - COLON(":"),HASH("#"),RSQUARE("]"), LSQUARE("["), + COLON(":"),HASH("#"),RSQUARE("]"), LSQUARE("["), LCURLY("{"),RCURLY("}"), DOT("."), PLUS("+"), STAR("*"), MINUS("-"), SELECT_FIRST("^["), SELECT_LAST("$["), QMARK("?"), PROJECT("!["), DIV("/"), GE(">="), GT(">"), LE("<="), LT("<"), EQ("=="), NE("!="), diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/standard/Tokenizer.java b/spring-expression/src/main/java/org/springframework/expression/spel/standard/Tokenizer.java index 44e122266b0..396c8f17ffc 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/standard/Tokenizer.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/standard/Tokenizer.java @@ -27,12 +27,12 @@ import org.springframework.util.Assert; /** * Lex some input data into a stream of tokens that can then be parsed. - * + * * @author Andy Clement * @since 3.0 */ class Tokenizer { - + String expressionString; char[] toProcess; int pos; @@ -117,7 +117,7 @@ class Tokenizer { if (isTwoCharToken(TokenKind.SELECT_FIRST)) { pushPairToken(TokenKind.SELECT_FIRST); } else { - pushCharToken(TokenKind.POWER); + pushCharToken(TokenKind.POWER); } break; case '!': @@ -145,7 +145,7 @@ class Tokenizer { if (isTwoCharToken(TokenKind.SYMBOLIC_OR)) { pushPairToken(TokenKind.SYMBOLIC_OR); } - break; + break; case '?': if (isTwoCharToken(TokenKind.SELECT)) { pushPairToken(TokenKind.SELECT); @@ -154,7 +154,7 @@ class Tokenizer { } else if (isTwoCharToken(TokenKind.SAFE_NAVI)) { pushPairToken(TokenKind.SAFE_NAVI); } else { - pushCharToken(TokenKind.QMARK); + pushCharToken(TokenKind.QMARK); } break; case '$': @@ -216,7 +216,7 @@ class Tokenizer { } } - public List getTokens() { + public List getTokens() { return tokens; } @@ -266,26 +266,26 @@ class Tokenizer { tokens.add(new Token(TokenKind.LITERAL_STRING, subarray(start,pos), start, pos)); } -// REAL_LITERAL : +// REAL_LITERAL : // ('.' (DECIMAL_DIGIT)+ (EXPONENT_PART)? (REAL_TYPE_SUFFIX)?) | // ((DECIMAL_DIGIT)+ '.' (DECIMAL_DIGIT)+ (EXPONENT_PART)? (REAL_TYPE_SUFFIX)?) | // ((DECIMAL_DIGIT)+ (EXPONENT_PART) (REAL_TYPE_SUFFIX)?) | // ((DECIMAL_DIGIT)+ (REAL_TYPE_SUFFIX)); // fragment INTEGER_TYPE_SUFFIX : ( 'L' | 'l' ); -// fragment HEX_DIGIT : '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'|'A'|'B'|'C'|'D'|'E'|'F'|'a'|'b'|'c'|'d'|'e'|'f'; -// -// fragment EXPONENT_PART : 'e' (SIGN)* (DECIMAL_DIGIT)+ | 'E' (SIGN)* (DECIMAL_DIGIT)+ ; +// fragment HEX_DIGIT : '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'|'A'|'B'|'C'|'D'|'E'|'F'|'a'|'b'|'c'|'d'|'e'|'f'; +// +// fragment EXPONENT_PART : 'e' (SIGN)* (DECIMAL_DIGIT)+ | 'E' (SIGN)* (DECIMAL_DIGIT)+ ; // fragment SIGN : '+' | '-' ; // fragment REAL_TYPE_SUFFIX : 'F' | 'f' | 'D' | 'd'; // INTEGER_LITERAL -// : (DECIMAL_DIGIT)+ (INTEGER_TYPE_SUFFIX)?; +// : (DECIMAL_DIGIT)+ (INTEGER_TYPE_SUFFIX)?; private void lexNumericLiteral(boolean firstCharIsZero) { boolean isReal = false; int start = pos; char ch = toProcess[pos+1]; boolean isHex = ch=='x' || ch=='X'; - + // deal with hexadecimal if (firstCharIsZero && isHex) { pos=pos+1; @@ -293,16 +293,16 @@ class Tokenizer { pos++; } while (isHexadecimalDigit(toProcess[pos])); if (isChar('L','l')) { - pushHexIntToken(subarray(start+2,pos),true, start, pos); + pushHexIntToken(subarray(start+2,pos),true, start, pos); pos++; } else { - pushHexIntToken(subarray(start+2,pos),false, start, pos); + pushHexIntToken(subarray(start+2,pos),false, start, pos); } return; } // real numbers must have leading digits - + // Consume first part of number do { pos++; @@ -311,7 +311,7 @@ class Tokenizer { // a '.' indicates this number is a real ch = toProcess[pos]; if (ch=='.') { - isReal = true; + isReal = true; int dotpos = pos; // carry on consuming digits do { @@ -328,9 +328,9 @@ class Tokenizer { } int endOfNumber = pos; - + // Now there may or may not be an exponent - + // is it a long ? if (isChar('L','l')) { if (isReal) { // 3.4L - not allowed @@ -345,7 +345,7 @@ class Tokenizer { if (isSign(possibleSign)) { pos++; } - + // exponent digits do { pos++; @@ -354,7 +354,7 @@ class Tokenizer { if (isFloatSuffix(toProcess[pos])) { isFloat = true; endOfNumber = ++pos; - } else if (isDoubleSuffix(toProcess[pos])) { + } else if (isDoubleSuffix(toProcess[pos])) { endOfNumber = ++pos; } pushRealToken(subarray(start,pos), isFloat, start, pos); @@ -367,7 +367,7 @@ class Tokenizer { endOfNumber = ++pos; } else if (isDoubleSuffix(ch)) { isReal = true; - endOfNumber = ++pos; + endOfNumber = ++pos; } if (isReal) { pushRealToken(subarray(start,endOfNumber), isFloat, start, endOfNumber); @@ -386,7 +386,7 @@ class Tokenizer { pos++; } while (isIdentifier(toProcess[pos])); char[] subarray = subarray(start,pos); - + // Check if this is the alternative (textual) representation of an operator (see alternativeOperatorNames) if ((pos-start)==2 || (pos-start)==3) { String asString = new String(subarray).toUpperCase(); @@ -409,7 +409,7 @@ class Tokenizer { private void pushHexIntToken(char[] data,boolean isLong, int start, int end) { if (data.length==0) { - if (isLong) { + if (isLong) { throw new InternalParseException(new SpelParseException(expressionString,start,SpelMessage.NOT_A_LONG,expressionString.substring(start,end+1))); } else { throw new InternalParseException(new SpelParseException(expressionString,start,SpelMessage.NOT_AN_INTEGER,expressionString.substring(start,end))); @@ -426,7 +426,7 @@ class Tokenizer { if (isFloat) { tokens.add(new Token(TokenKind.LITERAL_REAL_FLOAT, data, start, end)); } else { - tokens.add(new Token(TokenKind.LITERAL_REAL, data, start, end)); + tokens.add(new Token(TokenKind.LITERAL_REAL, data, start, end)); } } @@ -512,7 +512,7 @@ class Tokenizer { return (flags[ch] & IS_HEXDIGIT)!=0; } - private static final byte flags[] = new byte[256]; + private static final byte flags[] = new byte[256]; private static final byte IS_DIGIT=0x01; private static final byte IS_HEXDIGIT=0x02; private static final byte IS_ALPHA=0x04; diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/BooleanTypedValue.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/BooleanTypedValue.java index b397f1ac04c..8de21547205 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/BooleanTypedValue.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/BooleanTypedValue.java @@ -32,7 +32,7 @@ public class BooleanTypedValue extends TypedValue { private BooleanTypedValue(boolean b) { super(b); } - + public static BooleanTypedValue forValue(boolean b) { if (b) { diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectionHelper.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectionHelper.java index 40dcbc2ca76..a6beaafe6cd 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectionHelper.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectionHelper.java @@ -72,7 +72,7 @@ public class ReflectionHelper { if (suppliedArg.isAssignableTo(expectedArg)) { if (match != ArgsMatchKind.REQUIRES_CONVERSION) { match = ArgsMatchKind.CLOSE; - } + } } else if (typeConverter.canConvert(suppliedArg, expectedArg)) { if (argsRequiringConversion == null) { @@ -103,7 +103,7 @@ public class ReflectionHelper { } } } - + /** * Based on {@link MethodInvoker#getTypeDifferenceWeight(Class[], Object[])} but operates on TypeDescriptors. */ @@ -153,17 +153,17 @@ public class ReflectionHelper { * type by the converter. This variant of compareArguments also allows for a varargs match. * @param expectedArgTypes the array of types the method/constructor is expecting * @param suppliedArgTypes the array of types that are being supplied at the point of invocation - * @param typeConverter a registered type converter + * @param typeConverter a registered type converter * @return a MatchInfo object indicating what kind of match it was or null if it was not a match */ static ArgumentsMatchInfo compareArgumentsVarargs( List expectedArgTypes, List suppliedArgTypes, TypeConverter typeConverter) { - + Assert.isTrue(expectedArgTypes != null && expectedArgTypes.size() > 0, "Expected arguments must at least include one array (the vargargs parameter)"); Assert.isTrue(expectedArgTypes.get(expectedArgTypes.size() - 1).isArray(), "Final expected argument should be array type (the varargs parameter)"); - + ArgsMatchKind match = ArgsMatchKind.EXACT; List argsRequiringConversion = null; @@ -221,7 +221,7 @@ public class ReflectionHelper { if (suppliedArg == null) { if (varargsParameterType.isPrimitive()) { match = null; - } + } } else { if (varargsParameterType != suppliedArg.getType()) { if (ClassUtils.isAssignable(varargsParameterType, suppliedArg.getType())) { @@ -284,18 +284,18 @@ public class ReflectionHelper { for (int i = 0; i < varargsPosition; i++) { TypeDescriptor targetType = new TypeDescriptor(MethodParameter.forMethodOrConstructor(methodOrCtor, i)); Object argument = arguments[i]; - arguments[i] = converter.convertValue(argument, TypeDescriptor.forObject(argument), targetType); + arguments[i] = converter.convertValue(argument, TypeDescriptor.forObject(argument), targetType); } MethodParameter methodParam = MethodParameter.forMethodOrConstructor(methodOrCtor, varargsPosition); if (varargsPosition == arguments.length - 1) { - TypeDescriptor targetType = new TypeDescriptor(methodParam); + TypeDescriptor targetType = new TypeDescriptor(methodParam); Object argument = arguments[varargsPosition]; - arguments[varargsPosition] = converter.convertValue(argument, TypeDescriptor.forObject(argument), targetType); + arguments[varargsPosition] = converter.convertValue(argument, TypeDescriptor.forObject(argument), targetType); } else { TypeDescriptor targetType = TypeDescriptor.nested(methodParam, 1); for (int i = varargsPosition; i < arguments.length; i++) { Object argument = arguments[i]; - arguments[i] = converter.convertValue(argument, TypeDescriptor.forObject(argument), targetType); + arguments[i] = converter.convertValue(argument, TypeDescriptor.forObject(argument), targetType); } } } @@ -371,7 +371,7 @@ public class ReflectionHelper { if (argumentCount >= parameterCount) { arraySize = argumentCount - (parameterCount - 1); } - + // Create an array for the varargs arguments Object[] newArgs = new Object[parameterCount]; for (int i = 0; i < newArgs.length - 1; i++) { @@ -446,9 +446,9 @@ public class ReflectionHelper { public static enum ArgsMatchKind { // An exact match is where the parameter types exactly match what the method/constructor being invoked is expecting - EXACT, + EXACT, // A close match is where the parameter types either exactly match or are assignment compatible with the method/constructor being invoked - CLOSE, + CLOSE, // A conversion match is where the type converter must be used to transform some of the parameter types REQUIRES_CONVERSION } @@ -474,11 +474,11 @@ public class ReflectionHelper { ArgumentsMatchInfo(ArgsMatchKind kind) { this.kind = kind; } - + public boolean isExactMatch() { return (this.kind == ArgsMatchKind.EXACT); } - + public boolean isCloseMatch() { return (this.kind == ArgsMatchKind.CLOSE); } @@ -486,7 +486,7 @@ public class ReflectionHelper { public boolean isMatchRequiringConversion() { return (this.kind == ArgsMatchKind.REQUIRES_CONVERSION); } - + public String toString() { StringBuilder sb = new StringBuilder(); sb.append("ArgumentMatch: ").append(this.kind); diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveConstructorResolver.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveConstructorResolver.java index a2768fc0997..fb7d4b31368 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveConstructorResolver.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/ReflectiveConstructorResolver.java @@ -33,7 +33,7 @@ import org.springframework.expression.TypeConverter; /** * A constructor resolver that uses reflection to locate the constructor that should be invoked - * + * * @author Andy Clement * @author Juergen Hoeller * @since 3.0 diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardEvaluationContext.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardEvaluationContext.java index 88118cea321..c4a4425bed5 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardEvaluationContext.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardEvaluationContext.java @@ -47,13 +47,13 @@ import org.springframework.util.Assert; * @since 3.0 */ public class StandardEvaluationContext implements EvaluationContext { - + private TypedValue rootObject; private List constructorResolvers; private List methodResolvers; - + private ReflectiveMethodResolver reflectiveMethodResolver; private List propertyAccessors; @@ -67,14 +67,14 @@ public class StandardEvaluationContext implements EvaluationContext { private OperatorOverloader operatorOverloader = new StandardOperatorOverloader(); private final Map variables = new HashMap(); - + private BeanResolver beanResolver; public StandardEvaluationContext() { setRootObject(null); } - + public StandardEvaluationContext(Object rootObject) { this(); setRootObject(rootObject); @@ -102,12 +102,12 @@ public class StandardEvaluationContext implements EvaluationContext { ensureConstructorResolversInitialized(); return this.constructorResolvers.remove(resolver); } - + public List getConstructorResolvers() { ensureConstructorResolversInitialized(); return this.constructorResolvers; } - + public void setConstructorResolvers(List constructorResolvers) { this.constructorResolvers = constructorResolvers; } @@ -117,7 +117,7 @@ public class StandardEvaluationContext implements EvaluationContext { ensureMethodResolversInitialized(); this.methodResolvers.add(this.methodResolvers.size() - 1, resolver); } - + public boolean removeMethodResolver(MethodResolver methodResolver) { ensureMethodResolversInitialized(); return this.methodResolvers.remove(methodResolver); @@ -131,21 +131,21 @@ public class StandardEvaluationContext implements EvaluationContext { public void setBeanResolver(BeanResolver beanResolver) { this.beanResolver = beanResolver; } - + public BeanResolver getBeanResolver() { return this.beanResolver; } - + public void setMethodResolvers(List methodResolvers) { this.methodResolvers = methodResolvers; } - + public void addPropertyAccessor(PropertyAccessor accessor) { ensurePropertyAccessorsInitialized(); this.propertyAccessors.add(this.propertyAccessors.size() - 1, accessor); } - + public boolean removePropertyAccessor(PropertyAccessor accessor) { return this.propertyAccessors.remove(accessor); } @@ -154,7 +154,7 @@ public class StandardEvaluationContext implements EvaluationContext { ensurePropertyAccessorsInitialized(); return this.propertyAccessors; } - + public void setPropertyAccessors(List propertyAccessors) { this.propertyAccessors = propertyAccessors; } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeComparator.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeComparator.java index 4cb99f4d5f3..1b5a6ddddc0 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeComparator.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeComparator.java @@ -22,7 +22,7 @@ import org.springframework.expression.spel.SpelMessage; /** * A simple basic TypeComparator implementation. It supports comparison of numbers and types implementing Comparable. - * + * * @author Andy Clement * @author Juergen Hoeller * @since 3.0 @@ -68,7 +68,7 @@ public class StandardTypeComparator implements TypeComparator { } catch (ClassCastException cce) { throw new SpelEvaluationException(cce, SpelMessage.NOT_COMPARABLE, left.getClass(), right.getClass()); } - + throw new SpelEvaluationException(SpelMessage.NOT_COMPARABLE, left.getClass(), right.getClass()); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeConverter.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeConverter.java index 49c0b3c2bdc..1cc1d6f394a 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeConverter.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeConverter.java @@ -29,7 +29,7 @@ import org.springframework.util.Assert; /** * Default implementation of the {@link TypeConverter} interface, * delegating to a core Spring {@link ConversionService}. - * + * * @author Juergen Hoeller * @author Andy Clement * @since 3.0 @@ -38,7 +38,7 @@ import org.springframework.util.Assert; public class StandardTypeConverter implements TypeConverter { private static ConversionService defaultConversionService; - + private final ConversionService conversionService; diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeLocator.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeLocator.java index 18d9df11f24..e46c53462f9 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeLocator.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeLocator.java @@ -29,7 +29,7 @@ import org.springframework.util.ClassUtils; /** * A default implementation of a TypeLocator that uses the context classloader (or any classloader set upon it). It * supports 'well known' packages so if a type cannot be found it will try the registered imports to locate it. - * + * * @author Andy Clement * @author Juergen Hoeller * @since 3.0 @@ -95,9 +95,9 @@ public class StandardTypeLocator implements TypeLocator { public List getImportPrefixes() { return Collections.unmodifiableList(this.knownPackagePrefixes); } - + public void removeImport(String prefix) { - this.knownPackagePrefixes.remove(prefix); + this.knownPackagePrefixes.remove(prefix); } } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/ArrayConstructorTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/ArrayConstructorTests.java index d48266f4518..6a0a2f9c2a2 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/ArrayConstructorTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/ArrayConstructorTests.java @@ -22,7 +22,7 @@ import org.springframework.expression.spel.standard.SpelExpressionParser; /** * Test construction of arrays. - * + * * @author Andy Clement */ public class ArrayConstructorTests extends ExpressionTestCase { diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/ConstructorInvocationTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/ConstructorInvocationTests.java index 3d3be623a5b..eab2a6f0c28 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/ConstructorInvocationTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/ConstructorInvocationTests.java @@ -34,7 +34,7 @@ import org.springframework.expression.spel.testresources.PlaceOfBirth; /** * Tests invocation of constructors. - * + * * @author Andy Clement */ public class ConstructorInvocationTests extends ExpressionTestCase { @@ -43,22 +43,22 @@ public class ConstructorInvocationTests extends ExpressionTestCase { public void testTypeConstructors() { evaluate("new String('hello world')", "hello world", String.class); } - + @Test public void testNonExistentType() { evaluateAndCheckError("new FooBar()",SpelMessage.CONSTRUCTOR_INVOCATION_PROBLEM); } - + static class TestException extends Exception { - + } - + static class Tester { public static int counter; public int i; - + public Tester() {} - + public Tester(int i) throws Exception { counter++; if (i==1) { @@ -72,11 +72,11 @@ public class ConstructorInvocationTests extends ExpressionTestCase { } this.i = i; } - + public Tester(PlaceOfBirth pob) { - + } - + } @Test public void testConstructorThrowingException_SPR6760() { @@ -85,7 +85,7 @@ public class ConstructorInvocationTests extends ExpressionTestCase { // On 2 it will throw a RuntimeException // On 3 it will exit normally // In each case it increments the Tester field 'counter' when invoked - + SpelExpressionParser parser = new SpelExpressionParser(); Expression expr = parser.parseExpression("new org.springframework.expression.spel.ConstructorInvocationTests$Tester(#bar).i"); @@ -104,11 +104,11 @@ public class ConstructorInvocationTests extends ExpressionTestCase { o = expr.getValue(eContext); Assert.assertEquals(0, o); // That confirms the logic to mark the cached reference stale and retry is working - - + + // Now let's cause the method to exit via exception and ensure it doesn't cause // a retry. - + // First, switch back to throwException(int) eContext.setVariable("bar",3); o = expr.getValue(eContext); @@ -130,8 +130,8 @@ public class ConstructorInvocationTests extends ExpressionTestCase { } // If counter is 4 then the method got called twice! Assert.assertEquals(3,parser.parseExpression("counter").getValue(eContext)); - - + + // 1 will make it throw a RuntimeException - SpEL will let this through eContext.setVariable("bar",1); try { @@ -147,38 +147,38 @@ public class ConstructorInvocationTests extends ExpressionTestCase { // If counter is 5 then the method got called twice! Assert.assertEquals(4,parser.parseExpression("counter").getValue(eContext)); } - + @Test public void testAddingConstructorResolvers() { StandardEvaluationContext ctx = new StandardEvaluationContext(); - + // reflective constructor accessor is the only one by default List constructorResolvers = ctx.getConstructorResolvers(); Assert.assertEquals(1,constructorResolvers.size()); - + ConstructorResolver dummy = new DummyConstructorResolver(); ctx.addConstructorResolver(dummy); Assert.assertEquals(2,ctx.getConstructorResolvers().size()); - + List copy = new ArrayList(); copy.addAll(ctx.getConstructorResolvers()); Assert.assertTrue(ctx.removeConstructorResolver(dummy)); Assert.assertFalse(ctx.removeConstructorResolver(dummy)); Assert.assertEquals(1,ctx.getConstructorResolvers().size()); - + ctx.setConstructorResolvers(copy); Assert.assertEquals(2,ctx.getConstructorResolvers().size()); } - + static class DummyConstructorResolver implements ConstructorResolver { public ConstructorExecutor resolve(EvaluationContext context, String typeName, List argumentTypes) throws AccessException { throw new UnsupportedOperationException("Auto-generated method stub"); } - + } - + @Test public void testVarargsInvocation01() { // Calling 'Fruit(String... strings)' @@ -201,7 +201,7 @@ public class ConstructorInvocationTests extends ExpressionTestCase { evaluate("new org.springframework.expression.spel.testresources.Fruit(2,'a',3.0d).stringscount()", 4, Integer.class); evaluate("new org.springframework.expression.spel.testresources.Fruit(8,stringArrayOfThreeItems).stringscount()", 11, Integer.class); } - + /* * These tests are attempting to call constructors where we need to widen or convert the argument in order to * satisfy a suitable constructor. diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/DefaultComparatorUnitTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/DefaultComparatorUnitTests.java index 37c0dd935d2..f28c7c295c4 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/DefaultComparatorUnitTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/DefaultComparatorUnitTests.java @@ -24,7 +24,7 @@ import org.springframework.expression.spel.support.StandardTypeComparator; /** * Unit tests for type comparison - * + * * @author Andy Clement */ public class DefaultComparatorUnitTests { @@ -52,12 +52,12 @@ public class DefaultComparatorUnitTests { Assert.assertTrue(comparator.compare(1, 2L) < 0); Assert.assertTrue(comparator.compare(1, 1L) == 0); Assert.assertTrue(comparator.compare(2, 1L) > 0); - + Assert.assertTrue(comparator.compare(1L, 2L) < 0); Assert.assertTrue(comparator.compare(1L, 1L) == 0); Assert.assertTrue(comparator.compare(2L, 1L) > 0); } - + @Test public void testNulls() throws EvaluationException { TypeComparator comparator = new StandardTypeComparator(); @@ -73,7 +73,7 @@ public class DefaultComparatorUnitTests { Assert.assertTrue(comparator.compare("a","b")<0); Assert.assertTrue(comparator.compare("b","a")>0); } - + @Test public void testCanCompare() throws EvaluationException { TypeComparator comparator = new StandardTypeComparator(); @@ -85,5 +85,5 @@ public class DefaultComparatorUnitTests { Assert.assertTrue(comparator.canCompare("abc",3)); Assert.assertFalse(comparator.canCompare(String.class,3)); } - + } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/ExpressionLanguageScenarioTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/ExpressionLanguageScenarioTests.java index ed7d79f5dde..b225aa66df2 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/ExpressionLanguageScenarioTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/ExpressionLanguageScenarioTests.java @@ -56,7 +56,7 @@ import org.springframework.expression.spel.support.StandardEvaluationContext; *

    1. Adding an advanced (better performing) property resolver *
    2. Adding your own type converter to support conversion between any types you like * - * + * * @author Andy Clement */ public class ExpressionLanguageScenarioTests extends ExpressionTestCase { @@ -75,7 +75,7 @@ public class ExpressionLanguageScenarioTests extends ExpressionTestCase { Object value = expr.getValue(); // They are reusable value = expr.getValue(); - + Assert.assertEquals("hello world", value); Assert.assertEquals(String.class, value.getClass()); } catch (EvaluationException ee) { @@ -100,7 +100,7 @@ public class ExpressionLanguageScenarioTests extends ExpressionTestCase { List primes = new ArrayList(); primes.addAll(Arrays.asList(2,3,5,7,11,13,17)); ctx.setVariable("primes",primes); - + Expression expr = parser.parseRaw("#favouriteColour"); Object value = expr.getValue(ctx); Assert.assertEquals("blue", value); @@ -112,17 +112,17 @@ public class ExpressionLanguageScenarioTests extends ExpressionTestCase { // all prime numbers > 10 from the list (using selection ?{...}) expr = parser.parseRaw("#primes.?[#this>10]"); value = expr.getValue(ctx); - Assert.assertEquals("[11, 13, 17]", value.toString()); + Assert.assertEquals("[11, 13, 17]", value.toString()); } - + static class TestClass { public String str; private int property; public int getProperty() { return property; } public void setProperty(int i) { property = i; } } - + /** * Scenario: using your own root context object */ @@ -137,11 +137,11 @@ public class ExpressionLanguageScenarioTests extends ExpressionTestCase { tc.setProperty(42); tc.str = "wibble"; ctx.setRootObject(tc); - + // read it, set it, read it again Expression expr = parser.parseRaw("str"); Object value = expr.getValue(ctx); - Assert.assertEquals("wibble", value); + Assert.assertEquals("wibble", value); expr = parser.parseRaw("str"); expr.setValue(ctx, "wobble"); expr = parser.parseRaw("str"); @@ -153,7 +153,7 @@ public class ExpressionLanguageScenarioTests extends ExpressionTestCase { expr = parser.parseRaw("str"); value = expr.getValue(ctx); Assert.assertEquals("wabble", value); - + // private property will be accessed through getter() expr = parser.parseRaw("property"); value = expr.getValue(ctx); @@ -166,7 +166,7 @@ public class ExpressionLanguageScenarioTests extends ExpressionTestCase { value = expr.getValue(ctx); Assert.assertEquals(4,value); } - + public static String repeat(String s) { return s+s; } /** @@ -180,7 +180,7 @@ public class ExpressionLanguageScenarioTests extends ExpressionTestCase { // Use the standard evaluation context StandardEvaluationContext ctx = new StandardEvaluationContext(); ctx.registerFunction("repeat",ExpressionLanguageScenarioTests.class.getDeclaredMethod("repeat",String.class)); - + Expression expr = parser.parseRaw("#repeat('hello')"); Object value = expr.getValue(ctx); Assert.assertEquals("hellohello", value); @@ -193,7 +193,7 @@ public class ExpressionLanguageScenarioTests extends ExpressionTestCase { Assert.fail("Unexpected Exception: " + pe.getMessage()); } } - + /** * Scenario: add a property resolver that will get called in the resolver chain, this one only supports reading. */ @@ -313,6 +313,6 @@ public class ExpressionLanguageScenarioTests extends ExpressionTestCase { public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException { } - + } } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/ExpressionStateTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/ExpressionStateTests.java index f984c985401..a7a1856777e 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/ExpressionStateTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/ExpressionStateTests.java @@ -33,13 +33,13 @@ import org.springframework.expression.spel.testresources.Inventor; /** * Tests for the expression state object - some features are not yet exploited in the language (eg nested scopes) - * + * * @author Andy Clement */ public class ExpressionStateTests extends ExpressionTestCase { @Test - public void testConstruction() { + public void testConstruction() { EvaluationContext context = TestScenarioCreator.getTestEvaluationContext(); ExpressionState state = new ExpressionState(context); Assert.assertEquals(context,state.getEvaluationContext()); @@ -47,14 +47,14 @@ public class ExpressionStateTests extends ExpressionTestCase { // Local variables are in variable scopes which come and go during evaluation. Normal variables are // accessible through the evaluation context - + @Test public void testLocalVariables() { ExpressionState state = getState(); - + Object value = state.lookupLocalVariable("foo"); Assert.assertNull(value); - + state.setLocalVariable("foo",34); value = state.lookupLocalVariable("foo"); Assert.assertEquals(34,value); @@ -80,13 +80,13 @@ public class ExpressionStateTests extends ExpressionTestCase { Assert.assertEquals("abc",typedValue.getValue()); Assert.assertEquals(String.class,typedValue.getTypeDescriptor().getType()); } - + @Test public void testNoVariableInteference() { ExpressionState state = getState(); TypedValue typedValue = state.lookupVariable("foo"); Assert.assertEquals(TypedValue.NULL,typedValue); - + state.setLocalVariable("foo",34); typedValue = state.lookupVariable("foo"); Assert.assertEquals(TypedValue.NULL,typedValue); @@ -94,25 +94,25 @@ public class ExpressionStateTests extends ExpressionTestCase { state.setVariable("goo","hello"); Assert.assertNull(state.lookupLocalVariable("goo")); } - + @Test public void testLocalVariableNestedScopes() { ExpressionState state = getState(); Assert.assertEquals(null,state.lookupLocalVariable("foo")); - + state.setLocalVariable("foo",12); Assert.assertEquals(12,state.lookupLocalVariable("foo")); - + state.enterScope(null); Assert.assertEquals(12,state.lookupLocalVariable("foo")); // found in upper scope state.setLocalVariable("foo","abc"); Assert.assertEquals("abc",state.lookupLocalVariable("foo")); // found in nested scope - + state.exitScope(); Assert.assertEquals(12,state.lookupLocalVariable("foo")); // found in nested scope } - + @Test public void testRootContextObject() { ExpressionState state = getState(); @@ -122,62 +122,62 @@ public class ExpressionStateTests extends ExpressionTestCase { ((StandardEvaluationContext) state.getEvaluationContext()).setRootObject(null); Assert.assertEquals(Inventor.class,state.getRootContextObject().getValue().getClass()); // Assert.assertEquals(null, state.getRootContextObject().getValue()); - + state = new ExpressionState(new StandardEvaluationContext()); Assert.assertEquals(TypedValue.NULL,state.getRootContextObject()); - + ((StandardEvaluationContext)state.getEvaluationContext()).setRootObject(null); Assert.assertEquals(null,state.getRootContextObject().getValue()); } - + @Test public void testActiveContextObject() { ExpressionState state = getState(); Assert.assertEquals(state.getRootContextObject().getValue(),state.getActiveContextObject().getValue()); - + try { state.popActiveContextObject(); Assert.fail("stack should be empty..."); } catch (EmptyStackException ese) { // success } - + state.pushActiveContextObject(new TypedValue(34)); Assert.assertEquals(34,state.getActiveContextObject().getValue()); - + state.pushActiveContextObject(new TypedValue("hello")); Assert.assertEquals("hello",state.getActiveContextObject().getValue()); - + state.popActiveContextObject(); Assert.assertEquals(34,state.getActiveContextObject().getValue()); - + state.popActiveContextObject(); Assert.assertEquals(state.getRootContextObject().getValue(),state.getActiveContextObject().getValue()); - + state = new ExpressionState(new StandardEvaluationContext()); Assert.assertEquals(TypedValue.NULL,state.getActiveContextObject()); } - + @Test public void testPopulatedNestedScopes() { ExpressionState state = getState(); Assert.assertNull(state.lookupLocalVariable("foo")); - + state.enterScope("foo",34); Assert.assertEquals(34,state.lookupLocalVariable("foo")); - + state.enterScope(null); state.setLocalVariable("foo",12); Assert.assertEquals(12,state.lookupLocalVariable("foo")); state.exitScope(); Assert.assertEquals(34,state.lookupLocalVariable("foo")); - + state.exitScope(); Assert.assertNull(state.lookupLocalVariable("goo")); } - + @Test public void testRootObjectConstructor() { EvaluationContext ctx = getContext(); @@ -188,21 +188,21 @@ public class ExpressionStateTests extends ExpressionTestCase { Assert.assertEquals(String.class,stateRoot.getTypeDescriptor().getType()); Assert.assertEquals("i am a string",stateRoot.getValue()); } - + @Test public void testPopulatedNestedScopesMap() { ExpressionState state = getState(); Assert.assertNull(state.lookupLocalVariable("foo")); Assert.assertNull(state.lookupLocalVariable("goo")); - + Map m = new HashMap(); m.put("foo",34); m.put("goo","abc"); - + state.enterScope(m); Assert.assertEquals(34,state.lookupLocalVariable("foo")); Assert.assertEquals("abc",state.lookupLocalVariable("goo")); - + state.enterScope(null); state.setLocalVariable("foo",12); Assert.assertEquals(12,state.lookupLocalVariable("foo")); @@ -213,7 +213,7 @@ public class ExpressionStateTests extends ExpressionTestCase { Assert.assertNull(state.lookupLocalVariable("foo")); Assert.assertNull(state.lookupLocalVariable("goo")); } - + @Test public void testOperators() throws Exception { ExpressionState state = getState(); @@ -233,13 +233,13 @@ public class ExpressionStateTests extends ExpressionTestCase { Assert.assertEquals(SpelMessage.OPERATOR_NOT_SUPPORTED_BETWEEN_TYPES,sEx.getMessageCode()); } } - + @Test public void testComparator() { ExpressionState state = getState(); Assert.assertEquals(state.getEvaluationContext().getTypeComparator(),state.getTypeComparator()); } - + @Test public void testTypeLocator() throws EvaluationException { ExpressionState state = getState(); @@ -253,7 +253,7 @@ public class ExpressionStateTests extends ExpressionTestCase { Assert.assertEquals(SpelMessage.TYPE_NOT_FOUND,sEx.getMessageCode()); } } - + @Test public void testTypeConversion() throws EvaluationException { ExpressionState state = getState(); @@ -269,7 +269,7 @@ public class ExpressionStateTests extends ExpressionTestCase { ExpressionState state = getState(); Assert.assertEquals(state.getEvaluationContext().getPropertyAccessors(),state.getPropertyAccessors()); } - + /** * @return a new ExpressionState */ @@ -278,7 +278,7 @@ public class ExpressionStateTests extends ExpressionTestCase { ExpressionState state = new ExpressionState(context); return state; } - + private EvaluationContext getContext() { return TestScenarioCreator.getTestEvaluationContext(); } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/ExpressionTestsUsingCoreConversionService.java b/spring-expression/src/test/java/org/springframework/expression/spel/ExpressionTestsUsingCoreConversionService.java index af7e57e6e14..9f4d22b363c 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/ExpressionTestsUsingCoreConversionService.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/ExpressionTestsUsingCoreConversionService.java @@ -49,7 +49,7 @@ public class ExpressionTestsUsingCoreConversionService extends ExpressionTestCas private static TypeDescriptor typeDescriptorForListOfString = null; private static List listOfInteger = new ArrayList(); private static TypeDescriptor typeDescriptorForListOfInteger = null; - + static { listOfString.add("1"); listOfString.add("2"); @@ -58,21 +58,21 @@ public class ExpressionTestsUsingCoreConversionService extends ExpressionTestCas listOfInteger.add(5); listOfInteger.add(6); } - + @Before public void setUp() throws Exception { ExpressionTestsUsingCoreConversionService.typeDescriptorForListOfString = new TypeDescriptor(ExpressionTestsUsingCoreConversionService.class.getDeclaredField("listOfString")); ExpressionTestsUsingCoreConversionService.typeDescriptorForListOfInteger = new TypeDescriptor(ExpressionTestsUsingCoreConversionService.class.getDeclaredField("listOfInteger")); } - - + + /** * Test the service can convert what we are about to use in the expression evaluation tests. */ @Test public void testConversionsAvailable() throws Exception { TypeConvertorUsingConversionService tcs = new TypeConvertorUsingConversionService(); - + // ArrayList containing List to List Class clazz = typeDescriptorForListOfString.getElementTypeDescriptor().getType(); assertEquals(String.class,clazz); @@ -82,11 +82,11 @@ public class ExpressionTestsUsingCoreConversionService extends ExpressionTestCas // ArrayList containing List to List clazz = typeDescriptorForListOfInteger.getElementTypeDescriptor().getType(); assertEquals(Integer.class,clazz); - + l = (List) tcs.convertValue(listOfString, TypeDescriptor.forObject(listOfString), typeDescriptorForListOfString); assertNotNull(l); } - + @Test public void testSetParameterizedList() throws Exception { StandardEvaluationContext context = TestScenarioCreator.getTestEvaluationContext(); diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/IndexingTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/IndexingTests.java index 617d69fa66a..f94503828b6 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/IndexingTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/IndexingTests.java @@ -38,7 +38,7 @@ public class IndexingTests { expression = parser.parseExpression("property['foo']"); assertEquals("bar", expression.getValue(this)); } - + @FieldAnnotation public Object property; @@ -59,7 +59,7 @@ public class IndexingTests { expression = parser.parseExpression("property['foo']"); assertEquals("bar", expression.getValue(context)); } - + public static class MapAccessor implements PropertyAccessor { public boolean canRead(EvaluationContext context, Object target, String name) throws AccessException { @@ -83,9 +83,9 @@ public class IndexingTests { public Class[] getSpecificTargetClasses() { return new Class[] { Map.class }; } - + } - + @Test public void setGenericPropertyContainingMap() { Map property = new HashMap(); @@ -97,7 +97,7 @@ public class IndexingTests { assertEquals(property, expression.getValue(this)); expression = parser.parseExpression("property['foo']"); assertEquals("bar", expression.getValue(this)); - expression.setValue(this, "baz"); + expression.setValue(this, "baz"); assertEquals("baz", expression.getValue(this)); } @@ -112,7 +112,7 @@ public class IndexingTests { assertEquals(property, expression.getValue(this)); expression = parser.parseExpression("parameterizedMap['9']"); assertEquals(3, expression.getValue(this)); - expression.setValue(this, "37"); + expression.setValue(this, "37"); assertEquals(37, expression.getValue(this)); } @@ -126,10 +126,10 @@ public class IndexingTests { assertEquals(property, expression.getValue(this)); expression = parser.parseExpression("parameterizedMap['9']"); assertEquals(null, expression.getValue(this)); - expression.setValue(this, "37"); + expression.setValue(this, "37"); assertEquals(37, expression.getValue(this)); } - + @Test public void indexIntoGenericPropertyContainingList() { List property = new ArrayList(); @@ -142,7 +142,7 @@ public class IndexingTests { expression = parser.parseExpression("property[0]"); assertEquals("bar", expression.getValue(this)); } - + @Test public void setGenericPropertyContainingList() { List property = new ArrayList(); @@ -170,10 +170,10 @@ public class IndexingTests { try { expression.setValue(this, "4"); } catch (EvaluationException e) { - assertTrue(e.getMessage().startsWith("EL1053E")); + assertTrue(e.getMessage().startsWith("EL1053E")); } } - + @Test public void indexIntoPropertyContainingList() { List property = new ArrayList(); @@ -186,7 +186,7 @@ public class IndexingTests { expression = parser.parseExpression("parameterizedList[0]"); assertEquals(3, expression.getValue(this)); } - + public List parameterizedList; @Test @@ -201,9 +201,9 @@ public class IndexingTests { expression = parser.parseExpression("parameterizedListOfList[0][0]"); assertEquals(3, expression.getValue(this)); } - + public List> parameterizedListOfList; - + @Test public void setPropertyContainingList() { List property = new ArrayList(); @@ -218,7 +218,7 @@ public class IndexingTests { expression.setValue(this, "4"); assertEquals(4, expression.getValue(this)); } - + @Test public void indexIntoGenericPropertyContainingNullList() { SpelParserConfiguration configuration = new SpelParserConfiguration(true, true); @@ -230,7 +230,7 @@ public class IndexingTests { try { assertEquals("bar", expression.getValue(this)); } catch (EvaluationException e) { - assertTrue(e.getMessage().startsWith("EL1027E")); + assertTrue(e.getMessage().startsWith("EL1027E")); } } @@ -267,7 +267,7 @@ public class IndexingTests { assertTrue(e.getMessage().startsWith("EL1053E")); } } - + public List property2; @Test @@ -281,7 +281,7 @@ public class IndexingTests { expression = parser.parseExpression("property[0]"); assertEquals("bar", expression.getValue(this)); } - + @Test public void emptyList() { listOfScalarNotGeneric = new ArrayList(); @@ -315,7 +315,7 @@ public class IndexingTests { @Target({ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) public @interface FieldAnnotation { - + } @Test @@ -327,7 +327,7 @@ public class IndexingTests { Expression expression = parser.parseExpression("mapNotGeneric"); assertEquals("@org.springframework.expression.spel.IndexingTests$FieldAnnotation java.util.HashMap", expression.getValueTypeDescriptor(this).toString()); } - + @FieldAnnotation public Map mapNotGeneric; @@ -339,10 +339,10 @@ public class IndexingTests { Expression expression = parser.parseExpression("listOfScalarNotGeneric[0]"); assertEquals(new Integer(5), expression.getValue(this, Integer.class)); } - + public List listOfScalarNotGeneric; - + @Test public void testListsOfMap() { listOfMapsNotGeneric = new ArrayList(); @@ -353,7 +353,7 @@ public class IndexingTests { Expression expression = parser.parseExpression("listOfMapsNotGeneric[0]['fruit']"); assertEquals("apple", expression.getValue(this, String.class)); } - + public List listOfMapsNotGeneric; - + } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/ListTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/ListTests.java index 6fd8925ae01..71055857f81 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/ListTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/ListTests.java @@ -26,7 +26,7 @@ import org.springframework.expression.spel.standard.SpelExpressionParser; /** * Test usage of inline lists. - * + * * @author Andy Clement * @since 3.0.4 */ diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/LiteralExpressionTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/LiteralExpressionTests.java index 7aff1e1ba2f..16d490bc2cc 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/LiteralExpressionTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/LiteralExpressionTests.java @@ -46,7 +46,7 @@ public class LiteralExpressionTests { Assert.assertFalse(lEx.isWritable(new Rooty())); Assert.assertFalse(lEx.isWritable(new StandardEvaluationContext(), new Rooty())); } - + static class Rooty {} @Test diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/LiteralTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/LiteralTests.java index b3330d7b9d4..6eda3493255 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/LiteralTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/LiteralTests.java @@ -23,7 +23,7 @@ import org.springframework.expression.spel.support.StandardEvaluationContext; /** * Tests the evaluation of basic literals: boolean, integer, hex integer, long, real, null, date - * + * * @author Andy Clement */ public class LiteralTests extends ExpressionTestCase { @@ -159,7 +159,7 @@ public class LiteralTests extends ExpressionTestCase { evaluate("new Integer(37).byteValue()", (byte) 37, Byte.class); // calling byteValue() on Integer.class evaluateAndAskForReturnType("new Integer(37)", (byte) 37, Byte.class); // relying on registered type converters } - + @Test public void testNotWritable() throws Exception { SpelExpression expr = (SpelExpression)parser.parseExpression("37"); diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/MapAccessTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/MapAccessTests.java index adae5e71975..215e7036718 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/MapAccessTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/MapAccessTests.java @@ -33,7 +33,7 @@ import org.springframework.expression.spel.support.StandardEvaluationContext; /** * Testing variations on map access. - * + * * @author Andy Clement */ public class MapAccessTests extends ExpressionTestCase { @@ -170,7 +170,7 @@ public class MapAccessTests extends ExpressionTestCase { public Class[] getSpecificTargetClasses() { return new Class[] { Map.class }; } - + } } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/OperatorOverloaderTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/OperatorOverloaderTests.java index e19da9b9a80..66aa85fb892 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/OperatorOverloaderTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/OperatorOverloaderTests.java @@ -27,7 +27,7 @@ import org.springframework.expression.spel.standard.SpelExpression; /** * Test providing operator support - * + * * @author Andy Clement */ public class OperatorOverloaderTests extends ExpressionTestCase { @@ -48,11 +48,11 @@ public class OperatorOverloaderTests extends ExpressionTestCase { return true; } return false; - + } - + } - + @Test public void testSimpleOperations() throws Exception { // no built in support for this: @@ -66,7 +66,7 @@ public class OperatorOverloaderTests extends ExpressionTestCase { expr = (SpelExpression)parser.parseExpression("'abc'-true"); Assert.assertEquals("abc",expr.getValue(eContext)); - + expr = (SpelExpression)parser.parseExpression("'abc'+null"); Assert.assertEquals("abcnull",expr.getValue(eContext)); } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/OperatorTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/OperatorTests.java index 2c62030d6f0..56f26cef121 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/OperatorTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/OperatorTests.java @@ -23,7 +23,7 @@ import org.springframework.expression.spel.standard.SpelExpression; /** * Tests the evaluation of expressions using relational operators. - * + * * @author Andy Clement */ public class OperatorTests extends ExpressionTestCase { @@ -124,7 +124,7 @@ public class OperatorTests extends ExpressionTestCase { public void testGreaterThanOrEqual() { evaluate("3 >= 5", false, Boolean.class); evaluate("5 >= 3", true, Boolean.class); - evaluate("6 >= 6", true, Boolean.class); + evaluate("6 >= 6", true, Boolean.class); evaluate("3L >= 5L", false, Boolean.class); evaluate("5L >= 3L", true, Boolean.class); evaluate("5L >= 5L", true, Boolean.class); @@ -137,14 +137,14 @@ public class OperatorTests extends ExpressionTestCase { evaluate("3 GE 5", false, Boolean.class); evaluate("5 gE 3", true, Boolean.class); - evaluate("6 Ge 6", true, Boolean.class); + evaluate("6 Ge 6", true, Boolean.class); evaluate("3L ge 5L", false, Boolean.class); } @Test public void testGreaterThan() { evaluate("3 > 5", false, Boolean.class); - evaluate("5 > 3", true, Boolean.class); + evaluate("5 > 3", true, Boolean.class); evaluate("3L > 5L", false, Boolean.class); evaluate("5L > 3L", true, Boolean.class); evaluate("3.0d > 5.0d", false, Boolean.class); @@ -172,7 +172,7 @@ public class OperatorTests extends ExpressionTestCase { public void testMathOperatorAdd02() { evaluate("'hello' + ' ' + 'world'", "hello world", String.class); } - + @Test public void testMathOperatorsInChains() { evaluate("1+2+3",6,Integer.class); @@ -194,7 +194,7 @@ public class OperatorTests extends ExpressionTestCase { evaluate("3 Mod 2", 1, Integer.class); evaluate("3 MOD 2", 1, Integer.class); } - + @Test public void testPlus() throws Exception { evaluate("7 + 2", "9", Integer.class); @@ -205,26 +205,26 @@ public class OperatorTests extends ExpressionTestCase { evaluate("2 + 'a'", "2a", String.class); evaluate("'ab' + null", "abnull", String.class); evaluate("null + 'ab'", "nullab", String.class); - + // AST: SpelExpression expr = (SpelExpression)parser.parseExpression("+3"); Assert.assertEquals("+3",expr.toStringAST()); expr = (SpelExpression)parser.parseExpression("2+3"); Assert.assertEquals("(2 + 3)",expr.toStringAST()); - + // use as a unary operator evaluate("+5d",5d,Double.class); evaluate("+5L",5L,Long.class); evaluate("+5",5,Integer.class); evaluateAndCheckError("+'abc'",SpelMessage.OPERATOR_NOT_SUPPORTED_BETWEEN_TYPES); - + // string concatenation evaluate("'abc'+'def'","abcdef",String.class); - - // + + // evaluate("5 + new Integer('37')",42,Integer.class); } - + @Test public void testMinus() throws Exception { evaluate("'c' - 2", "a", String.class); @@ -235,13 +235,13 @@ public class OperatorTests extends ExpressionTestCase { Assert.assertEquals("-3",expr.toStringAST()); expr = (SpelExpression)parser.parseExpression("2-3"); Assert.assertEquals("(2 - 3)",expr.toStringAST()); - + evaluate("-5d",-5d,Double.class); evaluate("-5L",-5L,Long.class); evaluate("-5",-5,Integer.class); evaluateAndCheckError("-'abc'",SpelMessage.OPERATOR_NOT_SUPPORTED_BETWEEN_TYPES); } - + @Test public void testModulus() { evaluate("3%2",1,Integer.class); @@ -259,7 +259,7 @@ public class OperatorTests extends ExpressionTestCase { evaluate("4L DIV 2L",2L,Long.class); evaluateAndCheckError("'abc'/'def'",SpelMessage.OPERATOR_NOT_SUPPORTED_BETWEEN_TYPES); } - + @Test public void testMathOperatorDivide_ConvertToDouble() { evaluateAndAskForReturnType("8/4", new Double(2.0), Double.class); @@ -282,7 +282,7 @@ public class OperatorTests extends ExpressionTestCase { evaluate("3.0d / 5.0d", 0.6d, Double.class); evaluate("6.0d % 3.5d", 2.5d, Double.class); } - + @Test public void testOperatorNames() throws Exception { Operator node = getOperatorNode((SpelExpression)parser.parseExpression("1==3")); @@ -290,13 +290,13 @@ public class OperatorTests extends ExpressionTestCase { node = getOperatorNode((SpelExpression)parser.parseExpression("1!=3")); Assert.assertEquals("!=",node.getOperatorName()); - + node = getOperatorNode((SpelExpression)parser.parseExpression("3/3")); Assert.assertEquals("/",node.getOperatorName()); - + node = getOperatorNode((SpelExpression)parser.parseExpression("3+3")); Assert.assertEquals("+",node.getOperatorName()); - + node = getOperatorNode((SpelExpression)parser.parseExpression("3-3")); Assert.assertEquals("-",node.getOperatorName()); @@ -305,29 +305,29 @@ public class OperatorTests extends ExpressionTestCase { node = getOperatorNode((SpelExpression)parser.parseExpression("3<=4")); Assert.assertEquals("<=",node.getOperatorName()); - + node = getOperatorNode((SpelExpression)parser.parseExpression("3*4")); Assert.assertEquals("*",node.getOperatorName()); node = getOperatorNode((SpelExpression)parser.parseExpression("3%4")); Assert.assertEquals("%",node.getOperatorName()); - + node = getOperatorNode((SpelExpression)parser.parseExpression("3>=4")); Assert.assertEquals(">=",node.getOperatorName()); node = getOperatorNode((SpelExpression)parser.parseExpression("3 between 4")); Assert.assertEquals("between",node.getOperatorName()); - + node = getOperatorNode((SpelExpression)parser.parseExpression("3 ^ 4")); Assert.assertEquals("^",node.getOperatorName()); } - + @Test public void testOperatorOverloading() { evaluateAndCheckError("'a' * '2'", SpelMessage.OPERATOR_NOT_SUPPORTED_BETWEEN_TYPES); evaluateAndCheckError("'a' ^ '2'", SpelMessage.OPERATOR_NOT_SUPPORTED_BETWEEN_TYPES); } - + @Test public void testPower() { evaluate("3^2",9,Integer.class); @@ -335,16 +335,16 @@ public class OperatorTests extends ExpressionTestCase { evaluate("3L^2L",9L,Long.class); evaluate("(2^32)^2",9223372036854775807L,Long.class); } - + @Test public void testMixedOperands_FloatsAndDoubles() { evaluate("3.0d + 5.0f", 8.0d, Double.class); evaluate("3.0D - 5.0f", -2.0d, Double.class); evaluate("3.0f * 5.0d", 15.0d, Double.class); evaluate("3.0f / 5.0D", 0.6d, Double.class); - evaluate("5.0D % 3f", 2.0d, Double.class); + evaluate("5.0D % 3f", 2.0d, Double.class); } - + @Test public void testMixedOperands_DoublesAndInts() { evaluate("3.0d + 5", 8.0d, Double.class); @@ -352,10 +352,10 @@ public class OperatorTests extends ExpressionTestCase { evaluate("3.0f * 5", 15.0f, Float.class); evaluate("6.0f / 2", 3.0f, Float.class); evaluate("6.0f / 4", 1.5f, Float.class); - evaluate("5.0D % 3", 2.0d, Double.class); - evaluate("5.5D % 3", 2.5, Double.class); + evaluate("5.0D % 3", 2.0d, Double.class); + evaluate("5.5D % 3", 2.5, Double.class); } - + @Test public void testStrings() { evaluate("'abc' == 'abc'",true,Boolean.class); @@ -363,7 +363,7 @@ public class OperatorTests extends ExpressionTestCase { evaluate("'abc' != 'abc'",false,Boolean.class); evaluate("'abc' != 'def'",true,Boolean.class); } - + @Test public void testLongs() { evaluate("3L == 4L", false, Boolean.class); @@ -374,14 +374,14 @@ public class OperatorTests extends ExpressionTestCase { evaluate("3L + 50L", 53L, Long.class); evaluate("3L - 50L", -47L, Long.class); } - + // --- - + private Operator getOperatorNode(SpelExpression e) { SpelNode node = e.getAST(); return (Operator)findNode(node,Operator.class); } - + private SpelNode findNode(SpelNode node, Class clazz) { if (clazz.isAssignableFrom(node.getClass())) { return node; @@ -395,5 +395,5 @@ public class OperatorTests extends ExpressionTestCase { } return null; } - + } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/ParsingTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/ParsingTests.java index 5e714ac6611..3c0a3024f5d 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/ParsingTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/ParsingTests.java @@ -26,7 +26,7 @@ import org.springframework.expression.spel.standard.SpelExpressionParser; /** * Parse some expressions and check we get the AST we expect. Rather than inspecting each node in the AST, we ask it to * write itself to a string form and check that is as expected. - * + * * @author Andy Clement */ public class ParsingTests { @@ -160,7 +160,7 @@ public class ParsingTests { public void testElvis() { parseCheck("3?:1", "3 ?: 1"); } - + // public void testRelOperatorsIn01() { // parseCheck("3 in {1,2,3,4,5}", "(3 in {1,2,3,4,5})"); // } @@ -399,14 +399,14 @@ public class ParsingTests { parseCheck("#var1='value1'"); } - + // ternary operator - + @Test public void testTernaryOperator01() { parseCheck("1>2?3:4","(1 > 2) ? 3 : 4"); } - + // public void testTernaryOperator01() { // parseCheck("{1}.#isEven(#this) == 'y'?'it is even':'it is odd'", // "({1}.#isEven(#this) == 'y') ? 'it is even' : 'it is odd'"); @@ -432,16 +432,16 @@ public class ParsingTests { public void testTypeReferences02() { parseCheck("T(String)"); } - + @Test public void testInlineList1() { parseCheck("{1,2,3,4}"); } - + /** * Parse the supplied expression and then create a string representation of the resultant AST, it should be the same * as the original expression. - * + * * @param expression the expression to parse *and* the expected value of the string form of the resultant AST */ public void parseCheck(String expression) { @@ -451,7 +451,7 @@ public class ParsingTests { /** * Parse the supplied expression and then create a string representation of the resultant AST, it should be the * expected value. - * + * * @param expression the expression to parse * @param expectedStringFormOfAST the expected string form of the AST */ diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/PerformanceTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/PerformanceTests.java index 126cb718ce8..231a3adff0f 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/PerformanceTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/PerformanceTests.java @@ -28,7 +28,7 @@ import org.springframework.expression.spel.standard.SpelExpressionParser; /** * Tests the evaluation of real expressions in a real context. - * + * * @author Andy Clement */ public class PerformanceTests { @@ -40,7 +40,7 @@ public class PerformanceTests { private static EvaluationContext eContext = TestScenarioCreator.getTestEvaluationContext(); private static final boolean DEBUG = false; - + @Test public void testPerformanceOfPropertyAccess() throws Exception { long starttime = 0; @@ -54,7 +54,7 @@ public class PerformanceTests { } expr.getValue(eContext); } - + starttime = System.currentTimeMillis(); for (int i = 0; i < ITERATIONS; i++) { Expression expr = parser.parseExpression("placeOfBirth.city"); @@ -92,7 +92,7 @@ public class PerformanceTests { public void testPerformanceOfMethodAccess() throws Exception { long starttime = 0; long endtime = 0; - + // warmup for (int i = 0; i < ITERATIONS; i++) { Expression expr = parser.parseExpression("getPlaceOfBirth().getCity()"); diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/ScenariosForSpringSecurity.java b/spring-expression/src/test/java/org/springframework/expression/spel/ScenariosForSpringSecurity.java index fa05420e451..5bc84c9d380 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/ScenariosForSpringSecurity.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/ScenariosForSpringSecurity.java @@ -40,7 +40,7 @@ import org.springframework.expression.spel.support.StandardEvaluationContext; ///CLOVER:OFF /** * Spring Security scenarios from https://wiki.springsource.com/display/SECURITY/Spring+Security+Expression-based+Authorization - * + * * @author Andy Clement */ public class ScenariosForSpringSecurity extends ExpressionTestCase { @@ -55,7 +55,7 @@ public class ScenariosForSpringSecurity extends ExpressionTestCase { ctx.setRootObject(new Person("Ben")); Boolean value = expr.getValue(ctx,Boolean.class); Assert.assertFalse(value); - + ctx.setRootObject(new Manager("Luke")); value = expr.getValue(ctx,Boolean.class); Assert.assertTrue(value); @@ -72,7 +72,7 @@ public class ScenariosForSpringSecurity extends ExpressionTestCase { StandardEvaluationContext ctx = new StandardEvaluationContext(); ctx.addPropertyAccessor(new SecurityPrincipalAccessor()); - + // Multiple options for supporting this expression: "p.name == principal.name" // (1) If the right person is the root context object then "name==principal.name" is good enough Expression expr = parser.parseRaw("name == principal.name"); @@ -80,22 +80,22 @@ public class ScenariosForSpringSecurity extends ExpressionTestCase { ctx.setRootObject(new Person("Andy")); Boolean value = expr.getValue(ctx,Boolean.class); Assert.assertTrue(value); - + ctx.setRootObject(new Person("Christian")); value = expr.getValue(ctx,Boolean.class); Assert.assertFalse(value); // (2) Or register an accessor that can understand 'p' and return the right person expr = parser.parseRaw("p.name == principal.name"); - + PersonAccessor pAccessor = new PersonAccessor(); ctx.addPropertyAccessor(pAccessor); ctx.setRootObject(null); - + pAccessor.setPerson(new Person("Andy")); value = expr.getValue(ctx,Boolean.class); Assert.assertTrue(value); - + pAccessor.setPerson(new Person("Christian")); value = expr.getValue(ctx,Boolean.class); Assert.assertFalse(value); @@ -105,18 +105,18 @@ public class ScenariosForSpringSecurity extends ExpressionTestCase { public void testScenario03_Arithmetic() throws Exception { SpelExpressionParser parser = new SpelExpressionParser(); StandardEvaluationContext ctx = new StandardEvaluationContext(); - + // Might be better with a as a variable although it would work as a property too... // Variable references using a '#' Expression expr = parser.parseRaw("(hasRole('SUPERVISOR') or (#a < 1.042)) and hasIpAddress('10.10.0.0/16')"); Boolean value = null; - + ctx.setVariable("a",1.0d); // referenced as #a in the expression ctx.setRootObject(new Supervisor("Ben")); // so non-qualified references 'hasRole()' 'hasIpAddress()' are invoked against it value = expr.getValue(ctx,Boolean.class); Assert.assertTrue(value); - + ctx.setRootObject(new Manager("Luke")); ctx.setVariable("a",1.043d); value = expr.getValue(ctx,Boolean.class); @@ -128,7 +128,7 @@ public class ScenariosForSpringSecurity extends ExpressionTestCase { public void testScenario04_ControllingWhichMethodsRun() throws Exception { SpelExpressionParser parser = new SpelExpressionParser(); StandardEvaluationContext ctx = new StandardEvaluationContext(); - + ctx.setRootObject(new Supervisor("Ben")); // so non-qualified references 'hasRole()' 'hasIpAddress()' are invoked against it); ctx.addMethodResolver(new MyMethodResolver()); // NEEDS TO OVERRIDE THE REFLECTION ONE - SHOW REORDERING MECHANISM @@ -138,17 +138,17 @@ public class ScenariosForSpringSecurity extends ExpressionTestCase { Expression expr = parser.parseRaw("(hasRole(3) or (#a < 1.042)) and hasIpAddress('10.10.0.0/16')"); Boolean value = null; - + ctx.setVariable("a",1.0d); // referenced as #a in the expression value = expr.getValue(ctx,Boolean.class); Assert.assertTrue(value); - + // ctx.setRootObject(new Manager("Luke")); // ctx.setVariable("a",1.043d); // value = (Boolean)expr.getValue(ctx,Boolean.class); // assertFalse(value); } - + static class Person { @@ -236,7 +236,7 @@ public class ScenariosForSpringSecurity extends ExpressionTestCase { public Class[] getSpecificTargetClasses() { return null; } - + } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/SetValueTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/SetValueTests.java index 45ddcf23946..8d98cb8bea1 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/SetValueTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/SetValueTests.java @@ -31,7 +31,7 @@ import org.springframework.expression.spel.testresources.PlaceOfBirth; /** * Tests set value expressions. - * + * * @author Keith Donald * @author Andy Clement */ @@ -43,7 +43,7 @@ public class SetValueTests extends ExpressionTestCase { public void testSetProperty() { setValue("wonNobelPrize", true); } - + @Test public void testSetNestedProperty() { setValue("placeOfBirth.city", "Wien"); @@ -89,17 +89,17 @@ public class SetValueTests extends ExpressionTestCase { setValueExpectError("arrayContainer.bytes[1]", "NaB"); setValueExpectError("arrayContainer.chars[1]", "NaC"); } - + @Test public void testSetArrayElementNestedValue() { setValue("placesLived[0].city", "Wien"); } - + @Test public void testSetListElementValue() { setValue("placesLivedList[0]", new PlaceOfBirth("Wien")); } - + @Test public void testSetGenericListElementValueTypeCoersion() { // TODO currently failing since setValue does a getValue and "Wien" string != PlaceOfBirth - check with andy @@ -110,7 +110,7 @@ public class SetValueTests extends ExpressionTestCase { public void testSetGenericListElementValueTypeCoersionOK() { setValue("booleanList[0]", "true", Boolean.TRUE); } - + @Test public void testSetListElementNestedValue() { setValue("placesLived[0].city", "Wien"); @@ -121,17 +121,17 @@ public class SetValueTests extends ExpressionTestCase { setValueExpectError("placesLived[23]", "Wien"); setValueExpectError("placesLivedList[23]", "Wien"); } - + @Test public void testSetMapElements() { setValue("testMap['montag']","lundi"); } - + @Test public void testIndexingIntoUnsupportedType() { setValueExpectError("'hello'[3]", 'p'); } - + @Test public void testSetPropertyTypeCoersion() { setValue("publicBoolean", "true", Boolean.TRUE); @@ -141,9 +141,9 @@ public class SetValueTests extends ExpressionTestCase { public void testSetPropertyTypeCoersionThroughSetter() { setValue("SomeProperty", "true", Boolean.TRUE); } - + @Test - public void testAssign() throws Exception { + public void testAssign() throws Exception { StandardEvaluationContext eContext = TestScenarioCreator.getTestEvaluationContext(); Expression e = parse("publicName='Andy'"); Assert.assertFalse(e.isWritable(eContext)); @@ -158,32 +158,32 @@ public class SetValueTests extends ExpressionTestCase { StandardEvaluationContext eContext = TestScenarioCreator.getTestEvaluationContext(); Expression e = parse("mapOfStringToBoolean[42]"); Assert.assertNull(e.getValue(eContext)); - + // Key should be coerced to string representation of 42 e.setValue(eContext, "true"); - + // All keys should be strings Set ks = parse("mapOfStringToBoolean.keySet()").getValue(eContext,Set.class); for (Object o: ks) { Assert.assertEquals(String.class,o.getClass()); } - + // All values should be booleans Collection vs = parse("mapOfStringToBoolean.values()").getValue(eContext,Collection.class); for (Object o: vs) { Assert.assertEquals(Boolean.class,o.getClass()); } - + // One final test check coercion on the key for a map lookup Object o = e.getValue(eContext); Assert.assertEquals(Boolean.TRUE,o); } - + private Expression parse(String expressionString) throws Exception { return parser.parseExpression(expressionString); } - + /** * Call setValue() but expect it to fail. */ diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/SpelDocumentationTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/SpelDocumentationTests.java index 1dad2431208..ada7b35acfe 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/SpelDocumentationTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/SpelDocumentationTests.java @@ -38,17 +38,17 @@ import org.springframework.expression.spel.testresources.PlaceOfBirth; /** * Test the examples specified in the documentation. - * + * * NOTE: any outgoing changes from this file upon synchronizing with the repo may indicate that * you need to update the documentation too ! - * + * * @author Andy Clement */ public class SpelDocumentationTests extends ExpressionTestCase { static Inventor tesla ; static Inventor pupin ; - + static { GregorianCalendar c = new GregorianCalendar(); c.set(1856, 7, 9); @@ -60,18 +60,18 @@ public class SpelDocumentationTests extends ExpressionTestCase { pupin = new Inventor("Pupin", c.getTime(), "Idvor"); pupin.setPlaceOfBirth(new PlaceOfBirth("Idvor")); - + } static class IEEE { private String name; - - + + public Inventor[] Members = new Inventor[1]; public List Members2 = new ArrayList(); public Map officers = new HashMap(); - + public List> reverse = new ArrayList>(); - + @SuppressWarnings("unchecked") IEEE() { officers.put("president",pupin); @@ -80,28 +80,28 @@ public class SpelDocumentationTests extends ExpressionTestCase { officers.put("advisors",linv); Members2.add(tesla); Members2.add(pupin); - + reverse.add(officers); } - + public boolean isMember(String name) { return true; } - + public String getName() { return name; } public void setName(String n) { this.name = n; } } - + @Test public void testMethodInvocation() { evaluate("'Hello World'.concat('!')","Hello World!",String.class); } - + @Test public void testBeanPropertyAccess() { evaluate("new String('Hello World'.bytes)","Hello World",String.class); } - + @Test public void testArrayLengthAccess() { evaluate("'Hello World'.bytes.length",11,Integer.class); @@ -123,12 +123,12 @@ public class SpelDocumentationTests extends ExpressionTestCase { String name = (String) exp.getValue(context); Assert.assertEquals("Nikola Tesla",name); - } - + } + @Test public void testEqualityCheck() throws Exception { ExpressionParser parser = new SpelExpressionParser(); - + StandardEvaluationContext context = new StandardEvaluationContext(); context.setRootObject(tesla); @@ -136,14 +136,14 @@ public class SpelDocumentationTests extends ExpressionTestCase { boolean isEqual = exp.getValue(context, Boolean.class); // evaluates to true Assert.assertTrue(isEqual); } - + // Section 7.4.1 - + @Test public void testXMLBasedConfig() { evaluate("(T(java.lang.Math).random() * 100.0 )>0",true,Boolean.class); } - + // Section 7.5 @Test public void testLiterals() throws Exception { @@ -151,16 +151,16 @@ public class SpelDocumentationTests extends ExpressionTestCase { String helloWorld = (String) parser.parseExpression("'Hello World'").getValue(); // evals to "Hello World" Assert.assertEquals("Hello World",helloWorld); - - double avogadrosNumber = (Double) parser.parseExpression("6.0221415E+23").getValue(); + + double avogadrosNumber = (Double) parser.parseExpression("6.0221415E+23").getValue(); Assert.assertEquals(6.0221415E+23,avogadrosNumber); - + int maxValue = (Integer) parser.parseExpression("0x7FFFFFFF").getValue(); // evals to 2147483647 Assert.assertEquals(Integer.MAX_VALUE,maxValue); - + boolean trueValue = (Boolean) parser.parseExpression("true").getValue(); Assert.assertTrue(trueValue); - + Object nullValue = parser.parseExpression("null").getValue(); Assert.assertNull(nullValue); } @@ -170,11 +170,11 @@ public class SpelDocumentationTests extends ExpressionTestCase { EvaluationContext context = TestScenarioCreator.getTestEvaluationContext(); int year = (Integer) parser.parseExpression("Birthdate.Year + 1900").getValue(context); // 1856 Assert.assertEquals(1856,year); - + String city = (String) parser.parseExpression("placeOfBirth.City").getValue(context); Assert.assertEquals("SmilJan",city); } - + @Test public void testPropertyNavigation() throws Exception { ExpressionParser parser = new SpelExpressionParser(); @@ -184,7 +184,7 @@ public class SpelDocumentationTests extends ExpressionTestCase { // teslaContext.setRootObject(tesla); // evaluates to "Induction motor" - String invention = parser.parseExpression("inventions[3]").getValue(teslaContext, String.class); + String invention = parser.parseExpression("inventions[3]").getValue(teslaContext, String.class); Assert.assertEquals("Induction motor",invention); // Members List @@ -196,14 +196,14 @@ public class SpelDocumentationTests extends ExpressionTestCase { // evaluates to "Nikola Tesla" String name = parser.parseExpression("Members[0].Name").getValue(societyContext, String.class); Assert.assertEquals("Nikola Tesla",name); - + // List and Array navigation // evaluates to "Wireless communication" invention = parser.parseExpression("Members[0].Inventions[6]").getValue(societyContext, String.class); Assert.assertEquals("Wireless communication",invention); } - - + + @Test public void testDictionaryAccess() throws Exception { StandardEvaluationContext societyContext = new StandardEvaluationContext(); @@ -217,14 +217,14 @@ public class SpelDocumentationTests extends ExpressionTestCase { // setting values Inventor i = parser.parseExpression("officers['advisors'][0]").getValue(societyContext,Inventor.class); Assert.assertEquals("Nikola Tesla",i.getName()); - + parser.parseExpression("officers['advisors'][0].PlaceOfBirth.Country").setValue(societyContext, "Croatia"); Inventor i2 = parser.parseExpression("reverse[0]['advisors'][0]").getValue(societyContext,Inventor.class); Assert.assertEquals("Nikola Tesla",i2.getName()); } - + // 7.5.3 @Test @@ -232,16 +232,16 @@ public class SpelDocumentationTests extends ExpressionTestCase { // string literal, evaluates to "bc" String c = parser.parseExpression("'abc'.substring(1, 3)").getValue(String.class); Assert.assertEquals("bc",c); - + StandardEvaluationContext societyContext = new StandardEvaluationContext(); societyContext.setRootObject(new IEEE()); // evaluates to true boolean isMember = parser.parseExpression("isMember('Mihajlo Pupin')").getValue(societyContext, Boolean.class); Assert.assertTrue(isMember); } - + // 7.5.4.1 - + @Test public void testRelationalOperators() throws Exception { boolean result = parser.parseExpression("2 == 2").getValue(Boolean.class); @@ -249,18 +249,18 @@ public class SpelDocumentationTests extends ExpressionTestCase { // evaluates to false result = parser.parseExpression("2 < -5.0").getValue(Boolean.class); Assert.assertFalse(result); - + // evaluates to true result = parser.parseExpression("'black' < 'block'").getValue(Boolean.class); Assert.assertTrue(result); } - + @Test public void testOtherOperators() throws Exception { // evaluates to false boolean falseValue = parser.parseExpression("'xyz' instanceof T(int)").getValue(Boolean.class); Assert.assertFalse(falseValue); - + // evaluates to true boolean trueValue = parser.parseExpression("'5.00' matches '^-?\\d+(\\.\\d{2})?$'").getValue(Boolean.class); Assert.assertTrue(trueValue); @@ -269,15 +269,15 @@ public class SpelDocumentationTests extends ExpressionTestCase { falseValue = parser.parseExpression("'5.0067' matches '^-?\\d+(\\.\\d{2})?$'").getValue(Boolean.class); Assert.assertFalse(falseValue); } - + // 7.5.4.2 - + @Test public void testLogicalOperators() throws Exception { StandardEvaluationContext societyContext = new StandardEvaluationContext(); societyContext.setRootObject(new IEEE()); - + // -- AND -- // evaluates to false @@ -292,12 +292,12 @@ public class SpelDocumentationTests extends ExpressionTestCase { // evaluates to true trueValue = parser.parseExpression("true or false").getValue(Boolean.class); Assert.assertTrue(trueValue); - + // evaluates to true expression = "isMember('Nikola Tesla') or isMember('Albert Einstien')"; trueValue = parser.parseExpression(expression).getValue(societyContext, Boolean.class); Assert.assertTrue(trueValue); - + // -- NOT -- // evaluates to false @@ -310,56 +310,56 @@ public class SpelDocumentationTests extends ExpressionTestCase { falseValue = parser.parseExpression(expression).getValue(societyContext, Boolean.class); Assert.assertFalse(falseValue); } - + // 7.5.4.3 - + @Test public void testNumericalOperators() throws Exception { // Addition int two = parser.parseExpression("1 + 1").getValue(Integer.class); // 2 Assert.assertEquals(2,two); - + String testString = parser.parseExpression("'test' + ' ' + 'string'").getValue(String.class); // 'test string' Assert.assertEquals("test string",testString); - + // Subtraction int four = parser.parseExpression("1 - -3").getValue(Integer.class); // 4 Assert.assertEquals(4,four); - + double d = parser.parseExpression("1000.00 - 1e4").getValue(Double.class); // -9000 Assert.assertEquals(-9000.0d,d); - + // Multiplication int six = parser.parseExpression("-2 * -3").getValue(Integer.class); // 6 Assert.assertEquals(6,six); - + double twentyFour = parser.parseExpression("2.0 * 3e0 * 4").getValue(Double.class); // 24.0 Assert.assertEquals(24.0d,twentyFour); - + // Division int minusTwo = parser.parseExpression("6 / -3").getValue(Integer.class); // -2 Assert.assertEquals(-2,minusTwo); - + double one = parser.parseExpression("8.0 / 4e0 / 2").getValue(Double.class); // 1.0 Assert.assertEquals(1.0d,one); // Modulus int three = parser.parseExpression("7 % 4").getValue(Integer.class); // 3 Assert.assertEquals(3,three); - + int oneInt = parser.parseExpression("8 / 5 % 2").getValue(Integer.class); // 1 Assert.assertEquals(1,oneInt); - + // Operator precedence int minusTwentyOne = parser.parseExpression("1+2-3*8").getValue(Integer.class); // -21 Assert.assertEquals(-21,minusTwentyOne); } // 7.5.5 - + @Test public void testAssignment() throws Exception { - Inventor inventor = new Inventor(); + Inventor inventor = new Inventor(); StandardEvaluationContext inventorContext = new StandardEvaluationContext(); inventorContext.setRootObject(inventor); @@ -372,9 +372,9 @@ public class SpelDocumentationTests extends ExpressionTestCase { Assert.assertEquals("Alexandar Seovic",parser.parseExpression("foo").getValue(inventorContext,String.class)); Assert.assertEquals("Alexandar Seovic",aleks); } - + // 7.5.6 - + @Test public void testTypes() throws Exception { Class dateClass = parser.parseExpression("T(java.util.Date)").getValue(Class.class); @@ -382,22 +382,22 @@ public class SpelDocumentationTests extends ExpressionTestCase { boolean trueValue = parser.parseExpression("T(java.math.RoundingMode).CEILING < T(java.math.RoundingMode).FLOOR").getValue(Boolean.class); Assert.assertTrue(trueValue); } - + // 7.5.7 - + @Test public void testConstructors() throws Exception { StandardEvaluationContext societyContext = new StandardEvaluationContext(); societyContext.setRootObject(new IEEE()); - Inventor einstein = + Inventor einstein = parser.parseExpression("new org.springframework.expression.spel.testresources.Inventor('Albert Einstein',new java.util.Date(), 'German')").getValue(Inventor.class); Assert.assertEquals("Albert Einstein", einstein.getName()); //create new inventor instance within add method of List parser.parseExpression("Members2.add(new org.springframework.expression.spel.testresources.Inventor('Albert Einstein', 'German'))").getValue(societyContext); } - + // 7.5.8 - + @Test public void testVariables() throws Exception { Inventor tesla = new Inventor("Nikola Tesla", "Serbian"); @@ -410,7 +410,7 @@ public class SpelDocumentationTests extends ExpressionTestCase { Assert.assertEquals("Mike Tesla",tesla.getFoo()); } - + @SuppressWarnings("unchecked") @Test public void testSpecialVariables() throws Exception { @@ -427,45 +427,45 @@ public class SpelDocumentationTests extends ExpressionTestCase { List primesGreaterThanTen = (List) parser.parseExpression("#primes.?[#this>10]").getValue(context); Assert.assertEquals("[11, 13, 17]",primesGreaterThanTen.toString()); } - + // 7.5.9 - + @Test public void testFunctions() throws Exception { ExpressionParser parser = new SpelExpressionParser(); StandardEvaluationContext context = new StandardEvaluationContext(); - context.registerFunction("reverseString", + context.registerFunction("reverseString", StringUtils.class.getDeclaredMethod("reverseString", new Class[] { String.class })); String helloWorldReversed = parser.parseExpression("#reverseString('hello world')").getValue(context, String.class); Assert.assertEquals("dlrow olleh",helloWorldReversed); } - + // 7.5.10 - + @Test public void testTernary() throws Exception { String falseString = parser.parseExpression("false ? 'trueExp' : 'falseExp'").getValue(String.class); Assert.assertEquals("falseExp",falseString); - + StandardEvaluationContext societyContext = new StandardEvaluationContext(); societyContext.setRootObject(new IEEE()); - + parser.parseExpression("Name").setValue(societyContext, "IEEE"); societyContext.setVariable("queryName", "Nikola Tesla"); - String expression = "isMember(#queryName)? #queryName + ' is a member of the ' " + + String expression = "isMember(#queryName)? #queryName + ' is a member of the ' " + "+ Name + ' Society' : #queryName + ' is not a member of the ' + Name + ' Society'"; String queryResultString = parser.parseExpression(expression).getValue(societyContext, String.class); Assert.assertEquals("Nikola Tesla is a member of the IEEE Society",queryResultString); // queryResultString = "Nikola Tesla is a member of the IEEE Society" } - + // 7.5.11 - + @SuppressWarnings("unchecked") @Test public void testSelection() throws Exception { @@ -475,16 +475,16 @@ public class SpelDocumentationTests extends ExpressionTestCase { Assert.assertEquals(1,list.size()); Assert.assertEquals("Nikola Tesla",list.get(0).getName()); } - + // 7.5.12 - + @Test public void testTemplating() throws Exception { - String randomPhrase = + String randomPhrase = parser.parseExpression("random number is ${T(java.lang.Math).random()}", new TemplatedParserContext()).getValue(String.class); Assert.assertTrue(randomPhrase.startsWith("random number")); } - + static class TemplatedParserContext implements ParserContext { public String getExpressionPrefix() { @@ -494,12 +494,12 @@ public class SpelDocumentationTests extends ExpressionTestCase { public String getExpressionSuffix() { return "}"; } - + public boolean isTemplate() { return true; } } - + static class StringUtils { public static String reverseString(String input) { @@ -510,6 +510,6 @@ public class SpelDocumentationTests extends ExpressionTestCase { return backwards.toString(); } } - + } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/SpelUtilities.java b/spring-expression/src/test/java/org/springframework/expression/spel/SpelUtilities.java index 1833cc983a0..8c3f134774d 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/SpelUtilities.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/SpelUtilities.java @@ -23,7 +23,7 @@ import org.springframework.expression.spel.standard.SpelExpression; /** * Utilities for working with Spring Expressions. - * + * * @author Andy Clement */ public class SpelUtilities { diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/StandardTypeLocatorTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/StandardTypeLocatorTests.java index 16dae3796c4..bdc112a4ef7 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/StandardTypeLocatorTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/StandardTypeLocatorTests.java @@ -25,7 +25,7 @@ import org.springframework.expression.spel.support.StandardTypeLocator; /** * Unit tests for type comparison - * + * * @author Andy Clement */ public class StandardTypeLocatorTests { @@ -35,7 +35,7 @@ public class StandardTypeLocatorTests { StandardTypeLocator locator = new StandardTypeLocator(); Assert.assertEquals(Integer.class,locator.findType("java.lang.Integer")); Assert.assertEquals(String.class,locator.findType("java.lang.String")); - + List prefixes = locator.getImportPrefixes(); Assert.assertEquals(1,prefixes.size()); Assert.assertTrue(prefixes.contains("java.lang")); @@ -44,7 +44,7 @@ public class StandardTypeLocatorTests { Assert.assertEquals(Boolean.class,locator.findType("Boolean")); // currently does not know about java.util by default // assertEquals(java.util.List.class,locator.findType("List")); - + try { locator.findType("URL"); Assert.fail("Should have failed"); @@ -54,7 +54,7 @@ public class StandardTypeLocatorTests { } locator.registerImport("java.net"); Assert.assertEquals(java.net.URL.class,locator.findType("URL")); - + } } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/TemplateExpressionParsingTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/TemplateExpressionParsingTests.java index 0ce7fc58378..201944098d2 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/TemplateExpressionParsingTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/TemplateExpressionParsingTests.java @@ -91,7 +91,7 @@ public class TemplateExpressionParsingTests extends ExpressionTestCase { Expression expr = parser.parseExpression("${'hello'} world", DEFAULT_TEMPLATE_PARSER_CONTEXT); Object o = expr.getValue(); Assert.assertEquals("hello world", o.toString()); - + expr = parser.parseExpression("", DEFAULT_TEMPLATE_PARSER_CONTEXT); o = expr.getValue(); Assert.assertEquals("", o.toString()); @@ -135,7 +135,7 @@ public class TemplateExpressionParsingTests extends ExpressionTestCase { Assert.assertEquals(String.class,ex.getValueType(ctx, new Rooty())); Assert.assertEquals(String.class,ex.getValueTypeDescriptor(new Rooty()).getType()); Assert.assertEquals(String.class,ex.getValueTypeDescriptor(ctx, new Rooty()).getType()); - + try { ex.setValue(ctx, null); Assert.fail(); @@ -155,9 +155,9 @@ public class TemplateExpressionParsingTests extends ExpressionTestCase { // success } } - + static class Rooty {} - + @Test public void testNestedExpressions() throws Exception { SpelExpressionParser parser = new SpelExpressionParser(); @@ -179,22 +179,22 @@ public class TemplateExpressionParsingTests extends ExpressionTestCase { ex = parser.parseExpression("hello ${listOfNumbersUpToTen.$[#this<5]} ${listOfNumbersUpToTen.$[#this>5]} world",DEFAULT_TEMPLATE_PARSER_CONTEXT); s = ex.getValue(TestScenarioCreator.getTestEvaluationContext(),String.class); Assert.assertEquals("hello 4 10 world",s); - + try { ex = parser.parseExpression("hello ${listOfNumbersUpToTen.$[#this<5]} ${listOfNumbersUpToTen.$[#this>5] world",DEFAULT_TEMPLATE_PARSER_CONTEXT); Assert.fail("Should have failed"); } catch (ParseException pe) { Assert.assertEquals("No ending suffix '}' for expression starting at character 41: ${listOfNumbersUpToTen.$[#this>5] world",pe.getMessage()); - } - + } + try { ex = parser.parseExpression("hello ${listOfNumbersUpToTen.$[#root.listOfNumbersUpToTen.$[#this%2==1==3]} world",DEFAULT_TEMPLATE_PARSER_CONTEXT); Assert.fail("Should have failed"); } catch (ParseException pe) { Assert.assertEquals("Found closing '}' at position 74 but most recent opening is '[' at position 30",pe.getMessage()); - } + } } - + @Test public void testClashingWithSuffixes() throws Exception { @@ -211,7 +211,7 @@ public class TemplateExpressionParsingTests extends ExpressionTestCase { s = ex.getValue(TestScenarioCreator.getTestEvaluationContext(),String.class); Assert.assertEquals("hello 7 wo}rld",s); } - + @Test public void testParsingNormalExpressionThroughTemplateParser() throws Exception { Expression expr = parser.parseExpression("1+2+3"); @@ -219,7 +219,7 @@ public class TemplateExpressionParsingTests extends ExpressionTestCase { expr = parser.parseExpression("1+2+3",null); Assert.assertEquals(6,expr.getValue()); } - + @Test public void testErrorCases() throws Exception { try { @@ -240,29 +240,29 @@ public class TemplateExpressionParsingTests extends ExpressionTestCase { Assert.fail("Should have failed"); } catch (ParseException pe) { Assert.assertEquals("No expression defined within delimiter '${}' at character 6",pe.getMessage()); - } + } } @Test public void testTemplateParserContext() { TemplateParserContext tpc = new TemplateParserContext("abc","def"); Assert.assertEquals("abc", tpc.getExpressionPrefix()); - Assert.assertEquals("def", tpc.getExpressionSuffix()); + Assert.assertEquals("def", tpc.getExpressionSuffix()); Assert.assertTrue(tpc.isTemplate()); tpc = new TemplateParserContext(); Assert.assertEquals("#{", tpc.getExpressionPrefix()); - Assert.assertEquals("}", tpc.getExpressionSuffix()); + Assert.assertEquals("}", tpc.getExpressionSuffix()); Assert.assertTrue(tpc.isTemplate()); - + ParserContext pc = ParserContext.TEMPLATE_EXPRESSION; Assert.assertEquals("#{", pc.getExpressionPrefix()); - Assert.assertEquals("}", pc.getExpressionSuffix()); + Assert.assertEquals("}", pc.getExpressionSuffix()); Assert.assertTrue(pc.isTemplate()); } - + // --- - + private void checkString(String expectedString, Object value) { if (!(value instanceof String)) { Assert.fail("Result was not a string, it was of type " + value.getClass() + " (value=" + value + ")"); diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/VariableAndFunctionTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/VariableAndFunctionTests.java index f34ac8a1b64..d2cd8d94941 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/VariableAndFunctionTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/VariableAndFunctionTests.java @@ -25,7 +25,7 @@ import org.springframework.expression.spel.support.StandardEvaluationContext; /** * Tests the evaluation of expressions that access variables and functions (lambda/java). - * + * * @author Andy Clement */ public class VariableAndFunctionTests extends ExpressionTestCase { @@ -35,7 +35,7 @@ public class VariableAndFunctionTests extends ExpressionTestCase { evaluate("#answer", "42", Integer.class, SHOULD_BE_WRITABLE); evaluate("#answer / 2", 21, Integer.class, SHOULD_NOT_BE_WRITABLE); } - + @Test public void testVariableAccess_WellKnownVariables() { evaluate("#this.getName()","Nikola Tesla",String.class); diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/ast/FormatHelperTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/ast/FormatHelperTests.java index b40ec92a984..6aa0bafec5d 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/ast/FormatHelperTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/ast/FormatHelperTests.java @@ -28,13 +28,13 @@ import static org.junit.Assert.*; * @author Andy Wilkinson */ public class FormatHelperTests { - + @Test public void formatMethodWithSingleArgumentForMessage() { String message = FormatHelper.formatMethodForMessage("foo", Arrays.asList(TypeDescriptor.forObject("a string"))); assertEquals("foo(java.lang.String)", message); } - + @Test public void formatMethodWithMultipleArgumentsForMessage() { String message = FormatHelper.formatMethodForMessage("foo", Arrays.asList(TypeDescriptor.forObject("a string"), TypeDescriptor.forObject(Integer.valueOf(5)))); diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/support/ReflectionHelperTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/support/ReflectionHelperTests.java index 2bc87f90fb3..781d6963a46 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/support/ReflectionHelperTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/support/ReflectionHelperTests.java @@ -40,7 +40,7 @@ import org.springframework.expression.spel.support.ReflectionHelper.ArgsMatchKin /** * Tests for any helper code. - * + * * @author Andy Clement */ public class ReflectionHelperTests extends ExpressionTestCase { @@ -53,7 +53,7 @@ public class ReflectionHelperTests extends ExpressionTestCase { Assert.assertEquals("int[][]",FormatHelper.formatClassNameForMessage(new int[1][2].getClass())); Assert.assertEquals("null",FormatHelper.formatClassNameForMessage(null)); } - + /* @Test public void testFormatHelperForMethod() { @@ -62,7 +62,7 @@ public class ReflectionHelperTests extends ExpressionTestCase { Assert.assertEquals("boo()",FormatHelper.formatMethodForMessage("boo")); } */ - + @Test public void testUtilities() throws ParseException { SpelExpression expr = (SpelExpression)parser.parseExpression("3+4+5+6+7-2"); @@ -93,52 +93,52 @@ public class ReflectionHelperTests extends ExpressionTestCase { Assert.assertTrue(s.indexOf("===> Expression '3+4+5+6+7-2' - AST start")!=-1); Assert.assertTrue(s.indexOf(" OpPlus value:((((3 + 4) + 5) + 6) + 7) #children:2")!=-1); } - + @Test public void testTypedValue() { TypedValue tValue = new TypedValue("hello"); Assert.assertEquals(String.class,tValue.getTypeDescriptor().getType()); Assert.assertEquals("TypedValue: 'hello' of [java.lang.String]",tValue.toString()); } - + @Test public void testReflectionHelperCompareArguments_ExactMatching() { StandardTypeConverter typeConverter = new StandardTypeConverter(); - + // Calling foo(String) with (String) is exact match checkMatch(new Class[]{String.class},new Class[]{String.class},typeConverter,ArgsMatchKind.EXACT); - + // Calling foo(String,Integer) with (String,Integer) is exact match checkMatch(new Class[]{String.class,Integer.class},new Class[]{String.class,Integer.class},typeConverter,ArgsMatchKind.EXACT); } - + @Test public void testReflectionHelperCompareArguments_CloseMatching() { StandardTypeConverter typeConverter = new StandardTypeConverter(); - + // Calling foo(List) with (ArrayList) is close match (no conversion required) checkMatch(new Class[]{ArrayList.class},new Class[]{List.class},typeConverter,ArgsMatchKind.CLOSE); - + // Passing (Sub,String) on call to foo(Super,String) is close match checkMatch(new Class[]{Sub.class,String.class},new Class[]{Super.class,String.class},typeConverter,ArgsMatchKind.CLOSE); - + // Passing (String,Sub) on call to foo(String,Super) is close match checkMatch(new Class[]{String.class,Sub.class},new Class[]{String.class,Super.class},typeConverter,ArgsMatchKind.CLOSE); } - + @Test public void testReflectionHelperCompareArguments_RequiresConversionMatching() { StandardTypeConverter typeConverter = new StandardTypeConverter(); - + // Calling foo(String,int) with (String,Integer) requires boxing conversion of argument one checkMatch(new Class[]{String.class,Integer.TYPE},new Class[]{String.class,Integer.class},typeConverter,ArgsMatchKind.CLOSE,1); // Passing (int,String) on call to foo(Integer,String) requires boxing conversion of argument zero checkMatch(new Class[]{Integer.TYPE,String.class},new Class[]{Integer.class, String.class},typeConverter,ArgsMatchKind.CLOSE,0); - + // Passing (int,Sub) on call to foo(Integer,Super) requires boxing conversion of argument zero checkMatch(new Class[]{Integer.TYPE,Sub.class},new Class[]{Integer.class, Super.class},typeConverter,ArgsMatchKind.CLOSE,0); - + // Passing (int,Sub,boolean) on call to foo(Integer,Super,Boolean) requires boxing conversion of arguments zero and two // TODO checkMatch(new Class[]{Integer.TYPE,Sub.class,Boolean.TYPE},new Class[]{Integer.class, Super.class,Boolean.class},typeConverter,ArgsMatchKind.REQUIRES_CONVERSION,0,2); } @@ -146,7 +146,7 @@ public class ReflectionHelperTests extends ExpressionTestCase { @Test public void testReflectionHelperCompareArguments_NotAMatch() { StandardTypeConverter typeConverter = new StandardTypeConverter(); - + // Passing (Super,String) on call to foo(Sub,String) is not a match checkMatch(new Class[]{Super.class,String.class},new Class[]{Sub.class,String.class},typeConverter,null); } @@ -156,16 +156,16 @@ public class ReflectionHelperTests extends ExpressionTestCase { StandardTypeConverter tc = new StandardTypeConverter(); Class stringArrayClass = new String[0].getClass(); Class integerArrayClass = new Integer[0].getClass(); - + // Passing (String[]) on call to (String[]) is exact match checkMatch2(new Class[]{stringArrayClass},new Class[]{stringArrayClass},tc,ArgsMatchKind.EXACT); - + // Passing (Integer, String[]) on call to (Integer, String[]) is exact match checkMatch2(new Class[]{Integer.class,stringArrayClass},new Class[]{Integer.class,stringArrayClass},tc,ArgsMatchKind.EXACT); // Passing (String, Integer, String[]) on call to (String, String, String[]) is exact match checkMatch2(new Class[]{String.class,Integer.class,stringArrayClass},new Class[]{String.class,Integer.class,stringArrayClass},tc,ArgsMatchKind.EXACT); - + // Passing (Sub, String[]) on call to (Super, String[]) is exact match checkMatch2(new Class[]{Sub.class,stringArrayClass},new Class[]{Super.class,stringArrayClass},tc,ArgsMatchKind.CLOSE); @@ -174,10 +174,10 @@ public class ReflectionHelperTests extends ExpressionTestCase { // Passing (Integer, Sub, String[]) on call to (String, Super, String[]) is exact match checkMatch2(new Class[]{Integer.class,Sub.class,String[].class},new Class[]{String.class,Super.class,String[].class},tc,ArgsMatchKind.REQUIRES_CONVERSION,0); - + // Passing (String) on call to (String[]) is exact match checkMatch2(new Class[]{String.class},new Class[]{stringArrayClass},tc,ArgsMatchKind.EXACT); - + // Passing (Integer,String) on call to (Integer,String[]) is exact match checkMatch2(new Class[]{Integer.class,String.class},new Class[]{Integer.class,stringArrayClass},tc,ArgsMatchKind.EXACT); @@ -186,7 +186,7 @@ public class ReflectionHelperTests extends ExpressionTestCase { // Passing (Sub) on call to (Super[]) is close match checkMatch2(new Class[]{Sub.class},new Class[]{new Super[0].getClass()},tc,ArgsMatchKind.CLOSE); - + // Passing (Super) on call to (Sub[]) is not a match checkMatch2(new Class[]{Super.class},new Class[]{new Sub[0].getClass()},tc,null); @@ -261,17 +261,17 @@ public class ReflectionHelperTests extends ExpressionTestCase { catch (SpelEvaluationException se) { Assert.assertEquals(SpelMessage.TYPE_CONVERSION_ERROR,se.getMessageCode()); } - + // null value args = new Object[]{3,null,3.0f}; ReflectionHelper.convertAllArguments(tc, args, twoArg); checkArguments(args,"3",null,"3.0"); } - + @Test public void testSetupArguments() { Object[] newArray = ReflectionHelper.setupArgumentsForVarargsInvocation(new Class[]{new String[0].getClass()},"a","b","c"); - + Assert.assertEquals(1,newArray.length); Object firstParam = newArray[0]; Assert.assertEquals(String.class,firstParam.getClass().getComponentType()); @@ -281,7 +281,7 @@ public class ReflectionHelperTests extends ExpressionTestCase { Assert.assertEquals("b",firstParamArray[1]); Assert.assertEquals("c",firstParamArray[2]); } - + @Test public void testReflectivePropertyResolver() throws Exception { ReflectivePropertyAccessor rpr = new ReflectivePropertyAccessor(); @@ -295,16 +295,16 @@ public class ReflectionHelperTests extends ExpressionTestCase { Assert.assertTrue(rpr.canRead(ctx, t, "field")); Assert.assertEquals(3,rpr.read(ctx, t, "field").getValue()); Assert.assertEquals(3,rpr.read(ctx, t, "field").getValue()); // cached accessor used - + Assert.assertTrue(rpr.canWrite(ctx, t, "property")); rpr.write(ctx, t, "property","goodbye"); rpr.write(ctx, t, "property","goodbye"); // cached accessor used - + Assert.assertTrue(rpr.canWrite(ctx, t, "field")); rpr.write(ctx, t, "field",12); rpr.write(ctx, t, "field",12); - // Attempted write as first activity on this field and property to drive testing + // Attempted write as first activity on this field and property to drive testing // of populating type descriptor cache rpr.write(ctx,t,"field2",3); rpr.write(ctx, t, "property2","doodoo"); @@ -330,7 +330,7 @@ public class ReflectionHelperTests extends ExpressionTestCase { Assert.assertEquals("id",rpr.read(ctx,t,"Id").getValue()); Assert.assertTrue(rpr.canRead(ctx,t,"Id")); } - + @Test public void testOptimalReflectivePropertyResolver() throws Exception { ReflectivePropertyAccessor rpr = new ReflectivePropertyAccessor(); @@ -340,7 +340,7 @@ public class ReflectionHelperTests extends ExpressionTestCase { // Assert.assertTrue(rpr.canRead(ctx, t, "property")); // Assert.assertEquals("hello",rpr.read(ctx, t, "property").getValue()); // Assert.assertEquals("hello",rpr.read(ctx, t, "property").getValue()); // cached accessor used - + PropertyAccessor optA = rpr.createOptimalAccessor(ctx, t, "property"); Assert.assertTrue(optA.canRead(ctx, t, "property")); Assert.assertFalse(optA.canRead(ctx, t, "property2")); @@ -405,7 +405,7 @@ public class ReflectionHelperTests extends ExpressionTestCase { } - + // test classes static class Tester { @@ -426,7 +426,7 @@ public class ReflectionHelperTests extends ExpressionTestCase { public void setProperty2(String value) { property2 = value; } public String getProperty3() { return property3; } - + public boolean isProperty4() { return property4; } public String getiD() { return iD; } @@ -435,17 +435,17 @@ public class ReflectionHelperTests extends ExpressionTestCase { public String getID() { return ID; } } - + static class Super { } - + static class Sub extends Super { } - + static class Unconvertable {} - + // --- - + /** * Used to validate the match returned from a compareArguments call. */ @@ -459,10 +459,10 @@ public class ReflectionHelperTests extends ExpressionTestCase { if (expectedMatchKind==ArgsMatchKind.EXACT) { Assert.assertTrue(matchInfo.isExactMatch()); - Assert.assertNull(matchInfo.argsRequiringConversion); + Assert.assertNull(matchInfo.argsRequiringConversion); } else if (expectedMatchKind==ArgsMatchKind.CLOSE) { Assert.assertTrue(matchInfo.isCloseMatch()); - Assert.assertNull(matchInfo.argsRequiringConversion); + Assert.assertNull(matchInfo.argsRequiringConversion); } else if (expectedMatchKind==ArgsMatchKind.REQUIRES_CONVERSION) { Assert.assertTrue("expected to be a match requiring conversion, but was "+matchInfo,matchInfo.isMatchRequiringConversion()); if (argsForConversion==null) { @@ -488,10 +488,10 @@ public class ReflectionHelperTests extends ExpressionTestCase { if (expectedMatchKind==ArgsMatchKind.EXACT) { Assert.assertTrue(matchInfo.isExactMatch()); - Assert.assertNull(matchInfo.argsRequiringConversion); + Assert.assertNull(matchInfo.argsRequiringConversion); } else if (expectedMatchKind==ArgsMatchKind.CLOSE) { Assert.assertTrue(matchInfo.isCloseMatch()); - Assert.assertNull(matchInfo.argsRequiringConversion); + Assert.assertNull(matchInfo.argsRequiringConversion); } else if (expectedMatchKind==ArgsMatchKind.REQUIRES_CONVERSION) { Assert.assertTrue("expected to be a match requiring conversion, but was "+matchInfo,matchInfo.isMatchRequiringConversion()); if (argsForConversion==null) { @@ -510,7 +510,7 @@ public class ReflectionHelperTests extends ExpressionTestCase { checkArgument(expected[i],args[i]); } } - + private void checkArgument(Object expected, Object actual) { Assert.assertEquals(expected,actual); } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/support/StandardComponentsTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/support/StandardComponentsTests.java index 47c49ba0268..ab23d3e1572 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/support/StandardComponentsTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/support/StandardComponentsTests.java @@ -43,19 +43,19 @@ public class StandardComponentsTests { context.setTypeLocator(tl); Assert.assertEquals(tl,context.getTypeLocator()); } - + @Test public void testStandardOperatorOverloader() throws EvaluationException { OperatorOverloader oo = new StandardOperatorOverloader(); Assert.assertFalse(oo.overridesOperation(Operation.ADD, null, null)); - try { + try { oo.operate(Operation.ADD, 2, 3); Assert.fail("should have failed"); } catch (EvaluationException e) { // success } } - + @Test public void testStandardTypeLocator() { StandardTypeLocator tl = new StandardTypeLocator(); @@ -68,7 +68,7 @@ public class StandardComponentsTests { prefixes = tl.getImportPrefixes(); Assert.assertEquals(1,prefixes.size()); } - + @Test public void testStandardTypeConverter() throws EvaluationException { TypeConverter tc = new StandardTypeConverter(); diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/ArrayContainer.java b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/ArrayContainer.java index fa6d62f444c..9047e35b7d0 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/ArrayContainer.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/ArrayContainer.java @@ -17,7 +17,7 @@ /** * Hold the various kinds of primitive array for access through the test evaluation context. - * + * * @author Andy Clement */ public class ArrayContainer { @@ -29,7 +29,7 @@ public class ArrayContainer { public short[] shorts = new short[3]; public boolean[] booleans = new boolean[3]; public float[] floats = new float[3]; - + public ArrayContainer() { // setup some values ints[0] = 42; diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Company.java b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Company.java index 54a8384ff09..c497c2fad7c 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Company.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Company.java @@ -1,12 +1,12 @@ /** - * + * */ package org.springframework.expression.spel.testresources; ///CLOVER:OFF public class Company { String address; - + public Company(String string) { this.address = string; } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Fruit.java b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Fruit.java index c8a2c7f27f9..04cf7fa004e 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Fruit.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Fruit.java @@ -1,5 +1,5 @@ /** - * + * */ package org.springframework.expression.spel.testresources; @@ -11,7 +11,7 @@ public class Fruit { public Color color; // accessible as property through getter/setter public String colorName; // accessible as property through getter/setter public int stringscount = -1; - + public Fruit(String name, Color color, String colorName) { this.name = name; this.color = color; @@ -21,15 +21,15 @@ public class Fruit { public Color getColor() { return color; } - + public Fruit(String... strings) { stringscount = strings.length; } - + public Fruit(int i, String... strings) { stringscount = i + strings.length; } - + public int stringscount() { return stringscount; } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Inventor.java b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Inventor.java index 051fe95ca3f..2869a366bff 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Inventor.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Inventor.java @@ -37,7 +37,7 @@ public class Inventor { public String[] stringArrayOfThreeItems = new String[]{"1","2","3"}; private String foo; public int counter; - + public Inventor(String name, Date birthdate, String nationality) { this.name = name; this._name = name; @@ -88,7 +88,7 @@ public class Inventor { public String[] getInventions() { return inventions; } - + public void setInventions(String[] inventions) { this.inventions = inventions; } @@ -96,7 +96,7 @@ public class Inventor { public PlaceOfBirth getPlaceOfBirth() { return placeOfBirth; } - + public int throwException(int valueIn) throws Exception { counter++; if (valueIn==1) { @@ -110,9 +110,9 @@ public class Inventor { } return valueIn; } - + static class TestException extends Exception {} - + public String throwException(PlaceOfBirth pob) { return pob.getCity(); } @@ -120,7 +120,7 @@ public class Inventor { public String getName() { return name; } - + public boolean getWonNobelPrize() { return wonNobelPrize; } @@ -152,7 +152,7 @@ public class Inventor { public String sayHelloTo(String person) { return "hello " + person; } - + public String printDouble(Double d) { return d.toString(); } @@ -187,7 +187,7 @@ public class Inventor { public Inventor(String... strings) { } - + public boolean getSomeProperty() { return accessedThroughGetSet; } @@ -195,7 +195,7 @@ public class Inventor { public void setSomeProperty(boolean b) { this.accessedThroughGetSet = b; } - + public Date getBirthdate() { return birthdate;} public String getFoo() { return foo; } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Person.java b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Person.java index 80a432d2566..9126de04886 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Person.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/Person.java @@ -8,16 +8,16 @@ public class Person { public Person(String name) { this.privateName = name; } - + public Person(String name, Company company) { this.privateName = name; this.company = company; } - + public String getName() { return privateName; } - + public void setName(String n) { this.privateName = n; } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/PlaceOfBirth.java b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/PlaceOfBirth.java index 658855cd7c5..ea5c1d970a4 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/PlaceOfBirth.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/PlaceOfBirth.java @@ -3,9 +3,9 @@ package org.springframework.expression.spel.testresources; ///CLOVER:OFF public class PlaceOfBirth { private String city; - + public String Country; - + /** * Keith now has a converter that supports String to X, if X has a ctor that takes a String. * In order for round tripping to work we need toString() for X to return what it was @@ -25,11 +25,11 @@ public class PlaceOfBirth { public PlaceOfBirth(String string) { this.city=string; } - + public int doubleIt(int i) { return i*2; } - + public boolean equals(Object o) { if (!(o instanceof PlaceOfBirth)) { return false; @@ -37,9 +37,9 @@ public class PlaceOfBirth { PlaceOfBirth oPOB = (PlaceOfBirth)o; return (city.equals(oPOB.city)); } - + public int hashCode() { return city.hashCode(); } - + } \ No newline at end of file diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/TestAddress.java b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/TestAddress.java index 0f84c9e85ea..251703fbc81 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/TestAddress.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/TestAddress.java @@ -5,7 +5,7 @@ import java.util.List; public class TestAddress{ private String street; private List crossStreets; - + public String getStreet() { return street; } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/TestPerson.java b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/TestPerson.java index dca009da128..f01e15f0984 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/testresources/TestPerson.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/testresources/TestPerson.java @@ -3,7 +3,7 @@ package org.springframework.expression.spel.testresources; public class TestPerson { private String name; private TestAddress address; - + public String getName() { return name; } diff --git a/spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java b/spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java index 47d2a4ba293..e75390d3c11 100644 --- a/spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java +++ b/spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java @@ -28,8 +28,8 @@ import org.springframework.instrument.classloading.WeavingTransformer; * Extension of Tomcat's default class loader which adds instrumentation * to loaded classes without the need to use a VM-wide agent. * - *

      To be registered using a - * Loader tag + *

      To be registered using a + * Loader tag * in Tomcat's Context * definition in the server.xml file, with the Spring-provided * "spring-tomcat-weaver.jar" file deployed into Tomcat's "server/lib" (for Tomcat 5.x) or "lib" (for Tomcat 6.x) directory. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/BadSqlGrammarException.java b/spring-jdbc/src/main/java/org/springframework/jdbc/BadSqlGrammarException.java index 4e3389298ba..e61aefdee7e 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/BadSqlGrammarException.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/BadSqlGrammarException.java @@ -32,7 +32,7 @@ import org.springframework.dao.InvalidDataAccessResourceUsageException; * @see InvalidResultSetAccessException */ public class BadSqlGrammarException extends InvalidDataAccessResourceUsageException { - + private String sql; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/UncategorizedSQLException.java b/spring-jdbc/src/main/java/org/springframework/jdbc/UncategorizedSQLException.java index eccba39f5d2..658ec04b324 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/UncategorizedSQLException.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/UncategorizedSQLException.java @@ -21,7 +21,7 @@ import java.sql.SQLException; import org.springframework.dao.UncategorizedDataAccessException; /** - * Exception thrown when we can't classify a SQLException into + * Exception thrown when we can't classify a SQLException into * one of our generic data access exceptions. * * @author Rod Johnson diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/config/SortedResourcesFactoryBean.java b/spring-jdbc/src/main/java/org/springframework/jdbc/config/SortedResourcesFactoryBean.java index 9a54179854d..3f593940fb3 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/config/SortedResourcesFactoryBean.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/config/SortedResourcesFactoryBean.java @@ -42,7 +42,7 @@ import org.springframework.core.io.support.ResourcePatternUtils; * @since 3.0 */ public class SortedResourcesFactoryBean extends AbstractFactoryBean implements ResourceLoaderAware { - + private final List locations; private ResourcePatternResolver resourcePatternResolver; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/BatchPreparedStatementSetter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/BatchPreparedStatementSetter.java index 8a8e523a5b3..4b95acde854 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/BatchPreparedStatementSetter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/BatchPreparedStatementSetter.java @@ -38,7 +38,7 @@ import java.sql.SQLException; */ public interface BatchPreparedStatementSetter { - /** + /** * Set parameter values on the given PreparedStatement. * @param ps the PreparedStatement to invoke setter methods on * @param i index of the statement we're issuing in the batch, starting from 0 @@ -47,7 +47,7 @@ public interface BatchPreparedStatementSetter { */ void setValues(PreparedStatement ps, int i) throws SQLException; - /** + /** * Return the size of the batch. * @return the number of statements in the batch */ diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreator.java index 8a42702394b..552daf1bd3a 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreator.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreator.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -42,9 +42,9 @@ import java.sql.SQLException; */ public interface CallableStatementCreator { - /** + /** * Create a callable statement in this connection. Allows implementations to use - * CallableStatements. + * CallableStatements. * @param con Connection to use to create statement * @return a callable statement * @throws SQLException there is no need to catch SQLExceptions diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java index 93f68dd099f..f5f5d0eed57 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/CallableStatementCreatorFactory.java @@ -37,7 +37,7 @@ import org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor; * @author Thomas Risberg * @author Juergen Hoeller */ -public class CallableStatementCreatorFactory { +public class CallableStatementCreatorFactory { /** The SQL call string, which won't change when the parameters change. */ private final String callString; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java index 634b2c8b89e..e199293cee4 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcOperations.java @@ -407,7 +407,7 @@ public interface JdbcOperations { * @see PreparedStatementCreatorFactory */ void query(PreparedStatementCreator psc, RowCallbackHandler rch) throws DataAccessException; - + /** * Query given SQL to create a prepared statement from SQL and a * PreparedStatementSetter implementation that knows how to bind values @@ -423,7 +423,7 @@ public interface JdbcOperations { */ void query(String sql, PreparedStatementSetter pss, RowCallbackHandler rch) throws DataAccessException; - + /** * Query given SQL to create a prepared statement from SQL and a list of * arguments to bind to the query, reading the ResultSet on a per-row basis @@ -947,7 +947,7 @@ public interface JdbcOperations { * @throws DataAccessException if there is any problem issuing the update */ int update(String sql, PreparedStatementSetter pss) throws DataAccessException; - + /** * Issue a single SQL update operation (such as an insert, update or delete statement) * via a prepared statement, binding the given arguments. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java index 707ffe1482a..cce62c60b2b 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/JdbcTemplate.java @@ -934,7 +934,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { /* * (non-Javadoc) * @see org.springframework.jdbc.core.JdbcOperations#batchUpdate(java.lang.String, java.util.Collection, int, org.springframework.jdbc.core.ParameterizedPreparedStatementSetter) - * + * * Contribution by Nicolas Fabre */ public int[][] batchUpdate(String sql, final Collection batchArgs, final int batchSize, final ParameterizedPreparedStatementSetter pss) { @@ -1054,7 +1054,7 @@ public class JdbcTemplate extends JdbcAccessor implements JdbcOperations { resultSetParameters.add(parameter); } else { - updateCountParameters.add(parameter); + updateCountParameters.add(parameter); } } else { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterMapper.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterMapper.java index 46a78377c06..515163d7844 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterMapper.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterMapper.java @@ -20,7 +20,7 @@ import java.sql.Connection; import java.sql.SQLException; import java.util.Map; -/** +/** * Implement this interface when parameters need to be customized based * on the connection. We might need to do this to make use of proprietary * features, available only with a specific Connection type. @@ -43,5 +43,5 @@ public interface ParameterMapper { * @return Map of input parameters, keyed by name (never null) */ Map createMap(Connection con) throws SQLException; - + } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterizedPreparedStatementSetter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterizedPreparedStatementSetter.java index fd8f8278764..9845cec064d 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterizedPreparedStatementSetter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ParameterizedPreparedStatementSetter.java @@ -46,5 +46,5 @@ public interface ParameterizedPreparedStatementSetter { * @throws SQLException if a SQLException is encountered (i.e. there is no need to catch SQLException) */ void setValues(PreparedStatement ps, T argument) throws SQLException; - + } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreator.java index dc922156187..2cb5a1f6483 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreator.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementCreator.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -42,7 +42,7 @@ import java.sql.SQLException; */ public interface PreparedStatementCreator { - /** + /** * Create a statement in this connection. Allows implementations to use * PreparedStatements. The JdbcTemplate will close the created statement. * @param con Connection to use to create statement diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementSetter.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementSetter.java index fb12a1b48df..d8a3ad4a552 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementSetter.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/PreparedStatementSetter.java @@ -42,7 +42,7 @@ import java.sql.SQLException; */ public interface PreparedStatementSetter { - /** + /** * Set parameter values on the given PreparedStatement. * @param ps the PreparedStatement to invoke setter methods on * @throws SQLException if a SQLException is encountered diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ResultSetExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ResultSetExtractor.java index 76ddcd1b233..1544655ea44 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/ResultSetExtractor.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/ResultSetExtractor.java @@ -21,7 +21,7 @@ import java.sql.SQLException; import org.springframework.dao.DataAccessException; -/** +/** * Callback interface used by {@link JdbcTemplate}'s query methods. * Implementations of this interface perform the actual work of extracting * results from a {@link java.sql.ResultSet}, but don't need to worry diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowCountCallbackHandler.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowCountCallbackHandler.java index 88efe072ec3..73df113b545 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowCountCallbackHandler.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowCountCallbackHandler.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2006 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,7 +34,7 @@ import java.sql.SQLException; *

      A usage example with JdbcTemplate: * *

      JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);  // reusable object
      - * 
      + *
        * RowCountCallbackHandler countCallback = new RowCountCallbackHandler();  // not reusable
        * jdbcTemplate.query("select * from user", countCallback);
        * int rowCount = countCallback.getRowCount();
      @@ -55,7 +55,7 @@ public class RowCountCallbackHandler implements RowCallbackHandler { * as returned by ResultSetMetaData object. */ private int[] columnTypes; - + /** * Indexed from 0. Column name as returned by ResultSetMetaData object. */ @@ -84,7 +84,7 @@ public class RowCountCallbackHandler implements RowCallbackHandler { processRow(rs, this.rowCount++); } - /** + /** * Subclasses may override this to perform custom extraction * or processing. This class's implementation does nothing. * @param rs ResultSet to extract data from. This method is @@ -104,8 +104,8 @@ public class RowCountCallbackHandler implements RowCallbackHandler { public final int[] getColumnTypes() { return columnTypes; } - - /** + + /** * Return the names of the columns. * Valid after processRow is invoked the first time. * @return the names of the columns. @@ -115,7 +115,7 @@ public class RowCountCallbackHandler implements RowCallbackHandler { return columnNames; } - /** + /** * Return the row count of this ResultSet * Only valid after processing is complete * @return the number of rows in this ResultSet @@ -124,7 +124,7 @@ public class RowCountCallbackHandler implements RowCallbackHandler { return rowCount; } - /** + /** * Return the number of columns in this result set. * Valid once we've seen the first row, * so subclasses can use it during processing diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapper.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapper.java index 680e904ed29..56bba1bb558 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapper.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapper.java @@ -47,7 +47,7 @@ import java.sql.SQLException; */ public interface RowMapper { - /** + /** * Implementations must implement this method to map each row of data * in the ResultSet. This method should not call next() on * the ResultSet; it is only supposed to map values of the current row. @@ -57,7 +57,6 @@ public interface RowMapper { * @throws SQLException if a SQLException is encountered getting * column values (that is, there's no need to catch SQLException) */ - T mapRow(ResultSet rs, int rowNum) throws SQLException; + T mapRow(ResultSet rs, int rowNum) throws SQLException; } - \ No newline at end of file diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlProvider.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlProvider.java index 5dc642be864..755990221b7 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlProvider.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/SqlProvider.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/CallMetaDataProviderFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/CallMetaDataProviderFactory.java index 38d47301c3d..4693b02067d 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/CallMetaDataProviderFactory.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/CallMetaDataProviderFactory.java @@ -64,7 +64,7 @@ public class CallMetaDataProviderFactory { * Create a CallMetaDataProvider based on the database metedata * @param dataSource used to retrieve metedata * @param context the class that holds configuration and metedata - * @return instance of the CallMetaDataProvider implementation to be used + * @return instance of the CallMetaDataProvider implementation to be used */ static public CallMetaDataProvider createMetaDataProvider(DataSource dataSource, final CallMetaDataContext context) { try { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericCallMetaDataProvider.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericCallMetaDataProvider.java index db7cd667faf..17578e80bb0 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericCallMetaDataProvider.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericCallMetaDataProvider.java @@ -197,7 +197,7 @@ public class GenericCallMetaDataProvider implements CallMetaDataProvider { } public SqlParameter createDefaultInParameter(String parameterName, CallParameterMetaData meta) { - return new SqlParameter(parameterName, meta.getSqlType()); + return new SqlParameter(parameterName, meta.getSqlType()); } public String getUserName() { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericTableMetaDataProvider.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericTableMetaDataProvider.java index 1a4e28772fc..4869064edce 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericTableMetaDataProvider.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/GenericTableMetaDataProvider.java @@ -389,8 +389,8 @@ public class GenericTableMetaDataProvider implements TableMetaDataProvider { if (dataType == Types.DECIMAL) { String typeName = tableColumns.getString("TYPE_NAME"); int decimalDigits = tableColumns.getInt("DECIMAL_DIGITS"); - // override a DECIMAL data type for no-decimal numerics - // (this is for better Oracle support where there have been issues + // override a DECIMAL data type for no-decimal numerics + // (this is for better Oracle support where there have been issues // using DECIMAL for certain inserts (see SPR-6912)) if ("NUMBER".equals(typeName) && decimalDigits == 0) { dataType = Types.NUMERIC; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/HsqlTableMetaDataProvider.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/HsqlTableMetaDataProvider.java index b35ac67f6aa..7ae4ecd9123 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/HsqlTableMetaDataProvider.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/HsqlTableMetaDataProvider.java @@ -20,7 +20,7 @@ import java.sql.DatabaseMetaData; import java.sql.SQLException; /** - * The HSQL specific implementation of the {@link TableMetaDataProvider}. Suports a feature for + * The HSQL specific implementation of the {@link TableMetaDataProvider}. Suports a feature for * retreiving generated keys without the JDBC 3.0 getGeneratedKeys support. * * @author Thomas Risberg diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/OracleCallMetaDataProvider.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/OracleCallMetaDataProvider.java index 6b31dcea992..340f0fe2ea3 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/OracleCallMetaDataProvider.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/OracleCallMetaDataProvider.java @@ -45,7 +45,7 @@ public class OracleCallMetaDataProvider extends GenericCallMetaDataProvider { public boolean isReturnResultSetSupported() { return false; } - + @Override public boolean isRefCursorSupported() { return true; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/OracleTableMetaDataProvider.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/OracleTableMetaDataProvider.java index 326428a4c8d..3465522e11e 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/OracleTableMetaDataProvider.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/OracleTableMetaDataProvider.java @@ -34,7 +34,7 @@ import org.springframework.util.ReflectionUtils; * *

      Thanks to Mike Youngstrom and Bruce Campbell for submitting the original suggestion for the Oracle * current schema lookup implementation. - * + * * @author Thomas Risberg * @author Juergen Hoeller * @since 3.0 @@ -42,7 +42,7 @@ import org.springframework.util.ReflectionUtils; public class OracleTableMetaDataProvider extends GenericTableMetaDataProvider { private final boolean includeSynonyms; - + private String defaultSchema; @@ -124,10 +124,10 @@ public class OracleTableMetaDataProvider extends GenericTableMetaDataProvider { throw new InvalidDataAccessApiUsageException("Couldn't reset Oracle Connection", ex); } } - + /* * Oracle implementation for detecting current schema - * + * * @param databaseMetaData */ private void lookupDefaultSchema(DatabaseMetaData databaseMetaData) { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataProvider.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataProvider.java index d34c6fc11ce..25eaa98b568 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataProvider.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/TableMetaDataProvider.java @@ -98,7 +98,7 @@ public interface TableMetaDataProvider { * Are we using the meta data for the table columns? */ boolean isTableColumnMetaDataUsed(); - + /** * Does this database support the JDBC 3.0 feature of retreiving generated keys * {@link java.sql.DatabaseMetaData#supportsGetGeneratedKeys()} diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcDaoSupport.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcDaoSupport.java index 621cf6d9f39..9c049300e0d 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcDaoSupport.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterJdbcDaoSupport.java @@ -20,14 +20,14 @@ import org.springframework.jdbc.core.support.JdbcDaoSupport; /** * Extension of JdbcDaoSupport that exposes a NamedParameterJdbcTemplate as well. - * + * * @author Thomas Risberg * @author Juergen Hoeller * @since 2.0 * @see NamedParameterJdbcTemplate */ public class NamedParameterJdbcDaoSupport extends JdbcDaoSupport { - + private NamedParameterJdbcTemplate namedParameterJdbcTemplate; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java index ccc668502c5..552e3a526cb 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/NamedParameterUtils.java @@ -227,7 +227,7 @@ public abstract class NamedParameterUtils { } return position; } - + /** * Parse the SQL statement and locate any placeholders or named parameters. * Named parameters are substituted for a JDBC placeholder and any select list @@ -482,7 +482,7 @@ public abstract class NamedParameterUtils { public int getStartIndex() { return startIndex; } - + public int getEndIndex() { return endIndex; } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/package-info.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/package-info.java index 78f4d6d2d42..55414697b52 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/package-info.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/namedparam/package-info.java @@ -2,12 +2,12 @@ /** * * JdbcTemplate variant with named parameter support. - * + * *

      NamedParameterJdbcTemplate is a wrapper around JdbcTemplate that adds * support for named parameter parsing. It does not implement the JdbcOperations * interface or extend JdbcTemplate, but implements the dedicated * NamedParameterJdbcOperations interface. - * + * *

      If you need the full power of Spring JDBC for less common operations, use * the getJdbcOperations() method of NamedParameterJdbcTemplate and * work with the returned classic template, or use a JdbcTemplate instance directly. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java index 018892ba3ae..55d12b94c68 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java @@ -622,7 +622,7 @@ public abstract class AbstractJdbcInsert { } } } - + /** * Match the provided in parameter values with regitered parameters and parameters defined via metedata * processing. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java index 0311dc4cf38..a83b2e7954a 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcCall.java @@ -38,7 +38,7 @@ import org.springframework.jdbc.core.namedparam.SqlParameterSource; *

      The meta data processing is based on the DatabaseMetaData provided by * the JDBC driver. Since we rely on the JDBC driver this "auto-detection" * can only be used for databases that are known to provide accurate meta data. - * These currently include Derby, MySQL, Microsoft SQL Server, Oracle, DB2, + * These currently include Derby, MySQL, Microsoft SQL Server, Oracle, DB2, * Sybase and PostgreSQL. For any other databases you are required to declare all * parameters explicitly. You can of course declare all parameters explicitly even * if the database provides the necessary meta data. In that case your declared diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcDaoSupport.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcDaoSupport.java index d0ad45ce971..16a842da184 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcDaoSupport.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcDaoSupport.java @@ -22,18 +22,18 @@ import org.springframework.jdbc.core.support.JdbcDaoSupport; * Extension of {@link org.springframework.jdbc.core.support.JdbcDaoSupport} * that exposes a {@link #getSimpleJdbcTemplate() SimpleJdbcTemplate} as well. * Only usable on Java 5 and above. - * + * * @author Rod Johnson * @author Juergen Hoeller * @since 2.0 * @see SimpleJdbcTemplate * @deprecated since Spring 3.1 in favor of {@link org.springframework.jdbc.core.support.JdbcDaoSupport} and - * {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcDaoSupport}. The JdbcTemplate and + * {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcDaoSupport}. The JdbcTemplate and * NamedParameterJdbcTemplate now provide all the functionality of the SimpleJdbcTemplate. */ @Deprecated public class SimpleJdbcDaoSupport extends JdbcDaoSupport { - + private SimpleJdbcTemplate simpleJdbcTemplate; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsertOperations.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsertOperations.java index a4351abadc4..0033f3847ac 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsertOperations.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcInsertOperations.java @@ -31,7 +31,7 @@ import org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor; * @since 2.5 */ public interface SimpleJdbcInsertOperations { - + /** * Specify the table name to be used for the insert. * @param tableName the name of the stored table @@ -85,8 +85,8 @@ public interface SimpleJdbcInsertOperations { /** * Use a the provided NativeJdbcExtractor during the column meta data * lookups via JDBC. - * Note: this is only necessary to include when running with a connection pool - * that wraps the meta data connection and when using a database like Oracle + * Note: this is only necessary to include when running with a connection pool + * that wraps the meta data connection and when using a database like Oracle * where it is necessary to access the native connection to include synonyms. * @return the instance of this SimpleJdbcInsert */ diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcOperations.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcOperations.java index 2b68f35cb07..45e46448166 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcOperations.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcOperations.java @@ -38,7 +38,7 @@ import org.springframework.jdbc.core.namedparam.SqlParameterSource; * @see SimpleJdbcTemplate * @see org.springframework.jdbc.core.JdbcOperations * @deprecated since Spring 3.1 in favor of {@link org.springframework.jdbc.core.JdbcOperations} and - * {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations}. The JdbcTemplate and + * {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations}. The JdbcTemplate and * NamedParameterJdbcTemplate now provide all the functionality of the SimpleJdbcTemplate. */ @Deprecated diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcTemplate.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcTemplate.java index 2ca0132530d..ff1c7479959 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcTemplate.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/SimpleJdbcTemplate.java @@ -41,7 +41,7 @@ import org.springframework.util.ObjectUtils; * any methods specifying SQL types, methods using less commonly used callbacks * such as RowCallbackHandler, updates with PreparedStatementSetters rather than * argument arrays, and stored procedures as well as batch operations. - * + * * @author Rod Johnson * @author Rob Harrop * @author Juergen Hoeller @@ -51,12 +51,12 @@ import org.springframework.util.ObjectUtils; * @see SimpleJdbcDaoSupport * @see org.springframework.jdbc.core.JdbcTemplate * @deprecated since Spring 3.1 in favor of {@link org.springframework.jdbc.core.JdbcTemplate} and - * {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}. The JdbcTemplate and + * {@link org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate}. The JdbcTemplate and * NamedParameterJdbcTemplate now provide all the functionality of the SimpleJdbcTemplate. */ @Deprecated public class SimpleJdbcTemplate implements SimpleJdbcOperations { - + /** The NamedParameterJdbcTemplate that we are wrapping */ private final NamedParameterJdbcOperations namedParameterJdbcOperations; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/package-info.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/package-info.java index 44294d6e8b8..90f8f1c873f 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/package-info.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/package-info.java @@ -2,14 +2,14 @@ /** * * Simplification layer over JdbcTemplate for Java 5 and above. - * + * *

      SimpleJdbcInsert and SimpleJdbcCall are classes that takes advantage - * of database metadata provided by the JDBC driver to simplify the application code. Much of the + * of database metadata provided by the JDBC driver to simplify the application code. Much of the * parameter specification becomes unnecessary since it can be looked up in the metadata. - * - * Note: The SimpleJdbcOperations and SimpleJdbcTemplate, which provides a wrapper + * + * Note: The SimpleJdbcOperations and SimpleJdbcTemplate, which provides a wrapper * around JdbcTemplate to take advantage of Java 5 features like generics, varargs and autoboxing, is now deprecated - * since Spring 3.1. All functionality is now available in the JdbcOperations and + * since Spring 3.1. All functionality is now available in the JdbcOperations and * NamedParametersOperations respectively. * */ diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/SqlLobValue.java b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/SqlLobValue.java index 4921a84b6d8..517e8a052fb 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/SqlLobValue.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/core/support/SqlLobValue.java @@ -53,7 +53,7 @@ import org.springframework.jdbc.support.lob.LobHandler; * }, * new int[] {Types.VARCHAR, Types.BLOB, Types.CLOB}); * - * + * * @author Thomas Risberg * @author Juergen Hoeller * @since 1.1 diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceUtils.java index 12637d95475..6179a5103ca 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceUtils.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DataSourceUtils.java @@ -29,7 +29,7 @@ import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.support.TransactionSynchronizationAdapter; import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.util.Assert; - + /** * Helper class that provides static methods for obtaining JDBC Connections from * a {@link javax.sql.DataSource}. Includes special support for Spring-managed diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SmartDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SmartDataSource.java index 3c0e1377b11..9885f48efee 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SmartDataSource.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/SmartDataSource.java @@ -36,8 +36,8 @@ import javax.sql.DataSource; * @see org.springframework.jdbc.core.JdbcTemplate */ public interface SmartDataSource extends DataSource { - - /** + + /** * Should we close this Connection, obtained from this DataSource? *

      Code that uses Connections from a SmartDataSource should always * perform a check via this method before invoking close(). diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/DerbyEmbeddedDatabaseConfigurer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/DerbyEmbeddedDatabaseConfigurer.java index cf6737e1a5f..59690693717 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/DerbyEmbeddedDatabaseConfigurer.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/DerbyEmbeddedDatabaseConfigurer.java @@ -37,7 +37,7 @@ import org.apache.derby.jdbc.EmbeddedDriver; final class DerbyEmbeddedDatabaseConfigurer implements EmbeddedDatabaseConfigurer { private static final Log logger = LogFactory.getLog(DerbyEmbeddedDatabaseConfigurer.class); - + private static final String URL_TEMPLATE = "jdbc:derby:memory:%s;%s"; // Error code that indicates successful shutdown diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseBuilder.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseBuilder.java index 6c1ea235dcc..6555e2c5570 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseBuilder.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseBuilder.java @@ -105,7 +105,7 @@ public class EmbeddedDatabaseBuilder { addScript("data.sql"); return this; } - + /** * Build the embedded database. * @return the embedded database diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseConfigurer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseConfigurer.java index 210439042cb..7e1ea19597c 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseConfigurer.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseConfigurer.java @@ -26,7 +26,7 @@ import javax.sql.DataSource; * @since 3.0 */ public interface EmbeddedDatabaseConfigurer { - + /** * Configure the properties required to create and connect to the embedded database instance. * @param properties connection properties to configure @@ -40,5 +40,5 @@ public interface EmbeddedDatabaseConfigurer { * @param databaseName the name of the database being shutdown */ void shutdown(DataSource dataSource, String databaseName); - + } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseType.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseType.java index d70884c32f9..d8ad816c588 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseType.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseType.java @@ -26,10 +26,10 @@ package org.springframework.jdbc.datasource.embedded; public enum EmbeddedDatabaseType { /** The Hypersonic Embedded Java SQL Database (http://hsqldb.org) */ - HSQL, + HSQL, /** The H2 Embedded Java SQL Database Engine (http://h2database.com) */ - H2, + H2, /** The Apache Derby Embedded SQL Database (http://db.apache.org/derby) */ DERBY diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/SimpleDriverDataSourceFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/SimpleDriverDataSourceFactory.java index 4fdb38e8cdb..6debd6f014d 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/SimpleDriverDataSourceFactory.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/SimpleDriverDataSourceFactory.java @@ -32,21 +32,21 @@ import org.springframework.jdbc.datasource.SimpleDriverDataSource; final class SimpleDriverDataSourceFactory implements DataSourceFactory { private final SimpleDriverDataSource dataSource = new SimpleDriverDataSource(); - + public ConnectionProperties getConnectionProperties() { return new ConnectionProperties() { public void setDriverClass(Class driverClass) { dataSource.setDriverClass(driverClass); } - + public void setUrl(String url) { dataSource.setUrl(url); } - + public void setUsername(String username) { dataSource.setUsername(username); } - + public void setPassword(String password) { dataSource.setPassword(password); } @@ -56,5 +56,5 @@ final class SimpleDriverDataSourceFactory implements DataSourceFactory { public DataSource getDataSource() { return this.dataSource; } - + } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/DatabasePopulator.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/DatabasePopulator.java index 7f4102cb64c..a88cd6698be 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/DatabasePopulator.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/init/DatabasePopulator.java @@ -27,7 +27,7 @@ import java.sql.SQLException; * @see ResourceDatabasePopulator */ public interface DatabasePopulator { - + /** * Populate the database using the JDBC connection provided. * @param connection the JDBC connection to use to populate the db; already configured and ready to use diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookup.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookup.java index 49919dc26e5..144bf69aad3 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookup.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookup.java @@ -25,7 +25,7 @@ import org.springframework.util.Assert; /** * {@link DataSourceLookup} implementation based on a Spring {@link BeanFactory}. - * + * *

      Will lookup Spring managed beans identified by bean name, * expecting them to be of type javax.sql.DataSource. * @@ -53,7 +53,7 @@ public class BeanFactoryDataSourceLookup implements DataSourceLookup, BeanFactor * by a Spring IoC container, as the supplied {@link BeanFactory} will be * replaced by the {@link BeanFactory} that creates it (c.f. the * {@link BeanFactoryAware} contract). So only use this constructor if you - * are using this class outside the context of a Spring IoC container. + * are using this class outside the context of a Spring IoC container. * @param beanFactory the bean factory to be used to lookup {@link DataSource DataSources} */ public BeanFactoryDataSourceLookup(BeanFactory beanFactory) { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/JndiDataSourceLookup.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/JndiDataSourceLookup.java index 3d9de9d0b36..3e4ebc76ed8 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/JndiDataSourceLookup.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/JndiDataSourceLookup.java @@ -26,7 +26,7 @@ import org.springframework.jndi.JndiLocatorSupport; * *

      For specific JNDI configuration, it is recommended to configure * the "jndiEnvironment"/"jndiTemplate" properties. - * + * * @author Costin Leau * @author Juergen Hoeller * @since 2.0 diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookup.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookup.java index d09dacf8fe0..c8e2d06dc47 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookup.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/lookup/MapDataSourceLookup.java @@ -68,7 +68,7 @@ public class MapDataSourceLookup implements DataSourceLookup { * Set the {@link Map} of {@link DataSource DataSources}; the keys * are {@link String Strings}, the values are actual {@link DataSource} instances. *

      If the supplied {@link Map} is null, then this method - * call effectively has no effect. + * call effectively has no effect. * @param dataSources said {@link Map} of {@link DataSource DataSources} */ public void setDataSources(Map dataSources) { @@ -80,7 +80,7 @@ public class MapDataSourceLookup implements DataSourceLookup { /** * Get the {@link Map} of {@link DataSource DataSources} maintained by this object. *

      The returned {@link Map} is {@link Collections#unmodifiableMap(java.util.Map) unmodifiable}. - * @return said {@link Map} of {@link DataSource DataSources} (never null) + * @return said {@link Map} of {@link DataSource DataSources} (never null) */ public Map getDataSources() { return Collections.unmodifiableMap(this.dataSources); diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/BatchSqlUpdate.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/BatchSqlUpdate.java index 61e0d09fe10..3a757389d96 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/BatchSqlUpdate.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/BatchSqlUpdate.java @@ -180,7 +180,7 @@ public class BatchSqlUpdate extends SqlUpdate { if (this.parameterQueue.isEmpty()) { return new int[0]; } - + int[] rowsAffected = getJdbcTemplate().batchUpdate( getSql(), new BatchPreparedStatementSetter() { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/GenericSqlQuery.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/GenericSqlQuery.java index b2d09d28d25..c1527f45c3f 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/GenericSqlQuery.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/GenericSqlQuery.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,7 +32,7 @@ public class GenericSqlQuery extends SqlQuery { throws IllegalAccessException, InstantiationException { this.rowMapperClass = rowMapperClass; if (!RowMapper.class.isAssignableFrom(rowMapperClass)) - throw new IllegalStateException("The specified class '" + + throw new IllegalStateException("The specified class '" + rowMapperClass.getName() + " is not a sub class of " + "'org.springframework.jdbc.core.RowMapper'"); } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/GenericStoredProcedure.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/GenericStoredProcedure.java index 1944c6a31ea..13511bd2d48 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/GenericStoredProcedure.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/GenericStoredProcedure.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/RdbmsOperation.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/RdbmsOperation.java index 9884cd935d2..93a89ad13d1 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/RdbmsOperation.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/RdbmsOperation.java @@ -69,7 +69,7 @@ public abstract class RdbmsOperation implements InitializingBean { private boolean updatableResults = false; private boolean returnGeneratedKeys = false; - + private String[] generatedKeysColumnNames = null; private String sql; @@ -82,8 +82,8 @@ public abstract class RdbmsOperation implements InitializingBean { * but subclasses may also implement their own custom validation. */ private boolean compiled; - - + + /** * An alternative to the more commonly used setDataSource() when you want to * use the same JdbcTemplate in multiple RdbmsOperations. This is appropriate if the @@ -281,7 +281,7 @@ public abstract class RdbmsOperation implements InitializingBean { } /** - * Add one or more declared parameters. Used for configuring this operation + * Add one or more declared parameters. Used for configuring this operation * when used in a bean factory. Each parameter will specify SQL type and (optionally) * the parameter's name. * @param parameters Array containing the declared {@link SqlParameter} objects @@ -334,8 +334,8 @@ public abstract class RdbmsOperation implements InitializingBean { } catch (IllegalArgumentException ex) { throw new InvalidDataAccessApiUsageException(ex.getMessage()); - } - + } + compileInternal(); this.compiled = true; diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlFunction.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlFunction.java index 30965dbca1b..69e825a0cda 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlFunction.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlFunction.java @@ -24,8 +24,8 @@ import org.springframework.dao.TypeMismatchDataAccessException; import org.springframework.jdbc.core.SingleColumnRowMapper; /** - * SQL "function" wrapper for a query that returns a single row of results. - * The default behavior is to return an int, but that can be overridden by + * SQL "function" wrapper for a query that returns a single row of results. + * The default behavior is to return an int, but that can be overridden by * using the constructor with an extra return type parameter. * *

      Intended to use to call SQL functions that return a single result using a diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlOperation.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlOperation.java index df90e9de841..ecbe54490a2 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlOperation.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlOperation.java @@ -86,7 +86,7 @@ public abstract class SqlOperation extends RdbmsOperation { } } - + /** * Return a PreparedStatementSetter to perform an operation * with the given parameters. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlUpdate.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlUpdate.java index 27a108b043f..90007b646bf 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlUpdate.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlUpdate.java @@ -171,7 +171,7 @@ public class SqlUpdate extends SqlOperation { } /** - * Method to execute the update given arguments and + * Method to execute the update given arguments and * retrieve the generated keys using a KeyHolder. * @param params array of parameter objects * @param generatedKeyHolder KeyHolder that will hold the generated keys diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/StoredProcedure.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/StoredProcedure.java index c284edf3b3f..96e3e1490b7 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/StoredProcedure.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/StoredProcedure.java @@ -59,7 +59,7 @@ public abstract class StoredProcedure extends SqlCall { setDataSource(ds); setSql(name); } - + /** * Create a new object wrapper for a stored procedure. * @param jdbcTemplate JdbcTemplate which wraps DataSource @@ -147,9 +147,9 @@ public abstract class StoredProcedure extends SqlCall { /** * Execute the stored procedure. Subclasses should define a strongly typed * execute method (with a meaningful name) that invokes this method, passing in - * a ParameterMapper that will populate the input map. This allows mapping database + * a ParameterMapper that will populate the input map. This allows mapping database * specific features since the ParameterMapper has access to the Connection object. - * The execute method is also responsible for extracting typed values from the output map. + * The execute method is also responsible for extracting typed values from the output map. * Subclass execute methods will often take domain objects as arguments and return values. * Alternatively, they can return void. * @param inParamMapper map of input parameters, keyed by name as in parameter diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java index 8a4c1d77284..c7733b71305 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/UpdatableSqlQuery.java @@ -26,7 +26,7 @@ import org.springframework.jdbc.core.RowMapper; /** * Reusable RDBMS query in which concrete subclasses must implement - * the abstract updateRow(ResultSet, int, context) method to update each + * the abstract updateRow(ResultSet, int, context) method to update each * row of the JDBC ResultSet and optionally map contents into an object. * *

      Subclasses can be constructed providing SQL, parameter types @@ -65,15 +65,15 @@ public abstract class UpdatableSqlQuery extends SqlQuery { } /** - * Subclasses must implement this method to update each row of the + * Subclasses must implement this method to update each row of the * ResultSet and optionally create object of the result type. * @param rs ResultSet we're working through * @param rowNum row number (from 0) we're up to * @param context passed to the execute() method. * It can be null if no contextual information is need. If you - * need to pass in data for each row, you can pass in a HashMap with + * need to pass in data for each row, you can pass in a HashMap with * the primary key of the row being the key for the HashMap. That way - * it is easy to locate the updates for each row + * it is easy to locate the updates for each row * @return an object of the result type * @throws SQLException if there's an error updateing data. * Subclasses can simply not catch SQLExceptions, relying on the diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/object/package-info.java b/spring-jdbc/src/main/java/org/springframework/jdbc/object/package-info.java index a3805eeb752..f8ec12f7d91 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/object/package-info.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/object/package-info.java @@ -5,13 +5,13 @@ * and stored procedures as threadsafe, reusable objects. This approach * is modelled by JDO, although of course objects returned by queries * are "disconnected" from the database. - * + * *

      This higher level of JDBC abstraction depends on the lower-level * abstraction in the org.springframework.jdbc.core package. * Exceptions thrown are as in the org.springframework.dao package, * meaning that code using this package does not need to implement JDBC or * RDBMS-specific error handling. - * + * *

      This package and related packages are discussed in Chapter 9 of * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/package-info.java b/spring-jdbc/src/main/java/org/springframework/jdbc/package-info.java index 1d14b31fd9e..a58744a9fab 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/package-info.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/package-info.java @@ -14,7 +14,7 @@ * to target different RDBMSes without introducing proprietary * dependencies into application code. * - * + * *

      This package and related packages are discussed in Chapter 9 of * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseMetaDataCallback.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseMetaDataCallback.java index ebaf984a2d7..fa0d270d771 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseMetaDataCallback.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/DatabaseMetaDataCallback.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,7 +19,7 @@ package org.springframework.jdbc.support; import java.sql.DatabaseMetaData; import java.sql.SQLException; -/** +/** * A callback interface used by the JdbcUtils class. Implementations of this * interface perform the actual work of extracting database meta data, but * don't need to worry about exception handling. SQLExceptions will be caught @@ -29,8 +29,8 @@ import java.sql.SQLException; * @see JdbcUtils#extractDatabaseMetaData */ public interface DatabaseMetaDataCallback { - - /** + + /** * Implementations must implement this method to process the meta data * passed in. Exactly what the implementation chooses to do is up to it. * @param dbmd the DatabaseMetaData to process diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java index f07ba9ae193..c3ad8aefac2 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/JdbcUtils.java @@ -387,8 +387,8 @@ public abstract class JdbcUtils { name = "DB2"; } else if ("Sybase SQL Server".equals(source) || - "Adaptive Server Enterprise".equals(source) || - "ASE".equals(source) || + "Adaptive Server Enterprise".equals(source) || + "ASE".equals(source) || "sql server".equalsIgnoreCase(source) ) { name = "Sybase"; } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/KeyHolder.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/KeyHolder.java index 481623c4321..5be6970438b 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/KeyHolder.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/KeyHolder.java @@ -21,7 +21,7 @@ import java.util.Map; import org.springframework.dao.InvalidDataAccessApiUsageException; -/** +/** * Interface for retrieving keys, typically used for auto-generated keys * as potentially returned by JDBC insert statements. * @@ -41,8 +41,8 @@ import org.springframework.dao.InvalidDataAccessApiUsageException; * @see org.springframework.jdbc.object.SqlUpdate */ public interface KeyHolder { - - /** + + /** * Retrieve the first item from the first map, assuming that there is just * one item and just one map, and that the item is a number. * This is the typical case: a single, numeric generated key. @@ -54,9 +54,9 @@ public interface KeyHolder { * @return the generated key * @throws InvalidDataAccessApiUsageException if multiple keys are encountered. */ - Number getKey() throws InvalidDataAccessApiUsageException; + Number getKey() throws InvalidDataAccessApiUsageException; - /** + /** * Retrieve the first map of keys. If there are multiple entries in the list * (meaning that multiple rows had keys returned), then an * InvalidDataAccessApiUsageException is thrown. @@ -65,7 +65,7 @@ public interface KeyHolder { */ Map getKeys() throws InvalidDataAccessApiUsageException; - /** + /** * Return a reference to the List that contains the keys. * Can be used for extracting keys for multiple rows (an unusual case), * and also for adding new maps of keys. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodes.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodes.java index c82bbad5bf5..298343bf369 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodes.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodes.java @@ -174,7 +174,7 @@ public class SQLErrorCodes { public void setCannotSerializeTransactionCodes(String[] cannotSerializeTransactionCodes) { this.cannotSerializeTransactionCodes = StringUtils.sortStringArray(cannotSerializeTransactionCodes); } - + public String[] getCannotSerializeTransactionCodes() { return this.cannotSerializeTransactionCodes; } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodesFactory.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodesFactory.java index a127e829376..445ecf5b1a5 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodesFactory.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/SQLErrorCodesFactory.java @@ -130,10 +130,10 @@ public class SQLErrorCodesFactory { logger.warn("Error loading SQL error codes from config file", ex); errorCodes = Collections.emptyMap(); } - + this.errorCodesMap = errorCodes; } - + /** * Load the given resource from the class path. *

      Not to be overridden by application developers, who should obtain @@ -159,7 +159,7 @@ public class SQLErrorCodesFactory { */ public SQLErrorCodes getErrorCodes(String dbName) { Assert.notNull(dbName, "Database product name must not be null"); - + SQLErrorCodes sec = this.errorCodesMap.get(dbName); if (sec == null) { for (SQLErrorCodes candidate : this.errorCodesMap.values()) { diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SqlServerMaxValueIncrementer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SqlServerMaxValueIncrementer.java index 99d41cc0cd3..fea25531ca7 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SqlServerMaxValueIncrementer.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SqlServerMaxValueIncrementer.java @@ -26,7 +26,7 @@ import java.sql.SQLException; *

       create table tab (id int not null primary key, text varchar(100))
        * create table tab_sequence (id bigint identity)
        * insert into tab_sequence default values
      - * + * * If "cacheSize" is set, the intermediate values are served without querying the * database. If the server or your application is stopped or crashes or a transaction * is rolled back, the unused values will never be served. The maximum hole size in diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseAnywhereMaxValueIncrementer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseAnywhereMaxValueIncrementer.java index 679ff4a1cee..8b3a04a9995 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseAnywhereMaxValueIncrementer.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseAnywhereMaxValueIncrementer.java @@ -19,7 +19,7 @@ package org.springframework.jdbc.support.incrementer; import javax.sql.DataSource; /** - * {@link org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer} that increments + * {@link org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer} that increments * the maximum value of a given Sybase SQL Anywhere table * with the equivalent of an auto-increment column. Note: If you use this class, your table key * column should NOT be defined as an IDENTITY column, as the sequence table does the job. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseMaxValueIncrementer.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseMaxValueIncrementer.java index d8a30adfa5b..5ccc969a8f7 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseMaxValueIncrementer.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/SybaseMaxValueIncrementer.java @@ -28,7 +28,7 @@ import java.sql.ResultSet; import java.sql.SQLException; /** - * {@link org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer} that increments + * {@link org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer} that increments * the maximum value of a given Sybase SQL Server table * with the equivalent of an auto-increment column. Note: If you use this class, your table key * column should NOT be defined as an IDENTITY column, as the sequence table does the job. diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/package-info.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/package-info.java index 6ccd3254324..c6251e9b5b4 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/package-info.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/incrementer/package-info.java @@ -3,7 +3,7 @@ * * Provides a support framework for incrementing database table values * via sequences, with implementations for various databases. - * + * *

      Can be used independently, for example in custom JDBC access code. * */ diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/package-info.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/package-info.java index 08d63d6ec58..2991509bf7a 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/package-info.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/package-info.java @@ -3,7 +3,7 @@ * * Provides a stategy interface for Large OBject handling, * with implementations for various databases. - * + * *

      Can be used independently from jdbc.core and jdbc.object, * for example in custom JDBC access code. * diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/JBossNativeJdbcExtractor.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/JBossNativeJdbcExtractor.java index d5f24aaee1d..739b3fb1c40 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/JBossNativeJdbcExtractor.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/JBossNativeJdbcExtractor.java @@ -155,5 +155,5 @@ public class JBossNativeJdbcExtractor extends NativeJdbcExtractorAdapter { } return rs; } - + } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/package-info.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/package-info.java index e8fe8591b4b..1397cab074d 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/package-info.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/nativejdbc/package-info.java @@ -3,7 +3,7 @@ * * Provides a mechanism for extracting native implementations of JDBC * interfaces from wrapper objects that got returned from connection pools. - * + * *

      Can be used independently, for example in custom JDBC access code. * */ diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/package-info.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/package-info.java index 84132343285..13f9784fb59 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/package-info.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/package-info.java @@ -4,7 +4,7 @@ * Support classes for the JDBC framework, used by the classes in the * jdbc.core and jdbc.object packages. Provides a translator from * SQLExceptions Spring's generic DataAccessExceptions. - * + * *

      Can be used independently, for example in custom JDBC access code, * or in JDBC-based O/R mapping layers. * diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java index 23327ee7a2a..1256563e9dd 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSet.java @@ -71,7 +71,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { private final ResultSet resultSet; private final SqlRowSetMetaData rowSetMetaData; - + private final Map columnLabelMap; @@ -109,7 +109,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { catch (SQLException se) { throw new InvalidResultSetAccessException(se); } - + } @@ -128,7 +128,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { public final SqlRowSetMetaData getMetaData() { return this.rowSetMetaData; } - + /** * @see java.sql.ResultSet#findColumn(String) */ @@ -161,7 +161,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#getBigDecimal(String) */ @@ -187,7 +187,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { public boolean getBoolean(String columnLabel) throws InvalidResultSetAccessException { return getBoolean(findColumn(columnLabel)); } - + /** * @see java.sql.ResultSet#getByte(int) */ @@ -199,14 +199,14 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#getByte(String) */ public byte getByte(String columnLabel) throws InvalidResultSetAccessException { return getByte(findColumn(columnLabel)); } - + /** * @see java.sql.ResultSet#getDate(int, java.util.Calendar) */ @@ -218,7 +218,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#getDate(int) */ @@ -236,14 +236,14 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { public Date getDate(String columnLabel, Calendar cal) throws InvalidResultSetAccessException { return getDate(findColumn(columnLabel), cal); } - + /** * @see java.sql.ResultSet#getDate(String) */ public Date getDate(String columnLabel) throws InvalidResultSetAccessException { return getDate(findColumn(columnLabel)); } - + /** * @see java.sql.ResultSet#getDouble(int) */ @@ -255,14 +255,14 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#getDouble(String) */ public double getDouble(String columnLabel) throws InvalidResultSetAccessException { return getDouble(findColumn(columnLabel)); } - + /** * @see java.sql.ResultSet#getFloat(int) */ @@ -299,7 +299,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { public int getInt(String columnLabel) throws InvalidResultSetAccessException { return getInt(findColumn(columnLabel)); } - + /** * @see java.sql.ResultSet#getLong(int) */ @@ -311,14 +311,14 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#getLong(String) */ public long getLong(String columnLabel) throws InvalidResultSetAccessException { return getLong(findColumn(columnLabel)); } - + /** * @see java.sql.ResultSet#getObject(int, java.util.Map) */ @@ -330,7 +330,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#getObject(int) */ @@ -342,21 +342,21 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#getObject(String, java.util.Map) */ public Object getObject(String columnLabel, Map> map) throws InvalidResultSetAccessException { return getObject(findColumn(columnLabel), map); } - + /** * @see java.sql.ResultSet#getObject(String) */ public Object getObject(String columnLabel) throws InvalidResultSetAccessException { return getObject(findColumn(columnLabel)); } - + /** * @see java.sql.ResultSet#getShort(int) */ @@ -368,14 +368,14 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#getShort(String) */ public short getShort(String columnLabel) throws InvalidResultSetAccessException { return getShort(findColumn(columnLabel)); } - + /** * @see java.sql.ResultSet#getString(int) */ @@ -387,14 +387,14 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#getString(String) */ public String getString(String columnLabel) throws InvalidResultSetAccessException { return getString(findColumn(columnLabel)); } - + /** * @see java.sql.ResultSet#getTime(int, java.util.Calendar) */ @@ -406,7 +406,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#getTime(int) */ @@ -425,14 +425,14 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { public Time getTime(String columnLabel, Calendar cal) throws InvalidResultSetAccessException { return getTime(findColumn(columnLabel), cal); } - + /** * @see java.sql.ResultSet#getTime(String) */ public Time getTime(String columnLabel) throws InvalidResultSetAccessException { return getTime(findColumn(columnLabel)); } - + /** * @see java.sql.ResultSet#getTimestamp(int, java.util.Calendar) */ @@ -444,7 +444,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#getTimestamp(int) */ @@ -473,7 +473,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { // RowSet navigation methods - + /** * @see java.sql.ResultSet#absolute(int) */ @@ -497,7 +497,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#beforeFirst() */ @@ -509,7 +509,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#first() */ @@ -557,7 +557,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#isFirst() */ @@ -569,7 +569,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#isLast() */ @@ -581,7 +581,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#last() */ @@ -593,7 +593,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#next() */ @@ -605,7 +605,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#previous() */ @@ -617,7 +617,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#relative(int) */ @@ -629,7 +629,7 @@ public class ResultSetWrappingSqlRowSet implements SqlRowSet { throw new InvalidResultSetAccessException(se); } } - + /** * @see java.sql.ResultSet#wasNull() */ diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSetMetaData.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSetMetaData.java index 483ef36cc57..985a199af33 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSetMetaData.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/ResultSetWrappingSqlRowSetMetaData.java @@ -63,7 +63,7 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { throw new InvalidResultSetAccessException(se); } } - + public String getColumnClassName(int column) throws InvalidResultSetAccessException { try { return this.resultSetMetaData.getColumnClassName(column); @@ -199,5 +199,5 @@ public class ResultSetWrappingSqlRowSetMetaData implements SqlRowSetMetaData { throw new InvalidResultSetAccessException(se); } } - + } diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlResultProvider.java b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlResultProvider.java index 5b8db54ffe7..9142ecd0b81 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlResultProvider.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/support/xml/XmlResultProvider.java @@ -32,7 +32,7 @@ public interface XmlResultProvider { * Implementations must implement this method to provide the XML content * for the Result. Implementations will vary depending on * the Result implementation used. - * @param result the Result object being used to provide the XML input + * @param result the Result object being used to provide the XML input */ void provideXml(Result result); diff --git a/spring-jdbc/src/test/java/org/springframework/beans/INestedTestBean.java b/spring-jdbc/src/test/java/org/springframework/beans/INestedTestBean.java index 7d87547b5f7..c5c4ed5e679 100644 --- a/spring-jdbc/src/test/java/org/springframework/beans/INestedTestBean.java +++ b/spring-jdbc/src/test/java/org/springframework/beans/INestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-jdbc/src/test/java/org/springframework/beans/IOther.java b/spring-jdbc/src/test/java/org/springframework/beans/IOther.java index 797486ec44e..6a8f74187cb 100644 --- a/spring-jdbc/src/test/java/org/springframework/beans/IOther.java +++ b/spring-jdbc/src/test/java/org/springframework/beans/IOther.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-jdbc/src/test/java/org/springframework/beans/NestedTestBean.java b/spring-jdbc/src/test/java/org/springframework/beans/NestedTestBean.java index a06e15d150b..0eb8df5c8ae 100644 --- a/spring-jdbc/src/test/java/org/springframework/beans/NestedTestBean.java +++ b/spring-jdbc/src/test/java/org/springframework/beans/NestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/AbstractJdbcTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/AbstractJdbcTests.java index c8fecfdf969..ded9cd0bf71 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/AbstractJdbcTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/AbstractJdbcTests.java @@ -5,13 +5,13 @@ */ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -37,7 +37,7 @@ public abstract class AbstractJdbcTests extends TestCase { protected DataSource mockDataSource; protected MockControl ctrlConnection; protected Connection mockConnection; - + /** * Set to true if the user wants verification, indicated * by a call to replay(). We need to make this optional, diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/config/InitializeDatabaseIntegrationTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/config/InitializeDatabaseIntegrationTests.java index af62a7c6bf3..4d722fb2c81 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/config/InitializeDatabaseIntegrationTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/config/InitializeDatabaseIntegrationTests.java @@ -110,16 +110,16 @@ public class InitializeDatabaseIntegrationTests { JdbcTemplate t = new JdbcTemplate(dataSource); assertEquals(1, t.queryForInt("select count(*) from T_TEST")); } - + public static class CacheData implements InitializingBean { private JdbcTemplate jdbcTemplate; private List> cache; - + public void setDataSource(DataSource dataSource) { this.jdbcTemplate = new JdbcTemplate(dataSource); } - + public List> getCachedData() { return cache; } @@ -127,7 +127,7 @@ public class InitializeDatabaseIntegrationTests { public void afterPropertiesSet() throws Exception { cache = jdbcTemplate.queryForList("SELECT * FROM T_TEST"); } - + } } diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateQueryTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateQueryTests.java index 9851a23923c..de75c0d0f2e 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateQueryTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateQueryTests.java @@ -273,7 +273,7 @@ public class JdbcTemplateQueryTests extends AbstractJdbcTests { public void testQueryForObjectThrowsIncorrectResultSizeForMoreThanOneRow() throws Exception { String sql = "select pass from t_account where first_name='Alef'"; - + mockResultSetMetaData.getColumnCount(); ctrlResultSetMetaData.setReturnValue(1); diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateTests.java index bfe4c148240..636a2348592 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/JdbcTemplateTests.java @@ -51,7 +51,7 @@ import org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor; import org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractorAdapter; import org.springframework.util.LinkedCaseInsensitiveMap; -/** +/** * Mock object based tests for JdbcTemplate. * * @author Rod Johnson @@ -737,12 +737,12 @@ public class JdbcTemplateTests extends AbstractJdbcTests { try { template.batchUpdate(sql); fail("Shouldn't have executed batch statement with a select"); - } + } catch (DataAccessException ex) { // pass assertTrue("Check exception type", ex.getClass() == InvalidDataAccessApiUsageException.class); } - + ctrlStatement.verify(); ctrlDatabaseMetaData.verify(); } @@ -1189,7 +1189,7 @@ public class JdbcTemplateTests extends AbstractJdbcTests { BatchUpdateTestHelper.verifyBatchUpdateMocks(ctrlPreparedStatement, ctrlDatabaseMetaData); } - + public void testBatchUpdateWithCollectionOfObjects() throws Exception { final String sql = "UPDATE NOSUCHTABLE SET DATE_DISPATCHED = SYSDATE WHERE ID = ?"; final List ids = new ArrayList(); @@ -1275,12 +1275,12 @@ public class JdbcTemplateTests extends AbstractJdbcTests { RowCountCallbackHandler rcch = new RowCountCallbackHandler(); template.query("SELECT ID, FORENAME FROM CUSTMR WHERE ID < 3", rcch); fail("Shouldn't have executed query without a connection"); - } + } catch (CannotGetJdbcConnectionException ex) { // pass assertTrue("Check root cause", ex.getCause() == sex); } - + ctrlDataSource.verify(); } @@ -1348,7 +1348,7 @@ public class JdbcTemplateTests extends AbstractJdbcTests { //mockConnection.close(); //ctrlConnection.setVoidCallable(1); ctrlConnection.replay(); - + // Change behaviour in setUp() because we only expect one call to getConnection(): // none is necessary to get metadata for exception translator ctrlDataSource = MockControl.createControl(DataSource.class); @@ -1366,26 +1366,26 @@ public class JdbcTemplateTests extends AbstractJdbcTests { RowCountCallbackHandler rcch = new RowCountCallbackHandler(); template.query("SELECT ID, FORENAME FROM CUSTMR WHERE ID < 3", rcch); fail("Shouldn't have executed query without a connection"); - } + } catch (CannotGetJdbcConnectionException ex) { // pass assertTrue("Check root cause", ex.getCause() == sex); } - + ctrlDataSource.verify(); ctrlConnection.verify(); } - + public void testCouldntGetConnectionInOperationWithExceptionTranslatorInitializedViaBeanProperty() throws Exception { doTestCouldntGetConnectionInOperationWithExceptionTranslatorInitialized(true); } - + public void testCouldntGetConnectionInOperationWithExceptionTranslatorInitializedInAfterPropertiesSet() throws Exception { doTestCouldntGetConnectionInOperationWithExceptionTranslatorInitialized(false); } - + /** * If beanProperty is true, initialize via exception translator bean property; * if false, use afterPropertiesSet(). @@ -1402,7 +1402,7 @@ public class JdbcTemplateTests extends AbstractJdbcTests { //mockConnection.close(); //ctrlConnection.setVoidCallable(1); ctrlConnection.replay(); - + // Change behaviour in setUp() because we only expect one call to getConnection(): // none is necessary to get metadata for exception translator ctrlDataSource = MockControl.createControl(DataSource.class); @@ -1434,7 +1434,7 @@ public class JdbcTemplateTests extends AbstractJdbcTests { "SELECT ID, FORENAME FROM CUSTMR WHERE ID < 3", rcch); fail("Shouldn't have executed query without a connection"); - } + } catch (CannotGetJdbcConnectionException ex) { // pass assertTrue("Check root cause", ex.getCause() == sex); @@ -1778,7 +1778,7 @@ public class JdbcTemplateTests extends AbstractJdbcTests { mockConnection.createStatement(); ctrlConnection.setReturnValue(mockStatement); - + // Change behaviour in setUp() because we only expect one call to getConnection(): // none is necessary to get metadata for exception translator ctrlConnection = MockControl.createControl(Connection.class); @@ -1817,11 +1817,11 @@ public class JdbcTemplateTests extends AbstractJdbcTests { assertTrue( "Wanted same exception back, not " + ex, sex == ex.getCause()); - } + } ctrlResultSet.verify(); ctrlStatement.verify(); - + // We didn't call superclass replay() so we need to check these ourselves ctrlDataSource.verify(); ctrlConnection.verify(); @@ -2139,7 +2139,7 @@ public class JdbcTemplateTests extends AbstractJdbcTests { template.setResultsMapCaseInsensitive(true); assertTrue("now it should have been set to case insensitive", template.isResultsMapCaseInsensitive()); - + List params = new ArrayList(); params.add(new SqlOutParameter("a", 12)); diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterUtilsTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterUtilsTests.java index 48875c60f07..2360b808405 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterUtilsTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/NamedParameterUtilsTests.java @@ -227,7 +227,7 @@ public class NamedParameterUtilsTests { assertEquals(0, parsedSql.getParameterNames().size()); String finalSql = NamedParameterUtils.substituteNamedParameters(parsedSql, null); assertEquals(expectedSql, finalSql); - + String expectedSql2 = "select foo from bar where baz = 'b:{p1}z'"; String sql2 = "select foo from bar where baz = 'b:{p1}z'"; diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/SimpleJdbcInsertTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/SimpleJdbcInsertTests.java index 7d7b47918e1..b6ffa6f70f2 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/SimpleJdbcInsertTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/SimpleJdbcInsertTests.java @@ -82,7 +82,7 @@ public class SimpleJdbcInsertTests extends TestCase { ctrlResultSet.setReturnValue(false); mockResultSet.close(); ctrlResultSet.setVoidCallable(); - + mockDatabaseMetaData.getDatabaseProductName(); ctrlDatabaseMetaData.setReturnValue("MyDB"); mockDatabaseMetaData.supportsGetGeneratedKeys(); diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/TableMetaDataContextTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/TableMetaDataContextTests.java index a02a105c74e..d42a5810dd5 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/TableMetaDataContextTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/simple/TableMetaDataContextTests.java @@ -144,12 +144,12 @@ public class TableMetaDataContextTests extends TestCase { ctrlMetaDataResultSet.replay(); ctrlColumnsResultSet.replay(); replay(); - + MapSqlParameterSource map = new MapSqlParameterSource(); map.addValue("id", 1); map.addValue("name", "Sven"); map.addValue("customersince", new Date()); - map.addValue("version", 0); + map.addValue("version", 0); map.registerSqlType("customersince", Types.DATE); map.registerSqlType("version", Types.NUMERIC); diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcDaoSupportTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcDaoSupportTests.java index d9cb7118cc0..69d03b371d3 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcDaoSupportTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcDaoSupportTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/LobSupportTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/LobSupportTests.java index 08f3a84f18f..b63387c48c1 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/LobSupportTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/LobSupportTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,62 +34,62 @@ import org.springframework.jdbc.support.lob.LobHandler; * @author Alef Arendsen */ public class LobSupportTests extends TestCase { - + public void testCreatingPreparedStatementCallback() throws SQLException { // - return value should match // - lob creator should be closed // - set return value should be called // - execute update should be called - + MockControl lobHandlerControl = MockControl.createControl(LobHandler.class); - LobHandler handler = (LobHandler)lobHandlerControl.getMock(); - + LobHandler handler = (LobHandler)lobHandlerControl.getMock(); + MockControl lobCreatorControl = MockControl.createControl(LobCreator.class); LobCreator creator = (LobCreator)lobCreatorControl.getMock(); - + MockControl psControl = MockControl.createControl(PreparedStatement.class); PreparedStatement ps = (PreparedStatement)psControl.getMock(); - + handler.getLobCreator(); lobHandlerControl.setReturnValue(creator); ps.executeUpdate(); psControl.setReturnValue(3); creator.close(); - + lobHandlerControl.replay(); lobCreatorControl.replay(); psControl.replay(); - + class SetValuesCalled { boolean b = false; } - + final SetValuesCalled svc = new SetValuesCalled(); - - AbstractLobCreatingPreparedStatementCallback psc = + + AbstractLobCreatingPreparedStatementCallback psc = new AbstractLobCreatingPreparedStatementCallback(handler) { - + protected void setValues(PreparedStatement ps, LobCreator lobCreator) throws SQLException, DataAccessException { svc.b = true; } }; - + assertEquals(new Integer(3), psc.doInPreparedStatement(ps)); - + lobHandlerControl.verify(); lobCreatorControl.verify(); psControl.verify(); assertTrue(svc.b); } - + public void testAbstractLobStreamingResultSetExtractorNoRows() throws SQLException { MockControl rsetControl = MockControl.createControl(ResultSet.class); ResultSet rset = (ResultSet)rsetControl.getMock(); rset.next(); rsetControl.setReturnValue(false); rsetControl.replay(); - + AbstractLobStreamingResultSetExtractor lobRse = getResultSetExtractor(false); try { lobRse.extractData(rset); @@ -98,7 +98,7 @@ public class LobSupportTests extends TestCase { // expected } } - + public void testAbstractLobStreamingResultSetExtractorOneRow() throws SQLException { MockControl rsetControl = MockControl.createControl(ResultSet.class); ResultSet rset = (ResultSet)rsetControl.getMock(); @@ -109,7 +109,7 @@ public class LobSupportTests extends TestCase { rset.next(); rsetControl.setReturnValue(false); rsetControl.replay(); - + AbstractLobStreamingResultSetExtractor lobRse = getResultSetExtractor(false); lobRse.extractData(rset); rsetControl.verify(); @@ -125,7 +125,7 @@ public class LobSupportTests extends TestCase { rset.next(); rsetControl.setReturnValue(true); rsetControl.replay(); - + AbstractLobStreamingResultSetExtractor lobRse = getResultSetExtractor(false); try { lobRse.extractData(rset); @@ -135,14 +135,14 @@ public class LobSupportTests extends TestCase { } rsetControl.verify(); } - + public void testAbstractLobStreamingResultSetExtractorCorrectException() throws SQLException { MockControl rsetControl = MockControl.createControl(ResultSet.class); ResultSet rset = (ResultSet)rsetControl.getMock(); rset.next(); rsetControl.setReturnValue(true); rsetControl.replay(); - + AbstractLobStreamingResultSetExtractor lobRse = getResultSetExtractor(true); try { lobRse.extractData(rset); @@ -152,7 +152,7 @@ public class LobSupportTests extends TestCase { } rsetControl.verify(); } - + private AbstractLobStreamingResultSetExtractor getResultSetExtractor(final boolean ex) { AbstractLobStreamingResultSetExtractor lobRse = new AbstractLobStreamingResultSetExtractor() { protected void streamData(ResultSet rs) throws SQLException, IOException { diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/SqlLobValueTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/SqlLobValueTests.java index 29a4a51fbc1..f2345bbc730 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/SqlLobValueTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/SqlLobValueTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -33,7 +33,7 @@ import org.springframework.jdbc.support.lob.LobHandler; /** * Test cases for the sql lob value: * - * BLOB: + * BLOB: * 1. Types.BLOB: setBlobAsBytes (byte[]) * 2. String: setBlobAsBytes (byte[]) * 3. else: IllegalArgumentException @@ -43,44 +43,44 @@ import org.springframework.jdbc.support.lob.LobHandler; * 5. InputStream: setClobAsAsciiStream (InputStream) * 6. Reader: setClobAsCharacterStream (Reader) * 7. else: IllegalArgumentException - * + * * @author Alef Arendsen */ public class SqlLobValueTests extends TestCase { - + private MockControl psControl; private PreparedStatement ps; - + private MockControl lobHandlerControl; private LobHandler handler; - + private MockControl lobCreatorControl; private LobCreator creator; - + public void setUp() { // create preparedstatement psControl = MockControl.createControl(PreparedStatement.class); ps = (PreparedStatement) psControl.getMock(); - + // create handler controler lobHandlerControl = MockControl.createControl(LobHandler.class); handler = (LobHandler) lobHandlerControl.getMock(); - + // create creator control lobCreatorControl = MockControl.createControl(LobCreator.class); creator = (LobCreator) lobCreatorControl.getMock(); - + // set initial state handler.getLobCreator(); lobHandlerControl.setReturnValue(creator); } - + private void replay() { psControl.replay(); lobHandlerControl.replay(); lobCreatorControl.replay(); } - + public void test1() throws SQLException { byte[] testBytes = "Bla".getBytes(); creator.setBlobAsBytes(ps, 1, testBytes); @@ -88,40 +88,40 @@ public class SqlLobValueTests extends TestCase { SqlLobValue lob = new SqlLobValue(testBytes, handler); lob.setTypeValue(ps, 1, Types.BLOB, "test"); lobHandlerControl.verify(); - lobCreatorControl.verify(); + lobCreatorControl.verify(); } - + public void test2() throws SQLException { String testString = "Bla"; - + creator.setBlobAsBytes(ps, 1, testString.getBytes()); // set a matcher to match the byte array! - lobCreatorControl.setMatcher(new ArgumentsMatcher() { + lobCreatorControl.setMatcher(new ArgumentsMatcher() { public boolean matches(Object[] arg0, Object[] arg1) { byte[] one = (byte[]) arg0[2]; byte[] two = (byte[]) arg1[2]; return Arrays.equals(one, two); } - public String toString(Object[] arg0) { + public String toString(Object[] arg0) { return "bla"; } }); - + replay(); SqlLobValue lob = new SqlLobValue(testString, handler); lob.setTypeValue(ps, 1, Types.BLOB, "test"); lobHandlerControl.verify(); - lobCreatorControl.verify(); - + lobCreatorControl.verify(); + } - - public void test3() + + public void test3() throws SQLException { - + Date testContent = new Date(); - - SqlLobValue lob = + + SqlLobValue lob = new SqlLobValue(new InputStreamReader(new ByteArrayInputStream("Bla".getBytes())), 12); try { lob.setTypeValue(ps, 1, Types.BLOB, "test"); @@ -131,19 +131,19 @@ public class SqlLobValueTests extends TestCase { // expected } } - + public void test4() throws SQLException { String testContent = "Bla"; creator.setClobAsString(ps, 1, testContent); - + replay(); - + SqlLobValue lob = new SqlLobValue(testContent, handler); lob.setTypeValue(ps, 1, Types.CLOB, "test"); lobHandlerControl.verify(); - lobCreatorControl.verify(); + lobCreatorControl.verify(); } - + public void test5() throws SQLException { byte[] testContent = "Bla".getBytes(); ByteArrayInputStream bais = new ByteArrayInputStream(testContent); @@ -157,15 +157,15 @@ public class SqlLobValueTests extends TestCase { return null; } }); - + replay(); - + SqlLobValue lob = new SqlLobValue(new ByteArrayInputStream(testContent), 3, handler); lob.setTypeValue(ps, 1, Types.CLOB, "test"); lobHandlerControl.verify(); - lobCreatorControl.verify(); + lobCreatorControl.verify(); } - + public void test6()throws SQLException { byte[] testContent = "Bla".getBytes(); ByteArrayInputStream bais = new ByteArrayInputStream(testContent); @@ -180,19 +180,19 @@ public class SqlLobValueTests extends TestCase { return null; } }); - + replay(); - + SqlLobValue lob = new SqlLobValue(reader, 3, handler); lob.setTypeValue(ps, 1, Types.CLOB, "test"); lobHandlerControl.verify(); lobCreatorControl.verify(); - + } - + public void test7() throws SQLException { Date testContent = new Date(); - + SqlLobValue lob = new SqlLobValue("bla".getBytes()); try { lob.setTypeValue(ps, 1, Types.CLOB, "test"); @@ -202,13 +202,13 @@ public class SqlLobValueTests extends TestCase { // expected } } - + public void testOtherConstructors() throws SQLException { // a bit BS, but we need to test them, as long as they don't throw exceptions - + SqlLobValue lob = new SqlLobValue("bla"); lob.setTypeValue(ps, 1, Types.CLOB, "test"); - + try { lob = new SqlLobValue("bla".getBytes()); lob.setTypeValue(ps, 1, Types.CLOB, "test"); @@ -220,24 +220,24 @@ public class SqlLobValueTests extends TestCase { lob = new SqlLobValue(new ByteArrayInputStream("bla".getBytes()), 3); lob.setTypeValue(ps, 1, Types.CLOB, "test"); - + lob = new SqlLobValue(new InputStreamReader( new ByteArrayInputStream("bla".getBytes())), 3); lob.setTypeValue(ps, 1, Types.CLOB, "test"); - - // same for BLOB + + // same for BLOB lob = new SqlLobValue("bla"); lob.setTypeValue(ps, 1, Types.BLOB, "test"); - + lob = new SqlLobValue("bla".getBytes()); lob.setTypeValue(ps, 1, Types.BLOB, "test"); - + lob = new SqlLobValue(new ByteArrayInputStream("bla".getBytes()), 3); lob.setTypeValue(ps, 1, Types.BLOB, "test"); - + lob = new SqlLobValue(new InputStreamReader( new ByteArrayInputStream("bla".getBytes())), 3); - + try { lob.setTypeValue(ps, 1, Types.BLOB, "test"); fail("IllegalArgumentException should have been thrown"); @@ -246,19 +246,19 @@ public class SqlLobValueTests extends TestCase { // expected } } - + public void testCorrectCleanup() throws SQLException { creator.setClobAsString(ps, 1, "Bla"); creator.close(); - + replay(); SqlLobValue lob = new SqlLobValue("Bla", handler); lob.setTypeValue(ps, 1, Types.CLOB, "test"); lob.cleanup(); - + lobCreatorControl.verify(); } - + public void testOtherSqlType() throws SQLException { replay(); SqlLobValue lob = new SqlLobValue("Bla", handler); diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java index 89ecf0bc66e..cf3cf2cb452 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java @@ -48,11 +48,11 @@ import org.springframework.transaction.support.TransactionTemplate; * @since 04.07.2003 */ public class DataSourceTransactionManagerTests extends TestCase { - + public void testTransactionCommitWithAutoCommitTrue() throws Exception { doTestTransactionCommitRestoringAutoCommit(true, false, false); } - + public void testTransactionCommitWithAutoCommitFalse() throws Exception { doTestTransactionCommitRestoringAutoCommit(false, false, false); } @@ -159,11 +159,11 @@ public class DataSourceTransactionManagerTests extends TestCase { conControl.verify(); dsControl.verify(); } - + public void testTransactionRollbackWithAutoCommitTrue() throws Exception { doTestTransactionRollbackRestoringAutoCommit(true, false, false); } - + public void testTransactionRollbackWithAutoCommitFalse() throws Exception { doTestTransactionRollbackRestoringAutoCommit(false, false, false); } @@ -1509,7 +1509,7 @@ public class DataSourceTransactionManagerTests extends TestCase { // Must restore con.setAutoCommit(false); conControl.setVoidCallable(1); - + con.rollback(); conControl.setThrowable(new SQLException("Cannot rollback"), 1); con.setAutoCommit(true); diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryTests.java index f3e85fb790c..3a9f6b94ecb 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryTests.java @@ -8,9 +8,9 @@ import org.junit.Test; import org.springframework.jdbc.datasource.init.DatabasePopulator; public class EmbeddedDatabaseFactoryTests { - + private EmbeddedDatabaseFactory factory = new EmbeddedDatabaseFactory(); - + @Test public void testGetDataSource() { StubDatabasePopulator populator = new StubDatabasePopulator(); @@ -19,14 +19,14 @@ public class EmbeddedDatabaseFactoryTests { assertTrue(populator.populateCalled); db.shutdown(); } - + private static class StubDatabasePopulator implements DatabasePopulator { private boolean populateCalled; - + public void populate(Connection connection) { this.populateCalled = true; } - + } } diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookupTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookupTests.java index e6e8e10c077..20f66ddf3d0 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookupTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/BeanFactoryDataSourceLookupTests.java @@ -38,7 +38,7 @@ public class BeanFactoryDataSourceLookupTests { @Test public void testLookupSunnyDay() { BeanFactory beanFactory = createMock(BeanFactory.class); - + StubDataSource expectedDataSource = new StubDataSource(); expect(beanFactory.getBean(DATASOURCE_BEAN_NAME, DataSource.class)).andReturn(expectedDataSource); diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/StubDataSource.java b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/StubDataSource.java index 22904830666..a8521e70ba7 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/StubDataSource.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/lookup/StubDataSource.java @@ -23,9 +23,9 @@ import org.springframework.jdbc.datasource.AbstractDataSource; /** * Stub, do-nothing DataSource implementation. - * + * *

      All methods throw {@link UnsupportedOperationException}. - * + * * @author Rick Evans */ class StubDataSource extends AbstractDataSource { diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/object/CustomerMapper.java b/spring-jdbc/src/test/java/org/springframework/jdbc/object/CustomerMapper.java index 50455e803a8..a497dca34e5 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/object/CustomerMapper.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/object/CustomerMapper.java @@ -9,7 +9,7 @@ import java.sql.SQLException; public class CustomerMapper implements RowMapper { private static final String[] COLUMN_NAMES = new String[] {"id", "forename"}; - + public Customer mapRow(ResultSet rs, int rownum) throws SQLException { Customer cust = new Customer(); cust.setId(rs.getInt(COLUMN_NAMES[0])); diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/object/GenericSqlQueryTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/object/GenericSqlQueryTests.java index 785a0458f7a..4bf0f2eed40 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/object/GenericSqlQueryTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/object/GenericSqlQueryTests.java @@ -60,7 +60,7 @@ public class GenericSqlQueryTests extends AbstractJdbcTests { private BeanFactory bf; - + @Before public void setUp() throws Exception { super.setUp(); diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/object/RdbmsOperationTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/object/RdbmsOperationTests.java index e94bcc37293..8feb57fc975 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/object/RdbmsOperationTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/object/RdbmsOperationTests.java @@ -84,7 +84,7 @@ public class RdbmsOperationTests extends TestCase { operation.setTypes(new int[] { Types.INTEGER }); try { operation.validateParameters((Object[]) null); - fail("Shouldn't validate without enough parameters"); + fail("Shouldn't validate without enough parameters"); } catch (InvalidDataAccessApiUsageException idaauex) { // OK @@ -123,7 +123,7 @@ public class RdbmsOperationTests extends TestCase { operation.setSql("select * from mytable"); try { operation.validateParameters(new Object[] {new Integer(1), new Integer(2)}); - fail("Shouldn't validate with too many parameters"); + fail("Shouldn't validate with too many parameters"); } catch (InvalidDataAccessApiUsageException idaauex) { // OK diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/object/SqlQueryTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/object/SqlQueryTests.java index 877164d0d8d..1f548759eab 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/object/SqlQueryTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/object/SqlQueryTests.java @@ -969,7 +969,7 @@ public class SqlQueryTests extends AbstractJdbcTests { Assert.assertEquals("Second customer id was assigned correctly", ((Customer)cust.get(1)).getId(), 2); Assert.assertEquals("Second customer forename was assigned correctly", ((Customer)cust.get(1)).getForename(), "juergen"); } - + public void testNamedParameterQueryReusingParameter() throws SQLException { mockResultSet.next(); ctrlResultSet.setReturnValue(true); diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/object/SqlUpdateTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/object/SqlUpdateTests.java index 447a8aa9c22..867f1891ac4 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/object/SqlUpdateTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/object/SqlUpdateTests.java @@ -272,7 +272,7 @@ public class SqlUpdateTests extends AbstractJdbcTests { ctrlResultSet.setReturnValue(false); mockResultSet.close(); ctrlResultSet.setVoidCallable(); - + mockPreparedStatement.setString(1, "rod"); ctrlPreparedStatement.setVoidCallable(); mockPreparedStatement.executeUpdate(); diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/object/StoredProcedureTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/object/StoredProcedureTests.java index ddce92f5a37..13ceba3fed8 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/object/StoredProcedureTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/object/StoredProcedureTests.java @@ -213,13 +213,13 @@ public class StoredProcedureTests extends AbstractJdbcTests { } } - + /** * Confirm no connection was used to get metadata. * Does not use superclass replay mechanism. * @throws Exception */ - public void testStoredProcedureConfiguredViaJdbcTemplateWithCustomExceptionTranslator() throws Exception { + public void testStoredProcedureConfiguredViaJdbcTemplateWithCustomExceptionTranslator() throws Exception { mockCallable.setObject(1, new Integer(11), Types.INTEGER); ctrlCallable.setVoidCallable(1); mockCallable.registerOutParameter(2, Types.INTEGER); @@ -246,7 +246,7 @@ public class StoredProcedureTests extends AbstractJdbcTests { mockConnection.close(); ctrlConnection.setVoidCallable(1); ctrlConnection.replay(); - + MockControl dsControl = MockControl.createControl(DataSource.class); DataSource localDs = (DataSource) dsControl.getMock(); localDs.getConnection(); @@ -267,15 +267,15 @@ public class StoredProcedureTests extends AbstractJdbcTests { // DataSource here if we need to to create an ExceptionTranslator t.setExceptionTranslator(new SQLStateSQLExceptionTranslator()); StoredProcedureConfiguredViaJdbcTemplate sp = new StoredProcedureConfiguredViaJdbcTemplate(t); - + assertEquals(sp.execute(11), 5); assertEquals(1, t.calls); - + dsControl.verify(); ctrlCallable.verify(); ctrlConnection.verify(); } - + /** * Confirm our JdbcTemplate is used * @throws Exception @@ -301,11 +301,11 @@ public class StoredProcedureTests extends AbstractJdbcTests { mockConnection.prepareCall("{call " + StoredProcedureConfiguredViaJdbcTemplate.SQL + "(?, ?)}"); ctrlConnection.setReturnValue(mockCallable); - replay(); + replay(); JdbcTemplate t = new JdbcTemplate(); t.setDataSource(mockDataSource); StoredProcedureConfiguredViaJdbcTemplate sp = new StoredProcedureConfiguredViaJdbcTemplate(t); - + assertEquals(sp.execute(1106), 4); } @@ -429,7 +429,7 @@ public class StoredProcedureTests extends AbstractJdbcTests { ctrlResultSet.verify(); assertEquals(2, sproc.getCount()); } - + public void testStoredProcedureWithResultSetMapped() throws Exception { MockControl ctrlResultSet = MockControl.createControl(ResultSet.class); ResultSet mockResultSet = (ResultSet) ctrlResultSet.getMock(); @@ -473,11 +473,11 @@ public class StoredProcedureTests extends AbstractJdbcTests { Map res = sproc.execute(); ctrlResultSet.verify(); - + List rs = (List) res.get("rs"); assertEquals(2, rs.size()); assertEquals("Foo", rs.get(0)); - assertEquals("Bar", rs.get(1)); + assertEquals("Bar", rs.get(1)); } @@ -958,12 +958,12 @@ public class StoredProcedureTests extends AbstractJdbcTests { out = execute(new TestParameterMapper()); return out; } - + private static class TestParameterMapper implements ParameterMapper { - + private TestParameterMapper() { } - + public Map createMap(Connection conn) throws SQLException { Map inParms = new HashMap(); String testValue = conn.toString(); diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/support/CustomErrorCodeException.java b/spring-jdbc/src/test/java/org/springframework/jdbc/support/CustomErrorCodeException.java index 7a26db34718..a637cf1ba9a 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/support/CustomErrorCodeException.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/support/CustomErrorCodeException.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/support/DataFieldMaxValueIncrementerTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/support/DataFieldMaxValueIncrementerTests.java index 7c63fd5c5c0..bb022964a35 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/support/DataFieldMaxValueIncrementerTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/support/DataFieldMaxValueIncrementerTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/support/DefaultLobHandlerTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/support/DefaultLobHandlerTests.java index 933d8089a57..f4db4d3e66f 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/support/DefaultLobHandlerTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/support/DefaultLobHandlerTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/support/KeyHolderTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/support/KeyHolderTests.java index 058ce7c3048..565e7d1cce4 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/support/KeyHolderTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/support/KeyHolderTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,7 +34,7 @@ import junit.framework.TestCase; */ public class KeyHolderTests extends TestCase { private KeyHolder kh; - + public void setUp() { kh = new GeneratedKeyHolder(); } diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLErrorCodeSQLExceptionTranslatorTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLErrorCodeSQLExceptionTranslatorTests.java index b33aa870acc..8293d5c98d3 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLErrorCodeSQLExceptionTranslatorTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLErrorCodeSQLExceptionTranslatorTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -35,7 +35,7 @@ import org.springframework.jdbc.InvalidResultSetAccessException; * @author Rod Johnson */ public class SQLErrorCodeSQLExceptionTranslatorTests extends TestCase { - + private static SQLErrorCodes ERROR_CODES = new SQLErrorCodes(); static { ERROR_CODES.setBadSqlGrammarCodes(new String[] { "1", "2" }); @@ -116,19 +116,19 @@ public class SQLErrorCodeSQLExceptionTranslatorTests extends TestCase { } }; sext.setSqlErrorCodes(ERROR_CODES); - + // Shouldn't custom translate this assertEquals(customDex, sext.translate(TASK, SQL, badSqlEx)); DataIntegrityViolationException diex = (DataIntegrityViolationException) sext.translate(TASK, SQL, intVioEx); assertEquals(intVioEx, diex.getCause()); } - + public void testCustomExceptionTranslation() { final String TASK = "TASK"; final String SQL = "SQL SELECT *"; final SQLErrorCodes customErrorCodes = new SQLErrorCodes(); final CustomSQLErrorCodesTranslation customTranslation = new CustomSQLErrorCodesTranslation(); - + customErrorCodes.setBadSqlGrammarCodes(new String[] {"1", "2"}); customErrorCodes.setDataIntegrityViolationCodes(new String[] {"3", "4"}); customTranslation.setErrorCodes(new String[] {"1"}); @@ -137,7 +137,7 @@ public class SQLErrorCodeSQLExceptionTranslatorTests extends TestCase { SQLErrorCodeSQLExceptionTranslator sext = new SQLErrorCodeSQLExceptionTranslator(); sext.setSqlErrorCodes(customErrorCodes); - + // Should custom translate this SQLException badSqlEx = new SQLException("", "", 1); assertEquals(CustomErrorCodeException.class, sext.translate(TASK, SQL, badSqlEx).getClass()); diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLStateExceptionTranslatorTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLStateExceptionTranslatorTests.java index 35a66acbf34..681ef8ff16d 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLStateExceptionTranslatorTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/support/SQLStateExceptionTranslatorTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,12 +24,12 @@ import org.springframework.jdbc.BadSqlGrammarException; import org.springframework.jdbc.UncategorizedSQLException; /** - * + * * @author Rod Johnson * @since 13-Jan-03 */ public class SQLStateExceptionTranslatorTests extends TestCase { - + private SQLStateSQLExceptionTranslator trans = new SQLStateSQLExceptionTranslator(); // ALSO CHECK CHAIN of SQLExceptions!? @@ -39,7 +39,7 @@ public class SQLStateExceptionTranslatorTests extends TestCase { String sql = "SELECT FOO FROM BAR"; SQLException sex = new SQLException("Message", "42001", 1); try { - throw this.trans.translate("task", sql, sex); + throw this.trans.translate("task", sql, sex); } catch (BadSqlGrammarException ex) { // OK @@ -47,7 +47,7 @@ public class SQLStateExceptionTranslatorTests extends TestCase { assertTrue("Exception matches", sex.equals(ex.getSQLException())); } } - + public void testInvalidSqlStateCode() { String sql = "SELECT FOO FROM BAR"; SQLException sex = new SQLException("Message", "NO SUCH CODE", 1); @@ -60,26 +60,26 @@ public class SQLStateExceptionTranslatorTests extends TestCase { assertTrue("Exception matches", sex.equals(ex.getSQLException())); } } - + /** * PostgreSQL can return null * SAP DB can apparently return empty SQL code - * Bug 729170 + * Bug 729170 */ public void testMalformedSqlStateCodes() { String sql = "SELECT FOO FROM BAR"; SQLException sex = new SQLException("Message", null, 1); testMalformedSqlStateCode(sex); - + sex = new SQLException("Message", "", 1); testMalformedSqlStateCode(sex); - + // One char's not allowed sex = new SQLException("Message", "I", 1); testMalformedSqlStateCode(sex); } - - + + private void testMalformedSqlStateCode(SQLException sex) { String sql = "SELECT FOO FROM BAR"; try { diff --git a/spring-jms/src/main/java/org/springframework/jms/config/AbstractListenerContainerParser.java b/spring-jms/src/main/java/org/springframework/jms/config/AbstractListenerContainerParser.java index 7b470f949dd..ebd02595083 100644 --- a/spring-jms/src/main/java/org/springframework/jms/config/AbstractListenerContainerParser.java +++ b/spring-jms/src/main/java/org/springframework/jms/config/AbstractListenerContainerParser.java @@ -103,7 +103,7 @@ abstract class AbstractListenerContainerParser implements BeanDefinitionParser { } } } - + parserContext.popAndRegisterContainingComponent(); return null; } @@ -111,7 +111,7 @@ abstract class AbstractListenerContainerParser implements BeanDefinitionParser { private void parseListener(Element listenerEle, Element containerEle, ParserContext parserContext) { RootBeanDefinition listenerDef = new RootBeanDefinition(); listenerDef.setSource(parserContext.extractSource(listenerEle)); - + String ref = listenerEle.getAttribute(REF_ATTRIBUTE); if (!StringUtils.hasText(ref)) { parserContext.getReaderContext().error( @@ -164,11 +164,11 @@ abstract class AbstractListenerContainerParser implements BeanDefinitionParser { containerDef.getPropertyValues().add("messageListener", listenerDef); String containerBeanName = listenerEle.getAttribute(ID_ATTRIBUTE); - // If no bean id is given auto generate one using the ReaderContext's BeanNameGenerator + // If no bean id is given auto generate one using the ReaderContext's BeanNameGenerator if (!StringUtils.hasText(containerBeanName)) { containerBeanName = parserContext.getReaderContext().generateBeanName(containerDef); } - + // Register the listener and fire event parserContext.registerBeanComponent(new BeanComponentDefinition(containerDef, containerBeanName)); } diff --git a/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java b/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java index 1faf7d715e4..20df434ebf6 100644 --- a/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java +++ b/spring-jms/src/main/java/org/springframework/jms/config/JcaListenerContainerParser.java @@ -41,7 +41,7 @@ class JcaListenerContainerParser extends AbstractListenerContainerParser { RootBeanDefinition containerDef = new RootBeanDefinition(); containerDef.setSource(parserContext.extractSource(containerEle)); containerDef.setBeanClassName("org.springframework.jms.listener.endpoint.JmsMessageEndpointManager"); - + if (containerEle.hasAttribute(RESOURCE_ADAPTER_ATTRIBUTE)) { String resourceAdapterBeanName = containerEle.getAttribute(RESOURCE_ADAPTER_ATTRIBUTE); if (!StringUtils.hasText(resourceAdapterBeanName)) { @@ -73,7 +73,7 @@ class JcaListenerContainerParser extends AbstractListenerContainerParser { RootBeanDefinition configDef = new RootBeanDefinition(); configDef.setSource(parserContext.extractSource(configDef)); configDef.setBeanClassName("org.springframework.jms.listener.endpoint.JmsActivationSpecConfig"); - + parseListenerConfiguration(listenerEle, parserContext, configDef); parseContainerConfiguration(containerEle, parserContext, configDef); diff --git a/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java b/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java index e66a857155e..a65db63d9db 100644 --- a/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java +++ b/spring-jms/src/main/java/org/springframework/jms/config/JmsListenerContainerParser.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,7 +28,7 @@ import org.springframework.util.StringUtils; /** * Parser for the JMS <listener-container> element. - * + * * @author Mark Fisher * @author Juergen Hoeller * @since 2.5 @@ -53,7 +53,7 @@ class JmsListenerContainerParser extends AbstractListenerContainerParser { protected BeanDefinition parseContainer(Element listenerEle, Element containerEle, ParserContext parserContext) { RootBeanDefinition containerDef = new RootBeanDefinition(); containerDef.setSource(parserContext.extractSource(containerEle)); - + parseListenerConfiguration(listenerEle, parserContext, containerDef); parseContainerConfiguration(containerEle, parserContext, containerDef); diff --git a/spring-jms/src/main/java/org/springframework/jms/config/JmsNamespaceHandler.java b/spring-jms/src/main/java/org/springframework/jms/config/JmsNamespaceHandler.java index 28182738773..09949d55212 100644 --- a/spring-jms/src/main/java/org/springframework/jms/config/JmsNamespaceHandler.java +++ b/spring-jms/src/main/java/org/springframework/jms/config/JmsNamespaceHandler.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2007 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java b/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java index 6ea64fcb324..7d0871abb8c 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/JmsOperations.java @@ -24,7 +24,7 @@ import org.springframework.jms.JmsException; /** * Specifies a basic set of JMS operations. - * + * *

      Implemented by {@link JmsTemplate}. Not often used but a useful option * to enhance testability, as it can easily be mocked or stubbed. * diff --git a/spring-jms/src/main/java/org/springframework/jms/core/MessageCreator.java b/spring-jms/src/main/java/org/springframework/jms/core/MessageCreator.java index fec95b353bf..dfaeaceb9de 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/MessageCreator.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/MessageCreator.java @@ -22,7 +22,7 @@ import javax.jms.Session; /** * Creates a JMS message given a {@link Session}. - * + * *

      The Session typically is provided by an instance * of the {@link JmsTemplate} class. * @@ -40,7 +40,7 @@ public interface MessageCreator { /** * Create a {@link Message} to be sent. * @param session the JMS {@link Session} to be used to create the - * Message (never null) + * Message (never null) * @return the Message to be sent * @throws javax.jms.JMSException if thrown by JMS API methods */ diff --git a/spring-jms/src/main/java/org/springframework/jms/core/ProducerCallback.java b/spring-jms/src/main/java/org/springframework/jms/core/ProducerCallback.java index 037b8df4867..78b82b61e9e 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/ProducerCallback.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/ProducerCallback.java @@ -46,7 +46,7 @@ public interface ProducerCallback { * when specified in the JmsTemplate call. * @param session the JMS Session object to use * @param producer the JMS MessageProducer object to use - * @return a result object from working with the Session, if any (can be null) + * @return a result object from working with the Session, if any (can be null) * @throws javax.jms.JMSException if thrown by JMS API methods */ T doInJms(Session session, MessageProducer producer) throws JMSException; diff --git a/spring-jms/src/main/java/org/springframework/jms/core/SessionCallback.java b/spring-jms/src/main/java/org/springframework/jms/core/SessionCallback.java index cf6fe1545c2..0702989f7be 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/SessionCallback.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/SessionCallback.java @@ -22,7 +22,7 @@ import javax.jms.Session; /** * Callback for executing any number of operations on a provided * {@link Session}. - * + * *

      To be used with the {@link JmsTemplate#execute(SessionCallback)} * method, often implemented as an anonymous inner class. * @@ -36,7 +36,7 @@ public interface SessionCallback { * Execute any number of operations against the supplied JMS * {@link Session}, possibly returning a result. * @param session the JMS Session - * @return a result object from working with the Session, if any (so can be null) + * @return a result object from working with the Session, if any (so can be null) * @throws javax.jms.JMSException if thrown by JMS API methods */ T doInJms(Session session) throws JMSException; diff --git a/spring-jms/src/main/java/org/springframework/jms/core/support/JmsGatewaySupport.java b/spring-jms/src/main/java/org/springframework/jms/core/support/JmsGatewaySupport.java index c3abca4acee..bc426fc77ae 100644 --- a/spring-jms/src/main/java/org/springframework/jms/core/support/JmsGatewaySupport.java +++ b/spring-jms/src/main/java/org/springframework/jms/core/support/JmsGatewaySupport.java @@ -27,7 +27,7 @@ import org.springframework.jms.core.JmsTemplate; /** * Convenient super class for application classes that need JMS access. - * + * *

      Requires a ConnectionFactory or a JmsTemplate instance to be set. * It will create its own JmsTemplate if a ConnectionFactory is passed in. * A custom JmsTemplate instance can be created for a given ConnectionFactory @@ -44,7 +44,7 @@ public abstract class JmsGatewaySupport implements InitializingBean { /** Logger available to subclasses */ protected final Log logger = LogFactory.getLog(getClass()); - + private JmsTemplate jmsTemplate; @@ -58,7 +58,7 @@ public abstract class JmsGatewaySupport implements InitializingBean { public final void setConnectionFactory(ConnectionFactory connectionFactory) { this.jmsTemplate = createJmsTemplate(connectionFactory); } - + /** * Create a JmsTemplate for the given ConnectionFactory. * Only invoked if populating the gateway with a ConnectionFactory reference. @@ -72,14 +72,14 @@ public abstract class JmsGatewaySupport implements InitializingBean { protected JmsTemplate createJmsTemplate(ConnectionFactory connectionFactory) { return new JmsTemplate(connectionFactory); } - + /** * Return the JMS ConnectionFactory used by the gateway. */ public final ConnectionFactory getConnectionFactory() { return (this.jmsTemplate != null ? this.jmsTemplate.getConnectionFactory() : null); } - + /** * Set the JmsTemplate for the gateway. * @param jmsTemplate @@ -88,14 +88,14 @@ public abstract class JmsGatewaySupport implements InitializingBean { public final void setJmsTemplate(JmsTemplate jmsTemplate) { this.jmsTemplate = jmsTemplate; } - + /** * Return the JmsTemplate for the gateway. */ public final JmsTemplate getJmsTemplate() { return this.jmsTemplate; } - + public final void afterPropertiesSet() throws IllegalArgumentException, BeanInitializationException { if (this.jmsTemplate == null) { throw new IllegalArgumentException("'connectionFactory' or 'jmsTemplate' is required"); @@ -107,7 +107,7 @@ public abstract class JmsGatewaySupport implements InitializingBean { throw new BeanInitializationException("Initialization of JMS gateway failed: " + ex.getMessage(), ex); } } - + /** * Subclasses can override this for custom initialization behavior. * Gets called after population of this instance's bean properties. diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java b/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java index 5a6f3cbc3cc..b34168a18e2 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java @@ -87,7 +87,7 @@ import org.springframework.util.ClassUtils; * shrinking back to the standard number of consumers once the load decreases. * Consider adapting the {@link #setIdleTaskExecutionLimit "idleTaskExecutionLimit"} * setting to control the lifespan of each new task, to avoid frequent scaling up - * and down, in particular if the {@code ConnectionFactory} does not pool JMS + * and down, in particular if the {@code ConnectionFactory} does not pool JMS * {@code Sessions} and/or the {@code TaskExecutor} does not pool threads (check * your configuration!). Note that dynamic scaling only really makes sense for a * queue in the first place; for a topic, you will typically stick with the default @@ -421,7 +421,7 @@ public class DefaultMessageListenerContainer extends AbstractPollingMessageListe } /** - * Return the limit for the number of idle consumers. + * Return the limit for the number of idle consumers. */ public final int getIdleConsumerLimit() { synchronized (this.lifecycleMonitor) { diff --git a/spring-jms/src/main/java/org/springframework/jms/remoting/package-info.java b/spring-jms/src/main/java/org/springframework/jms/remoting/package-info.java index cfb780cd8bd..4c350973814 100644 --- a/spring-jms/src/main/java/org/springframework/jms/remoting/package-info.java +++ b/spring-jms/src/main/java/org/springframework/jms/remoting/package-info.java @@ -2,7 +2,7 @@ /** * * Remoting classes for transparent Java-to-Java remoting via a JMS provider. - * + * *

      Allows the target service to be load-balanced across a number of queue * receivers, and provides a level of indirection between the client and the * service: They only need to agree on a queue name and a service interface. diff --git a/spring-jms/src/main/java/org/springframework/jms/support/destination/DestinationResolver.java b/spring-jms/src/main/java/org/springframework/jms/support/destination/DestinationResolver.java index 7f5d5d6ca4b..e01c5129c3c 100644 --- a/spring-jms/src/main/java/org/springframework/jms/support/destination/DestinationResolver.java +++ b/spring-jms/src/main/java/org/springframework/jms/support/destination/DestinationResolver.java @@ -22,7 +22,7 @@ import javax.jms.Session; /** * Strategy interface for resolving JMS destinations. - * + * *

      Used by {@link org.springframework.jms.core.JmsTemplate} for resolving * destination names from simple {@link String Strings} to actual * {@link Destination} implementation instances. diff --git a/spring-jms/src/test/java/org/springframework/beans/INestedTestBean.java b/spring-jms/src/test/java/org/springframework/beans/INestedTestBean.java index 7d87547b5f7..c5c4ed5e679 100644 --- a/spring-jms/src/test/java/org/springframework/beans/INestedTestBean.java +++ b/spring-jms/src/test/java/org/springframework/beans/INestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-jms/src/test/java/org/springframework/beans/IOther.java b/spring-jms/src/test/java/org/springframework/beans/IOther.java index 797486ec44e..6a8f74187cb 100644 --- a/spring-jms/src/test/java/org/springframework/beans/IOther.java +++ b/spring-jms/src/test/java/org/springframework/beans/IOther.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-jms/src/test/java/org/springframework/beans/NestedTestBean.java b/spring-jms/src/test/java/org/springframework/beans/NestedTestBean.java index a06e15d150b..0eb8df5c8ae 100644 --- a/spring-jms/src/test/java/org/springframework/beans/NestedTestBean.java +++ b/spring-jms/src/test/java/org/springframework/beans/NestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-jms/src/test/java/org/springframework/jms/StubConnectionFactory.java b/spring-jms/src/test/java/org/springframework/jms/StubConnectionFactory.java index dced87b7168..3d7b35490ce 100644 --- a/spring-jms/src/test/java/org/springframework/jms/StubConnectionFactory.java +++ b/spring-jms/src/test/java/org/springframework/jms/StubConnectionFactory.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2007 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,7 +22,7 @@ import javax.jms.JMSException; /** * A stub implementation of the JMS ConnectionFactory for testing. - * + * * @author Mark Fisher */ public class StubConnectionFactory implements ConnectionFactory { diff --git a/spring-jms/src/test/java/org/springframework/jms/config/JmsNamespaceHandlerTests.java b/spring-jms/src/test/java/org/springframework/jms/config/JmsNamespaceHandlerTests.java index acd9e4f474f..4f51d133a07 100644 --- a/spring-jms/src/test/java/org/springframework/jms/config/JmsNamespaceHandlerTests.java +++ b/spring-jms/src/test/java/org/springframework/jms/config/JmsNamespaceHandlerTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2010 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -184,9 +184,9 @@ public class JmsNamespaceHandlerTests extends TestCase { assertTrue("Parser should have registered a component named 'listener1'", context.containsComponentDefinition("listener1")); assertTrue("Parser should have registered a component named 'listener2'", context.containsComponentDefinition("listener2")); assertTrue("Parser should have registered a component named 'listener3'", context.containsComponentDefinition("listener3")); - assertTrue("Parser should have registered a component named '" + DefaultMessageListenerContainer.class.getName() + "#0'", + assertTrue("Parser should have registered a component named '" + DefaultMessageListenerContainer.class.getName() + "#0'", context.containsComponentDefinition(DefaultMessageListenerContainer.class.getName() + "#0")); - assertTrue("Parser should have registered a component named '" + JmsMessageEndpointManager.class.getName() + "#0'", + assertTrue("Parser should have registered a component named '" + JmsMessageEndpointManager.class.getName() + "#0'", context.containsComponentDefinition(JmsMessageEndpointManager.class.getName() + "#0")); } @@ -215,14 +215,14 @@ public class JmsNamespaceHandlerTests extends TestCase { this.message = message; } } - + /** * Internal extension that registers a {@link ReaderEventListener} to store * registered {@link ComponentDefinition}s. */ private static class ToolingTestApplicationContext extends ClassPathXmlApplicationContext { - + private Set registeredComponents; public ToolingTestApplicationContext(String path, Class clazz) { @@ -234,7 +234,7 @@ public class JmsNamespaceHandlerTests extends TestCase { beanDefinitionReader.setEventListener(new StoringReaderEventListener(this.registeredComponents)); beanDefinitionReader.setSourceExtractor(new PassThroughSourceExtractor()); } - + public boolean containsComponentDefinition(String name) { for (ComponentDefinition cd : this.registeredComponents) { if (cd instanceof CompositeComponentDefinition) { @@ -253,21 +253,21 @@ public class JmsNamespaceHandlerTests extends TestCase { } return false; } - + public Iterator getRegisteredComponents() { return this.registeredComponents.iterator(); } } - + private static class StoringReaderEventListener extends EmptyReaderEventListener { - + protected final Set registeredComponents; - + public StoringReaderEventListener(Set registeredComponents) { this.registeredComponents = registeredComponents; } - + public void componentRegistered(ComponentDefinition componentDefinition) { this.registeredComponents.add(componentDefinition); } diff --git a/spring-jms/src/test/java/org/springframework/jms/core/support/JmsGatewaySupportTests.java b/spring-jms/src/test/java/org/springframework/jms/core/support/JmsGatewaySupportTests.java index 1007b4c1d70..dbc3663fa01 100644 --- a/spring-jms/src/test/java/org/springframework/jms/core/support/JmsGatewaySupportTests.java +++ b/spring-jms/src/test/java/org/springframework/jms/core/support/JmsGatewaySupportTests.java @@ -47,7 +47,7 @@ public class JmsGatewaySupportTests extends TestCase { assertEquals("Correct JmsTemplate", mockConnectionFactory, gateway.getJmsTemplate().getConnectionFactory()); assertEquals("initGatway called", test.size(), 1); connectionFactoryControl.verify(); - + } public void testJmsGatewaySupportWithJmsTemplate() throws Exception { JmsTemplate template = new JmsTemplate(); @@ -60,7 +60,7 @@ public class JmsGatewaySupportTests extends TestCase { gateway.setJmsTemplate(template); gateway.afterPropertiesSet(); assertEquals("Correct JmsTemplate", template, gateway.getJmsTemplate()); - assertEquals("initGateway called", test.size(), 1); + assertEquals("initGateway called", test.size(), 1); } } 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 78c21266462..0e51fae6936 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 @@ -28,7 +28,7 @@ public abstract class AbstractMessageListenerContainerTests { protected abstract AbstractMessageListenerContainer getContainer(); - + @Test(expected=IllegalArgumentException.class) public void testSettingMessageListenerToANullType() throws Exception { getContainer().setMessageListener(null); diff --git a/spring-jms/src/test/java/org/springframework/jms/listener/adapter/MessageListenerAdapter102Tests.java b/spring-jms/src/test/java/org/springframework/jms/listener/adapter/MessageListenerAdapter102Tests.java index 89bdeab9370..56c56a8e653 100644 --- a/spring-jms/src/test/java/org/springframework/jms/listener/adapter/MessageListenerAdapter102Tests.java +++ b/spring-jms/src/test/java/org/springframework/jms/listener/adapter/MessageListenerAdapter102Tests.java @@ -379,7 +379,7 @@ public final class MessageListenerAdapter102Tests { QueueSender queueSender = (QueueSender) mockQueueSender.getMock(); queueSender.send(responseTextMessage); mockQueueSender.setThrowable(new JMSException("Dow!")); - // ensure that regardless of a JMSException the producer is closed... + // ensure that regardless of a JMSException the producer is closed... queueSender.close(); mockQueueSender.setVoidCallable(); mockQueueSender.replay(); diff --git a/spring-jms/src/test/java/org/springframework/transaction/CallCountingTransactionManager.java b/spring-jms/src/test/java/org/springframework/transaction/CallCountingTransactionManager.java index d5c2531fbde..563d6107149 100644 --- a/spring-jms/src/test/java/org/springframework/transaction/CallCountingTransactionManager.java +++ b/spring-jms/src/test/java/org/springframework/transaction/CallCountingTransactionManager.java @@ -50,7 +50,7 @@ public class CallCountingTransactionManager extends AbstractPlatformTransactionM ++rollbacks; --inflight; } - + public void clear() { begun = commits = rollbacks = inflight = 0; } diff --git a/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/MockHttpServletResponse.java b/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/MockHttpServletResponse.java index 550e927a477..88f3dbab08e 100644 --- a/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/MockHttpServletResponse.java +++ b/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/MockHttpServletResponse.java @@ -51,7 +51,7 @@ public class MockHttpServletResponse implements HttpServletResponse { private static final String CHARSET_PREFIX = "charset="; private static final String CONTENT_TYPE_HEADER = "Content-Type"; - + private static final String CONTENT_LENGTH_HEADER = "Content-Length"; private static final String LOCATION_HEADER = "Location"; @@ -141,7 +141,7 @@ public class MockHttpServletResponse implements HttpServletResponse { this.charset = true; updateContentTypeHeader(); } - + private void updateContentTypeHeader() { if (this.contentType != null) { StringBuilder sb = new StringBuilder(this.contentType); @@ -457,7 +457,7 @@ public class MockHttpServletResponse implements HttpServletResponse { } doAddHeaderValue(name, value, false); } - + private boolean setSpecialHeader(String name, Object value) { if (CONTENT_TYPE_HEADER.equalsIgnoreCase(name)) { setContentType((String) value); diff --git a/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/MockHttpSession.java b/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/MockHttpSession.java index 3caa9213ee4..c5096572d02 100644 --- a/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/MockHttpSession.java +++ b/spring-orm-hibernate4/src/test/java/org/springframework/mock/web/MockHttpSession.java @@ -80,7 +80,7 @@ public class MockHttpSession implements HttpSession { /** * Create a new MockHttpSession. - * + * * @param servletContext the ServletContext that the session runs in */ public MockHttpSession(ServletContext servletContext) { @@ -89,7 +89,7 @@ public class MockHttpSession implements HttpSession { /** * Create a new MockHttpSession. - * + * * @param servletContext the ServletContext that the session runs in * @param id a unique identifier for this session */ @@ -222,7 +222,7 @@ public class MockHttpSession implements HttpSession { /** * Serialize the attributes of this session into an object that can be * turned into a byte array with standard Java serialization. - * + * * @return a representation of this session's serialized state */ public Serializable serializeState() { @@ -249,7 +249,7 @@ public class MockHttpSession implements HttpSession { /** * Deserialize the attributes of this session from a state object created by * {@link #serializeState()}. - * + * * @param state a representation of this session's serialized state */ @SuppressWarnings("unchecked") diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateOperations.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateOperations.java index 25353ae56a1..2bf551c381a 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateOperations.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateOperations.java @@ -239,7 +239,7 @@ public interface HibernateOperations { /** * Return all persistent instances of the given entity class. - * Note: Use queries or criteria for retrieving a specific subset. + * Note: Use queries or criteria for retrieving a specific subset. * @param entityClass a persistent class * @return a {@link List} containing 0 or more persistent instances * @throws org.springframework.dao.DataAccessException if there is a Hibernate error diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateQueryException.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateQueryException.java index 743600991b6..a1e72bcc3c8 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateQueryException.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateQueryException.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateSystemException.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateSystemException.java index 83fdb0f3d51..f8f0408b402 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateSystemException.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/HibernateSystemException.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/ClobStringType.java b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/ClobStringType.java index 12435ba890c..af8640ba8e4 100644 --- a/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/ClobStringType.java +++ b/spring-orm/src/main/java/org/springframework/orm/hibernate3/support/ClobStringType.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-orm/src/main/java/org/springframework/orm/ibatis/package-info.java b/spring-orm/src/main/java/org/springframework/orm/ibatis/package-info.java index c16fc59bab0..b76167a271c 100644 --- a/spring-orm/src/main/java/org/springframework/orm/ibatis/package-info.java +++ b/spring-orm/src/main/java/org/springframework/orm/ibatis/package-info.java @@ -4,7 +4,7 @@ * Package providing integration of * iBATIS Database Layer * with Spring concepts. - * + * *

      Contains resource helper classes and template classes for * data access with the iBATIS SqlMapClient API. * diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoSystemException.java b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoSystemException.java index 088b80a0b37..6d193d463fe 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoSystemException.java +++ b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoSystemException.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,5 +34,5 @@ public class JdoSystemException extends UncategorizedDataAccessException { public JdoSystemException(JDOException ex) { super(ex.getMessage(), ex); } - + } diff --git a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoUsageException.java b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoUsageException.java index b4c44419106..c7114178f61 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jdo/JdoUsageException.java +++ b/spring-orm/src/main/java/org/springframework/orm/jdo/JdoUsageException.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryInfo.java b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryInfo.java index a9d3fc26705..140d1fef0b3 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryInfo.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryInfo.java @@ -33,7 +33,7 @@ import javax.sql.DataSource; * @since 2.0 */ public interface EntityManagerFactoryInfo { - + /** * Return the raw underlying EntityManagerFactory. * @return the unadorned EntityManagerFactory (never null) @@ -59,7 +59,7 @@ public interface EntityManagerFactoryInfo { PersistenceUnitInfo getPersistenceUnitInfo(); /** - * Return the name of the persistence unit used to create this + * Return the name of the persistence unit used to create this * EntityManagerFactory, or null if it is an unnamed default. *

      If getPersistenceUnitInfo() returns non-null, the result of * getPersistenceUnitName() must be equal to the value returned by diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryUtils.java b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryUtils.java index 8ed9ed0718f..11b743aecfd 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryUtils.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/EntityManagerFactoryUtils.java @@ -317,11 +317,11 @@ public abstract class EntityManagerFactoryUtils { if (ex instanceof PersistenceException) { return new JpaSystemException((PersistenceException) ex); } - + // If we get here, we have an exception that resulted from user code, // rather than the persistence provider, so we return null to indicate // that translation should not occur. - return null; + return null; } /** diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaDialect.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaDialect.java index b3802f05591..0d0562dbd6f 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaDialect.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaDialect.java @@ -32,7 +32,7 @@ import org.springframework.transaction.TransactionException; * does not offer, such as access to the underlying JDBC Connection. This * strategy is mainly intended for standalone usage of a JPA provider; most * of its functionality is not relevant when running with JTA transactions. - * + * *

      Also allows for the provision of value-added methods for portable yet * more capable EntityManager and EntityManagerFactory subinterfaces offered * by Spring. diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaSystemException.java b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaSystemException.java index 710ab144c83..362374a6b5b 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/JpaSystemException.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/JpaSystemException.java @@ -34,5 +34,5 @@ public class JpaSystemException extends UncategorizedDataAccessException { public JpaSystemException(PersistenceException ex) { super(ex.getMessage(), ex); } - + } diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/ClassFileTransformerAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/ClassFileTransformerAdapter.java index 7402618f12d..2b1fb8687fc 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/ClassFileTransformerAdapter.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/persistenceunit/ClassFileTransformerAdapter.java @@ -36,7 +36,7 @@ import org.springframework.util.Assert; * @see javax.persistence.spi.PersistenceUnitInfo#addTransformer(javax.persistence.spi.ClassTransformer) */ class ClassFileTransformerAdapter implements ClassFileTransformer { - + private static final Log logger = LogFactory.getLog(ClassFileTransformerAdapter.class); private final ClassTransformer classTransformer; @@ -51,7 +51,7 @@ class ClassFileTransformerAdapter implements ClassFileTransformer { public byte[] transform( ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) { - + try { byte[] transformed = this.classTransformer.transform( loader, className, classBeingRedefined, protectionDomain, classfileBuffer); diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/Database.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/Database.java index 053acca358b..7b7c4643d95 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/Database.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/Database.java @@ -49,7 +49,7 @@ public enum Database { ORACLE, - POSTGRESQL, + POSTGRESQL, SQL_SERVER, diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java index fcc3afd86ec..e9858020078 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/EclipseLinkJpaVendorAdapter.java @@ -41,7 +41,7 @@ import org.springframework.orm.jpa.JpaDialect; * Thanks to Mike Keith for the original EclipseLink support prototype! * *

      NOTE: No need to filter out classes from the JPA providers package for - * EclipseLink (see SPR-6040) + * EclipseLink (see SPR-6040) * * @author Juergen Hoeller * @author Thomas Risberg diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaDialect.java b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaDialect.java index 89b9141b93a..bbaef3c3d0f 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaDialect.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/vendor/TopLinkJpaDialect.java @@ -54,7 +54,7 @@ import org.springframework.transaction.TransactionException; */ @Deprecated public class TopLinkJpaDialect extends DefaultJpaDialect { - + private boolean lazyDatabaseTransaction = false; diff --git a/spring-orm/src/test/java/org/springframework/beans/INestedTestBean.java b/spring-orm/src/test/java/org/springframework/beans/INestedTestBean.java index 7d87547b5f7..c5c4ed5e679 100644 --- a/spring-orm/src/test/java/org/springframework/beans/INestedTestBean.java +++ b/spring-orm/src/test/java/org/springframework/beans/INestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-orm/src/test/java/org/springframework/beans/IOther.java b/spring-orm/src/test/java/org/springframework/beans/IOther.java index 797486ec44e..6a8f74187cb 100644 --- a/spring-orm/src/test/java/org/springframework/beans/IOther.java +++ b/spring-orm/src/test/java/org/springframework/beans/IOther.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-orm/src/test/java/org/springframework/beans/NestedTestBean.java b/spring-orm/src/test/java/org/springframework/beans/NestedTestBean.java index a06e15d150b..0eb8df5c8ae 100644 --- a/spring-orm/src/test/java/org/springframework/beans/NestedTestBean.java +++ b/spring-orm/src/test/java/org/springframework/beans/NestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-orm/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java b/spring-orm/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java index 8b816b45d0d..f6c3f0a3761 100644 --- a/spring-orm/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java +++ b/spring-orm/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java @@ -52,7 +52,7 @@ import org.springframework.util.ClassUtils; * DataSource ds = new DriverManagerDataSource(...); * builder.bind("java:comp/env/jdbc/myds", ds); * builder.activate(); - * + * * Note that it's impossible to activate multiple builders within the same JVM, * due to JNDI restrictions. Thus to configure a fresh builder repeatedly, use * the following code to get a reference to either an already activated builder diff --git a/spring-orm/src/test/java/org/springframework/orm/hibernate3/HibernateTransactionManagerTests.java b/spring-orm/src/test/java/org/springframework/orm/hibernate3/HibernateTransactionManagerTests.java index 81a4bf6ea46..4e7e29d6d70 100644 --- a/spring-orm/src/test/java/org/springframework/orm/hibernate3/HibernateTransactionManagerTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/hibernate3/HibernateTransactionManagerTests.java @@ -1024,7 +1024,7 @@ public class HibernateTransactionManagerTests extends TestCase { beanFactory.getBean("entityInterceptor", Interceptor.class); beanFactoryControl.setReturnValue(entityInterceptor2, 1); beanFactoryControl.replay(); - + HibernateTransactionManager tm = new HibernateTransactionManager(sf); tm.setEntityInterceptorBeanName("entityInterceptor"); tm.setBeanFactory(beanFactory); diff --git a/spring-orm/src/test/java/org/springframework/orm/hibernate3/support/HibernateDaoSupportTests.java b/spring-orm/src/test/java/org/springframework/orm/hibernate3/support/HibernateDaoSupportTests.java index b6d0e0e1df8..b0d96c7d328 100644 --- a/spring-orm/src/test/java/org/springframework/orm/hibernate3/support/HibernateDaoSupportTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/hibernate3/support/HibernateDaoSupportTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-orm/src/test/java/org/springframework/orm/hibernate3/support/ScopedBeanInterceptorTests.java b/spring-orm/src/test/java/org/springframework/orm/hibernate3/support/ScopedBeanInterceptorTests.java index 4d74833ab97..c884a39fa4b 100644 --- a/spring-orm/src/test/java/org/springframework/orm/hibernate3/support/ScopedBeanInterceptorTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/hibernate3/support/ScopedBeanInterceptorTests.java @@ -32,7 +32,7 @@ public class ScopedBeanInterceptorTests extends TestCase { ScopedObject scoped = new ScopedObject() { public Object getTargetObject() { - return realObject; + return realObject; } public void removeFromScope() { // do nothing diff --git a/spring-orm/src/test/java/org/springframework/orm/jdo/JdoInterceptorTests.java b/spring-orm/src/test/java/org/springframework/orm/jdo/JdoInterceptorTests.java index 46093da105e..a07a672b09f 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jdo/JdoInterceptorTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jdo/JdoInterceptorTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-orm/src/test/java/org/springframework/orm/jdo/support/JdoDaoSupportTests.java b/spring-orm/src/test/java/org/springframework/orm/jdo/support/JdoDaoSupportTests.java index 89b3987b111..99a55063d45 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jdo/support/JdoDaoSupportTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jdo/support/JdoDaoSupportTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-orm/src/test/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewTests.java b/spring-orm/src/test/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewTests.java index cbfd34748a9..133e08311eb 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jdo/support/OpenPersistenceManagerInViewTests.java @@ -43,7 +43,7 @@ import org.springframework.web.context.support.StaticWebApplicationContext; * @since 15.06.2004 */ public class OpenPersistenceManagerInViewTests extends TestCase { - + public void testOpenPersistenceManagerInViewInterceptor() throws Exception { MockControl pmfControl = MockControl.createControl(PersistenceManagerFactory.class); PersistenceManagerFactory pmf = (PersistenceManagerFactory) pmfControl.getMock(); diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java index e53c4a1fada..32b43d0cb69 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java @@ -47,7 +47,7 @@ public abstract class AbstractContainerEntityManagerFactoryIntegrationTests @NotTransactional public void testEntityManagerFactoryImplementsEntityManagerFactoryInfo() { assertTrue(Proxy.isProxyClass(entityManagerFactory.getClass())); - assertTrue("Must have introduced config interface", + assertTrue("Must have introduced config interface", entityManagerFactory instanceof EntityManagerFactoryInfo); EntityManagerFactoryInfo emfi = (EntityManagerFactoryInfo) entityManagerFactory; //assertEquals("Person", emfi.getPersistenceUnitName()); @@ -79,7 +79,7 @@ public abstract class AbstractContainerEntityManagerFactoryIntegrationTests assertTrue(Proxy.isProxyClass(sharedEntityManager.getClass())); Query q = sharedEntityManager.createQuery("select p from Person as p"); List people = q.getResultList(); - + assertTrue("Should be open to start with", sharedEntityManager.isOpen()); sharedEntityManager.close(); assertTrue("Close should have been silently ignored", sharedEntityManager.isOpen()); @@ -96,8 +96,8 @@ public abstract class AbstractContainerEntityManagerFactoryIntegrationTests public void testGetReferenceWhenNoRow() { // Fails here with TopLink Person notThere = sharedEntityManager.getReference(Person.class, 666); - - // We may get here (as with Hibernate). + + // We may get here (as with Hibernate). // Either behaviour is valid: throw exception on first access // or on getReference itself. notThere.getFirstName(); @@ -112,15 +112,15 @@ public abstract class AbstractContainerEntityManagerFactoryIntegrationTests sharedEntityManager.persist(tony); setComplete(); endTransaction(); - + startNewTransaction(); sharedEntityManager.clear(); Person newTony = entityManagerFactory.createEntityManager().getReference(Person.class, tony.getId()); assertNotSame(newTony, tony); endTransaction(); - + assertNotNull(newTony.getDriversLicense()); - + newTony.getDriversLicense().getSerialNumber(); } finally { @@ -128,17 +128,17 @@ public abstract class AbstractContainerEntityManagerFactoryIntegrationTests //setComplete(); } } - + @SuppressWarnings("unchecked") public void testMultipleResults() { // Add with JDBC String firstName = "Tony"; insertPerson(firstName); - + assertTrue(Proxy.isProxyClass(sharedEntityManager.getClass())); Query q = sharedEntityManager.createQuery("select p from Person as p"); List people = q.getResultList(); - + assertEquals(1, people.size()); assertEquals(firstName, people.get(0).getFirstName()); } @@ -147,32 +147,32 @@ public abstract class AbstractContainerEntityManagerFactoryIntegrationTests String INSERT_PERSON = "INSERT INTO PERSON (ID, FIRST_NAME, LAST_NAME) VALUES (?, ?, ?)"; simpleJdbcTemplate.update(INSERT_PERSON, 1, firstName, "Blair"); } - + public void testEntityManagerProxyRejectsProgrammaticTxManagement() { try { sharedEntityManager.getTransaction(); fail("Should not be able to create transactions on container managed EntityManager"); } - catch (IllegalStateException ex) { + catch (IllegalStateException ex) { } } - + public void testSharedEntityManagerProxyRejectsProgrammaticTxJoining() { try { sharedEntityManager.joinTransaction(); fail("Should not be able to join transactions with container managed EntityManager"); } - catch (IllegalStateException ex) { + catch (IllegalStateException ex) { } } - + // public void testAspectJInjectionOfConfigurableEntity() { // Person p = new Person(); // System.err.println(p); // assertNotNull("Was injected", p.getTestBean()); // assertEquals("Ramnivas", p.getTestBean().getName()); // } - + public void testInstantiateAndSaveWithSharedEmProxy() { testInstantiateAndSave(sharedEntityManager); } @@ -183,7 +183,7 @@ public abstract class AbstractContainerEntityManagerFactoryIntegrationTests p.setFirstName("Tony"); p.setLastName("Blair"); em.persist(p); - + em.flush(); assertEquals("1 row must have been inserted", 1, countRowsInTable("person")); } diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBeanTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBeanTests.java index f4e65122676..52e7ac53d1c 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBeanTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBeanTests.java @@ -68,7 +68,7 @@ public abstract class AbstractEntityManagerFactoryBeanTests extends TestCase { protected static class DummyEntityManagerFactoryBean extends AbstractEntityManagerFactoryBean { private final EntityManagerFactory emf; - + public DummyEntityManagerFactoryBean(EntityManagerFactory emf) { this.emf = emf; } diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java index d2cf740ab36..fb5b06616e4 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/ApplicationManagedEntityManagerIntegrationTests.java @@ -37,7 +37,7 @@ import org.springframework.transaction.annotation.Transactional; * @since 2.0 */ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEntityManagerFactoryIntegrationTests { - + @NotTransactional public void testEntityManagerIsProxy() { assertTrue("EntityManagerFactory is proxied", Proxy.isProxyClass(entityManagerFactory.getClass())); @@ -49,25 +49,25 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt assertTrue(Proxy.isProxyClass(em.getClass())); Query q = em.createQuery("select p from Person as p"); List people = q.getResultList(); - + assertTrue("Should be open to start with", em.isOpen()); em.close(); assertFalse("Close should work on application managed EM", em.isOpen()); } - + public void testEntityManagerProxyAcceptsProgrammaticTxJoining() { EntityManager em = entityManagerFactory.createEntityManager(); em.joinTransaction(); } - + public void testInstantiateAndSave() { EntityManager em = entityManagerFactory.createEntityManager(); em.joinTransaction(); doInstantiateAndSave(em); } - + public void testCannotFlushWithoutGettingTransaction() { - EntityManager em = entityManagerFactory.createEntityManager(); + EntityManager em = entityManagerFactory.createEntityManager(); try { doInstantiateAndSave(em); fail("Should have thrown TransactionRequiredException"); @@ -75,7 +75,7 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt catch (TransactionRequiredException ex) { // expected } - + // TODO following lines are a workaround for Hibernate bug // If Hibernate throws an exception due to flush(), // it actually HAS flushed, meaning that the database @@ -83,15 +83,15 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt deleteAllPeopleUsingEntityManager(sharedEntityManager); setComplete(); } - + public void doInstantiateAndSave(EntityManager em) { testStateClean(); Person p = new Person(); - + p.setFirstName("Tony"); p.setLastName("Blair"); em.persist(p); - + em.flush(); assertEquals("1 row must have been inserted", 1, countRowsInTable("person")); } @@ -99,31 +99,31 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt public void testStateClean() { assertEquals("Should be no people from previous transactions", 0, countRowsInTable("person")); } - + public void testReuseInNewTransaction() { EntityManager em = entityManagerFactory.createEntityManager(); em.joinTransaction(); - + doInstantiateAndSave(em); endTransaction(); - + assertFalse(em.getTransaction().isActive()); - + startNewTransaction(); // Call any method: should cause automatic tx invocation assertFalse(em.contains(new Person())); - + assertFalse(em.getTransaction().isActive()); em.joinTransaction(); - + assertTrue(em.getTransaction().isActive()); - + doInstantiateAndSave(em); setComplete(); endTransaction(); // Should rollback assertEquals("Tx must have committed back", 1, countRowsInTable("person")); - + // Now clean up the database startNewTransaction(); em.joinTransaction(); @@ -132,7 +132,7 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt 0, countRowsInTable("person")); setComplete(); } - + public static void deleteAllPeopleUsingEntityManager(EntityManager em) { em.createQuery("delete from Person p").executeUpdate(); } @@ -145,19 +145,19 @@ public class ApplicationManagedEntityManagerIntegrationTests extends AbstractEnt assertEquals("Tx must have been rolled back", 0, countRowsInTable("person")); } - + public void testCommitOccurs() { EntityManager em = entityManagerFactory.createEntityManager(); em.joinTransaction(); doInstantiateAndSave(em); - + setComplete(); endTransaction(); // Should rollback assertEquals("Tx must have committed back", 1, countRowsInTable("person")); - + // Now clean up the database deleteFromTables(new String[] { "person" }); } - + } diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java index 22f22831e46..eeb89a614d6 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/ContainerManagedEntityManagerIntegrationTests.java @@ -33,17 +33,17 @@ import org.springframework.test.annotation.NotTransactional; /** * Integration tests using in-memory database for container-managed JPA - * + * * @author Rod Johnson * @since 2.0 */ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntityManagerFactoryIntegrationTests { - + @NotTransactional - public void testExceptionTranslationWithDialectFoundOnIntroducedEntityManagerInfo() throws Exception { + public void testExceptionTranslationWithDialectFoundOnIntroducedEntityManagerInfo() throws Exception { doTestExceptionTranslationWithDialectFound(((EntityManagerFactoryInfo) entityManagerFactory).getJpaDialect()); } - + @NotTransactional public void testExceptionTranslationWithDialectFoundOnEntityManagerFactoryBean() throws Exception { AbstractEntityManagerFactoryBean aefb = @@ -51,7 +51,7 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit assertNotNull("Dialect must have been set", aefb.getJpaDialect()); doTestExceptionTranslationWithDialectFound(aefb); } - + protected void doTestExceptionTranslationWithDialectFound(PersistenceExceptionTranslator pet) throws Exception { RuntimeException in1 = new RuntimeException("in1"); PersistenceException in2 = new PersistenceException(); @@ -60,14 +60,14 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit assertNotNull(dex); assertSame(in2, dex.getCause()); } - + public void testEntityManagerProxyIsProxy() { EntityManager em = createContainerManagedEntityManager(); assertTrue(Proxy.isProxyClass(em.getClass())); Query q = em.createQuery("select p from Person as p"); List people = q.getResultList(); assertTrue(people.isEmpty()); - + assertTrue("Should be open to start with", em.isOpen()); try { em.close(); @@ -78,7 +78,7 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit } assertTrue(em.isOpen()); } - + // This would be legal, at least if not actually _starting_ a tx @ExpectedException(IllegalStateException.class) public void testEntityManagerProxyRejectsProgrammaticTxManagement() { @@ -92,53 +92,53 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit public void testContainerEntityManagerProxyAllowsJoinTransactionInTransaction() { createContainerManagedEntityManager().joinTransaction(); } - + @NotTransactional @ExpectedException(TransactionRequiredException.class) public void testContainerEntityManagerProxyRejectsJoinTransactionWithoutTransaction() { createContainerManagedEntityManager().joinTransaction(); } - + public void testInstantiateAndSave() { EntityManager em = createContainerManagedEntityManager(); doInstantiateAndSave(em); } - + public void doInstantiateAndSave(EntityManager em) { assertEquals("Should be no people from previous transactions", 0, countRowsInTable("person")); Person p = new Person(); - + p.setFirstName("Tony"); p.setLastName("Blair"); em.persist(p); - + em.flush(); assertEquals("1 row must have been inserted", 1, countRowsInTable("person")); } - + public void testReuseInNewTransaction() { EntityManager em = createContainerManagedEntityManager(); doInstantiateAndSave(em); endTransaction(); - + //assertFalse(em.getTransaction().isActive()); - + startNewTransaction(); // Call any method: should cause automatic tx invocation assertFalse(em.contains(new Person())); //assertTrue(em.getTransaction().isActive()); - + doInstantiateAndSave(em); setComplete(); endTransaction(); // Should rollback assertEquals("Tx must have committed back", 1, countRowsInTable("person")); - + // Now clean up the database deleteFromTables(new String[] { "person" }); } - + public void testRollbackOccurs() { EntityManager em = createContainerManagedEntityManager(); doInstantiateAndSave(em); @@ -146,7 +146,7 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit assertEquals("Tx must have been rolled back", 0, countRowsInTable("person")); } - + public void testCommitOccurs() { EntityManager em = createContainerManagedEntityManager(); doInstantiateAndSave(em); @@ -154,7 +154,7 @@ public class ContainerManagedEntityManagerIntegrationTests extends AbstractEntit endTransaction(); // Should rollback assertEquals("Tx must have committed back", 1, countRowsInTable("person")); - + // Now clean up the database deleteFromTables(new String[] { "person" }); } diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/DefaultJpaDialectTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/DefaultJpaDialectTests.java index 5135a401fdb..8bea2144035 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/DefaultJpaDialectTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/DefaultJpaDialectTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2006 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,9 +28,9 @@ import org.springframework.transaction.TransactionException; import org.springframework.transaction.support.DefaultTransactionDefinition; /** - * + * * @author Costin Leau - * + * */ public class DefaultJpaDialectTests extends TestCase { JpaDialect dialect; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/EntityManagerFactoryBeanSupportTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/EntityManagerFactoryBeanSupportTests.java index 9ad43e6e7f8..e88c59dc31a 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/EntityManagerFactoryBeanSupportTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/EntityManagerFactoryBeanSupportTests.java @@ -20,7 +20,7 @@ package org.springframework.orm.jpa; * @author Rod Johnson */ public class EntityManagerFactoryBeanSupportTests extends AbstractEntityManagerFactoryBeanTests { - + @Override protected void setUp() throws Exception { super.setUp(); @@ -28,17 +28,17 @@ public class EntityManagerFactoryBeanSupportTests extends AbstractEntityManagerF emfMc.setVoidCallable(); emfMc.replay(); } - + public void testHookIsCalled() throws Exception { DummyEntityManagerFactoryBean demf = new DummyEntityManagerFactoryBean(mockEmf); - + demf.afterPropertiesSet(); - + checkInvariants(demf); - + // Should trigger close method expected by EntityManagerFactory mock demf.destroy(); - + emfMc.verify(); } diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/EntityManagerFactoryUtilsTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/EntityManagerFactoryUtilsTests.java index e3b323ab35d..91978604146 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/EntityManagerFactoryUtilsTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/EntityManagerFactoryUtilsTests.java @@ -82,7 +82,7 @@ public class EntityManagerFactoryUtilsTests extends TestCase { // no tx active assertSame(manager, EntityManagerFactoryUtils.doGetTransactionalEntityManager(factory, null)); assertSame(manager, ((EntityManagerHolder)TransactionSynchronizationManager.unbindResource(factory)).getEntityManager()); - + mockControl.verify(); } finally { @@ -91,21 +91,21 @@ public class EntityManagerFactoryUtilsTests extends TestCase { assertTrue(TransactionSynchronizationManager.getResourceMap().isEmpty()); } - + public void testTranslatesIllegalStateException() { IllegalStateException ise = new IllegalStateException(); DataAccessException dex = EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(ise); assertSame(ise, dex.getCause()); assertTrue(dex instanceof InvalidDataAccessApiUsageException); } - + public void testTranslatesIllegalArgumentException() { IllegalArgumentException iae = new IllegalArgumentException(); DataAccessException dex = EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(iae); assertSame(iae, dex.getCause()); assertTrue(dex instanceof InvalidDataAccessApiUsageException); } - + /** * We do not convert unknown exceptions. They may result from user code. */ diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/JpaInterceptorTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/JpaInterceptorTests.java index b70e89752ff..a94be01f20a 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/JpaInterceptorTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/JpaInterceptorTests.java @@ -108,7 +108,7 @@ public class JpaInterceptorTests extends TestCase { public void testInterceptorWithThreadBound() { factoryControl.replay(); managerControl.replay(); - + TransactionSynchronizationManager.bindResource(factory, new EntityManagerHolder(entityManager)); JpaInterceptor interceptor = new JpaInterceptor(); interceptor.setEntityManagerFactory(factory); @@ -179,12 +179,12 @@ public class JpaInterceptorTests extends TestCase { public void testInterceptorWithFlushFailure() throws Throwable { factoryControl.expectAndReturn(factory.createEntityManager(), entityManager); entityManager.flush(); - + PersistenceException exception = new PersistenceException(); managerControl.setThrowable(exception, 1); managerControl.expectAndReturn(entityManager.isOpen(), true); entityManager.close(); - + factoryControl.replay(); managerControl.replay(); @@ -203,16 +203,16 @@ public class JpaInterceptorTests extends TestCase { factoryControl.verify(); managerControl.verify(); } - + public void testInterceptorWithFlushFailureWithoutConversion() throws Throwable { factoryControl.expectAndReturn(factory.createEntityManager(), entityManager); entityManager.flush(); - + PersistenceException exception = new PersistenceException(); managerControl.setThrowable(exception, 1); managerControl.expectAndReturn(entityManager.isOpen(), true); entityManager.close(); - + factoryControl.replay(); managerControl.replay(); diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/LocalEntityManagerFactoryBeanTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/LocalEntityManagerFactoryBeanTests.java index b2d3557e9b8..ad68b90a6f9 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/LocalEntityManagerFactoryBeanTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/LocalEntityManagerFactoryBeanTests.java @@ -27,7 +27,7 @@ import javax.persistence.spi.PersistenceUnitInfo; * @author Rod Johnson */ public class LocalEntityManagerFactoryBeanTests extends AbstractEntityManagerFactoryBeanTests { - + // Static fields set by inner class DummyPersistenceProvider private static String actualName; @@ -42,48 +42,48 @@ public class LocalEntityManagerFactoryBeanTests extends AbstractEntityManagerFac emfMc.setVoidCallable(); emfMc.replay(); } - + public void testValidUsageWithDefaultProperties() throws Exception { testValidUsage(null); } - + public void testValidUsageWithExplicitProperties() throws Exception { testValidUsage(new Properties()); } - + protected void testValidUsage(Properties props) throws Exception { // This will be set by DummyPersistenceProvider actualName = null; actualProps = null; - + LocalEntityManagerFactoryBean lemfb = new LocalEntityManagerFactoryBean(); String entityManagerName = "call me Bob"; - + lemfb.setPersistenceUnitName(entityManagerName); lemfb.setPersistenceProviderClass(DummyPersistenceProvider.class); if (props != null) { lemfb.setJpaProperties(props); } lemfb.afterPropertiesSet(); - + assertSame(entityManagerName, actualName); if (props != null) { assertEquals(props, actualProps); } checkInvariants(lemfb); - + lemfb.destroy(); - + emfMc.verify(); } - - + + protected static class DummyPersistenceProvider implements PersistenceProvider { - + public EntityManagerFactory createContainerEntityManagerFactory(PersistenceUnitInfo pui, Map map) { throw new UnsupportedOperationException(); } - + public EntityManagerFactory createEntityManagerFactory(String emfName, Map properties) { actualName = emfName; actualProps = properties; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/domain/DriversLicense.java b/spring-orm/src/test/java/org/springframework/orm/jpa/domain/DriversLicense.java index c0b90036547..da0ad4e1388 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/domain/DriversLicense.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/domain/DriversLicense.java @@ -23,16 +23,16 @@ import javax.persistence.Table; @Entity @Table(name="DRIVERS_LICENSE") public class DriversLicense { - + @Id private int id; - + private String serial_number; - + protected DriversLicense() { } - + public DriversLicense(String serialNumber) { this.serial_number = serialNumber; } diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java b/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java index 69c51ca869f..5e5e7f917f4 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java @@ -39,7 +39,7 @@ import org.springframework.beans.factory.annotation.Configurable; @Configurable public class Person { - @Id + @Id @GeneratedValue(strategy=GenerationType.AUTO) private Integer id; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/hibernate/HibernateEntityManagerFactoryIntegrationTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/hibernate/HibernateEntityManagerFactoryIntegrationTests.java index 40e7af04319..e7a439080a1 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/hibernate/HibernateEntityManagerFactoryIntegrationTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/hibernate/HibernateEntityManagerFactoryIntegrationTests.java @@ -29,7 +29,7 @@ import org.springframework.test.annotation.IfProfileValue; /** * Hibernate-specific JPA tests. - * + * * @author Juergen Hoeller * @author Rod Johnson */ diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/openjpa/OpenJpaEntityManagerFactoryWithAspectJWeavingIntegrationTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/openjpa/OpenJpaEntityManagerFactoryWithAspectJWeavingIntegrationTests.java index 44dc72070a3..3b1f71ba3c9 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/openjpa/OpenJpaEntityManagerFactoryWithAspectJWeavingIntegrationTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/openjpa/OpenJpaEntityManagerFactoryWithAspectJWeavingIntegrationTests.java @@ -19,7 +19,7 @@ package org.springframework.orm.jpa.openjpa; import org.junit.Ignore; /** - * Test that AspectJ weaving (in particular the currently shipped aspects) work with JPA (see SPR-3873 for more details). + * Test that AspectJ weaving (in particular the currently shipped aspects) work with JPA (see SPR-3873 for more details). * * @author Ramnivas Laddad */ @@ -34,7 +34,7 @@ public class OpenJpaEntityManagerFactoryWithAspectJWeavingIntegrationTests exten protected String[] getConfigLocations() { return new String[] { - "/org/springframework/orm/jpa/openjpa/openjpa-manager-aspectj-weaving.xml", + "/org/springframework/orm/jpa/openjpa/openjpa-manager-aspectj-weaving.xml", "/org/springframework/orm/jpa/memdb.xml", "/org/springframework/orm/jpa/inject.xml"}; } diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceXmlParsingTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceXmlParsingTests.java index 559a9c98a58..a09e090765a 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceXmlParsingTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceXmlParsingTests.java @@ -40,7 +40,7 @@ import static org.junit.Assert.*; /** * Unit and integration tests for the JPA XML resource parsing support. - * + * * @author Costin Leau * @author Juergen Hoeller */ @@ -275,7 +275,7 @@ public class PersistenceXmlParsingTests { url = reader.determinePersistenceUnitRootUrl(new ClassPathResource("/org/springframework/orm/jpa/META-INF/persistence.xml")); assertTrue("the containing folder should have been returned", url.toString().endsWith("/org/springframework/orm/jpa")); } - + @Test public void testPersistenceUnitRootUrlWithJar() throws Exception { PersistenceUnitReader reader = new PersistenceUnitReader( diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/support/JpaDaoSupportTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/support/JpaDaoSupportTests.java index e5513a0cf5d..ec65890b884 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/support/JpaDaoSupportTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/support/JpaDaoSupportTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2006 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,7 +28,7 @@ import org.springframework.orm.jpa.JpaTemplate; /** * @author Costin Leau - * + * */ public class JpaDaoSupportTests extends TestCase { diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/toplink/TopLinkEntityManagerFactoryIntegrationTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/toplink/TopLinkEntityManagerFactoryIntegrationTests.java index ef97dec7a98..d69241996e2 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/toplink/TopLinkEntityManagerFactoryIntegrationTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/toplink/TopLinkEntityManagerFactoryIntegrationTests.java @@ -21,7 +21,7 @@ import org.springframework.orm.jpa.EntityManagerFactoryInfo; /** * TopLink-specific JPA tests. - * + * * @author Costin Leau * @author Rod Johnson * @author Juergen Hoeller diff --git a/spring-orm/src/test/java/org/springframework/test/jpa/AbstractJpaTests.java b/spring-orm/src/test/java/org/springframework/test/jpa/AbstractJpaTests.java index 99ffd1dcfd4..9a52d6b5bad 100644 --- a/spring-orm/src/test/java/org/springframework/test/jpa/AbstractJpaTests.java +++ b/spring-orm/src/test/java/org/springframework/test/jpa/AbstractJpaTests.java @@ -59,8 +59,8 @@ import org.springframework.util.StringUtils; * JpaTransactionManager through the superclass. * *

      When using Xerces, make sure a post 2.0.2 version is available on the classpath - * to avoid a critical - * bug + * to avoid a critical + * bug * that leads to StackOverflow. Maven users are likely to encounter this problem since * 2.0.2 is used by default. * @@ -83,7 +83,7 @@ import org.springframework.util.StringUtils; public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactionalTests { private static final String DEFAULT_ORM_XML_LOCATION = "META-INF/orm.xml"; - + /** * Map from String defining unique combination of config locations, to ApplicationContext. * Values are intentionally not strongly typed, to avoid potential class cast exceptions @@ -139,15 +139,15 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio @Override public void setDirty() { - super.setDirty(); + super.setDirty(); contextCache.remove(cacheKeys()); classLoaderCache.remove(cacheKeys()); - + // If we are a shadow loader, we need to invoke - // the shadow parent to set it dirty, as + // the shadow parent to set it dirty, as // it is the shadow parent that maintains the cache state, // not the child - if (this.shadowParent != null) { + if (this.shadowParent != null) { try { Method m = shadowParent.getClass().getMethod("setDirty", (Class[]) null); m.invoke(shadowParent, (Object[]) null); @@ -158,11 +158,11 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio } } - + @SuppressWarnings({ "rawtypes", "unchecked" }) @Override public void runBare() throws Throwable { - + // getName will return the name of the method being run. if (isDisabledInThisEnvironment(getName())) { // Let superclass log that we didn't run the test. @@ -178,13 +178,13 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio + "Total disabled tests=" + getDisabledTestCount()); return; } - + if (!shouldUseShadowLoader()) { super.runBare(); return; } - - String combinationOfContextLocationsForThisTestClass = cacheKeys(); + + String combinationOfContextLocationsForThisTestClass = cacheKeys(); ClassLoader classLoaderForThisTestClass = getClass().getClassLoader(); // save the TCCL ClassLoader initialClassLoader = Thread.currentThread().getContextClassLoader(); @@ -254,7 +254,7 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio } // create the shadowed test Class shadowedTestClass = shadowingClassLoader.loadClass(getClass().getName()); - + // So long as JUnit is excluded from shadowing we // can minimize reflective invocation here TestCase shadowedTestCase = (TestCase) BeanUtils.instantiateClass(shadowedTestClass); @@ -294,12 +294,12 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio * class to be loaded eagerly when this test case loads, creating verify errors at runtime. */ protected ClassLoader createShadowingClassLoader(ClassLoader classLoader) { - OrmXmlOverridingShadowingClassLoader orxl = new OrmXmlOverridingShadowingClassLoader(classLoader, - getActualOrmXmlLocation()); + OrmXmlOverridingShadowingClassLoader orxl = new OrmXmlOverridingShadowingClassLoader(classLoader, + getActualOrmXmlLocation()); customizeResourceOverridingShadowingClassLoader(orxl); return orxl; } - + /** * Customize the shadowing class loader. * @param shadowingClassLoader this parameter is actually of type @@ -310,7 +310,7 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio protected void customizeResourceOverridingShadowingClassLoader(ClassLoader shadowingClassLoader) { // empty } - + /** * Subclasses can override this to return the real location path for * orm.xml or null if they do not wish to find any orm.xml @@ -366,7 +366,7 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio public ClassLoader getInstrumentableClassLoader() { return this.shadowingClassLoader; } - + public ClassLoader getThrowawayClassLoader() { // Be sure to copy the same resource overrides and same class file transformers: // We want the throwaway class loader to behave like the instrumentable class loader. diff --git a/spring-orm/src/test/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java b/spring-orm/src/test/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java index a6baeaffcd2..0f2180ebebf 100644 --- a/spring-orm/src/test/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java +++ b/spring-orm/src/test/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java @@ -31,7 +31,7 @@ import org.springframework.instrument.classloading.ResourceOverridingShadowingCl * @since 2.0 */ class OrmXmlOverridingShadowingClassLoader extends ResourceOverridingShadowingClassLoader { - + /** * Default location of the orm.xml file in the class path: * "META-INF/orm.xml" diff --git a/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java index dfea7ac536d..55e66f8d5e5 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/castor/CastorMarshaller.java @@ -181,7 +181,7 @@ public class CastorMarshaller extends AbstractMarshaller implements Initializing public void setTargetPackage(String targetPackage) { this.targetPackages = new String[] {targetPackage}; } - + /** * Set the names of packages with the Castor descriptor classes. */ diff --git a/spring-oxm/src/main/java/org/springframework/oxm/config/CastorMarshallerBeanDefinitionParser.java b/spring-oxm/src/main/java/org/springframework/oxm/config/CastorMarshallerBeanDefinitionParser.java index 60fdf715d3c..9d28892f9de 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/config/CastorMarshallerBeanDefinitionParser.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/config/CastorMarshallerBeanDefinitionParser.java @@ -33,5 +33,5 @@ public class CastorMarshallerBeanDefinitionParser extends AbstractSimpleBeanDefi @Override protected String getBeanClassName(Element element) { return CASTOR_MARSHALLER_CLASS_NAME; - } + } } diff --git a/spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java index a53bddf3f0d..65ec8cceedb 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java @@ -132,7 +132,7 @@ public class Jaxb2Marshaller private String contextPath; private Class[] classesToBeBound; - + private String[] packagesToScan; private Map jaxbContextProperties; diff --git a/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java b/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java index eb5a6e6c1d6..ae322b90367 100644 --- a/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java +++ b/spring-oxm/src/main/java/org/springframework/oxm/xmlbeans/XmlBeansMarshaller.java @@ -328,7 +328,7 @@ public class XmlBeansMarshaller extends AbstractMarshaller { private InputStream getInputStream() { return this.in.get(); } - + @Override public int read() throws IOException { InputStream in = getInputStream(); diff --git a/spring-oxm/src/test/java/org/springframework/oxm/config/OxmNamespaceHandlerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/config/OxmNamespaceHandlerTests.java index f9dd3eeb240..90e8bdf738d 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/config/OxmNamespaceHandlerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/config/OxmNamespaceHandlerTests.java @@ -30,7 +30,7 @@ import static org.junit.Assert.*; /** * Tests the {@link OxmNamespaceHandler} class. - * + * * @author Arjen Poustma * @author Jakub Narloch */ diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java index a9a749dc0f7..1471b5fd410 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java @@ -163,7 +163,7 @@ public class Jaxb2MarshallerTests extends AbstractMarshallerTests { marshaller.afterPropertiesSet(); testSupports(); } - + @Test public void supportsPackagesToScan() throws Exception { marshaller = new Jaxb2Marshaller(); @@ -261,7 +261,7 @@ public class Jaxb2MarshallerTests extends AbstractMarshallerTests { assertFalse("Jaxb2Marshaller supports DummyType class", marshaller.supports(DummyType.class)); assertFalse("Jaxb2Marshaller supports DummyType type", marshaller.supports((Type)DummyType.class)); } - + @Test public void marshalAttachments() throws Exception { @@ -307,5 +307,5 @@ public class Jaxb2MarshallerTests extends AbstractMarshallerTests { private JAXBElement createDummyType() { return null; } - + } diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Primitives.java b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Primitives.java index 1a5c6580933..92e98b4d060 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Primitives.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Primitives.java @@ -52,7 +52,7 @@ public class Primitives { public JAXBElement primitiveDouble() { return new JAXBElement(NAME, Double.class, 42D); } - + public JAXBElement primitiveByteArray() { return new JAXBElement(NAME, byte[].class, new byte[]{42}); } diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/StandardClasses.java b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/StandardClasses.java index bd98d9df1a8..89e41d3c656 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/StandardClasses.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/StandardClasses.java @@ -103,7 +103,7 @@ public class StandardClasses { Duration duration = factory.newDuration(42000); return new JAXBElement(NAME, Duration.class, duration); } - + public JAXBElement standardClassImage() throws IOException { Image image = ImageIO.read(getClass().getResourceAsStream("spring-ws.png")); return new JAXBElement(NAME, Image.class, image); diff --git a/spring-oxm/src/test/java/org/springframework/oxm/xstream/XStreamMarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/xstream/XStreamMarshallerTests.java index 49821ece292..cf42f1bd783 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/xstream/XStreamMarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/xstream/XStreamMarshallerTests.java @@ -216,7 +216,7 @@ public class XStreamMarshallerTests { String expected = ""; assertXMLEqual("Marshaller does not use attributes", expected, writer.toString()); } - + @Test public void useAttributesForClassStringListMap() throws Exception { marshaller @@ -278,7 +278,7 @@ public class XStreamMarshallerTests { Flights flights = new Flights(); flights.getFlights().add(flight); flights.getStrings().add("42"); - + Map aliases = new HashMap(); aliases.put("flight", Flight.class); aliases.put("flights", Flights.class); diff --git a/spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java b/spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java index ba316fd3bc2..3f1cf061183 100644 --- a/spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java +++ b/spring-struts/src/main/java/org/springframework/web/struts/ContextLoaderPlugIn.java @@ -305,7 +305,7 @@ public class ContextLoaderPlugIn implements PlugIn { logger.debug("Published WebApplicationContext of Struts ActionServlet '" + getServletName() + "', module '" + getModulePrefix() + "' as ServletContext attribute with name [" + attrName + "]"); } - + return wac; } diff --git a/spring-struts/src/main/java/org/springframework/web/struts/DelegatingRequestProcessor.java b/spring-struts/src/main/java/org/springframework/web/struts/DelegatingRequestProcessor.java index 9f8d647b8c6..4883625cfc3 100644 --- a/spring-struts/src/main/java/org/springframework/web/struts/DelegatingRequestProcessor.java +++ b/spring-struts/src/main/java/org/springframework/web/struts/DelegatingRequestProcessor.java @@ -108,7 +108,7 @@ import org.springframework.web.context.WebApplicationContext; public class DelegatingRequestProcessor extends RequestProcessor { private WebApplicationContext webApplicationContext; - + @Override public void init(ActionServlet actionServlet, ModuleConfig moduleConfig) throws ServletException { diff --git a/spring-struts/src/main/java/org/springframework/web/struts/DelegatingTilesRequestProcessor.java b/spring-struts/src/main/java/org/springframework/web/struts/DelegatingTilesRequestProcessor.java index 9749ad53b01..ee80f637202 100644 --- a/spring-struts/src/main/java/org/springframework/web/struts/DelegatingTilesRequestProcessor.java +++ b/spring-struts/src/main/java/org/springframework/web/struts/DelegatingTilesRequestProcessor.java @@ -60,7 +60,7 @@ import org.springframework.web.context.WebApplicationContext; public class DelegatingTilesRequestProcessor extends TilesRequestProcessor { private WebApplicationContext webApplicationContext; - + @Override public void init(ActionServlet actionServlet, ModuleConfig moduleConfig) throws ServletException { diff --git a/spring-struts/src/main/java/org/springframework/web/struts/SpringBindingActionForm.java b/spring-struts/src/main/java/org/springframework/web/struts/SpringBindingActionForm.java index c16f719c626..77dcb6d579e 100644 --- a/spring-struts/src/main/java/org/springframework/web/struts/SpringBindingActionForm.java +++ b/spring-struts/src/main/java/org/springframework/web/struts/SpringBindingActionForm.java @@ -62,7 +62,7 @@ import org.springframework.validation.ObjectError; * <form-beans> * <form-bean name="actionForm" type="org.springframework.web.struts.SpringBindingActionForm"/> * </form-beans> - * + * * Example code in a custom Struts Action: * *

      diff --git a/spring-struts/src/test/java/org/springframework/web/servlet/view/tiles/TestComponentController.java b/spring-struts/src/test/java/org/springframework/web/servlet/view/tiles/TestComponentController.java
      index d65b6c7a4dc..941dd59517e 100644
      --- a/spring-struts/src/test/java/org/springframework/web/servlet/view/tiles/TestComponentController.java
      +++ b/spring-struts/src/test/java/org/springframework/web/servlet/view/tiles/TestComponentController.java
      @@ -1,12 +1,12 @@
       /*
        * Copyright 2002-2005 the original author or authors.
      - * 
      + *
        * Licensed under the Apache License, Version 2.0 (the "License");
        * you may not use this file except in compliance with the License.
        * You may obtain a copy of the License at
      - * 
      + *
        *      http://www.apache.org/licenses/LICENSE-2.0
      - * 
      + *
        * Unless required by applicable law or agreed to in writing, software
        * distributed under the License is distributed on an "AS IS" BASIS,
        * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      diff --git a/spring-test-mvc/src/test/java/org/springframework/test/web/servlet/result/ContentResultMatchersTests.java b/spring-test-mvc/src/test/java/org/springframework/test/web/servlet/result/ContentResultMatchersTests.java
      index 7cec4989f8f..9a1bac3fdc9 100644
      --- a/spring-test-mvc/src/test/java/org/springframework/test/web/servlet/result/ContentResultMatchersTests.java
      +++ b/spring-test-mvc/src/test/java/org/springframework/test/web/servlet/result/ContentResultMatchersTests.java
      @@ -36,49 +36,49 @@ public class ContentResultMatchersTests {
       	public void typeNoMatch() throws Exception {
       		new ContentResultMatchers().contentType("text/plain").match(getStubMvcResult());
       	}
      -	
      +
       	@Test
       	public void encoding() throws Exception {
       		new ContentResultMatchers().encoding("UTF-8").match(getStubMvcResult());
       	}
      -	
      +
       	@Test(expected=AssertionError.class)
       	public void encodingNoMatch() throws Exception {
       		new ContentResultMatchers().encoding("ISO-8859-1").match(getStubMvcResult());
       	}
      -	
      +
       	@Test
       	public void string() throws Exception {
       		new ContentResultMatchers().string(new String(CONTENT.getBytes("UTF-8"))).match(getStubMvcResult());
       	}
      -	
      +
       	@Test(expected=AssertionError.class)
       	public void stringNoMatch() throws Exception {
       		new ContentResultMatchers().encoding("bogus").match(getStubMvcResult());
       	}
      -	
      +
       	@Test
       	public void stringMatcher() throws Exception {
       		String content = new String(CONTENT.getBytes("UTF-8"));
       		new ContentResultMatchers().string(Matchers.equalTo(content)).match(getStubMvcResult());
       	}
      -	
      +
       	@Test(expected=AssertionError.class)
       	public void stringMatcherNoMatch() throws Exception {
       		new ContentResultMatchers().string(Matchers.equalTo("bogus")).match(getStubMvcResult());
       	}
      -	
      +
       	@Test
       	public void bytes() throws Exception {
       		new ContentResultMatchers().bytes(CONTENT.getBytes("UTF-8")).match(getStubMvcResult());
       	}
      -	
      +
       	@Test(expected=AssertionError.class)
       	public void bytesNoMatch() throws Exception {
       		new ContentResultMatchers().bytes("bogus".getBytes()).match(getStubMvcResult());
       	}
       
      -	
      +
       	private static final String CONTENT = "{\"foo\":\"bar\"}";
       
       	private StubMvcResult getStubMvcResult() throws Exception {
      diff --git a/spring-test-mvc/src/test/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchersTests.java b/spring-test-mvc/src/test/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchersTests.java
      index 0b6e0be4474..c27a743a19d 100644
      --- a/spring-test-mvc/src/test/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchersTests.java
      +++ b/spring-test-mvc/src/test/java/org/springframework/test/web/servlet/result/FlashAttributeResultMatchersTests.java
      @@ -35,7 +35,7 @@ public class FlashAttributeResultMatchersTests {
       	public void attributeExists_doesntExist() throws Exception {
       		new FlashAttributeResultMatchers().attributeExists("bad").match(getStubMvcResult());
       	}
      -	
      +
       	@Test
       	public void attribute() throws Exception {
       		new FlashAttributeResultMatchers().attribute("good", "good").match(getStubMvcResult());
      diff --git a/spring-test/src/main/java/org/springframework/mock/env/MockEnvironment.java b/spring-test/src/main/java/org/springframework/mock/env/MockEnvironment.java
      index a6892558321..8042e6d1f60 100644
      --- a/spring-test/src/main/java/org/springframework/mock/env/MockEnvironment.java
      +++ b/spring-test/src/main/java/org/springframework/mock/env/MockEnvironment.java
      @@ -23,7 +23,7 @@ import org.springframework.core.env.ConfigurableEnvironment;
        * Simple {@link ConfigurableEnvironment} implementation exposing
        * {@link #setProperty(String, String)} and {@link #withProperty(String, String)}
        * methods for testing purposes.
      - * 
      + *
        * @author Chris Beams
        * @author Sam Brannen
        * @since 3.2
      diff --git a/spring-test/src/main/java/org/springframework/mock/env/package-info.java b/spring-test/src/main/java/org/springframework/mock/env/package-info.java
      index 6be96f5baf3..1772b5c90e8 100644
      --- a/spring-test/src/main/java/org/springframework/mock/env/package-info.java
      +++ b/spring-test/src/main/java/org/springframework/mock/env/package-info.java
      @@ -3,7 +3,7 @@
        * {@link org.springframework.core.env.Environment Environment} and
        * {@link org.springframework.core.env.PropertySource PropertySource}
        * abstractions introduced in Spring 3.1.
      - * 
      + *
        * 

      These mocks are useful for developing out-of-container * unit tests for code that depends on environment-specific properties. */ diff --git a/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java b/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java index 8b816b45d0d..f6c3f0a3761 100644 --- a/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java +++ b/spring-test/src/main/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java @@ -52,7 +52,7 @@ import org.springframework.util.ClassUtils; * DataSource ds = new DriverManagerDataSource(...); * builder.bind("java:comp/env/jdbc/myds", ds); * builder.activate();

      - * + * * Note that it's impossible to activate multiple builders within the same JVM, * due to JNDI restrictions. Thus to configure a fresh builder repeatedly, use * the following code to get a reference to either an already activated builder diff --git a/spring-test/src/main/java/org/springframework/mock/jndi/package-info.java b/spring-test/src/main/java/org/springframework/mock/jndi/package-info.java index 4ee7055afd6..992e2369c36 100644 --- a/spring-test/src/main/java/org/springframework/mock/jndi/package-info.java +++ b/spring-test/src/main/java/org/springframework/mock/jndi/package-info.java @@ -2,7 +2,7 @@ /** * * The simplest implementation of the JNDI SPI that could possibly work. - * + * *

      Useful for setting up a simple JNDI environment for test suites * or stand-alone applications. If, for example, JDBC DataSources get bound to the * same JNDI names as within a Java EE container, both application code and diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockExpressionEvaluator.java b/spring-test/src/main/java/org/springframework/mock/web/MockExpressionEvaluator.java index 6748f5e7e04..4894fe4eb9b 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockExpressionEvaluator.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockExpressionEvaluator.java @@ -36,7 +36,7 @@ import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager; *

      * Note that the Jakarta JSTL implementation (jstl.jar, standard.jar) has to be * available on the class path to use this expression evaluator. - * + * * @author Juergen Hoeller * @since 1.1.5 * @see org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager @@ -49,7 +49,7 @@ public class MockExpressionEvaluator extends ExpressionEvaluator { /** * Create a new MockExpressionEvaluator for the given PageContext. - * + * * @param pageContext the JSP PageContext to run in */ public MockExpressionEvaluator(PageContext pageContext) { diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java b/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java index 973db4189fc..b1ca960b70b 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java @@ -747,7 +747,7 @@ public class MockHttpServletRequest implements HttpServletRequest { return -1; } } - + public void setMethod(String method) { this.method = method; } diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java b/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java index 3e2701c576b..88f3dbab08e 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java @@ -51,7 +51,7 @@ public class MockHttpServletResponse implements HttpServletResponse { private static final String CHARSET_PREFIX = "charset="; private static final String CONTENT_TYPE_HEADER = "Content-Type"; - + private static final String CONTENT_LENGTH_HEADER = "Content-Length"; private static final String LOCATION_HEADER = "Location"; @@ -65,7 +65,7 @@ public class MockHttpServletResponse implements HttpServletResponse { private boolean writerAccessAllowed = true; private String characterEncoding = WebUtils.DEFAULT_CHARACTER_ENCODING; - + private boolean charset = false; private final ByteArrayOutputStream content = new ByteArrayOutputStream(); @@ -141,7 +141,7 @@ public class MockHttpServletResponse implements HttpServletResponse { this.charset = true; updateContentTypeHeader(); } - + private void updateContentTypeHeader() { if (this.contentType != null) { StringBuilder sb = new StringBuilder(this.contentType); @@ -151,7 +151,7 @@ public class MockHttpServletResponse implements HttpServletResponse { doAddHeaderValue(CONTENT_TYPE_HEADER, sb.toString(), true); } } - + public String getCharacterEncoding() { return this.characterEncoding; } @@ -457,7 +457,7 @@ public class MockHttpServletResponse implements HttpServletResponse { } doAddHeaderValue(name, value, false); } - + private boolean setSpecialHeader(String name, Object value) { if (CONTENT_TYPE_HEADER.equalsIgnoreCase(name)) { setContentType((String) value); diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockHttpSession.java b/spring-test/src/main/java/org/springframework/mock/web/MockHttpSession.java index bc08077830f..1855230d2c5 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/MockHttpSession.java +++ b/spring-test/src/main/java/org/springframework/mock/web/MockHttpSession.java @@ -71,7 +71,7 @@ public class MockHttpSession implements HttpSession { /** * Create a new MockHttpSession with a default {@link MockServletContext}. - * + * * @see MockServletContext */ public MockHttpSession() { @@ -80,7 +80,7 @@ public class MockHttpSession implements HttpSession { /** * Create a new MockHttpSession. - * + * * @param servletContext the ServletContext that the session runs in */ public MockHttpSession(ServletContext servletContext) { @@ -89,7 +89,7 @@ public class MockHttpSession implements HttpSession { /** * Create a new MockHttpSession. - * + * * @param servletContext the ServletContext that the session runs in * @param id a unique identifier for this session */ @@ -222,7 +222,7 @@ public class MockHttpSession implements HttpSession { /** * Serialize the attributes of this session into an object that can be * turned into a byte array with standard Java serialization. - * + * * @return a representation of this session's serialized state */ public Serializable serializeState() { @@ -249,7 +249,7 @@ public class MockHttpSession implements HttpSession { /** * Deserialize the attributes of this session from a state object created by * {@link #serializeState()}. - * + * * @param state a representation of this session's serialized state */ @SuppressWarnings("unchecked") diff --git a/spring-test/src/main/java/org/springframework/mock/web/package-info.java b/spring-test/src/main/java/org/springframework/mock/web/package-info.java index b97ebd68a84..be8cb8601c8 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/package-info.java +++ b/spring-test/src/main/java/org/springframework/mock/web/package-info.java @@ -4,7 +4,7 @@ * A comprehensive set of Servlet API 2.5 mock objects, * targeted at usage with Spring's web MVC framework. * Useful for testing web contexts and controllers. - * + * *

      More convenient to use than dynamic mock objects * (EasyMock) or * existing Servlet API mock objects diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletConfig.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletConfig.java index d69e75d0c11..985c1e20dca 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletConfig.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletConfig.java @@ -95,15 +95,15 @@ public class MockPortletConfig implements PortletConfig { this.portletName = portletName; } - + public String getPortletName() { return this.portletName; } - + public PortletContext getPortletContext() { return this.portletContext; } - + public void setResourceBundle(Locale locale, ResourceBundle resourceBundle) { Assert.notNull(locale, "Locale must not be null"); this.resourceBundles.put(locale, resourceBundle); diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletContext.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletContext.java index 45db454d8b2..89dbaf0d74b 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletContext.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletContext.java @@ -57,7 +57,7 @@ public class MockPortletContext implements PortletContext { private final Log logger = LogFactory.getLog(getClass()); private final String resourceBasePath; - + private final ResourceLoader resourceLoader; private final Map attributes = new LinkedHashMap(); @@ -70,7 +70,7 @@ public class MockPortletContext implements PortletContext { /** - * Create a new MockPortletContext with no base path and a + * Create a new MockPortletContext with no base path and a * DefaultResourceLoader (i.e. the classpath root as WAR root). * @see org.springframework.core.io.DefaultResourceLoader */ @@ -125,7 +125,7 @@ public class MockPortletContext implements PortletContext { return this.resourceBasePath + path; } - + public String getServerInfo() { return "MockPortal/1.0"; } @@ -160,7 +160,7 @@ public class MockPortletContext implements PortletContext { public int getMinorVersion() { return 0; } - + public String getMimeType(String filePath) { return MimeTypeResolver.getMimeType(filePath); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequest.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequest.java index e302a86e77a..7281894d513 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequest.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletRequest.java @@ -42,7 +42,7 @@ import org.springframework.util.CollectionUtils; /** * Mock implementation of the {@link javax.portlet.PortletRequest} interface. - * + * * @author John A. Lewis * @author Juergen Hoeller * @since 2.0 @@ -103,7 +103,7 @@ public class MockPortletRequest implements PortletRequest { /** * Create a new MockPortletRequest with a default {@link MockPortalContext} * and a default {@link MockPortletContext}. - * + * * @see MockPortalContext * @see MockPortletContext */ @@ -113,7 +113,7 @@ public class MockPortletRequest implements PortletRequest { /** * Create a new MockPortletRequest with a default {@link MockPortalContext}. - * + * * @param portletContext the PortletContext that the request runs in * @see MockPortalContext */ @@ -123,7 +123,7 @@ public class MockPortletRequest implements PortletRequest { /** * Create a new MockPortletRequest. - * + * * @param portalContext the PortalContext that the request runs in * @param portletContext the PortletContext that the request runs in */ diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletSession.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletSession.java index d2c84be7ea0..477493f4f0f 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletSession.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/MockPortletSession.java @@ -76,7 +76,7 @@ public class MockPortletSession implements PortletSession { this.portletContext = (portletContext != null ? portletContext : new MockPortletContext()); } - + public Object getAttribute(String name) { return this.portletAttributes.get(name); } diff --git a/spring-test/src/main/java/org/springframework/mock/web/portlet/package-info.java b/spring-test/src/main/java/org/springframework/mock/web/portlet/package-info.java index db777eec285..3c28fee42b4 100644 --- a/spring-test/src/main/java/org/springframework/mock/web/portlet/package-info.java +++ b/spring-test/src/main/java/org/springframework/mock/web/portlet/package-info.java @@ -4,7 +4,7 @@ * A comprehensive set of Portlet API 2.0 mock objects, * targeted at usage with Spring's web MVC framework. * Useful for testing web contexts and controllers. - * + * *

      More convenient to use than dynamic mock objects * (EasyMock) or * existing Portlet API mock objects. diff --git a/spring-test/src/main/java/org/springframework/test/AssertThrows.java b/spring-test/src/main/java/org/springframework/test/AssertThrows.java index 0224a26e6e9..35a275f2f9c 100644 --- a/spring-test/src/main/java/org/springframework/test/AssertThrows.java +++ b/spring-test/src/main/java/org/springframework/test/AssertThrows.java @@ -166,7 +166,7 @@ public abstract class AssertThrows { * {@link #test() test logic} and the * {@link #checkExceptionExpectations(Exception) checking} of the * resulting (expected) {@link java.lang.Exception}. - * @see #test() + * @see #test() * @see #doFail() * @see #checkExceptionExpectations(Exception) */ diff --git a/spring-test/src/main/java/org/springframework/test/annotation/DirtiesContext.java b/spring-test/src/main/java/org/springframework/test/annotation/DirtiesContext.java index e129e49428c..c9e9921ba63 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/DirtiesContext.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/DirtiesContext.java @@ -49,7 +49,7 @@ import java.lang.annotation.Target; * AFTER_EACH_TEST_METHOD}, the context will be marked dirty after each test * method in the class. *

      - * + * * @author Sam Brannen * @author Rod Johnson * @since 2.0 diff --git a/spring-test/src/main/java/org/springframework/test/annotation/ExpectedException.java b/spring-test/src/main/java/org/springframework/test/annotation/ExpectedException.java index b5f8584dfec..91962ee8273 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/ExpectedException.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/ExpectedException.java @@ -25,12 +25,12 @@ import java.lang.annotation.Target; /** * Test annotation to indicate that a test method is required to throw the * specified exception. - * + * * @author Rod Johnson * @author Sam Brannen * @since 2.0 * @deprecated as of Spring 3.1 in favor of using built-in support for declaring - * expected exceptions in the underlying testing framework (e.g., JUnit, TestNG, etc.) + * expected exceptions in the underlying testing framework (e.g., JUnit, TestNG, etc.) */ @Documented @Retention(RetentionPolicy.RUNTIME) diff --git a/spring-test/src/main/java/org/springframework/test/annotation/IfProfileValue.java b/spring-test/src/main/java/org/springframework/test/annotation/IfProfileValue.java index 47d6f57628a..8eb649d291f 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/IfProfileValue.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/IfProfileValue.java @@ -41,7 +41,7 @@ import java.lang.annotation.Target; * {@link ProfileValueSource} implementation, you can configure a test method to * run only on Java VMs from Sun Microsystems as follows: *

      - * + * *
        * @IfProfileValue(name = "java.vendor", value = "Sun Microsystems Inc.")
        * public void testSomething() {
      @@ -54,14 +54,14 @@ import java.lang.annotation.Target;
        * (assuming a {@link ProfileValueSource} has been appropriately configured for
        * the "test-groups" name):
        * 

      - * + * *
        * @IfProfileValue(name = "test-groups", values = { "unit-tests", "integration-tests" })
        * public void testWhichRunsForUnitOrIntegrationTestGroups() {
        * 	// ...
        * }
        * 
      - * + * * @author Rod Johnson * @author Sam Brannen * @since 2.0 diff --git a/spring-test/src/main/java/org/springframework/test/annotation/NotTransactional.java b/spring-test/src/main/java/org/springframework/test/annotation/NotTransactional.java index ade7b71fb71..76983acf728 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/NotTransactional.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/NotTransactional.java @@ -24,7 +24,7 @@ import java.lang.annotation.Target; /** * Test annotation to indicate that a method is not transactional. - * + * * @author Rod Johnson * @author Sam Brannen * @since 2.0 diff --git a/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueSourceConfiguration.java b/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueSourceConfiguration.java index 5c195c85e8e..e21ace4ce78 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueSourceConfiguration.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueSourceConfiguration.java @@ -30,7 +30,7 @@ import java.lang.annotation.Target; * profile values configured via the {@link IfProfileValue * @IfProfileValue} annotation. *

      - * + * * @author Sam Brannen * @since 2.5 * @see ProfileValueSource @@ -48,7 +48,7 @@ public @interface ProfileValueSourceConfiguration { * The type of {@link ProfileValueSource} to use when retrieving * profile values. *

      - * + * * @see SystemProfileValueSource */ Class value() default SystemProfileValueSource.class; diff --git a/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueUtils.java b/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueUtils.java index f43ea26f8c6..fc912a798c1 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueUtils.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/ProfileValueUtils.java @@ -27,7 +27,7 @@ import org.springframework.util.StringUtils; /** * General utility methods for working with profile values. - * + * * @author Sam Brannen * @author Juergen Hoeller * @since 2.5 @@ -51,7 +51,7 @@ public abstract class ProfileValueUtils { * @ProfileValueSourceConfiguration} is not present on the specified * class or if a custom {@link ProfileValueSource} is not declared, the * default {@link SystemProfileValueSource} will be returned instead. - * + * * @param testClass The test class for which the ProfileValueSource should * be retrieved * @return the configured (or default) ProfileValueSource for the specified @@ -108,7 +108,7 @@ public abstract class ProfileValueUtils { *

      * Defaults to true if no {@link IfProfileValue * @IfProfileValue} annotation is declared. - * + * * @param testClass the test class * @return true if the test is enabled in the current * environment @@ -127,7 +127,7 @@ public abstract class ProfileValueUtils { *

      * Defaults to true if no {@link IfProfileValue * @IfProfileValue} annotation is declared. - * + * * @param testMethod the test method * @param testClass the test class * @return true if the test is enabled in the current @@ -146,7 +146,7 @@ public abstract class ProfileValueUtils { *

      * Defaults to true if no {@link IfProfileValue * @IfProfileValue} annotation is declared. - * + * * @param profileValueSource the ProfileValueSource to use to determine if * the test is enabled * @param testMethod the test method @@ -172,7 +172,7 @@ public abstract class ProfileValueUtils { * Determine if the value (or one of the values) * in the supplied {@link IfProfileValue @IfProfileValue} annotation is * enabled in the current environment. - * + * * @param profileValueSource the ProfileValueSource to use to determine if * the test is enabled * @param ifProfileValue the annotation to introspect; may be diff --git a/spring-test/src/main/java/org/springframework/test/annotation/Repeat.java b/spring-test/src/main/java/org/springframework/test/annotation/Repeat.java index f0c7591ac8b..7ab79068137 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/Repeat.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/Repeat.java @@ -28,7 +28,7 @@ import java.lang.annotation.Target; * Note that the scope of execution to be repeated includes execution of the * test method itself as well as any set up or tear down of * the test fixture. - * + * * @author Rod Johnson * @author Sam Brannen * @since 2.0 diff --git a/spring-test/src/main/java/org/springframework/test/annotation/Rollback.java b/spring-test/src/main/java/org/springframework/test/annotation/Rollback.java index 052b419f95d..56c29482a07 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/Rollback.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/Rollback.java @@ -27,7 +27,7 @@ import java.lang.annotation.Target; * test method should be rolled back after the test method has * completed. If true, the transaction will be rolled back; * otherwise, the transaction will be committed. - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-test/src/main/java/org/springframework/test/annotation/Timed.java b/spring-test/src/main/java/org/springframework/test/annotation/Timed.java index 94f7d0df148..96729e409e4 100644 --- a/spring-test/src/main/java/org/springframework/test/annotation/Timed.java +++ b/spring-test/src/main/java/org/springframework/test/annotation/Timed.java @@ -36,7 +36,7 @@ import java.lang.annotation.Target; * {@link Repeat repetitions} of the test, and any set up or * tear down of the test fixture. *

      - * + * * @author Rod Johnson * @author Sam Brannen * @since 2.0 diff --git a/spring-test/src/main/java/org/springframework/test/context/ActiveProfiles.java b/spring-test/src/main/java/org/springframework/test/context/ActiveProfiles.java index b0bff1db9a4..628e665745b 100644 --- a/spring-test/src/main/java/org/springframework/test/context/ActiveProfiles.java +++ b/spring-test/src/main/java/org/springframework/test/context/ActiveProfiles.java @@ -45,7 +45,7 @@ public @interface ActiveProfiles { /** * Alias for {@link #profiles}. - * + * *

      This attribute may not be used in conjunction * with {@link #profiles}, but it may be used instead of * {@link #profiles}. @@ -54,7 +54,7 @@ public @interface ActiveProfiles { /** * The bean definition profiles to activate. - * + * *

      This attribute may not be used in conjunction * with {@link #value}, but it may be used instead of * {@link #value}. @@ -88,7 +88,7 @@ public @interface ActiveProfiles { * public class BaseTest { * // ... * } - * + * * @ActiveProfiles("extended") * @ContextConfiguration * public class ExtendedTest extends BaseTest { @@ -96,7 +96,7 @@ public @interface ActiveProfiles { * } *

      * - *

      Note: {@code @ActiveProfiles} can be used when loading an + *

      Note: {@code @ActiveProfiles} can be used when loading an * {@code ApplicationContext} from path-based resource locations or * annotated classes. * diff --git a/spring-test/src/main/java/org/springframework/test/context/ContextConfiguration.java b/spring-test/src/main/java/org/springframework/test/context/ContextConfiguration.java index 4710ee7af97..7dfd2db721e 100644 --- a/spring-test/src/main/java/org/springframework/test/context/ContextConfiguration.java +++ b/spring-test/src/main/java/org/springframework/test/context/ContextConfiguration.java @@ -81,7 +81,7 @@ public @interface ContextConfiguration { /** * Alias for {@link #locations}. - * + * *

      This attribute may not be used in conjunction * with {@link #locations} or {@link #classes}, but it may be used * instead of {@link #locations}. @@ -93,7 +93,7 @@ public @interface ContextConfiguration { /** * The resource locations to use for loading an * {@link org.springframework.context.ApplicationContext ApplicationContext}. - * + * *

      Check out the Javadoc for * {@link org.springframework.test.context.support.AbstractContextLoader#modifyLocations * AbstractContextLoader.modifyLocations()} for details on how a location @@ -102,7 +102,7 @@ public @interface ContextConfiguration { * {@link org.springframework.test.context.support.AbstractContextLoader#generateDefaultLocations * AbstractContextLoader.generateDefaultLocations()} for details on the default * locations that are going to be used if none are specified. - * + * *

      Note that the above-mentioned default rules only apply for a standard * {@link org.springframework.test.context.support.AbstractContextLoader * AbstractContextLoader} subclass such as @@ -111,7 +111,7 @@ public @interface ContextConfiguration { * used at runtime if locations are configured. See the * documentation for {@link #loader} for further details regarding default * loaders. - * + * *

      This attribute may not be used in conjunction with * {@link #value} or {@link #classes}, but it may be used instead of * {@link #value}. @@ -123,14 +123,14 @@ public @interface ContextConfiguration { /** * The annotated classes to use for loading an * {@link org.springframework.context.ApplicationContext ApplicationContext}. - * + * *

      Check out the Javadoc for * {@link org.springframework.test.context.support.AnnotationConfigContextLoader#detectDefaultConfigurationClasses * AnnotationConfigContextLoader.detectDefaultConfigurationClasses()} for details * on how default configuration classes will be detected if no * annotated classes are specified. See the documentation for * {@link #loader} for further details regarding default loaders. - * + * *

      This attribute may not be used in conjunction with * {@link #locations} or {@link #value}. * @@ -144,7 +144,7 @@ public @interface ContextConfiguration { /** * The application context initializer classes to use for initializing * a {@link ConfigurableApplicationContext}. - * + * *

      The concrete {@code ConfigurableApplicationContext} type supported by each * declared initializer must be compatible with the type of {@code ApplicationContext} * created by the {@link SmartContextLoader} in use. @@ -173,12 +173,12 @@ public @interface ContextConfiguration { * resource locations or annotated classes defined by test superclasses. * Thus, subclasses have the option of extending the list of resource * locations or annotated classes. - * + * *

      If inheritLocations is set to false, the * resource locations or annotated classes for the annotated class - * will shadow and effectively replace any resource locations + * will shadow and effectively replace any resource locations * or annotated classes defined by superclasses. - * + * *

      In the following example that uses path-based resource locations, the * {@link org.springframework.context.ApplicationContext ApplicationContext} * for {@code ExtendedTest} will be loaded from @@ -191,18 +191,18 @@ public @interface ContextConfiguration { * public class BaseTest { * // ... * } - * + * * @ContextConfiguration("extended-context.xml") * public class ExtendedTest extends BaseTest { * // ... * } * - * + * *

      Similarly, in the following example that uses annotated * classes, the * {@link org.springframework.context.ApplicationContext ApplicationContext} * for {@code ExtendedTest} will be loaded from the - * {@code BaseConfig} and {@code ExtendedConfig} + * {@code BaseConfig} and {@code ExtendedConfig} * configuration classes, in that order. Beans defined in * {@code ExtendedConfig} may therefore override those defined in * {@code BaseConfig}. @@ -211,7 +211,7 @@ public @interface ContextConfiguration { * public class BaseTest { * // ... * } - * + * * @ContextConfiguration(classes=ExtendedConfig.class) * public class ExtendedTest extends BaseTest { * // ... @@ -249,7 +249,7 @@ public @interface ContextConfiguration { * public class BaseTest { * // ... * } - * + * * @ContextConfiguration(initializers = ExtendedInitializer.class) * public class ExtendedTest extends BaseTest { * // ... @@ -263,12 +263,12 @@ public @interface ContextConfiguration { * The type of {@link SmartContextLoader} (or {@link ContextLoader}) to use * for loading an {@link org.springframework.context.ApplicationContext * ApplicationContext}. - * + * *

      If not specified, the loader will be inherited from the first superclass * that is annotated with {@code @ContextConfiguration} and specifies an * explicit loader. If no class in the hierarchy specifies an explicit * loader, a default loader will be used instead. - * + * *

      The default concrete implementation chosen at runtime will be * {@link org.springframework.test.context.support.DelegatingSmartContextLoader * DelegatingSmartContextLoader}. For further details on the default behavior diff --git a/spring-test/src/main/java/org/springframework/test/context/ContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/ContextLoader.java index f28364a9b4b..2db039ad32c 100644 --- a/spring-test/src/main/java/org/springframework/test/context/ContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/ContextLoader.java @@ -21,7 +21,7 @@ import org.springframework.context.ApplicationContext; /** * Strategy interface for loading an {@link ApplicationContext application context} * for an integration test managed by the Spring TestContext Framework. - * + * *

      Note: as of Spring 3.1, implement {@link SmartContextLoader} instead * of this interface in order to provide support for annotated classes, active * bean definition profiles, and application context initializers. diff --git a/spring-test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java b/spring-test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java index 01f368c0113..a4e911cbd69 100644 --- a/spring-test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java +++ b/spring-test/src/main/java/org/springframework/test/context/ContextLoaderUtils.java @@ -42,7 +42,7 @@ import org.springframework.util.StringUtils; * Utility methods for working with {@link ContextLoader ContextLoaders} and * {@link SmartContextLoader SmartContextLoaders} and resolving resource locations, * annotated classes, and active bean definition profiles. - * + * * @author Sam Brannen * @since 3.1 * @see ContextLoader @@ -112,15 +112,15 @@ abstract class ContextLoaderUtils { /** * Resolve the {@link ContextLoader} {@linkplain Class class} to use for the * supplied list of {@link ContextConfigurationAttributes}. - * + * *

      Beginning with the first level in the context configuration attributes - * hierarchy: + * hierarchy: * *

        *
      1. If the {@link ContextConfigurationAttributes#getContextLoaderClass() * contextLoaderClass} property of {@link ContextConfigurationAttributes} is * configured with an explicit class, that class will be returned.
      2. - *
      3. If an explicit {@code ContextLoader} class is not specified at the + *
      4. If an explicit {@code ContextLoader} class is not specified at the * current level in the hierarchy, traverse to the next level in the hierarchy * and return to step #1.
      5. *
      6. If no explicit {@code ContextLoader} class is found after traversing @@ -137,9 +137,9 @@ abstract class ContextLoaderUtils { * {@code ContextLoader} class to use; must not be {@code null} or empty * @return the {@code ContextLoader} class to use for the supplied test class * @throws IllegalArgumentException if {@code @ContextConfiguration} is not - * present on the supplied test class + * present on the supplied test class * @throws IllegalStateException if the default {@code ContextLoader} class - * could not be loaded + * could not be loaded */ @SuppressWarnings("unchecked") static Class resolveContextLoaderClass(Class testClass, @@ -407,7 +407,7 @@ abstract class ContextLoaderUtils { /** * Load the {@link org.springframework.test.context.web.WebAppConfiguration @WebAppConfiguration} * class, using reflection in order to avoid package cycles. - * + * * @return the {@code @WebAppConfiguration} class or null if it * cannot be loaded * @since 3.2 diff --git a/spring-test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java b/spring-test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java index 6fc402e92ff..39330672860 100644 --- a/spring-test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java +++ b/spring-test/src/main/java/org/springframework/test/context/MergedContextConfiguration.java @@ -41,15 +41,15 @@ import org.springframework.util.StringUtils; * {@link ContextConfiguration#inheritLocations inheritLocations} and * {@link ActiveProfiles#inheritProfiles inheritProfiles} flags in * {@code @ContextConfiguration} and {@code @ActiveProfiles}, respectively. - * + * *

        A {@link SmartContextLoader} uses {@code MergedContextConfiguration} * to load an {@link org.springframework.context.ApplicationContext ApplicationContext}. - * + * *

        {@code MergedContextConfiguration} is also used by the {@link TestContext} * as the context cache key for caching an * {@link org.springframework.context.ApplicationContext ApplicationContext} * that was loaded using properties of this {@code MergedContextConfiguration}. - * + * * @author Sam Brannen * @since 3.1 * @see ContextConfiguration @@ -118,7 +118,7 @@ public class MergedContextConfiguration implements Serializable { * classes, or activeProfiles an empty array will * be stored instead. Furthermore, active profiles will be sorted, and duplicate * profiles will be removed. - * + * * @param testClass the test class for which the configuration was merged * @param locations the merged resource locations * @param classes the merged annotated classes diff --git a/spring-test/src/main/java/org/springframework/test/context/SmartContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/SmartContextLoader.java index ba5f22bd66b..54a44174fef 100644 --- a/spring-test/src/main/java/org/springframework/test/context/SmartContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/SmartContextLoader.java @@ -32,7 +32,7 @@ import org.springframework.context.ApplicationContext; *

        See the Javadoc for * {@link org.springframework.test.context.ContextConfiguration @ContextConfiguration} * for a definition of annotated class. - * + * *

        Clients of a {@code SmartContextLoader} should call * {@link #processContextConfiguration(ContextConfigurationAttributes) * processContextConfiguration()} prior to calling diff --git a/spring-test/src/main/java/org/springframework/test/context/TestContext.java b/spring-test/src/main/java/org/springframework/test/context/TestContext.java index 6d3a90c663d..02ac2bfe569 100644 --- a/spring-test/src/main/java/org/springframework/test/context/TestContext.java +++ b/spring-test/src/main/java/org/springframework/test/context/TestContext.java @@ -28,7 +28,7 @@ import org.springframework.util.Assert; /** * TestContext encapsulates the context in which a test is executed, * agnostic of the actual testing framework in use. - * + * * @author Sam Brannen * @author Juergen Hoeller * @since 2.5 diff --git a/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java b/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java index 088d8867a3e..409b8dc39de 100644 --- a/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java +++ b/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java @@ -64,7 +64,7 @@ import org.springframework.util.ObjectUtils; * after class methods of a particular testing framework (e.g., JUnit * 4's {@link org.junit.AfterClass @AfterClass})

      7. * - * + * * @author Sam Brannen * @author Juergen Hoeller * @since 2.5 diff --git a/spring-test/src/main/java/org/springframework/test/context/TestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/TestExecutionListener.java index 2b67223d938..a76134c23f8 100644 --- a/spring-test/src/main/java/org/springframework/test/context/TestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/TestExecutionListener.java @@ -41,7 +41,7 @@ package org.springframework.test.context; * {@link org.springframework.test.context.transaction.TransactionalTestExecutionListener * TransactionalTestExecutionListener} * - * + * * @author Sam Brannen * @author Juergen Hoeller * @since 2.5 @@ -58,7 +58,7 @@ public interface TestExecutionListener { * If a given testing framework (e.g., JUnit 3.8) does not support * before class lifecycle callbacks, this method will not be called * for that framework. - * + * * @param testContext the test context for the test; never null * @throws Exception allows any exception to propagate */ @@ -70,7 +70,7 @@ public interface TestExecutionListener { *

        * This method should be called immediately after instantiation of the test * instance but prior to any framework-specific lifecycle callbacks. - * + * * @param testContext the test context for the test; never null * @throws Exception allows any exception to propagate */ @@ -84,7 +84,7 @@ public interface TestExecutionListener { *

        * This method should be called immediately prior to framework-specific * before lifecycle callbacks. - * + * * @param testContext the test context in which the test method will be * executed; never null * @throws Exception allows any exception to propagate @@ -99,7 +99,7 @@ public interface TestExecutionListener { *

        * This method should be called immediately after framework-specific * after lifecycle callbacks. - * + * * @param testContext the test context in which the test method was * executed; never null * @throws Exception allows any exception to propagate @@ -116,7 +116,7 @@ public interface TestExecutionListener { * If a given testing framework (e.g., JUnit 3.8) does not support * after class lifecycle callbacks, this method will not be called * for that framework. - * + * * @param testContext the test context for the test; never null * @throws Exception allows any exception to propagate */ diff --git a/spring-test/src/main/java/org/springframework/test/context/TestExecutionListeners.java b/spring-test/src/main/java/org/springframework/test/context/TestExecutionListeners.java index a7517418ffe..86d1d8dc437 100644 --- a/spring-test/src/main/java/org/springframework/test/context/TestExecutionListeners.java +++ b/spring-test/src/main/java/org/springframework/test/context/TestExecutionListeners.java @@ -29,7 +29,7 @@ import java.lang.annotation.Target; * be registered with a {@link TestContextManager}. Typically, * @TestExecutionListeners will be used in conjunction with * {@link ContextConfiguration @ContextConfiguration}. - * + * * @author Sam Brannen * @since 2.5 * @see TestExecutionListener @@ -47,7 +47,7 @@ public @interface TestExecutionListeners { * The {@link TestExecutionListener TestExecutionListeners} to register with * a {@link TestContextManager}. *

        - * + * * @see org.springframework.test.context.support.DependencyInjectionTestExecutionListener * @see org.springframework.test.context.support.DirtiesContextTestExecutionListener * @see org.springframework.test.context.transaction.TransactionalTestExecutionListener @@ -78,14 +78,14 @@ public @interface TestExecutionListeners { * DirtiesContextTestExecutionListener, and * TransactionalTestExecutionListener, in that order. *

        - * + * *
         	 * @TestExecutionListeners({ DependencyInjectionTestExecutionListener.class,
              *    DirtiesContextTestExecutionListener.class })
         	 * public abstract class AbstractBaseTest {
         	 * 	// ...
         	 * }
        -	 * 
        +	 *
         	 * @TestExecutionListeners(TransactionalTestExecutionListener.class)
         	 * public class TransactionalTest extends AbstractBaseTest {
         	 * 	// ...
        diff --git a/spring-test/src/main/java/org/springframework/test/context/junit38/AbstractJUnit38SpringContextTests.java b/spring-test/src/main/java/org/springframework/test/context/junit38/AbstractJUnit38SpringContextTests.java
        index f4766354161..958904e2d08 100644
        --- a/spring-test/src/main/java/org/springframework/test/context/junit38/AbstractJUnit38SpringContextTests.java
        +++ b/spring-test/src/main/java/org/springframework/test/context/junit38/AbstractJUnit38SpringContextTests.java
        @@ -99,7 +99,7 @@ import org.springframework.test.context.support.DirtiesContextTestExecutionListe
          * {@link org.springframework.test.context.TestExecutionListener#afterTestClass(org.springframework.test.context.TestContext)
          * afterTestClass()}
          * 
        - * 
        + *
          * @author Sam Brannen
          * @author Juergen Hoeller
          * @since 2.5
        @@ -164,7 +164,7 @@ public abstract class AbstractJUnit38SpringContextTests extends TestCase impleme
         	 * supplied name; initializes the internal
         	 * {@link TestContextManager} for the current test; and retrieves the
         	 * configured (or default) {@link ProfileValueSource}.
        -	 * 
        +	 *
         	 * @param name the name of the current test to execute
         	 */
         	public AbstractJUnit38SpringContextTests(String name) {
        @@ -200,7 +200,7 @@ public abstract class AbstractJUnit38SpringContextTests extends TestCase impleme
         	 * 
      8. Provides support for {@link ExpectedException * @ExpectedException}.
      9. * - * + * * @see ProfileValueUtils#isTestEnabledInThisEnvironment */ @Override @@ -242,7 +242,7 @@ public abstract class AbstractJUnit38SpringContextTests extends TestCase impleme /** * Runs a timed test via the supplied {@link TestExecutionCallback} * , providing support for the {@link Timed @Timed} annotation. - * + * * @param tec the test execution callback to run * @param testMethod the actual test method: used to retrieve the * timeout @@ -273,7 +273,7 @@ public abstract class AbstractJUnit38SpringContextTests extends TestCase impleme * Runs a test via the supplied {@link TestExecutionCallback}, providing * support for the {@link ExpectedException @ExpectedException} and * {@link Repeat @Repeat} annotations. - * + * * @param tec the test execution callback to run * @param testMethod the actual test method: used to retrieve the * {@link ExpectedException @ExpectedException} and {@link Repeat @@ -320,7 +320,7 @@ public abstract class AbstractJUnit38SpringContextTests extends TestCase impleme * Calls {@link TestContextManager#beforeTestMethod(Object,Method)} and * {@link TestContextManager#afterTestMethod(Object,Method,Throwable)} at * the appropriate test execution points. - * + * * @param testMethod the test method to run * @throws Throwable if any exception is thrown * @see #runBare() @@ -374,7 +374,7 @@ public abstract class AbstractJUnit38SpringContextTests extends TestCase impleme * Records the supplied test method as disabled in the current * environment by incrementing the total number of disabled tests and * logging a debug message. - * + * * @param testMethod the test method that is disabled. * @see #getDisabledTestCount() */ diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractJUnit4SpringContextTests.java b/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractJUnit4SpringContextTests.java index 19806cd1632..555892901ee 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractJUnit4SpringContextTests.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractJUnit4SpringContextTests.java @@ -51,7 +51,7 @@ import org.springframework.test.context.support.DirtiesContextTestExecutionListe * {@link SpringJUnit4ClassRunner}, {@link ContextConfiguration * @ContextConfiguration}, {@link TestExecutionListeners * @TestExecutionListeners}, etc. - * + * * @author Sam Brannen * @since 2.5 * @see ContextConfiguration diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.java b/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.java index a0cef632898..79546a256fd 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.java @@ -56,7 +56,7 @@ import org.springframework.transaction.annotation.Transactional; * @ContextConfiguration}, {@link TestExecutionListeners * @TestExecutionListeners}, {@link Transactional @Transactional}, * etc. - * + * * @author Sam Brannen * @author Juergen Hoeller * @since 2.5 diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java b/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java index 2d184156ee7..9351f2f9085 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java @@ -79,7 +79,7 @@ import org.springframework.util.ReflectionUtils; * NOTE: As of Spring 3.0, SpringJUnit4ClassRunner requires * JUnit 4.5+. *

        - * + * * @author Sam Brannen * @author Juergen Hoeller * @since 2.5 diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunAfterTestClassCallbacks.java b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunAfterTestClassCallbacks.java index b0ca874ca36..61d721ebf9b 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunAfterTestClassCallbacks.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunAfterTestClassCallbacks.java @@ -29,7 +29,7 @@ import org.springframework.test.context.TestContextManager; * be plugged into the JUnit execution chain by calling * {@link TestContextManager#afterTestClass() afterTestClass()} on the supplied * {@link TestContextManager}. - * + * * @see #evaluate() * @see RunBeforeTestMethodCallbacks * @author Sam Brannen @@ -45,7 +45,7 @@ public class RunAfterTestClassCallbacks extends Statement { /** * Constructs a new RunAfterTestClassCallbacks statement. - * + * * @param next the next Statement in the execution chain * @param testContextManager the TestContextManager upon which to call * afterTestClass() diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestClassCallbacks.java b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestClassCallbacks.java index 6e06239a122..af2f1c23a0c 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestClassCallbacks.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestClassCallbacks.java @@ -25,7 +25,7 @@ import org.springframework.test.context.TestContextManager; * be plugged into the JUnit execution chain by calling * {@link TestContextManager#beforeTestClass() beforeTestClass()} on the * supplied {@link TestContextManager}. - * + * * @see #evaluate() * @see RunAfterTestMethodCallbacks * @author Sam Brannen @@ -40,7 +40,7 @@ public class RunBeforeTestClassCallbacks extends Statement { /** * Constructs a new RunBeforeTestClassCallbacks statement. - * + * * @param next the next Statement in the execution chain * @param testContextManager the TestContextManager upon which to call * beforeTestClass() diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestMethodCallbacks.java b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestMethodCallbacks.java index 8833c390b16..1c5e59be6f5 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestMethodCallbacks.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestMethodCallbacks.java @@ -27,7 +27,7 @@ import org.springframework.test.context.TestContextManager; * be plugged into the JUnit execution chain by calling * {@link TestContextManager#beforeTestMethod(Object, Method) * beforeTestMethod()} on the supplied {@link TestContextManager}. - * + * * @see #evaluate() * @see RunAfterTestMethodCallbacks * @author Sam Brannen @@ -46,7 +46,7 @@ public class RunBeforeTestMethodCallbacks extends Statement { /** * Constructs a new RunBeforeTestMethodCallbacks statement. - * + * * @param next the next Statement in the execution chain * @param testInstance the current test instance (never null) * @param testMethod the test method which is about to be executed on the diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringFailOnTimeout.java b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringFailOnTimeout.java index 62aee02728f..a9a10b8b801 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringFailOnTimeout.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringFailOnTimeout.java @@ -26,7 +26,7 @@ import org.springframework.test.annotation.Timed; * which adds support for Spring's {@link Timed @Timed} annotation by throwing * an exception if the next statement in the execution chain takes more than the * specified number of milliseconds. - * + * * @see #evaluate() * @author Sam Brannen * @since 3.0 @@ -40,7 +40,7 @@ public class SpringFailOnTimeout extends Statement { /** * Constructs a new SpringFailOnTimeout statement. - * + * * @param next the next Statement in the execution chain * @param timeout the configured timeout for the current test * @see Timed#millis() diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringRepeat.java b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringRepeat.java index f2c79a9f3b7..541b4ab6d69 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringRepeat.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/SpringRepeat.java @@ -28,7 +28,7 @@ import org.springframework.util.ClassUtils; * SpringRepeat is a custom JUnit 4.5+ {@link Statement} which adds * support for Spring's {@link Repeat @Repeat} annotation by repeating the * test for the specified number of times. - * + * * @see #evaluate() * @author Sam Brannen * @since 3.0 @@ -46,7 +46,7 @@ public class SpringRepeat extends Statement { /** * Constructs a new SpringRepeat statement. - * + * * @param next the next Statement in the execution chain * @param testMethod the current test method * @param repeat the configured repeat count for the current test method diff --git a/spring-test/src/main/java/org/springframework/test/context/package-info.java b/spring-test/src/main/java/org/springframework/test/context/package-info.java index f549babc39d..b02e0b447b2 100644 --- a/spring-test/src/main/java/org/springframework/test/context/package-info.java +++ b/spring-test/src/main/java/org/springframework/test/context/package-info.java @@ -4,7 +4,7 @@ * agnostic of the actual testing framework in use. The same techniques and * annotation-based configuration used in, for example, a JUnit 4.5+ environment * can also be applied to tests written with TestNG, etc. - * + * *

        In addition to providing generic and extensible testing infrastructure, * the Spring TestContext Framework provides out-of-the-box support for * Spring-specific integration testing functionality such as context management diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AbstractContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/AbstractContextLoader.java index 6f114738fff..d4b6dc49bbd 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/AbstractContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/AbstractContextLoader.java @@ -93,7 +93,7 @@ public abstract class AbstractContextLoader implements SmartContextLoader { } /** - * Prepare the {@link ConfigurableApplicationContext} created by this + * Prepare the {@link ConfigurableApplicationContext} created by this * {@code SmartContextLoader} before bean definitions are read. * *

        The default implementation: diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AbstractDelegatingSmartContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/AbstractDelegatingSmartContextLoader.java index d8116c000df..01b4102e53f 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/AbstractDelegatingSmartContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/AbstractDelegatingSmartContextLoader.java @@ -42,7 +42,7 @@ import org.springframework.util.ObjectUtils; * that is annotated with {@link ContextConfiguration @ContextConfiguration}, and * the candidate that supports the merged, processed configuration will be used to * actually {@link #loadContext load} the context. - * + * *

        Placing an empty {@code @ContextConfiguration} annotation on a test class signals * that default resource locations (i.e., XML configuration files) or default * {@link org.springframework.context.annotation.Configuration configuration classes} @@ -52,13 +52,13 @@ import org.springframework.util.ObjectUtils; * {@code AbstractDelegatingSmartContextLoader} will be used as the default loader, * thus providing automatic support for either XML configuration files or annotated * classes, but not both simultaneously. - * + * *

        As of Spring 3.2, a test class may optionally declare neither XML configuration * files nor annotated classes and instead declare only {@linkplain * ContextConfiguration#initializers application context initializers}. In such * cases, an attempt will still be made to detect defaults, but their absence will * not result an an exception. - * + * * @author Sam Brannen * @since 3.2 * @see SmartContextLoader @@ -111,15 +111,15 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte /** * Delegates to candidate {@code SmartContextLoaders} to process the supplied * {@link ContextConfigurationAttributes}. - * + * *

        Delegation is based on explicit knowledge of the implementations of the * default loaders for {@link #getXmlLoader() XML configuration files} and * {@link #getAnnotationConfigLoader() annotated classes}. Specifically, the * delegation algorithm is as follows: - * + * *

          *
        • If the resource locations or annotated classes in the supplied - * {@code ContextConfigurationAttributes} are not empty, the appropriate + * {@code ContextConfigurationAttributes} are not empty, the appropriate * candidate loader will be allowed to process the configuration as is, * without any checks for detection of defaults.
        • *
        • Otherwise, the XML-based loader will be allowed to process @@ -131,7 +131,7 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte * If the annotation-based loader detects default configuration * classes, an {@code info} message will be logged.
        • *
        - * + * * @param configAttributes the context configuration attributes to process * @throws IllegalArgumentException if the supplied configuration attributes are * null, or if the supplied configuration attributes include both @@ -216,12 +216,12 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte /** * Delegates to an appropriate candidate {@code SmartContextLoader} to load * an {@link ApplicationContext}. - * + * *

        Delegation is based on explicit knowledge of the implementations of the * default loaders for {@link #getXmlLoader() XML configuration files} and * {@link #getAnnotationConfigLoader() annotated classes}. Specifically, the * delegation algorithm is as follows: - * + * *

          *
        • If the resource locations in the supplied {@code MergedContextConfiguration} * are not empty and the annotated classes are empty, @@ -230,7 +230,7 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte * are not empty and the resource locations are empty, * the annotation-based loader will load the {@code ApplicationContext}.
        • *
        - * + * * @param mergedConfig the merged context configuration to use to load the application context * @throws IllegalArgumentException if the supplied merged configuration is null * @throws IllegalStateException if neither candidate loader is capable of loading an diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AbstractTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/support/AbstractTestExecutionListener.java index e57d1a1dafc..beaa77ca1a1 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/AbstractTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/AbstractTestExecutionListener.java @@ -23,7 +23,7 @@ import org.springframework.test.context.TestExecutionListener; * Abstract implementation of the {@link TestExecutionListener} interface which * provides empty method stubs. Subclasses can extend this class and override * only those methods suitable for the task at hand. - * + * * @author Sam Brannen * @author Juergen Hoeller * @since 2.5 diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoader.java index 749f08cca57..c8ba660fbfe 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/AnnotationConfigContextLoader.java @@ -28,11 +28,11 @@ import org.springframework.util.ObjectUtils; /** * Concrete implementation of {@link AbstractGenericContextLoader} that loads * bean definitions from annotated classes. - * + * *

        See the Javadoc for * {@link org.springframework.test.context.ContextConfiguration @ContextConfiguration} * for a definition of annotated class. - * + * *

        Note: AnnotationConfigContextLoader supports annotated classes * rather than the String-based resource locations defined by the legacy * {@link org.springframework.test.context.ContextLoader ContextLoader} API. Thus, @@ -68,7 +68,7 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader * {@link ContextConfigurationAttributes#setClasses(Class[]) set} in the * supplied configuration attributes. Otherwise, properties in the supplied * configuration attributes will not be modified. - * + * * @param configAttributes the context configuration attributes to process * @see org.springframework.test.context.SmartContextLoader#processContextConfiguration(ContextConfigurationAttributes) * @see #isGenerateDefaultLocations() diff --git a/spring-test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java index 4d2d7c324ae..32442fe3ec1 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/DelegatingSmartContextLoader.java @@ -22,7 +22,7 @@ import org.springframework.test.context.SmartContextLoader; * {@code DelegatingSmartContextLoader} is a concrete implementation of * {@link AbstractDelegatingSmartContextLoader} that delegates to a * {@link GenericXmlContextLoader} and an {@link AnnotationConfigContextLoader}. - * + * * @author Sam Brannen * @since 3.1 * @see SmartContextLoader diff --git a/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java index b59b88a9372..b5665228ef1 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/DirtiesContextTestExecutionListener.java @@ -31,7 +31,7 @@ import org.springframework.util.Assert; * ApplicationContext associated with a test as dirty for * both test classes and test methods configured with the {@link DirtiesContext * @DirtiesContext} annotation. - * + * * @author Sam Brannen * @author Juergen Hoeller * @since 2.5 diff --git a/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java b/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java index 7f002792f1b..ee397d1655c 100644 --- a/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java +++ b/spring-test/src/main/java/org/springframework/test/context/testng/AbstractTestNGSpringContextTests.java @@ -58,7 +58,7 @@ import org.testng.annotations.BeforeMethod; *

      10. Must have constructors which either implicitly or explicitly delegate to * {@code super();}.
      11. * - * + * * @author Sam Brannen * @author Juergen Hoeller * @since 2.5 @@ -96,7 +96,7 @@ public abstract class AbstractTestNGSpringContextTests implements IHookable, App /** * Set the {@link ApplicationContext} to be used by this test instance, * provided via {@link ApplicationContextAware} semantics. - * + * * @param applicationContext the applicationContext to set */ public final void setApplicationContext(ApplicationContext applicationContext) { @@ -107,7 +107,7 @@ public abstract class AbstractTestNGSpringContextTests implements IHookable, App * Delegates to the configured {@link TestContextManager} to call * {@link TestContextManager#beforeTestClass() 'before test class'} * callbacks. - * + * * @throws Exception if a registered TestExecutionListener throws an * exception */ @@ -121,7 +121,7 @@ public abstract class AbstractTestNGSpringContextTests implements IHookable, App * {@link TestContextManager#prepareTestInstance(Object) prepare} this test * instance prior to execution of any individual tests, for example for * injecting dependencies, etc. - * + * * @throws Exception if a registered TestExecutionListener throws an * exception */ @@ -134,7 +134,7 @@ public abstract class AbstractTestNGSpringContextTests implements IHookable, App * Delegates to the configured {@link TestContextManager} to * {@link TestContextManager#beforeTestMethod(Object,Method) pre-process} * the test method before the actual test is executed. - * + * * @param testMethod the test method which is about to be executed. * @throws Exception allows all exceptions to propagate. */ @@ -147,7 +147,7 @@ public abstract class AbstractTestNGSpringContextTests implements IHookable, App * Delegates to the {@link IHookCallBack#runTestMethod(ITestResult) test * method} in the supplied callback to execute the actual test * and then tracks the exception thrown during test execution, if any. - * + * * @see org.testng.IHookable#run(org.testng.IHookCallBack, * org.testng.ITestResult) */ @@ -165,7 +165,7 @@ public abstract class AbstractTestNGSpringContextTests implements IHookable, App * Delegates to the configured {@link TestContextManager} to * {@link TestContextManager#afterTestMethod(Object, Method, Throwable) * post-process} the test method after the actual test has executed. - * + * * @param testMethod the test method which has just been executed on the * test instance * @throws Exception allows all exceptions to propagate @@ -183,7 +183,7 @@ public abstract class AbstractTestNGSpringContextTests implements IHookable, App /** * Delegates to the configured {@link TestContextManager} to call * {@link TestContextManager#afterTestClass() 'after test class'} callbacks. - * + * * @throws Exception if a registered TestExecutionListener throws an * exception */ diff --git a/spring-test/src/main/java/org/springframework/test/context/transaction/AfterTransaction.java b/spring-test/src/main/java/org/springframework/test/context/transaction/AfterTransaction.java index 7900cf30bfd..6ecbc5d5345 100644 --- a/spring-test/src/main/java/org/springframework/test/context/transaction/AfterTransaction.java +++ b/spring-test/src/main/java/org/springframework/test/context/transaction/AfterTransaction.java @@ -33,7 +33,7 @@ import java.lang.annotation.Target; * The @AfterTransaction methods of superclasses will be * executed after those of the current class. *

        - * + * * @author Sam Brannen * @since 2.5 * @see org.springframework.transaction.annotation.Transactional diff --git a/spring-test/src/main/java/org/springframework/test/context/transaction/BeforeTransaction.java b/spring-test/src/main/java/org/springframework/test/context/transaction/BeforeTransaction.java index 48736b79fdd..ac7e1e62baf 100644 --- a/spring-test/src/main/java/org/springframework/test/context/transaction/BeforeTransaction.java +++ b/spring-test/src/main/java/org/springframework/test/context/transaction/BeforeTransaction.java @@ -33,7 +33,7 @@ import java.lang.annotation.Target; * The @BeforeTransaction methods of superclasses will be * executed before those of the current class. *

        - * + * * @author Sam Brannen * @since 2.5 * @see org.springframework.transaction.annotation.Transactional diff --git a/spring-test/src/main/java/org/springframework/test/context/web/AbstractGenericWebContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/web/AbstractGenericWebContextLoader.java index d43e5f755d1..06b9d54b1f0 100644 --- a/spring-test/src/main/java/org/springframework/test/context/web/AbstractGenericWebContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/web/AbstractGenericWebContextLoader.java @@ -136,7 +136,7 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa * the {@code MockServletContext} under the * {@link WebApplicationContext#ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE} key. *
      12. Finally, the {@code MockServletContext} is set in the - * {@code WebApplicationContext}.
      13. + * {@code WebApplicationContext}. * * @param context the web application context for which to configure the web * resources diff --git a/spring-test/src/main/java/org/springframework/test/context/web/AnnotationConfigWebContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/web/AnnotationConfigWebContextLoader.java index 05cc92cd93f..4c89b59c70a 100644 --- a/spring-test/src/main/java/org/springframework/test/context/web/AnnotationConfigWebContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/web/AnnotationConfigWebContextLoader.java @@ -28,11 +28,11 @@ import org.springframework.web.context.support.GenericWebApplicationContext; /** * Concrete implementation of {@link AbstractGenericWebContextLoader} that loads * bean definitions from annotated classes. - * + * *

        See the Javadoc for * {@link org.springframework.test.context.ContextConfiguration @ContextConfiguration} * for a definition of annotated class. - * + * *

        Note: AnnotationConfigWebContextLoader supports annotated classes * rather than the String-based resource locations defined by the legacy * {@link org.springframework.test.context.ContextLoader ContextLoader} API. Thus, @@ -69,7 +69,7 @@ public class AnnotationConfigWebContextLoader extends AbstractGenericWebContextL * {@linkplain ContextConfigurationAttributes#setClasses(Class[]) set} in the * supplied configuration attributes. Otherwise, properties in the supplied * configuration attributes will not be modified. - * + * * @param configAttributes the context configuration attributes to process * @see org.springframework.test.context.SmartContextLoader#processContextConfiguration(ContextConfigurationAttributes) * @see #isGenerateDefaultLocations() diff --git a/spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java index 5a21ea0d321..2d865d8afd5 100644 --- a/spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/web/ServletTestExecutionListener.java @@ -38,7 +38,7 @@ import org.springframework.web.context.request.ServletWebRequest; * {@code TestExecutionListener} which provides mock Servlet API support to * {@link WebApplicationContext WebApplicationContexts} loaded by the Spring * TestContext Framework. - * + * *

        Specifically, {@code ServletTestExecutionListener} sets up thread-local * state via Spring Web's {@link RequestContextHolder} during {@linkplain * #prepareTestInstance(TestContext) test instance preparation} and {@linkplain @@ -61,7 +61,7 @@ public class ServletTestExecutionListener extends AbstractTestExecutionListener private static final Log logger = LogFactory.getLog(ServletTestExecutionListener.class); - + /** * Sets up thread-local state during the test instance preparation * callback phase via Spring Web's {@link RequestContextHolder}. diff --git a/spring-test/src/main/java/org/springframework/test/context/web/WebAppConfiguration.java b/spring-test/src/main/java/org/springframework/test/context/web/WebAppConfiguration.java index 785d314e5e0..7f24c2663f6 100644 --- a/spring-test/src/main/java/org/springframework/test/context/web/WebAppConfiguration.java +++ b/spring-test/src/main/java/org/springframework/test/context/web/WebAppConfiguration.java @@ -24,11 +24,11 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * {@code @WebAppConfiguration} is a class-level annotation that is used to + * {@code @WebAppConfiguration} is a class-level annotation that is used to * declare that the {@code ApplicationContext} loaded for an integration test * should be a {@link org.springframework.web.context.WebApplicationContext * WebApplicationContext}. - * + * *

        The mere presence of {@code @WebAppConfiguration} on a test class ensures * that a {@code WebApplicationContext} will be loaded for the test using a default * for the path to the root of the web application. To override the default, @@ -36,7 +36,7 @@ import java.lang.annotation.Target; * *

        Note that {@code @WebAppConfiguration} must be used in conjunction with * {@link org.springframework.test.context.ContextConfiguration @ContextConfiguration}, - * either within a single test class or within a test class hierarchy. + * either within a single test class or within a test class hierarchy. * * @author Sam Brannen * @since 3.2 diff --git a/spring-test/src/main/java/org/springframework/test/context/web/WebDelegatingSmartContextLoader.java b/spring-test/src/main/java/org/springframework/test/context/web/WebDelegatingSmartContextLoader.java index 6e0be682e80..fa561c00a7f 100644 --- a/spring-test/src/main/java/org/springframework/test/context/web/WebDelegatingSmartContextLoader.java +++ b/spring-test/src/main/java/org/springframework/test/context/web/WebDelegatingSmartContextLoader.java @@ -23,7 +23,7 @@ import org.springframework.test.context.support.AbstractDelegatingSmartContextLo * {@code WebDelegatingSmartContextLoader} is a concrete implementation of * {@link AbstractDelegatingSmartContextLoader} that delegates to a * {@link GenericXmlWebContextLoader} and an {@link AnnotationConfigWebContextLoader}. - * + * * @author Sam Brannen * @since 3.2 * @see SmartContextLoader diff --git a/spring-test/src/main/java/org/springframework/test/context/web/WebMergedContextConfiguration.java b/spring-test/src/main/java/org/springframework/test/context/web/WebMergedContextConfiguration.java index ce3ed59e29f..4be20de0f36 100644 --- a/spring-test/src/main/java/org/springframework/test/context/web/WebMergedContextConfiguration.java +++ b/spring-test/src/main/java/org/springframework/test/context/web/WebMergedContextConfiguration.java @@ -117,7 +117,7 @@ public class WebMergedContextConfiguration extends MergedContextConfiguration { * instance by comparing both object's {@linkplain #getLocations() locations}, * {@linkplain #getClasses() annotated classes}, * {@linkplain #getContextInitializerClasses() context initializer classes}, - * {@linkplain #getActiveProfiles() active profiles}, + * {@linkplain #getActiveProfiles() active profiles}, * {@linkplain #getResourceBasePath() resource base path}, and the fully * qualified names of their {@link #getContextLoader() ContextLoaders}. */ diff --git a/spring-test/src/main/java/org/springframework/test/jdbc/JdbcTestUtils.java b/spring-test/src/main/java/org/springframework/test/jdbc/JdbcTestUtils.java index 8c2370f7a7e..a59043a948b 100644 --- a/spring-test/src/main/java/org/springframework/test/jdbc/JdbcTestUtils.java +++ b/spring-test/src/main/java/org/springframework/test/jdbc/JdbcTestUtils.java @@ -233,7 +233,7 @@ public class JdbcTestUtils { } /** - * Read a script from the provided {@code LineNumberReader}, using + * Read a script from the provided {@code LineNumberReader}, using * "{@code --}" as the comment prefix, and build a {@code String} containing * the lines. * @param lineNumberReader the {@code LineNumberReader} containing the script diff --git a/spring-test/src/main/java/org/springframework/test/jpa/AbstractJpaTests.java b/spring-test/src/main/java/org/springframework/test/jpa/AbstractJpaTests.java index fd18656aa9d..5e1b0038308 100644 --- a/spring-test/src/main/java/org/springframework/test/jpa/AbstractJpaTests.java +++ b/spring-test/src/main/java/org/springframework/test/jpa/AbstractJpaTests.java @@ -59,8 +59,8 @@ import org.springframework.util.StringUtils; * JpaTransactionManager through the superclass. * *

        When using Xerces, make sure a post 2.0.2 version is available on the classpath - * to avoid a critical - * bug + * to avoid a critical + * bug * that leads to StackOverflow. Maven users are likely to encounter this problem since * 2.0.2 is used by default. * @@ -84,7 +84,7 @@ import org.springframework.util.StringUtils; public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactionalTests { private static final String DEFAULT_ORM_XML_LOCATION = "META-INF/orm.xml"; - + /** * Map from String defining unique combination of config locations, to ApplicationContext. * Values are intentionally not strongly typed, to avoid potential class cast exceptions @@ -140,15 +140,15 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio @Override public void setDirty() { - super.setDirty(); + super.setDirty(); contextCache.remove(cacheKeys()); classLoaderCache.remove(cacheKeys()); - + // If we are a shadow loader, we need to invoke - // the shadow parent to set it dirty, as + // the shadow parent to set it dirty, as // it is the shadow parent that maintains the cache state, // not the child - if (this.shadowParent != null) { + if (this.shadowParent != null) { try { Method m = shadowParent.getClass().getMethod("setDirty", (Class[]) null); m.invoke(shadowParent, (Object[]) null); @@ -159,11 +159,11 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio } } - + @Override @SuppressWarnings({ "rawtypes", "unchecked" }) public void runBare() throws Throwable { - + // getName will return the name of the method being run. if (isDisabledInThisEnvironment(getName())) { // Let superclass log that we didn't run the test. @@ -185,7 +185,7 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio return; } - String combinationOfContextLocationsForThisTestClass = cacheKeys(); + String combinationOfContextLocationsForThisTestClass = cacheKeys(); ClassLoader classLoaderForThisTestClass = getClass().getClassLoader(); // save the TCCL ClassLoader initialClassLoader = Thread.currentThread().getContextClassLoader(); @@ -255,7 +255,7 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio } // create the shadowed test Class shadowedTestClass = shadowingClassLoader.loadClass(getClass().getName()); - + // So long as JUnit is excluded from shadowing we // can minimize reflective invocation here TestCase shadowedTestCase = (TestCase) BeanUtils.instantiateClass(shadowedTestClass); @@ -295,12 +295,12 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio * class to be loaded eagerly when this test case loads, creating verify errors at runtime. */ protected ClassLoader createShadowingClassLoader(ClassLoader classLoader) { - OrmXmlOverridingShadowingClassLoader orxl = new OrmXmlOverridingShadowingClassLoader(classLoader, - getActualOrmXmlLocation()); + OrmXmlOverridingShadowingClassLoader orxl = new OrmXmlOverridingShadowingClassLoader(classLoader, + getActualOrmXmlLocation()); customizeResourceOverridingShadowingClassLoader(orxl); return orxl; } - + /** * Customize the shadowing class loader. * @param shadowingClassLoader this parameter is actually of type @@ -311,7 +311,7 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio protected void customizeResourceOverridingShadowingClassLoader(ClassLoader shadowingClassLoader) { // empty } - + /** * Subclasses can override this to return the real location path for * orm.xml or null if they do not wish to find any orm.xml @@ -367,7 +367,7 @@ public abstract class AbstractJpaTests extends AbstractAnnotationAwareTransactio public ClassLoader getInstrumentableClassLoader() { return this.shadowingClassLoader; } - + public ClassLoader getThrowawayClassLoader() { // Be sure to copy the same resource overrides and same class file transformers: // We want the throwaway class loader to behave like the instrumentable class loader. diff --git a/spring-test/src/main/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java b/spring-test/src/main/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java index a6baeaffcd2..0f2180ebebf 100644 --- a/spring-test/src/main/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java +++ b/spring-test/src/main/java/org/springframework/test/jpa/OrmXmlOverridingShadowingClassLoader.java @@ -31,7 +31,7 @@ import org.springframework.instrument.classloading.ResourceOverridingShadowingCl * @since 2.0 */ class OrmXmlOverridingShadowingClassLoader extends ResourceOverridingShadowingClassLoader { - + /** * Default location of the orm.xml file in the class path: * "META-INF/orm.xml" diff --git a/spring-test/src/main/java/org/springframework/test/util/ReflectionTestUtils.java b/spring-test/src/main/java/org/springframework/test/util/ReflectionTestUtils.java index 865c9e3a5ca..6b54d54797e 100644 --- a/spring-test/src/main/java/org/springframework/test/util/ReflectionTestUtils.java +++ b/spring-test/src/main/java/org/springframework/test/util/ReflectionTestUtils.java @@ -30,12 +30,12 @@ import org.springframework.util.StringUtils; /** * {@code ReflectionTestUtils} is a collection of reflection-based utility * methods for use in unit and integration testing scenarios. - * + * *

        There are often times when it would be beneficial to be able to set a * non-{@code public} field, invoke a non-{@code public} setter method, or * invoke a non-{@code public} configuration or lifecycle * callback method when testing code involving, for example: - * + * *

          *
        • ORM frameworks such as JPA and Hibernate which condone the usage of * {@code private} or {@code protected} field access as opposed to @@ -49,7 +49,7 @@ import org.springframework.util.StringUtils; * and {@link javax.annotation.PreDestroy @PreDestroy} for lifecycle callback * methods.
        • *
        - * + * * @author Sam Brannen * @author Juergen Hoeller * @since 2.5 @@ -67,12 +67,12 @@ public class ReflectionTestUtils { /** * Set the {@link Field field} with the given {@code name} on the provided * {@link Object target object} to the supplied {@code value}. - * + * *

        This method traverses the class hierarchy in search of the desired field. * In addition, an attempt will be made to make non-{@code public} fields * accessible, thus allowing one to set {@code protected}, * {@code private}, and package-private fields. - * + * * @param target the target object on which to set the field * @param name the name of the field to set * @param value the value to set @@ -87,12 +87,12 @@ public class ReflectionTestUtils { /** * Set the {@link Field field} with the given {@code name} on the provided * {@link Object target object} to the supplied {@code value}. - * + * *

        This method traverses the class hierarchy in search of the desired * field. In addition, an attempt will be made to make non-{@code public} * fields accessible, thus allowing one to set {@code protected}, * {@code private}, and package-private fields. - * + * * @param target the target object on which to set the field * @param name the name of the field to set * @param value the value to set @@ -123,12 +123,12 @@ public class ReflectionTestUtils { /** * Get the field with the given {@code name} from the provided target object. - * + * *

        This method traverses the class hierarchy in search of the desired * field. In addition, an attempt will be made to make non-{@code public} * fields accessible, thus allowing one to get {@code protected}, * {@code private}, and package-private fields. - * + * * @param target the target object on which to set the field * @param name the name of the field to get * @return the field's current value @@ -151,17 +151,17 @@ public class ReflectionTestUtils { /** * Invoke the setter method with the given {@code name} on the supplied * target object with the supplied {@code value}. - * + * *

        This method traverses the class hierarchy in search of the desired * method. In addition, an attempt will be made to make non-{@code public} * methods accessible, thus allowing one to invoke {@code protected}, * {@code private}, and package-private setter methods. - * + * *

        In addition, this method supports JavaBean-style property * names. For example, if you wish to set the {@code name} property on the * target object, you may pass either "name" or * "setName" as the method name. - * + * * @param target the target object on which to invoke the specified setter * method * @param name the name of the setter method to invoke or the corresponding @@ -178,17 +178,17 @@ public class ReflectionTestUtils { /** * Invoke the setter method with the given {@code name} on the supplied * target object with the supplied {@code value}. - * + * *

        This method traverses the class hierarchy in search of the desired * method. In addition, an attempt will be made to make non-{@code public} * methods accessible, thus allowing one to invoke {@code protected}, * {@code private}, and package-private setter methods. - * + * *

        In addition, this method supports JavaBean-style property * names. For example, if you wish to set the {@code name} property on the * target object, you may pass either "name" or * "setName" as the method name. - * + * * @param target the target object on which to invoke the specified setter * method * @param name the name of the setter method to invoke or the corresponding @@ -226,17 +226,17 @@ public class ReflectionTestUtils { /** * Invoke the getter method with the given {@code name} on the supplied * target object with the supplied {@code value}. - * + * *

        This method traverses the class hierarchy in search of the desired * method. In addition, an attempt will be made to make non-{@code public} * methods accessible, thus allowing one to invoke {@code protected}, * {@code private}, and package-private getter methods. - * + * *

        In addition, this method supports JavaBean-style property * names. For example, if you wish to get the {@code name} property on the * target object, you may pass either "name" or * "getName" as the method name. - * + * * @param target the target object on which to invoke the specified getter * method * @param name the name of the getter method to invoke or the corresponding @@ -271,12 +271,12 @@ public class ReflectionTestUtils { /** * Invoke the method with the given {@code name} on the supplied target * object with the supplied arguments. - * + * *

        This method traverses the class hierarchy in search of the desired * method. In addition, an attempt will be made to make non-{@code public} * methods accessible, thus allowing one to invoke {@code protected}, * {@code private}, and package-private methods. - * + * * @param target the target object on which to invoke the specified method * @param name the name of the method to invoke * @param args the arguments to provide to the method diff --git a/spring-test/src/main/java/org/springframework/test/web/AbstractModelAndViewTests.java b/spring-test/src/main/java/org/springframework/test/web/AbstractModelAndViewTests.java index e3392456b4a..c647bd41dcc 100644 --- a/spring-test/src/main/java/org/springframework/test/web/AbstractModelAndViewTests.java +++ b/spring-test/src/main/java/org/springframework/test/web/AbstractModelAndViewTests.java @@ -28,11 +28,11 @@ import org.springframework.web.servlet.ModelAndView; /** * Convenient JUnit 3.8 base class for tests dealing with Spring Web MVC * {@link org.springframework.web.servlet.ModelAndView ModelAndView} objects. - * + * *

        All assert*() methods throw {@link AssertionFailedError}s. - * + * *

        Consider the use of {@link ModelAndViewAssert} with JUnit 4 and TestNG. - * + * * @author Alef Arendsen * @author Bram Smeets * @author Sam Brannen diff --git a/spring-test/src/main/java/org/springframework/test/web/ModelAndViewAssert.java b/spring-test/src/main/java/org/springframework/test/web/ModelAndViewAssert.java index 2d6bf7da09a..a15c67d3232 100644 --- a/spring-test/src/main/java/org/springframework/test/web/ModelAndViewAssert.java +++ b/spring-test/src/main/java/org/springframework/test/web/ModelAndViewAssert.java @@ -35,7 +35,7 @@ import org.springframework.web.servlet.ModelAndView; *

        * Intended for use with JUnit 4 and TestNG. All assert*() methods * throw {@link AssertionError}s. - * + * * @author Sam Brannen * @author Alef Arendsen * @author Bram Smeets @@ -48,7 +48,7 @@ public abstract class ModelAndViewAssert { * Checks whether the model value under the given modelName * exists and checks it type, based on the expectedType. If the * model entry exists and the type matches, the model value is returned. - * + * * @param mav ModelAndView to test against (never null) * @param modelName name of the object to add to the model (never * null) @@ -68,7 +68,7 @@ public abstract class ModelAndViewAssert { /** * Compare each individual entry in a list, without first sorting the lists. - * + * * @param mav ModelAndView to test against (never null) * @param modelName name of the object to add to the model (never * null) @@ -87,7 +87,7 @@ public abstract class ModelAndViewAssert { /** * Assert whether or not a model attribute is available. - * + * * @param mav ModelAndView to test against (never null) * @param modelName name of the object to add to the model (never * null) @@ -102,7 +102,7 @@ public abstract class ModelAndViewAssert { /** * Compare a given expectedValue to the value from the model * bound under the given modelName. - * + * * @param mav ModelAndView to test against (never null) * @param modelName name of the object to add to the model (never * null) @@ -118,7 +118,7 @@ public abstract class ModelAndViewAssert { /** * Inspect the expectedModel to see if all elements in the * model appear and are equal. - * + * * @param mav ModelAndView to test against (never null) * @param expectedModel the expected model */ @@ -151,7 +151,7 @@ public abstract class ModelAndViewAssert { /** * Compare each individual entry in a list after having sorted both lists * (optionally using a comparator). - * + * * @param mav ModelAndView to test against (never null) * @param modelName name of the object to add to the model (never * null) @@ -187,7 +187,7 @@ public abstract class ModelAndViewAssert { /** * Check to see if the view name in the ModelAndView matches the given * expectedName. - * + * * @param mav ModelAndView to test against (never null) * @param expectedName the name of the model value */ diff --git a/spring-test/src/test/java/org/springframework/beans/Employee.java b/spring-test/src/test/java/org/springframework/beans/Employee.java index 923c0041087..3a47dfd6903 100644 --- a/spring-test/src/test/java/org/springframework/beans/Employee.java +++ b/spring-test/src/test/java/org/springframework/beans/Employee.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,7 @@ package org.springframework.beans; public class Employee extends TestBean { - + private String co; /** @@ -27,11 +27,11 @@ public class Employee extends TestBean { public Employee() { super(); } - + public String getCompany() { return co; } - + public void setCompany(String co) { this.co = co; } diff --git a/spring-test/src/test/java/org/springframework/beans/INestedTestBean.java b/spring-test/src/test/java/org/springframework/beans/INestedTestBean.java index 7d87547b5f7..c5c4ed5e679 100644 --- a/spring-test/src/test/java/org/springframework/beans/INestedTestBean.java +++ b/spring-test/src/test/java/org/springframework/beans/INestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-test/src/test/java/org/springframework/beans/IOther.java b/spring-test/src/test/java/org/springframework/beans/IOther.java index 797486ec44e..6a8f74187cb 100644 --- a/spring-test/src/test/java/org/springframework/beans/IOther.java +++ b/spring-test/src/test/java/org/springframework/beans/IOther.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-test/src/test/java/org/springframework/beans/NestedTestBean.java b/spring-test/src/test/java/org/springframework/beans/NestedTestBean.java index a06e15d150b..0eb8df5c8ae 100644 --- a/spring-test/src/test/java/org/springframework/beans/NestedTestBean.java +++ b/spring-test/src/test/java/org/springframework/beans/NestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-test/src/test/java/org/springframework/beans/TestBean.java b/spring-test/src/test/java/org/springframework/beans/TestBean.java index a56bab7e33e..d84f85d0964 100644 --- a/spring-test/src/test/java/org/springframework/beans/TestBean.java +++ b/spring-test/src/test/java/org/springframework/beans/TestBean.java @@ -35,7 +35,7 @@ import org.springframework.util.ObjectUtils; /** * Simple test bean used for testing bean factories, the AOP framework etc. - * + * * @author Rod Johnson * @author Juergen Hoeller * @since 15 April 2001 diff --git a/spring-test/src/test/java/org/springframework/test/AbstractSpr3350SingleSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/AbstractSpr3350SingleSpringContextTests.java index c60037cf749..eb8f362d56d 100644 --- a/spring-test/src/test/java/org/springframework/test/AbstractSpr3350SingleSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/AbstractSpr3350SingleSpringContextTests.java @@ -24,7 +24,7 @@ import org.springframework.context.ApplicationContext; * Abstract JUnit 3.8 based unit test which verifies new functionality requested * in SPR-3350. - * + * * @author Sam Brannen * @since 2.5 */ @@ -51,7 +51,7 @@ public abstract class AbstractSpr3350SingleSpringContextTests extends AbstractDe * configured * {@link #createBeanDefinitionReader(org.springframework.context.support.GenericApplicationContext) * BeanDefinitionReader}. - * + * * @see org.springframework.test.AbstractSingleSpringContextTests#getConfigPath() */ protected abstract String getConfigPath(); diff --git a/spring-test/src/test/java/org/springframework/test/Spr3264DependencyInjectionSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/Spr3264DependencyInjectionSpringContextTests.java index 9636d46a97d..ab6e42dc68c 100644 --- a/spring-test/src/test/java/org/springframework/test/Spr3264DependencyInjectionSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/Spr3264DependencyInjectionSpringContextTests.java @@ -20,7 +20,7 @@ package org.springframework.test; * JUnit 3.8 based unit test which verifies new functionality requested in SPR-3264. - * + * * @author Sam Brannen * @since 2.5 * @see Spr3264SingleSpringContextTests diff --git a/spring-test/src/test/java/org/springframework/test/Spr3264SingleSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/Spr3264SingleSpringContextTests.java index 6496cdb07e0..496bbc1b010 100644 --- a/spring-test/src/test/java/org/springframework/test/Spr3264SingleSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/Spr3264SingleSpringContextTests.java @@ -20,7 +20,7 @@ package org.springframework.test; * JUnit 3.8 based unit test which verifies new functionality requested in SPR-3264. - * + * * @author Sam Brannen * @since 2.5 * @see Spr3264DependencyInjectionSpringContextTests diff --git a/spring-test/src/test/java/org/springframework/test/annotation/ProfileValueAnnotationAwareTransactionalTests.java b/spring-test/src/test/java/org/springframework/test/annotation/ProfileValueAnnotationAwareTransactionalTests.java index e1d77ab5d5a..580b873b10b 100644 --- a/spring-test/src/test/java/org/springframework/test/annotation/ProfileValueAnnotationAwareTransactionalTests.java +++ b/spring-test/src/test/java/org/springframework/test/annotation/ProfileValueAnnotationAwareTransactionalTests.java @@ -23,7 +23,7 @@ import junit.framework.TestResult; * Verifies proper handling of {@link IfProfileValue @IfProfileValue} and * {@link ProfileValueSourceConfiguration @ProfileValueSourceConfiguration} in * conjunction with {@link AbstractAnnotationAwareTransactionalTests}. - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-test/src/test/java/org/springframework/test/annotation/ProfileValueUtilsTests.java b/spring-test/src/test/java/org/springframework/test/annotation/ProfileValueUtilsTests.java index 092bc751acc..7ec007c0160 100644 --- a/spring-test/src/test/java/org/springframework/test/annotation/ProfileValueUtilsTests.java +++ b/spring-test/src/test/java/org/springframework/test/annotation/ProfileValueUtilsTests.java @@ -26,7 +26,7 @@ import org.junit.Test; /** * Unit tests for {@link ProfileValueUtils}. - * + * * @author Sam Brannen * @since 3.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/ClassLevelDirtiesContextTests.java b/spring-test/src/test/java/org/springframework/test/context/ClassLevelDirtiesContextTests.java index 59d5da748bf..613dc3acce8 100644 --- a/spring-test/src/test/java/org/springframework/test/context/ClassLevelDirtiesContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/ClassLevelDirtiesContextTests.java @@ -41,7 +41,7 @@ import org.springframework.test.context.support.DirtiesContextTestExecutionListe * application context caching} in conjunction with the * {@link SpringJUnit4ClassRunner} and the {@link DirtiesContext * @DirtiesContext} annotation at the class level. - * + * * @author Sam Brannen * @since 3.0 */ @@ -54,7 +54,7 @@ public class ClassLevelDirtiesContextTests { /** * Asserts the statistics of the supplied context cache. - * + * * @param usageScenario the scenario in which the statistics are used * @param expectedSize the expected number of contexts in the cache * @param expectedHitCount the expected hit count diff --git a/spring-test/src/test/java/org/springframework/test/context/ContextLoaderUtilsTests.java b/spring-test/src/test/java/org/springframework/test/context/ContextLoaderUtilsTests.java index 5b386cfc943..aace2b29a41 100644 --- a/spring-test/src/test/java/org/springframework/test/context/ContextLoaderUtilsTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/ContextLoaderUtilsTests.java @@ -37,7 +37,7 @@ import org.springframework.web.context.support.GenericWebApplicationContext; /** * Unit tests for {@link ContextLoaderUtils}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/MergedContextConfigurationTests.java b/spring-test/src/test/java/org/springframework/test/context/MergedContextConfigurationTests.java index 790d5f9ca99..9bd67303ba5 100644 --- a/spring-test/src/test/java/org/springframework/test/context/MergedContextConfigurationTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/MergedContextConfigurationTests.java @@ -31,10 +31,10 @@ import org.springframework.test.context.support.GenericXmlContextLoader; /** * Unit tests for {@link MergedContextConfiguration}. - * + * *

        These tests primarily exist to ensure that {@code MergedContextConfiguration} * can safely be used as the cache key for {@link ContextCache}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/SpringRunnerContextCacheTests.java b/spring-test/src/test/java/org/springframework/test/context/SpringRunnerContextCacheTests.java index 2e1b2ef09ea..8ae941c107e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/SpringRunnerContextCacheTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/SpringRunnerContextCacheTests.java @@ -40,7 +40,7 @@ import org.springframework.test.context.support.DirtiesContextTestExecutionListe * application context caching} in conjunction with the * {@link SpringJUnit4ClassRunner} and the {@link DirtiesContext * @DirtiesContext} annotation at the method level. - * + * * @author Sam Brannen * @author Juergen Hoeller * @since 2.5 @@ -59,7 +59,7 @@ public class SpringRunnerContextCacheTests { /** * Asserts the statistics of the context cache in {@link TestContextManager}. - * + * * @param usageScenario the scenario in which the statistics are used * @param expectedSize the expected number of contexts in the cache * @param expectedHitCount the expected hit count @@ -73,7 +73,7 @@ public class SpringRunnerContextCacheTests { /** * Asserts the statistics of the supplied context cache. - * + * * @param contextCache the cache to assert against * @param usageScenario the scenario in which the statistics are used * @param expectedSize the expected number of contexts in the cache diff --git a/spring-test/src/test/java/org/springframework/test/context/TestContextCacheKeyTests.java b/spring-test/src/test/java/org/springframework/test/context/TestContextCacheKeyTests.java index c8a21e32b6d..a504642a928 100644 --- a/spring-test/src/test/java/org/springframework/test/context/TestContextCacheKeyTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/TestContextCacheKeyTests.java @@ -26,9 +26,9 @@ import org.springframework.context.annotation.Configuration; import org.springframework.test.context.support.AnnotationConfigContextLoader; /** - * Unit tests for verifying proper behavior of the {@link ContextCache} in + * Unit tests for verifying proper behavior of the {@link ContextCache} in * conjunction with cache keys used in {@link TestContext}. - * + * * @author Sam Brannen * @since 3.1 * @see SpringRunnerContextCacheTests diff --git a/spring-test/src/test/java/org/springframework/test/context/TestContextManagerTests.java b/spring-test/src/test/java/org/springframework/test/context/TestContextManagerTests.java index 5b76b650bbc..69c5ba2d433 100644 --- a/spring-test/src/test/java/org/springframework/test/context/TestContextManagerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/TestContextManagerTests.java @@ -38,7 +38,7 @@ import org.springframework.test.context.support.AbstractTestExecutionListener; * JUnit 4 based unit test for {@link TestContextManager}, which verifies proper * execution order of registered {@link TestExecutionListener * TestExecutionListeners}. - * + * * @author Sam Brannen * @since 2.5 */ @@ -64,7 +64,7 @@ public class TestContextManagerTests { * Asserts the execution order of 'before' and 'after' test method * calls on {@link TestExecutionListener listeners} registered for the * configured {@link TestContextManager}. - * + * * @see #beforeTestMethodCalls * @see #afterTestMethodCalls */ @@ -121,7 +121,7 @@ public class TestContextManagerTests { /** * Verifies the expected {@link TestExecutionListener} * execution order within a test method. - * + * * @see #verifyListenerExecutionOrderAfterClass() */ @Test diff --git a/spring-test/src/test/java/org/springframework/test/context/TestExecutionListenersTests.java b/spring-test/src/test/java/org/springframework/test/context/TestExecutionListenersTests.java index 19919c1ac2b..5596e6ea8bf 100644 --- a/spring-test/src/test/java/org/springframework/test/context/TestExecutionListenersTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/TestExecutionListenersTests.java @@ -33,7 +33,7 @@ import org.springframework.test.context.support.AbstractTestExecutionListener; * href="http://opensource.atlassian.com/projects/spring/browse/SPR-3896" * target="_blank">SPR-3896 * - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java index a9b9e3f16f8..a6376dfdf94 100644 --- a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java @@ -31,7 +31,7 @@ import org.springframework.test.context.junit4.PropertiesBasedSpringJUnit4ClassR * be used at all levels within a test class hierarchy when the * loader is inherited (i.e., not explicitly declared) via * {@link ContextConfiguration @ContextConfiguration}. - * + * * @author Sam Brannen * @since 3.0 * @see PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests diff --git a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java index 3038750d411..8c635bdd6a3 100644 --- a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java @@ -32,7 +32,7 @@ import org.springframework.test.context.support.GenericPropertiesContextLoader; * be used at all levels within a test class hierarchy when the * loader is explicitly declared via {@link ContextConfiguration * @ContextConfiguration}. - * + * * @author Sam Brannen * @since 3.0 * @see PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests diff --git a/spring-test/src/test/java/org/springframework/test/context/junit38/ConcreteTransactionalJUnit38SpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/junit38/ConcreteTransactionalJUnit38SpringContextTests.java index 9235841e498..b1a0a4e5514 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit38/ConcreteTransactionalJUnit38SpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit38/ConcreteTransactionalJUnit38SpringContextTests.java @@ -41,7 +41,7 @@ import org.springframework.test.jdbc.SimpleJdbcTestUtils; /** * Combined integration test for {@link AbstractJUnit38SpringContextTests} and * {@link AbstractTransactionalJUnit38SpringContextTests}. - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit38/FailingBeforeAndAfterMethodsTests.java b/spring-test/src/test/java/org/springframework/test/context/junit38/FailingBeforeAndAfterMethodsTests.java index 3049204efbe..192702ab294 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit38/FailingBeforeAndAfterMethodsTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit38/FailingBeforeAndAfterMethodsTests.java @@ -47,7 +47,7 @@ import org.springframework.test.context.transaction.BeforeTransaction; * href="http://opensource.atlassian.com/projects/spring/browse/SPR-3960" * target="_blank">SPR-3960. *

        - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit38/ProfileValueJUnit38SpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/junit38/ProfileValueJUnit38SpringContextTests.java index 1b8e6e6a00c..39cf8624ad5 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit38/ProfileValueJUnit38SpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit38/ProfileValueJUnit38SpringContextTests.java @@ -32,7 +32,7 @@ import org.springframework.test.context.TestExecutionListeners; * Verifies proper handling of {@link IfProfileValue @IfProfileValue} and * {@link ProfileValueSourceConfiguration @ProfileValueSourceConfiguration} * in conjunction with {@link AbstractJUnit38SpringContextTests}. - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit38/RepeatedJUnit38SpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/junit38/RepeatedJUnit38SpringContextTests.java index 8a6f32c512a..e33f290ac5b 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit38/RepeatedJUnit38SpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit38/RepeatedJUnit38SpringContextTests.java @@ -24,7 +24,7 @@ import org.springframework.test.context.TestExecutionListeners; /** * Unit test for {@link AbstractJUnit38SpringContextTests} which focuses on * proper support of the {@link Repeat @Repeat} annotation. - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/AbsolutePathSpringJUnit4ClassRunnerAppCtxTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/AbsolutePathSpringJUnit4ClassRunnerAppCtxTests.java index 6318814e72b..419997161eb 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/AbsolutePathSpringJUnit4ClassRunnerAppCtxTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/AbsolutePathSpringJUnit4ClassRunnerAppCtxTests.java @@ -23,7 +23,7 @@ import org.springframework.test.context.ContextConfiguration; * Extension of {@link SpringJUnit4ClassRunnerAppCtxTests}, which verifies that * we can specify an explicit, absolute path location for our * application context. - * + * * @author Sam Brannen * @since 2.5 * @see SpringJUnit4ClassRunnerAppCtxTests diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/AbstractTransactionalSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/AbstractTransactionalSpringRunnerTests.java index 4b36e3ed375..ebe40daa0ac 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/AbstractTransactionalSpringRunnerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/AbstractTransactionalSpringRunnerTests.java @@ -26,7 +26,7 @@ import org.springframework.transaction.annotation.Transactional; * Abstract base class for verifying support of Spring's {@link Transactional * @Transactional} and {@link NotTransactional @NotTransactional} * annotations. - * + * * @author Sam Brannen * @since 2.5 * @see ClassLevelTransactionalSpringRunnerTests diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/ClassLevelTransactionalSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/ClassLevelTransactionalSpringRunnerTests.java index a4c5c81ab40..9069dc59bd0 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/ClassLevelTransactionalSpringRunnerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/ClassLevelTransactionalSpringRunnerTests.java @@ -55,7 +55,7 @@ import org.springframework.transaction.annotation.Transactional; * This class specifically tests usage of @Transactional * defined at the class level. *

        - * + * * @author Sam Brannen * @since 2.5 * @see MethodLevelTransactionalSpringRunnerTests diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests.java index 8348e5aad7a..01ec43a2fd1 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests.java @@ -45,7 +45,7 @@ import org.springframework.test.jdbc.SimpleJdbcTestUtils; /** * Combined integration test for {@link AbstractJUnit4SpringContextTests} and * {@link AbstractTransactionalJUnit4SpringContextTests}. - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/CustomDefaultContextLoaderClassSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/CustomDefaultContextLoaderClassSpringRunnerTests.java index 59f59ff21d1..ad7de4f2701 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/CustomDefaultContextLoaderClassSpringRunnerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/CustomDefaultContextLoaderClassSpringRunnerTests.java @@ -31,7 +31,7 @@ import org.springframework.test.context.support.GenericPropertiesContextLoader; * Integration tests which verify that a subclass of {@link SpringJUnit4ClassRunner} * can specify a custom default ContextLoader class name that overrides * the standard default class name. - * + * * @author Sam Brannen * @since 3.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/EnabledAndIgnoredSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/EnabledAndIgnoredSpringRunnerTests.java index b9c6c811a30..80366aed5aa 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/EnabledAndIgnoredSpringRunnerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/EnabledAndIgnoredSpringRunnerTests.java @@ -39,7 +39,7 @@ import org.springframework.test.context.TestExecutionListeners; * Note that {@link TestExecutionListeners @TestExecutionListeners} is * explicitly configured with an empty list, thus disabling all default * listeners. - * + * * @author Sam Brannen * @since 2.5 * @see HardCodedProfileValueSourceSpringRunnerTests 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 cedbc191210..d94035194c9 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 @@ -35,7 +35,7 @@ import org.springframework.test.context.TestExecutionListeners; *
      14. JUnit's {@link Test#expected() @Test(expected=...)}
      15. *
      16. Spring's {@link ExpectedException @ExpectedException}
      17. * - * + * * @author Sam Brannen * @since 3.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTests.java index 4bdf5837e3c..0f4fb93641f 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/FailingBeforeAndAfterMethodsTests.java @@ -55,7 +55,7 @@ import org.springframework.test.context.transaction.BeforeTransaction; * and {@link TestExecutionListener#afterTestClass(TestContext) * afterTestClass()} lifecycle callback methods. *

        - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/HardCodedProfileValueSourceSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/HardCodedProfileValueSourceSpringRunnerTests.java index 62118b48df6..8e422e1c0cd 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/HardCodedProfileValueSourceSpringRunnerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/HardCodedProfileValueSourceSpringRunnerTests.java @@ -29,7 +29,7 @@ import org.springframework.test.annotation.ProfileValueSourceConfiguration; * explicit, custom defined {@link ProfileValueSource}) annotations in * conjunction with the {@link SpringJUnit4ClassRunner}. *

        - * + * * @author Sam Brannen * @since 2.5 * @see EnabledAndIgnoredSpringRunnerTests diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/MethodLevelTransactionalSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/MethodLevelTransactionalSpringRunnerTests.java index b553904583c..f2664d8ec0e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/MethodLevelTransactionalSpringRunnerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/MethodLevelTransactionalSpringRunnerTests.java @@ -55,7 +55,7 @@ import org.springframework.transaction.annotation.Transactional; * {@link ClassLevelTransactionalSpringRunnerTests}, this class omits usage of * @NotTransactional. *

        - * + * * @author Sam Brannen * @since 2.5 * @see ClassLevelTransactionalSpringRunnerTests diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests.java index 3790fc2188d..306eb98310a 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests.java @@ -30,7 +30,7 @@ import org.springframework.util.ResourceUtils; * to verify support for the new value attribute alias for * @ContextConfiguration's locations attribute. *

        - * + * * @author Sam Brannen * @since 2.5 * @see SpringJUnit4ClassRunnerAppCtxTests diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/RepeatedSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/RepeatedSpringRunnerTests.java index 5b02643ea66..49d5ad5e7a4 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/RepeatedSpringRunnerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/RepeatedSpringRunnerTests.java @@ -40,7 +40,7 @@ import org.springframework.test.context.TestExecutionListeners; *
      18. Spring's {@link Repeat @Repeat}
      19. *
      20. Spring's {@link Timed @Timed}
      21. * - * + * * @author Sam Brannen * @since 3.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit47ClassRunnerRuleTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit47ClassRunnerRuleTests.java index 215e410469d..61059c36399 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit47ClassRunnerRuleTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit47ClassRunnerRuleTests.java @@ -28,7 +28,7 @@ import org.springframework.test.context.TestExecutionListeners; * Verifies support for JUnit 4.7 {@link Rule Rules} in conjunction with the * {@link SpringJUnit4ClassRunner}. The body of this test class is taken from * the JUnit 4.7 release notes. - * + * * @author JUnit 4.7 Team * @author Sam Brannen * @since 3.0 diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests.java index af1389b879d..0b2993059f8 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests.java @@ -69,11 +69,11 @@ import org.springframework.test.context.support.GenericXmlContextLoader; * dependencies will be injected via {@link Autowired @Autowired}, * {@link Inject @Inject}, and {@link Resource @Resource} from beans defined in * the {@link ApplicationContext} loaded from the default classpath resource: - * + * * "/org/springframework/test/context/junit/SpringJUnit4ClassRunnerAppCtxTests-context.xml" * . *

        - * + * * @author Sam Brannen * @since 2.5 * @see AbsolutePathSpringJUnit4ClassRunnerAppCtxTests @@ -88,7 +88,7 @@ public class SpringJUnit4ClassRunnerAppCtxTests implements ApplicationContextAwa /** * Default resource path for the application context configuration for * {@link SpringJUnit4ClassRunnerAppCtxTests}: - * + * * "/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml" */ public static final String DEFAULT_CONTEXT_RESOURCE_PATH = "/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml"; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4SuiteTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4SuiteTests.java index f9096ab5f06..d8446ea5791 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4SuiteTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4SuiteTests.java @@ -43,15 +43,15 @@ import org.springframework.test.context.junit4.profile.xml.DevProfileXmlConfigTe /** * JUnit test suite for tests involving {@link SpringJUnit4ClassRunner} and the * Spring TestContext Framework. - * + * *

        This test suite serves a dual purpose of verifying that tests run with * {@link SpringJUnit4ClassRunner} can be used in conjunction with JUnit's * {@link Suite} runner. - * + * *

        Note that tests included in this suite will be executed at least twice if * run from an automated build process, test runner, etc. that is configured to * run tests based on a "*Tests.class" pattern match. - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/TimedSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/TimedSpringRunnerTests.java index 4d7eb155da4..a3679ba75e1 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/TimedSpringRunnerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/TimedSpringRunnerTests.java @@ -33,7 +33,7 @@ import org.springframework.test.context.TestExecutionListeners; *

      22. JUnit's {@link Test#timeout() @Test(timeout=...)}
      23. *
      24. Spring's {@link Timed @Timed}
      25. * - * + * * @author Sam Brannen * @since 3.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/TimedTransactionalSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/TimedTransactionalSpringRunnerTests.java index 1dd4494dd69..ad6090ab612 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/TimedTransactionalSpringRunnerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/TimedTransactionalSpringRunnerTests.java @@ -31,7 +31,7 @@ import org.springframework.transaction.annotation.Transactional; * {@link Transactional @Transactional} and {@link NotTransactional * @NotTransactional} annotations in conjunction with {@link Timed * @Timed} and JUnit 4's {@link Test#timeout() timeout} attribute. - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/TrackingRunListener.java b/spring-test/src/test/java/org/springframework/test/context/junit4/TrackingRunListener.java index 6a8edd857ca..2b387520827 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/TrackingRunListener.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/TrackingRunListener.java @@ -25,7 +25,7 @@ import org.junit.runner.notification.RunListener; /** * Simple {@link RunListener} which tracks how many times certain JUnit callback * methods were called: only intended for the integration test suite. - * + * * @author Sam Brannen * @since 3.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/AnnotationConfigSpringJUnit4ClassRunnerAppCtxTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/AnnotationConfigSpringJUnit4ClassRunnerAppCtxTests.java index e83eaddd33d..e8a92ab0ef0 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/AnnotationConfigSpringJUnit4ClassRunnerAppCtxTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/AnnotationConfigSpringJUnit4ClassRunnerAppCtxTests.java @@ -22,14 +22,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunnerAppCtxTest /** * Integration tests that verify support for configuration classes in * the Spring TestContext Framework. - * + * *

        Furthermore, by extending {@link SpringJUnit4ClassRunnerAppCtxTests}, * this class also verifies support for several basic features of the * Spring TestContext Framework. See JavaDoc in * SpringJUnit4ClassRunnerAppCtxTests for details. - * + * *

        Configuration will be loaded from {@link PojoAndStringConfig}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingDefaultConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingDefaultConfigClassesInheritedTests.java index 61a033f3cb9..70e1a8dd5c0 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingDefaultConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingDefaultConfigClassesInheritedTests.java @@ -28,10 +28,10 @@ import org.springframework.test.context.ContextConfiguration; /** * Integration tests that verify support for configuration classes in * the Spring TestContext Framework. - * + * *

        Configuration will be loaded from {@link DefaultConfigClassesBaseTests.ContextConfiguration} * and {@link BeanOverridingDefaultConfigClassesInheritedTests.ContextConfiguration}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingExplicitConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingExplicitConfigClassesInheritedTests.java index 537e46ead0e..223c5a6f592 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingExplicitConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingExplicitConfigClassesInheritedTests.java @@ -25,10 +25,10 @@ import org.springframework.test.context.ContextConfiguration; /** * Integration tests that verify support for configuration classes in * the Spring TestContext Framework. - * + * *

        Configuration will be loaded from {@link DefaultConfigClassesBaseTests.ContextConfiguration} * and {@link BeanOverridingDefaultConfigClassesInheritedTests.ContextConfiguration}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesBaseTests.java index e6a1d67b311..87738909689 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesBaseTests.java @@ -32,9 +32,9 @@ import org.springframework.test.context.support.AnnotationConfigContextLoader; /** * Integration tests that verify support for configuration classes in * the Spring TestContext Framework. - * + * *

        Configuration will be loaded from {@link DefaultConfigClassesBaseTests.ContextConfiguration}. - * + * * @author Sam Brannen * @since 3.1 * @see DefaultLoaderDefaultConfigClassesBaseTests diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesInheritedTests.java index 281c8f3f266..aed661d8385 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesInheritedTests.java @@ -29,10 +29,10 @@ import org.springframework.test.context.ContextConfiguration; /** * Integration tests that verify support for configuration classes in * the Spring TestContext Framework. - * + * *

        Configuration will be loaded from {@link DefaultConfigClassesBaseTests.ContextConfiguration} * and {@link DefaultConfigClassesInheritedTests.ContextConfiguration}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingDefaultConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingDefaultConfigClassesInheritedTests.java index c61562127f5..db1c4bca19d 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingDefaultConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingDefaultConfigClassesInheritedTests.java @@ -30,7 +30,7 @@ import org.springframework.test.context.support.DelegatingSmartContextLoader; * Integration tests that verify support for configuration classes in * the Spring TestContext Framework in conjunction with the * {@link DelegatingSmartContextLoader}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingExplicitConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingExplicitConfigClassesInheritedTests.java index cdf4207a016..cfc0a5fd533 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingExplicitConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingExplicitConfigClassesInheritedTests.java @@ -27,7 +27,7 @@ import org.springframework.test.context.support.DelegatingSmartContextLoader; * Integration tests that verify support for configuration classes in * the Spring TestContext Framework in conjunction with the * {@link DelegatingSmartContextLoader}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesBaseTests.java index 68a1d37603e..f2b001e10d1 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesBaseTests.java @@ -33,7 +33,7 @@ import org.springframework.test.context.support.DelegatingSmartContextLoader; * Integration tests that verify support for configuration classes in * the Spring TestContext Framework in conjunction with the * {@link DelegatingSmartContextLoader}. - * + * * @author Sam Brannen * @since 3.1 * @see DefaultConfigClassesBaseTests diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesInheritedTests.java index a5706a1517d..6ba03e1bc4a 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesInheritedTests.java @@ -31,7 +31,7 @@ import org.springframework.test.context.support.DelegatingSmartContextLoader; * Integration tests that verify support for configuration classes in * the Spring TestContext Framework in conjunction with the * {@link DelegatingSmartContextLoader}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesBaseTests.java index 46b72595814..b2e4fedb24f 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesBaseTests.java @@ -31,7 +31,7 @@ import org.springframework.test.context.support.DelegatingSmartContextLoader; * Integration tests that verify support for configuration classes in * the Spring TestContext Framework in conjunction with the * {@link DelegatingSmartContextLoader}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesInheritedTests.java index 69a2c846b53..f769cb1a133 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesInheritedTests.java @@ -31,7 +31,7 @@ import org.springframework.test.context.support.DelegatingSmartContextLoader; * Integration tests that verify support for configuration classes in * the Spring TestContext Framework in conjunction with the * {@link DelegatingSmartContextLoader}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesBaseTests.java index cd351bdfc01..da02bb82281 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesBaseTests.java @@ -30,9 +30,9 @@ import org.springframework.test.context.support.AnnotationConfigContextLoader; /** * Integration tests that verify support for configuration classes in * the Spring TestContext Framework. - * + * *

        Configuration will be loaded from {@link DefaultConfigClassesBaseTests.ContextConfiguration}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesInheritedTests.java index 642d2d67e75..6a384d8c6ac 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesInheritedTests.java @@ -30,10 +30,10 @@ import org.springframework.test.context.support.AnnotationConfigContextLoader; /** * Integration tests that verify support for configuration classes in * the Spring TestContext Framework. - * + * *

        Configuration will be loaded from {@link DefaultConfigClassesInheritedTests.ContextConfiguration} * and {@link DefaultConfigClassesBaseTests.ContextConfiguration}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java index e04c1c07378..6a169ebf2b2 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java @@ -23,12 +23,12 @@ import org.springframework.context.annotation.Configuration; /** * ApplicationContext configuration class for various integration tests. - * + * *

        The beans defined in this configuration class map directly to the * beans defined in SpringJUnit4ClassRunnerAppCtxTests-context.xml. * Consequently, the application contexts loaded from these two sources * should be identical with regard to bean definitions. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/orm/HibernateSessionFlushingTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/orm/HibernateSessionFlushingTests.java index 3c32c47b82d..69aecb723b7 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/orm/HibernateSessionFlushingTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/orm/HibernateSessionFlushingTests.java @@ -37,7 +37,7 @@ import org.springframework.test.context.junit4.orm.service.PersonService; /** * Transactional integration tests regarding manual session flushing with * Hibernate. - * + * * @author Sam Brannen * @since 3.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/orm/domain/DriversLicense.java b/spring-test/src/test/java/org/springframework/test/context/junit4/orm/domain/DriversLicense.java index cdb2b0f884d..464ff84af01 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/orm/domain/DriversLicense.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/orm/domain/DriversLicense.java @@ -18,7 +18,7 @@ package org.springframework.test.context.junit4.orm.domain; /** * DriversLicense POJO. - * + * * @author Sam Brannen * @since 3.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/orm/domain/Person.java b/spring-test/src/test/java/org/springframework/test/context/junit4/orm/domain/Person.java index e264f66e8e5..882578a189b 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/orm/domain/Person.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/orm/domain/Person.java @@ -18,7 +18,7 @@ package org.springframework.test.context.junit4.orm.domain; /** * Person POJO. - * + * * @author Sam Brannen * @since 3.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/orm/repository/PersonRepository.java b/spring-test/src/test/java/org/springframework/test/context/junit4/orm/repository/PersonRepository.java index a0b7730d31c..56bd2987393 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/orm/repository/PersonRepository.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/orm/repository/PersonRepository.java @@ -20,7 +20,7 @@ import org.springframework.test.context.junit4.orm.domain.Person; /** * Person Repository API. - * + * * @author Sam Brannen * @since 3.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/orm/repository/hibernate/HibernatePersonRepository.java b/spring-test/src/test/java/org/springframework/test/context/junit4/orm/repository/hibernate/HibernatePersonRepository.java index 702dfcae7e4..994b886b30e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/orm/repository/hibernate/HibernatePersonRepository.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/orm/repository/hibernate/HibernatePersonRepository.java @@ -24,7 +24,7 @@ import org.springframework.test.context.junit4.orm.repository.PersonRepository; /** * Hibernate implementation of the {@link PersonRepository} API. - * + * * @author Sam Brannen * @since 3.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/orm/service/PersonService.java b/spring-test/src/test/java/org/springframework/test/context/junit4/orm/service/PersonService.java index 73aa29a5c31..e8a7c2f5a56 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/orm/service/PersonService.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/orm/service/PersonService.java @@ -20,7 +20,7 @@ import org.springframework.test.context.junit4.orm.domain.Person; /** * Person Service API. - * + * * @author Sam Brannen * @since 3.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/orm/service/impl/StandardPersonService.java b/spring-test/src/test/java/org/springframework/test/context/junit4/orm/service/impl/StandardPersonService.java index dbd7fe6c22b..039faa6894f 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/orm/service/impl/StandardPersonService.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/orm/service/impl/StandardPersonService.java @@ -25,7 +25,7 @@ import org.springframework.transaction.annotation.Transactional; /** * Standard implementation of the {@link PersonService} API. - * + * * @author Sam Brannen * @since 3.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr4868/Jsr250LifecycleTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr4868/Jsr250LifecycleTests.java index 45af06fb216..44b7d1bd247 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr4868/Jsr250LifecycleTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr4868/Jsr250LifecycleTests.java @@ -38,12 +38,12 @@ import org.springframework.test.context.support.DependencyInjectionTestExecution /** * Integration tests that investigate the applicability of JSR-250 lifecycle * annotations in test classes. - * + * *

        This class does not really contain actual tests per se. Rather it * can be used to empirically verify the expected log output (see below). In - * order to see the log output, one would naturally need to ensure that the + * order to see the log output, one would naturally need to ensure that the * logger category for this class is enabled at {@code INFO} level. - * + * *

        Expected Log Output

        *
          * INFO : org.springframework.test.context.junit4.spr4868.LifecycleBean - initializing
        @@ -57,7 +57,7 @@ import org.springframework.test.context.support.DependencyInjectionTestExecution
          * INFO : org.springframework.test.context.junit4.spr4868.ExampleTest - tearDown()
          * INFO : org.springframework.test.context.junit4.spr4868.LifecycleBean - destroying
          * 
        - * + * * @author Sam Brannen * @since 3.2 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr6128/AutowiredQualifierTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr6128/AutowiredQualifierTests.java index f0012c412ce..47d7dab773b 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr6128/AutowiredQualifierTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr6128/AutowiredQualifierTests.java @@ -30,7 +30,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; * Integration tests to verify claims made in SPR-6128. - * + * * @author Sam Brannen * @author Chris Beams * @since 3.0 diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AbstractTransactionalAnnotatedConfigClassTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AbstractTransactionalAnnotatedConfigClassTests.java index cb00d7af816..d8b7fcacf3f 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AbstractTransactionalAnnotatedConfigClassTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AbstractTransactionalAnnotatedConfigClassTests.java @@ -42,7 +42,7 @@ import org.springframework.transaction.annotation.Transactional; * This set of tests (i.e., all concrete subclasses) investigates the claims made in * SPR-9051 * with regard to transactional tests. - * + * * @author Sam Brannen * @since 3.2 * @see org.springframework.test.context.testng.AnnotationConfigTransactionalTestNGSpringContextTests diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AtBeanLiteModeScopeTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AtBeanLiteModeScopeTests.java index 9a1fe08c37d..035bc9f23d6 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AtBeanLiteModeScopeTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AtBeanLiteModeScopeTests.java @@ -35,7 +35,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; /** * Integration tests that verify proper scoping of beans created in * {@code @Bean} Lite Mode. - * + * * @author Sam Brannen * @since 3.2 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/LifecycleBean.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/LifecycleBean.java index 0d08f3d93ac..07c0550c2d9 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/LifecycleBean.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/LifecycleBean.java @@ -20,7 +20,7 @@ import javax.annotation.PostConstruct; /** * Simple POJO that contains lifecycle callbacks. - * + * * @author Sam Brannen * @since 3.2 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassWithAtConfigurationTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassWithAtConfigurationTests.java index 3b5a579d8a2..373166d9b41 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassWithAtConfigurationTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassWithAtConfigurationTests.java @@ -32,7 +32,7 @@ import org.springframework.transaction.PlatformTransactionManager; /** * Concrete implementation of {@link AbstractTransactionalAnnotatedConfigClassTests} * that uses a true {@link Configuration @Configuration class}. - * + * * @author Sam Brannen * @since 3.2 * @see TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests @@ -43,7 +43,7 @@ public class TransactionalAnnotatedConfigClassWithAtConfigurationTests extends /** * This is intentionally annotated with {@code @Configuration}. - * + * *

        Consequently, this class contains standard singleton bean methods * instead of annotated factory bean methods. */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests.java index 63c6ef5849e..3f6a054ecb0 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests.java @@ -38,7 +38,7 @@ import org.springframework.transaction.PlatformTransactionManager; * that does not use a true {@link Configuration @Configuration class} but * rather a lite mode configuration class (see the Javadoc for {@link Bean @Bean} * for details). - * + * * @author Sam Brannen * @since 3.2 * @see Bean @@ -50,7 +50,7 @@ public class TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests exte /** * This is intentionally not annotated with {@code @Configuration}. - * + * *

        Consequently, this class contains annotated factory bean methods * instead of standard singleton bean methods. */ @@ -74,10 +74,10 @@ public class TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests exte /** * Since this method does not reside in a true {@code @Configuration class}, * it acts as a factory method when invoked directly (e.g., from - * {@link #transactionManager()}) and as a singleton bean when retrieved + * {@link #transactionManager()}) and as a singleton bean when retrieved * through the application context (e.g., when injected into the test * instance). The result is that this method will be called twice: - * + * *

          *
        1. once indirectly by the {@link TransactionalTestExecutionListener} * when it retrieves the {@link PlatformTransactionManager} from the @@ -110,8 +110,8 @@ public class TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests exte } /** - * Overrides {@code afterTransaction()} in order to assert a different result. - * + * Overrides {@code afterTransaction()} in order to assert a different result. + * *

          See in-line comments for details. * * @see AbstractTransactionalAnnotatedConfigClassTests#afterTransaction() diff --git a/spring-test/src/test/java/org/springframework/test/context/support/AnnotatedFooConfigInnerClassTestCase.java b/spring-test/src/test/java/org/springframework/test/context/support/AnnotatedFooConfigInnerClassTestCase.java index d44ce27d960..85da86b3f55 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/AnnotatedFooConfigInnerClassTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/AnnotatedFooConfigInnerClassTestCase.java @@ -21,7 +21,7 @@ import org.springframework.context.annotation.Configuration; /** * Not an actual test case. - * + * * @author Sam Brannen * @since 3.1 * @see AnnotationConfigContextLoaderTests diff --git a/spring-test/src/test/java/org/springframework/test/context/support/AnnotationConfigContextLoaderTests.java b/spring-test/src/test/java/org/springframework/test/context/support/AnnotationConfigContextLoaderTests.java index 8cc52762862..d56c24f5e5d 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/AnnotationConfigContextLoaderTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/AnnotationConfigContextLoaderTests.java @@ -23,7 +23,7 @@ import org.junit.Test; /** * Unit tests for {@link AnnotationConfigContextLoader}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/support/ContextConfigurationInnerClassTestCase.java b/spring-test/src/test/java/org/springframework/test/context/support/ContextConfigurationInnerClassTestCase.java index 5d243200033..adaff61eb02 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/ContextConfigurationInnerClassTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/ContextConfigurationInnerClassTestCase.java @@ -20,7 +20,7 @@ import org.springframework.context.annotation.Configuration; /** * Not an actual test case. - * + * * @author Sam Brannen * @since 3.1 * @see AnnotationConfigContextLoaderTests diff --git a/spring-test/src/test/java/org/springframework/test/context/support/DelegatingSmartContextLoaderTests.java b/spring-test/src/test/java/org/springframework/test/context/support/DelegatingSmartContextLoaderTests.java index 21a32e37143..20355683bc7 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/DelegatingSmartContextLoaderTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/DelegatingSmartContextLoaderTests.java @@ -33,7 +33,7 @@ import org.springframework.util.ObjectUtils; /** * Unit tests for {@link DelegatingSmartContextLoader}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/support/FinalConfigInnerClassTestCase.java b/spring-test/src/test/java/org/springframework/test/context/support/FinalConfigInnerClassTestCase.java index 89a1653b09f..7cde8c0190b 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/FinalConfigInnerClassTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/FinalConfigInnerClassTestCase.java @@ -20,7 +20,7 @@ import org.springframework.context.annotation.Configuration; /** * Not an actual test case. - * + * * @author Sam Brannen * @since 3.1 * @see AnnotationConfigContextLoaderTests diff --git a/spring-test/src/test/java/org/springframework/test/context/support/MultipleStaticConfigurationClassesTestCase.java b/spring-test/src/test/java/org/springframework/test/context/support/MultipleStaticConfigurationClassesTestCase.java index a07dc16cfa5..e9e69e1a19b 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/MultipleStaticConfigurationClassesTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/MultipleStaticConfigurationClassesTestCase.java @@ -20,7 +20,7 @@ import org.springframework.context.annotation.Configuration; /** * Not an actual test case. - * + * * @author Sam Brannen * @since 3.1 * @see AnnotationConfigContextLoaderTests diff --git a/spring-test/src/test/java/org/springframework/test/context/support/NonStaticConfigInnerClassesTestCase.java b/spring-test/src/test/java/org/springframework/test/context/support/NonStaticConfigInnerClassesTestCase.java index a7118532417..a8ae4fcc8bc 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/NonStaticConfigInnerClassesTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/NonStaticConfigInnerClassesTestCase.java @@ -20,7 +20,7 @@ import org.springframework.context.annotation.Configuration; /** * Not an actual test case. - * + * * @author Sam Brannen * @since 3.1 * @see AnnotationConfigContextLoaderTests diff --git a/spring-test/src/test/java/org/springframework/test/context/support/PlainVanillaFooConfigInnerClassTestCase.java b/spring-test/src/test/java/org/springframework/test/context/support/PlainVanillaFooConfigInnerClassTestCase.java index 98858425fa1..a5693135559 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/PlainVanillaFooConfigInnerClassTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/PlainVanillaFooConfigInnerClassTestCase.java @@ -18,7 +18,7 @@ package org.springframework.test.context.support; /** * Not an actual test case. - * + * * @author Sam Brannen * @since 3.1 * @see AnnotationConfigContextLoaderTests diff --git a/spring-test/src/test/java/org/springframework/test/context/support/PrivateConfigInnerClassTestCase.java b/spring-test/src/test/java/org/springframework/test/context/support/PrivateConfigInnerClassTestCase.java index d6e387be050..5432f578a1b 100644 --- a/spring-test/src/test/java/org/springframework/test/context/support/PrivateConfigInnerClassTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/support/PrivateConfigInnerClassTestCase.java @@ -20,7 +20,7 @@ import org.springframework.context.annotation.Configuration; /** * Not an actual test case. - * + * * @author Sam Brannen * @since 3.1 * @see AnnotationConfigContextLoaderTests diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTransactionalTestNGSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTransactionalTestNGSpringContextTests.java index dfabc22d7d7..4cfb6b8abc4 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTransactionalTestNGSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTransactionalTestNGSpringContextTests.java @@ -45,10 +45,10 @@ import org.testng.annotations.Test; * Integration tests that verify support for * {@link import org.springframework.context.annotation.Configuration @Configuration} * classes with TestNG-based tests. - * + * *

          Configuration will be loaded from * {@link AnnotationConfigTransactionalTestNGSpringContextTests.ContextConfiguration}. - * + * * @author Sam Brannen * @since 3.1 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java index 5f6840f495b..27a08c054c2 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java @@ -43,7 +43,7 @@ import org.testng.annotations.Test; /** * Combined integration test for {@link AbstractTestNGSpringContextTests} and * {@link AbstractTransactionalTestNGSpringContextTests}. - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests.java index ab61dc2bc5d..82fb19287b7 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/DirtiesContextTransactionalTestNGSpringContextTests.java @@ -43,7 +43,7 @@ import org.testng.annotations.Test; * individual tests. DirtiesContextTransactionalTestNGSpringContextTests * therefore verifies the expected behavior and correct semantics. *

          - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/FailingBeforeAndAfterMethodsTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/FailingBeforeAndAfterMethodsTests.java index ab76d69d472..66318987d00 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/FailingBeforeAndAfterMethodsTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/FailingBeforeAndAfterMethodsTests.java @@ -57,7 +57,7 @@ import org.testng.TestNG; * and {@link TestExecutionListener#afterTestClass(TestContext) * afterTestClass()} lifecycle callback methods. *

          - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/TimedTransactionalTestNGSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/TimedTransactionalTestNGSpringContextTests.java index f7bc81107e4..cdc23e35bf3 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/TimedTransactionalTestNGSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/TimedTransactionalTestNGSpringContextTests.java @@ -26,7 +26,7 @@ import org.testng.annotations.Test; * {@link AbstractTransactionalTestNGSpringContextTests}; used to verify claim * raised in SPR-6124. - * + * * @author Sam Brannen * @since 3.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/web/WebContextLoaderTestSuite.java b/spring-test/src/test/java/org/springframework/test/context/web/WebContextLoaderTestSuite.java index 06a83a29233..8ccd8b4f905 100644 --- a/spring-test/src/test/java/org/springframework/test/context/web/WebContextLoaderTestSuite.java +++ b/spring-test/src/test/java/org/springframework/test/context/web/WebContextLoaderTestSuite.java @@ -26,7 +26,7 @@ import org.springframework.web.context.WebApplicationContext; * Convenience test suite for integration tests that verify support for * {@link WebApplicationContext} {@linkplain ContextLoader context loaders} * in the TestContext framework. - * + * * @author Sam Brannen * @since 3.2 */ diff --git a/spring-test/src/test/java/org/springframework/test/jdbc/JdbcTestUtilsTests.java b/spring-test/src/test/java/org/springframework/test/jdbc/JdbcTestUtilsTests.java index 9651d2bcdef..d5fd1b68e4b 100644 --- a/spring-test/src/test/java/org/springframework/test/jdbc/JdbcTestUtilsTests.java +++ b/spring-test/src/test/java/org/springframework/test/jdbc/JdbcTestUtilsTests.java @@ -28,7 +28,7 @@ import org.springframework.core.io.support.EncodedResource; /** * Unit tests for {@link JdbcTestUtils}. - * + * * @author Thomas Risberg * @author Sam Brannen * @since 2.5.4 diff --git a/spring-test/src/test/java/org/springframework/test/util/ReflectionTestUtilsTests.java b/spring-test/src/test/java/org/springframework/test/util/ReflectionTestUtilsTests.java index 0634161c3b7..5b64657360d 100644 --- a/spring-test/src/test/java/org/springframework/test/util/ReflectionTestUtilsTests.java +++ b/spring-test/src/test/java/org/springframework/test/util/ReflectionTestUtilsTests.java @@ -29,7 +29,7 @@ import org.springframework.test.util.subpackage.Person; /** * Unit tests for {@link ReflectionTestUtils}. - * + * * @author Sam Brannen * @author Juergen Hoeller */ diff --git a/spring-test/src/test/java/org/springframework/test/util/subpackage/LegacyEntity.java b/spring-test/src/test/java/org/springframework/test/util/subpackage/LegacyEntity.java index a31f450d154..19507c9380f 100644 --- a/spring-test/src/test/java/org/springframework/test/util/subpackage/LegacyEntity.java +++ b/spring-test/src/test/java/org/springframework/test/util/subpackage/LegacyEntity.java @@ -21,7 +21,7 @@ import org.springframework.core.style.ToStringCreator; /** * A legacy entity whose {@link #toString()} method has side effects; * intended for use in unit tests. - * + * * @author Sam Brannen * @since 3.2 */ diff --git a/spring-test/src/test/java/org/springframework/test/util/subpackage/Person.java b/spring-test/src/test/java/org/springframework/test/util/subpackage/Person.java index 4eb84791f52..eac5e7b76f5 100644 --- a/spring-test/src/test/java/org/springframework/test/util/subpackage/Person.java +++ b/spring-test/src/test/java/org/springframework/test/util/subpackage/Person.java @@ -21,7 +21,7 @@ import org.springframework.core.style.ToStringCreator; /** * Concrete subclass of {@link PersistentEntity} representing a person * entity; intended for use in unit tests. - * + * * @author Sam Brannen * @since 2.5 */ diff --git a/spring-tx/src/main/java/org/springframework/dao/DataRetrievalFailureException.java b/spring-tx/src/main/java/org/springframework/dao/DataRetrievalFailureException.java index 68467df26a2..c9d7a93f60f 100644 --- a/spring-tx/src/main/java/org/springframework/dao/DataRetrievalFailureException.java +++ b/spring-tx/src/main/java/org/springframework/dao/DataRetrievalFailureException.java @@ -42,5 +42,5 @@ public class DataRetrievalFailureException extends NonTransientDataAccessExcepti public DataRetrievalFailureException(String msg, Throwable cause) { super(msg, cause); } - + } diff --git a/spring-tx/src/main/java/org/springframework/dao/IncorrectUpdateSemanticsDataAccessException.java b/spring-tx/src/main/java/org/springframework/dao/IncorrectUpdateSemanticsDataAccessException.java index d4a2d1957be..57ddae53795 100644 --- a/spring-tx/src/main/java/org/springframework/dao/IncorrectUpdateSemanticsDataAccessException.java +++ b/spring-tx/src/main/java/org/springframework/dao/IncorrectUpdateSemanticsDataAccessException.java @@ -42,7 +42,7 @@ public class IncorrectUpdateSemanticsDataAccessException extends InvalidDataAcce public IncorrectUpdateSemanticsDataAccessException(String msg, Throwable cause) { super(msg, cause); } - + /** * Return whether data was updated. * If this method returns false, there's nothing to roll back. diff --git a/spring-tx/src/main/java/org/springframework/dao/InvalidDataAccessResourceUsageException.java b/spring-tx/src/main/java/org/springframework/dao/InvalidDataAccessResourceUsageException.java index 0537b27dbed..735acdc3482 100644 --- a/spring-tx/src/main/java/org/springframework/dao/InvalidDataAccessResourceUsageException.java +++ b/spring-tx/src/main/java/org/springframework/dao/InvalidDataAccessResourceUsageException.java @@ -24,7 +24,7 @@ package org.springframework.dao; * @author Rod Johnson */ public class InvalidDataAccessResourceUsageException extends NonTransientDataAccessException { - + /** * Constructor for InvalidDataAccessResourceUsageException. * @param msg the detail message @@ -32,7 +32,7 @@ public class InvalidDataAccessResourceUsageException extends NonTransientDataAcc public InvalidDataAccessResourceUsageException(String msg) { super(msg); } - + /** * Constructor for InvalidDataAccessResourceUsageException. * @param msg the detail message diff --git a/spring-tx/src/main/java/org/springframework/dao/package-info.java b/spring-tx/src/main/java/org/springframework/dao/package-info.java index 725797c63ab..dd36227a357 100644 --- a/spring-tx/src/main/java/org/springframework/dao/package-info.java +++ b/spring-tx/src/main/java/org/springframework/dao/package-info.java @@ -7,10 +7,10 @@ * subclasses), calling code can detect and handle common problems such * as deadlocks without being tied to a particular data access strategy, * such as JDBC. - * + * *

          All these exceptions are unchecked, meaning that calling code can * leave them uncaught and treat all data access exceptions as fatal. - * + * *

          The classes in this package are discussed in Chapter 9 of * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). diff --git a/spring-tx/src/main/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslator.java b/spring-tx/src/main/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslator.java index 5c0e6e78318..b5946c404ed 100644 --- a/spring-tx/src/main/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslator.java +++ b/spring-tx/src/main/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslator.java @@ -32,7 +32,7 @@ import org.springframework.util.Assert; * @since 2.0 */ public class ChainedPersistenceExceptionTranslator implements PersistenceExceptionTranslator { - + /** List of PersistenceExceptionTranslators */ private final List delegates = new ArrayList(4); diff --git a/spring-tx/src/main/java/org/springframework/dao/support/DataAccessUtils.java b/spring-tx/src/main/java/org/springframework/dao/support/DataAccessUtils.java index 6e7e07608aa..5dbf87b39c3 100644 --- a/spring-tx/src/main/java/org/springframework/dao/support/DataAccessUtils.java +++ b/spring-tx/src/main/java/org/springframework/dao/support/DataAccessUtils.java @@ -196,8 +196,8 @@ public abstract class DataAccessUtils { return objectResult(results, Number.class).longValue(); } - - + + /** * Return a translated exception if this is appropriate, * otherwise return the input exception. diff --git a/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslator.java b/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslator.java index e17732f11b9..21300ae57e0 100644 --- a/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslator.java +++ b/spring-tx/src/main/java/org/springframework/dao/support/PersistenceExceptionTranslator.java @@ -31,7 +31,7 @@ import org.springframework.dao.DataAccessException; * @since 2.0 */ public interface PersistenceExceptionTranslator { - + /** * Translate the given runtime exception thrown by a persistence framework to a * corresponding exception from Spring's generic DataAccessException hierarchy, diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/CannotGetCciConnectionException.java b/spring-tx/src/main/java/org/springframework/jca/cci/CannotGetCciConnectionException.java index e2f5761a634..f35273b6277 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/CannotGetCciConnectionException.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/CannotGetCciConnectionException.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/InvalidResultSetAccessException.java b/spring-tx/src/main/java/org/springframework/jca/cci/InvalidResultSetAccessException.java index 6492bc72174..b7959a6079f 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/InvalidResultSetAccessException.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/InvalidResultSetAccessException.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,7 +32,7 @@ import org.springframework.dao.InvalidDataAccessResourceUsageException; * @see javax.resource.cci.ResultSet */ public class InvalidResultSetAccessException extends InvalidDataAccessResourceUsageException { - + /** * Constructor for InvalidResultSetAccessException. * @param msg message diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionFactoryUtils.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionFactoryUtils.java index 3fd28fc9cf0..47d57437110 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionFactoryUtils.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionFactoryUtils.java @@ -28,7 +28,7 @@ import org.springframework.jca.cci.CannotGetCciConnectionException; import org.springframework.transaction.support.ResourceHolderSynchronization; import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.util.Assert; - + /** * Helper class that provides static methods for obtaining CCI Connections * from a {@link javax.resource.cci.ConnectionFactory}. Includes special diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionHolder.java b/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionHolder.java index 86410786397..693345dc629 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionHolder.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/connection/ConnectionHolder.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java index f7dd0edae58..54a8a1f4997 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/ConnectionCallback.java @@ -28,7 +28,7 @@ import org.springframework.dao.DataAccessException; * Generic callback interface for code that operates on a CCI Connection. * Allows to execute any number of operations on a single Connection, * using any type and number of Interaction. - * + * *

          This is particularly useful for delegating to existing data access code * that expects a Connection to work on and throws ResourceException. For newly * written code, it is strongly recommended to use CciTemplate's more specific @@ -47,7 +47,7 @@ public interface ConnectionCallback { * Gets called by CciTemplate.execute with an active CCI Connection. * Does not need to care about activating or closing the Connection, or handling * transactions. - * + * *

          If called without a thread-bound CCI transaction (initiated by * CciLocalTransactionManager), the code will simply get executed on the CCI * Connection with its transactional semantics. If CciTemplate is configured diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java index 9de2bfce86e..5ed18fb3611 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/InteractionCallback.java @@ -29,7 +29,7 @@ import org.springframework.dao.DataAccessException; * Allows to execute any number of operations on a single Interaction, for * example a single execute call or repeated execute calls with varying * parameters. - * + * *

          This is particularly useful for delegating to existing data access code * that expects an Interaction to work on and throws ResourceException. For newly * written code, it is strongly recommended to use CciTemplate's more specific @@ -48,7 +48,7 @@ public interface InteractionCallback { * Gets called by CciTemplate.execute with an active CCI Interaction. * Does not need to care about activating or closing the Interaction, or * handling transactions. - * + * *

          If called without a thread-bound CCI transaction (initiated by * CciLocalTransactionManager), the code will simply get executed on the CCI * Interaction with its transactional semantics. If CciTemplate is configured diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordCreator.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordCreator.java index 4458dfb9bfa..956403b511b 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordCreator.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordCreator.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java index 6cdb8753262..539a7b9eaf9 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/RecordExtractor.java @@ -23,7 +23,7 @@ import javax.resource.cci.Record; import org.springframework.dao.DataAccessException; -/** +/** * Callback interface for extracting a result object from a CCI Record instance. * *

          Used for output object creation in CciTemplate. Alternatively, output @@ -44,8 +44,8 @@ import org.springframework.dao.DataAccessException; * @see javax.resource.cci.ResultSet */ public interface RecordExtractor { - - /** + + /** * Process the data in the given Record, creating a corresponding result object. * @param record the Record to extract data from * (possibly a CCI ResultSet) diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CommAreaRecord.java b/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CommAreaRecord.java index 52d9d7ef6d9..223f5daf5f6 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CommAreaRecord.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/core/support/CommAreaRecord.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingCommAreaOperation.java b/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingCommAreaOperation.java index bbbd94bd6f3..638ae9d23aa 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingCommAreaOperation.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingCommAreaOperation.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java b/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java index 8c9915b796f..3735e34d165 100644 --- a/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java +++ b/spring-tx/src/main/java/org/springframework/jca/cci/object/MappingRecordOperation.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-tx/src/main/java/org/springframework/transaction/TransactionDefinition.java b/spring-tx/src/main/java/org/springframework/transaction/TransactionDefinition.java index 0382efa2f24..5645c336a6b 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/TransactionDefinition.java +++ b/spring-tx/src/main/java/org/springframework/transaction/TransactionDefinition.java @@ -186,7 +186,7 @@ public interface TransactionDefinition { /** * Use the default timeout of the underlying transaction system, - * or none if timeouts are not supported. + * or none if timeouts are not supported. */ int TIMEOUT_DEFAULT = -1; @@ -237,7 +237,7 @@ public interface TransactionDefinition { * it will not necessarily cause failure of write access attempts. * A transaction manager which cannot interpret the read-only hint will * not throw an exception when asked for a read-only transaction. - * @return true if the transaction is to be optimized as read-only + * @return true if the transaction is to be optimized as read-only * @see org.springframework.transaction.support.TransactionSynchronization#beforeCommit(boolean) * @see org.springframework.transaction.support.TransactionSynchronizationManager#isCurrentTransactionReadOnly() */ diff --git a/spring-tx/src/main/java/org/springframework/transaction/TransactionUsageException.java b/spring-tx/src/main/java/org/springframework/transaction/TransactionUsageException.java index 28c4f859ba5..ef28675b743 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/TransactionUsageException.java +++ b/spring-tx/src/main/java/org/springframework/transaction/TransactionUsageException.java @@ -17,7 +17,7 @@ package org.springframework.transaction; /** - * Superclass for exceptions caused by inappropriate usage of + * Superclass for exceptions caused by inappropriate usage of * a Spring transaction API. * * @author Rod Johnson diff --git a/spring-tx/src/main/java/org/springframework/transaction/annotation/Isolation.java b/spring-tx/src/main/java/org/springframework/transaction/annotation/Isolation.java index 03e569991f7..597afcc58c1 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/annotation/Isolation.java +++ b/spring-tx/src/main/java/org/springframework/transaction/annotation/Isolation.java @@ -28,7 +28,7 @@ import org.springframework.transaction.TransactionDefinition; * @since 1.2 */ public enum Isolation { - + /** * Use the default isolation level of the underlying datastore. * All other levels correspond to the JDBC isolation levels. @@ -82,7 +82,7 @@ public enum Isolation { Isolation(int value) { this.value = value; } - + public int value() { return this.value; } - + } diff --git a/spring-tx/src/main/java/org/springframework/transaction/annotation/Propagation.java b/spring-tx/src/main/java/org/springframework/transaction/annotation/Propagation.java index 5e0a7964504..37e9e5c7eca 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/annotation/Propagation.java +++ b/spring-tx/src/main/java/org/springframework/transaction/annotation/Propagation.java @@ -16,7 +16,7 @@ package org.springframework.transaction.annotation; -import org.springframework.transaction.TransactionDefinition; +import org.springframework.transaction.TransactionDefinition; /** * Enumeration that represents transaction propagation behaviors for use @@ -28,7 +28,7 @@ import org.springframework.transaction.TransactionDefinition; * @since 1.2 */ public enum Propagation { - + /** * Support a current transaction, create a new one if none exists. * Analogous to EJB transaction attribute of the same name. @@ -99,7 +99,7 @@ public enum Propagation { Propagation(int value) { this.value = value; } - + public int value() { return this.value; } - + } diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/MatchAlwaysTransactionAttributeSource.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/MatchAlwaysTransactionAttributeSource.java index 42767a7ea42..c807119f761 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/MatchAlwaysTransactionAttributeSource.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/MatchAlwaysTransactionAttributeSource.java @@ -34,7 +34,7 @@ import org.springframework.util.ObjectUtils; * @see org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator */ public class MatchAlwaysTransactionAttributeSource implements TransactionAttributeSource, Serializable { - + private TransactionAttribute transactionAttribute = new DefaultTransactionAttribute(); diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java index 0181a5efa5d..be037ba6f9f 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java @@ -35,7 +35,7 @@ import org.springframework.util.PatternMatchUtils; /** * Simple {@link TransactionAttributeSource} implementation that * allows attributes to be stored per method in a {@link Map}. - * + * * @author Rod Johnson * @author Juergen Hoeller * @since 24.04.2003 diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/NoRollbackRuleAttribute.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/NoRollbackRuleAttribute.java index da4f0006ddb..17dc29a531b 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/NoRollbackRuleAttribute.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/NoRollbackRuleAttribute.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2007 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/RollbackRuleAttribute.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/RollbackRuleAttribute.java index c1d7e41359a..4c60fbf2f8f 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/RollbackRuleAttribute.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/RollbackRuleAttribute.java @@ -133,7 +133,7 @@ public class RollbackRuleAttribute implements Serializable{ RollbackRuleAttribute rhs = (RollbackRuleAttribute) other; return this.exceptionName.equals(rhs.exceptionName); } - + @Override public int hashCode() { return this.exceptionName.hashCode(); diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttribute.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttribute.java index d67368843f3..d1f7b1665eb 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttribute.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/RuleBasedTransactionAttribute.java @@ -152,7 +152,7 @@ public class RuleBasedTransactionAttribute extends DefaultTransactionAttribute i logger.trace("No relevant rollback rule found: applying default rules"); return super.rollbackOn(ex); } - + return !(winner instanceof NoRollbackRuleAttribute); } diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttribute.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttribute.java index e208008cb66..3e02fef6d55 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttribute.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttribute.java @@ -44,5 +44,5 @@ public interface TransactionAttribute extends TransactionDefinition { * @return whether to perform a rollback or not */ boolean rollbackOn(Throwable ex); - + } diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisor.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisor.java index 941c2b7336e..1aaee3b3937 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisor.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisor.java @@ -36,7 +36,7 @@ import org.springframework.aop.support.AbstractPointcutAdvisor; * @see TransactionProxyFactoryBean */ public class TransactionAttributeSourceAdvisor extends AbstractPointcutAdvisor { - + private TransactionInterceptor transactionInterceptor; private final TransactionAttributeSourcePointcut pointcut = new TransactionAttributeSourcePointcut() { diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/package-info.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/package-info.java index 18f5282cd18..1a88634aa5b 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/package-info.java +++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/package-info.java @@ -4,10 +4,10 @@ * AOP-based solution for declarative transaction demarcation. * Builds on the AOP infrastructure in org.springframework.aop.framework. * Any POJO can be transactionally advised with Spring. - * + * *

          The TransactionFactoryProxyBean can be used to create transactional * AOP proxies transparently to code that uses them. - * + * *

          The TransactionInterceptor is the AOP Alliance MethodInterceptor that * delivers transactional advice, based on the Spring transaction abstraction. * This allows declarative transaction management in any environment, diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java b/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java index dbb9f85fb4c..07e3344f0f4 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/AbstractPlatformTransactionManager.java @@ -64,7 +64,7 @@ import org.springframework.transaction.UnexpectedRollbackException; * transaction for closing at transaction completion time, allowing e.g. for reuse * of the same Hibernate Session within the transaction. The same mechanism can * also be leveraged for custom synchronization needs in an application. - * + * *

          The state of this class is serializable, to allow for serializing the * transaction strategy along with proxies that carry a transaction interceptor. * It is up to subclasses if they wish to make their state to be serializable too. diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/SimpleTransactionStatus.java b/spring-tx/src/main/java/org/springframework/transaction/support/SimpleTransactionStatus.java index 0018fc1f475..6ad3318a1d1 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/SimpleTransactionStatus.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/SimpleTransactionStatus.java @@ -19,7 +19,7 @@ package org.springframework.transaction.support; /** * A simple {@link org.springframework.transaction.TransactionStatus} * implementation. - * + * *

          Derives from {@link AbstractTransactionStatus} and adds an explicit * {@link #isNewTransaction() "newTransaction"} flag. * diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronization.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronization.java index a152f94698e..ccf5109c58e 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronization.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronization.java @@ -44,7 +44,7 @@ public interface TransactionSynchronization { /** Completion status in case of heuristic mixed completion or system errors */ int STATUS_UNKNOWN = 2; - + /** * Suspend this synchronization. diff --git a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationManager.java b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationManager.java index 93aafbdabd7..0c7aedfd228 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationManager.java +++ b/spring-tx/src/main/java/org/springframework/transaction/support/TransactionSynchronizationManager.java @@ -118,7 +118,7 @@ public abstract class TransactionSynchronizationManager { * Check if there is a resource for the given key bound to the current thread. * @param key the key to check (usually the resource factory) * @return if there is a value bound to the current thread - * @see ResourceTransactionManager#getResourceFactory() + * @see ResourceTransactionManager#getResourceFactory() */ public static boolean hasResource(Object key) { Object actualKey = TransactionSynchronizationUtils.unwrapResourceIfNecessary(key); diff --git a/spring-tx/src/test/java/org/springframework/beans/INestedTestBean.java b/spring-tx/src/test/java/org/springframework/beans/INestedTestBean.java index 7d87547b5f7..c5c4ed5e679 100644 --- a/spring-tx/src/test/java/org/springframework/beans/INestedTestBean.java +++ b/spring-tx/src/test/java/org/springframework/beans/INestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-tx/src/test/java/org/springframework/beans/IOther.java b/spring-tx/src/test/java/org/springframework/beans/IOther.java index 797486ec44e..6a8f74187cb 100644 --- a/spring-tx/src/test/java/org/springframework/beans/IOther.java +++ b/spring-tx/src/test/java/org/springframework/beans/IOther.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-tx/src/test/java/org/springframework/beans/NestedTestBean.java b/spring-tx/src/test/java/org/springframework/beans/NestedTestBean.java index a06e15d150b..0eb8df5c8ae 100644 --- a/spring-tx/src/test/java/org/springframework/beans/NestedTestBean.java +++ b/spring-tx/src/test/java/org/springframework/beans/NestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-tx/src/test/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslatorTests.java b/spring-tx/src/test/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslatorTests.java index 010da75e8f5..5cd19f8f02d 100644 --- a/spring-tx/src/test/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslatorTests.java +++ b/spring-tx/src/test/java/org/springframework/dao/support/ChainedPersistenceExceptionTranslatorTests.java @@ -27,39 +27,39 @@ import org.springframework.dao.support.DataAccessUtilsTests.MapPersistenceExcept * @since 2.0 */ public class ChainedPersistenceExceptionTranslatorTests extends TestCase { - + public void testEmpty() { ChainedPersistenceExceptionTranslator pet = new ChainedPersistenceExceptionTranslator(); //MapPersistenceExceptionTranslator mpet = new MapPersistenceExceptionTranslator(); RuntimeException in = new RuntimeException("in"); assertSame(in, DataAccessUtils.translateIfNecessary(in, pet)); } - + public void testExceptionTranslationWithTranslation() { MapPersistenceExceptionTranslator mpet1 = new MapPersistenceExceptionTranslator(); RuntimeException in1 = new RuntimeException("in"); InvalidDataAccessApiUsageException out1 = new InvalidDataAccessApiUsageException("out"); InvalidDataAccessApiUsageException out2 = new InvalidDataAccessApiUsageException("out"); mpet1.addTranslation(in1, out1); - + ChainedPersistenceExceptionTranslator chainedPet1 = new ChainedPersistenceExceptionTranslator(); assertSame("Should not translate yet", in1, DataAccessUtils.translateIfNecessary(in1, chainedPet1)); chainedPet1.addDelegate(mpet1); assertSame("Should now translate", out1, DataAccessUtils.translateIfNecessary(in1, chainedPet1)); - + // Now add a new translator and verify it wins MapPersistenceExceptionTranslator mpet2 = new MapPersistenceExceptionTranslator(); mpet2.addTranslation(in1, out2); chainedPet1.addDelegate(mpet2); - assertSame("Should still translate the same due to ordering", + assertSame("Should still translate the same due to ordering", out1, DataAccessUtils.translateIfNecessary(in1, chainedPet1)); - + ChainedPersistenceExceptionTranslator chainedPet2 = new ChainedPersistenceExceptionTranslator(); chainedPet2.addDelegate(mpet2); chainedPet2.addDelegate(mpet1); - assertSame("Should translate differently due to ordering", + assertSame("Should translate differently due to ordering", out2, DataAccessUtils.translateIfNecessary(in1, chainedPet2)); - + RuntimeException in2 = new RuntimeException("in2"); OptimisticLockingFailureException out3 = new OptimisticLockingFailureException("out2"); assertNull(chainedPet2.translateExceptionIfPossible(in2)); diff --git a/spring-tx/src/test/java/org/springframework/jca/cci/CciLocalTransactionTests.java b/spring-tx/src/test/java/org/springframework/jca/cci/CciLocalTransactionTests.java index dc38fb5e8e2..16f1012a75e 100644 --- a/spring-tx/src/test/java/org/springframework/jca/cci/CciLocalTransactionTests.java +++ b/spring-tx/src/test/java/org/springframework/jca/cci/CciLocalTransactionTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -104,7 +104,7 @@ public class CciLocalTransactionTests { LocalTransaction localTransaction = createMock(LocalTransaction.class); final Record record = createMock(Record.class); final InteractionSpec interactionSpec = createMock(InteractionSpec.class); - + expect(connectionFactory.getConnection()).andReturn(connection); expect(connection.getLocalTransaction()).andReturn(localTransaction); @@ -122,7 +122,7 @@ public class CciLocalTransactionTests { localTransaction.rollback(); connection.close(); - + replay(connectionFactory, connection, localTransaction, interaction, record); org.springframework.jca.cci.connection.CciLocalTransactionManager tm = new org.springframework.jca.cci.connection.CciLocalTransactionManager(); diff --git a/spring-tx/src/test/java/org/springframework/jca/cci/CciTemplateTests.java b/spring-tx/src/test/java/org/springframework/jca/cci/CciTemplateTests.java index d724b77190c..c8f43b96259 100644 --- a/spring-tx/src/test/java/org/springframework/jca/cci/CciTemplateTests.java +++ b/spring-tx/src/test/java/org/springframework/jca/cci/CciTemplateTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-tx/src/test/java/org/springframework/jca/cci/EisOperationTests.java b/spring-tx/src/test/java/org/springframework/jca/cci/EisOperationTests.java index 0fa0b63d4bd..bd8f7fb5d00 100644 --- a/spring-tx/src/test/java/org/springframework/jca/cci/EisOperationTests.java +++ b/spring-tx/src/test/java/org/springframework/jca/cci/EisOperationTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -80,7 +80,7 @@ public class EisOperationTests { InteractionSpec interactionSpec = createMock(InteractionSpec.class); SimpleRecordOperation operation = new SimpleRecordOperation(connectionFactory, interactionSpec); - + expect(connectionFactory.getConnection()).andReturn(connection); expect(connection.createInteraction()).andReturn(interaction); diff --git a/spring-tx/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java b/spring-tx/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java index 8b816b45d0d..f6c3f0a3761 100644 --- a/spring-tx/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java +++ b/spring-tx/src/test/java/org/springframework/mock/jndi/SimpleNamingContextBuilder.java @@ -52,7 +52,7 @@ import org.springframework.util.ClassUtils; * DataSource ds = new DriverManagerDataSource(...); * builder.bind("java:comp/env/jdbc/myds", ds); * builder.activate();

        - * + * * Note that it's impossible to activate multiple builders within the same JVM, * due to JNDI restrictions. Thus to configure a fresh builder repeatedly, use * the following code to get a reference to either an already activated builder diff --git a/spring-tx/src/test/java/org/springframework/transaction/CallCountingTransactionManager.java b/spring-tx/src/test/java/org/springframework/transaction/CallCountingTransactionManager.java index d5c2531fbde..563d6107149 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/CallCountingTransactionManager.java +++ b/spring-tx/src/test/java/org/springframework/transaction/CallCountingTransactionManager.java @@ -50,7 +50,7 @@ public class CallCountingTransactionManager extends AbstractPlatformTransactionM ++rollbacks; --inflight; } - + public void clear() { begun = commits = rollbacks = inflight = 0; } diff --git a/spring-tx/src/test/java/org/springframework/transaction/JtaTransactionManagerTests.java b/spring-tx/src/test/java/org/springframework/transaction/JtaTransactionManagerTests.java index 4b6d23d3698..480b869d3aa 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/JtaTransactionManagerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/JtaTransactionManagerTests.java @@ -43,7 +43,7 @@ import org.springframework.transaction.support.TransactionTemplate; * @since 12.05.2003 */ public class JtaTransactionManagerTests extends TestCase { - + public void testJtaTransactionManagerWithCommit() throws Exception { MockControl utControl = MockControl.createControl(UserTransaction.class); UserTransaction ut = (UserTransaction) utControl.getMock(); diff --git a/spring-tx/src/test/java/org/springframework/transaction/TestTransactionManager.java b/spring-tx/src/test/java/org/springframework/transaction/TestTransactionManager.java index f64862b9389..1cd39725b04 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/TestTransactionManager.java +++ b/spring-tx/src/test/java/org/springframework/transaction/TestTransactionManager.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java b/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java index b83f83ebd4b..cfae77ca56b 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java @@ -76,13 +76,13 @@ public class TxNamespaceHandlerTests extends TestCase { assertEquals("Should have 1 rolled back transaction", 1, ptm.rollbacks); } } - + public void testRollbackRules() { TransactionInterceptor txInterceptor = (TransactionInterceptor) context.getBean("txRollbackAdvice"); TransactionAttributeSource txAttrSource = txInterceptor.getTransactionAttributeSource(); TransactionAttribute txAttr = txAttrSource.getTransactionAttribute(getAgeMethod,ITestBean.class); assertTrue("should be configured to rollback on Exception",txAttr.rollbackOn(new Exception())); - + txAttr = txAttrSource.getTransactionAttribute(setAgeMethod, ITestBean.class); assertFalse("should not rollback on RuntimeException",txAttr.rollbackOn(new RuntimeException())); } diff --git a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java index 9bd446fc87c..6d61e66360c 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java @@ -43,7 +43,7 @@ import org.springframework.util.SerializationTestUtils; * @author Juergen Hoeller */ public class AnnotationTransactionAttributeSourceTests { - + @Test public void testSerializable() throws Exception { TestBean1 tb = new TestBean1(); @@ -71,10 +71,10 @@ public class AnnotationTransactionAttributeSourceTests { @Test public void testNullOrEmpty() throws Exception { Method method = Empty.class.getMethod("getAge", (Class[]) null); - + AnnotationTransactionAttributeSource atas = new AnnotationTransactionAttributeSource(); assertNull(atas.getTransactionAttribute(method, null)); - + // Try again in case of caching assertNull(atas.getTransactionAttribute(method, null)); } @@ -86,10 +86,10 @@ public class AnnotationTransactionAttributeSourceTests { @Test public void testTransactionAttributeDeclaredOnClassMethod() throws Exception { Method classMethod = ITestBean.class.getMethod("getAge", (Class[]) null); - + AnnotationTransactionAttributeSource atas = new AnnotationTransactionAttributeSource(); TransactionAttribute actual = atas.getTransactionAttribute(classMethod, TestBean1.class); - + RuleBasedTransactionAttribute rbta = new RuleBasedTransactionAttribute(); rbta.getRollbackRules().add(new RollbackRuleAttribute(Exception.class)); assertEquals(rbta.getRollbackRules(), ((RuleBasedTransactionAttribute) actual).getRollbackRules()); @@ -124,7 +124,7 @@ public class AnnotationTransactionAttributeSourceTests { AnnotationTransactionAttributeSource atas = new AnnotationTransactionAttributeSource(); TransactionAttribute actual = atas.getTransactionAttribute(interfaceMethod, TestBean2.class); - + RuleBasedTransactionAttribute rbta = new RuleBasedTransactionAttribute(); assertEquals(rbta.getRollbackRules(), ((RuleBasedTransactionAttribute) actual).getRollbackRules()); } @@ -152,11 +152,11 @@ public class AnnotationTransactionAttributeSourceTests { TransactionAttribute actual2 = atas.getTransactionAttribute(interfaceMethod2, TestBean3.class); assertEquals(TransactionAttribute.PROPAGATION_REQUIRED, actual2.getPropagationBehavior()); } - + @Test public void testRollbackRulesAreApplied() throws Exception { Method method = TestBean3.class.getMethod("getAge", (Class[]) null); - + AnnotationTransactionAttributeSource atas = new AnnotationTransactionAttributeSource(); TransactionAttribute actual = atas.getTransactionAttribute(method, TestBean3.class); @@ -167,13 +167,13 @@ public class AnnotationTransactionAttributeSourceTests { assertEquals(rbta.getRollbackRules(), ((RuleBasedTransactionAttribute) actual).getRollbackRules()); assertTrue(actual.rollbackOn(new Exception())); assertFalse(actual.rollbackOn(new IOException())); - + actual = atas.getTransactionAttribute(method, method.getDeclaringClass()); rbta = new RuleBasedTransactionAttribute(); rbta.getRollbackRules().add(new RollbackRuleAttribute("java.lang.Exception")); rbta.getRollbackRules().add(new NoRollbackRuleAttribute(IOException.class)); - + assertEquals(rbta.getRollbackRules(), ((RuleBasedTransactionAttribute) actual).getRollbackRules()); assertTrue(actual.rollbackOn(new Exception())); assertFalse(actual.rollbackOn(new IOException())); @@ -189,7 +189,7 @@ public class AnnotationTransactionAttributeSourceTests { AnnotationTransactionAttributeSource atas = new AnnotationTransactionAttributeSource(); TransactionAttribute actual = atas.getTransactionAttribute(method, TestBean4.class); - + RuleBasedTransactionAttribute rbta = new RuleBasedTransactionAttribute(); rbta.getRollbackRules().add(new RollbackRuleAttribute(Exception.class)); rbta.getRollbackRules().add(new NoRollbackRuleAttribute(IOException.class)); @@ -265,7 +265,7 @@ public class AnnotationTransactionAttributeSourceTests { void setAge(int age); - String getName(); + String getName(); void setName(String name); } @@ -278,7 +278,7 @@ public class AnnotationTransactionAttributeSourceTests { void setAge(int age); - String getName(); + String getName(); void setName(String name); } @@ -291,12 +291,12 @@ public class AnnotationTransactionAttributeSourceTests { void setAge(int age); - String getName(); + String getName(); void setName(String name); } - + public static class Empty implements ITestBean { private String name; diff --git a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionNamespaceHandlerTests.java b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionNamespaceHandlerTests.java index 2b813663196..36c076ce521 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionNamespaceHandlerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionNamespaceHandlerTests.java @@ -82,14 +82,14 @@ public class AnnotationTransactionNamespaceHandlerTests extends TestCase { } } - + public void testNonPublicMethodsNotAdvised() { TransactionalTestBean testBean = getTestBean(); CallCountingTransactionManager ptm = (CallCountingTransactionManager) context.getBean("transactionManager"); assertEquals("Should not have any started transactions", 0, ptm.begun); testBean.annotationsOnProtectedAreIgnored(); - assertEquals("Should not have any started transactions", 0, ptm.begun); + assertEquals("Should not have any started transactions", 0, ptm.begun); } public void testMBeanExportAlsoWorks() throws Exception { @@ -125,7 +125,7 @@ public class AnnotationTransactionNamespaceHandlerTests extends TestCase { public String doSomething() { return "done"; } - + @Transactional protected void annotationsOnProtectedAreIgnored() { } diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/AbstractTransactionAspectTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/AbstractTransactionAspectTests.java index 790c0ee53cf..5d787bec1e8 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/AbstractTransactionAspectTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/AbstractTransactionAspectTests.java @@ -47,11 +47,11 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport.Tran * @since 16.03.2003 */ public abstract class AbstractTransactionAspectTests extends TestCase { - + protected Method exceptionalMethod; - + protected Method getNameMethod; - + protected Method setNameMethod; @@ -246,7 +246,7 @@ public abstract class AbstractTransactionAspectTests extends TestCase { ptm.commit(status); ptmControl.setVoidCallable(1); ptmControl.replay(); - + final String spouseName = "innerName"; TestBean outer = new TestBean() { @@ -264,7 +264,7 @@ public abstract class AbstractTransactionAspectTests extends TestCase { return spouseName; } }; - + ITestBean outerProxy = (ITestBean) advised(outer, ptm, tas); ITestBean innerProxy = (ITestBean) advised(inner, ptm, tas); outer.setSpouse(innerProxy); @@ -272,13 +272,13 @@ public abstract class AbstractTransactionAspectTests extends TestCase { checkTransactionStatus(false); // Will invoke inner.getName, which is non-transactional - outerProxy.exceptional(null); - + outerProxy.exceptional(null); + checkTransactionStatus(false); ptmControl.verify(); } - + public void testEnclosingTransactionWithNestedTransactionOnAdvisedInside() throws Throwable { final TransactionAttribute outerTxatt = new DefaultTransactionAttribute(); final TransactionAttribute innerTxatt = new DefaultTransactionAttribute(TransactionDefinition.PROPAGATION_NESTED); @@ -291,23 +291,23 @@ public abstract class AbstractTransactionAspectTests extends TestCase { TransactionStatus outerStatus = transactionStatusForNewTransaction(); TransactionStatus innerStatus = transactionStatusForNewTransaction(); - + MockControl ptmControl = MockControl.createControl(PlatformTransactionManager.class); PlatformTransactionManager ptm = (PlatformTransactionManager) ptmControl.getMock(); // Expect a transaction ptm.getTransaction(outerTxatt); ptmControl.setReturnValue(outerStatus, 1); - + ptm.getTransaction(innerTxatt); ptmControl.setReturnValue(innerStatus, 1); - + ptm.commit(innerStatus); ptmControl.setVoidCallable(1); - + ptm.commit(outerStatus); ptmControl.setVoidCallable(1); ptmControl.replay(); - + final String spouseName = "innerName"; TestBean outer = new TestBean() { @@ -328,7 +328,7 @@ public abstract class AbstractTransactionAspectTests extends TestCase { return spouseName; } }; - + ITestBean outerProxy = (ITestBean) advised(outer, ptm, tas); ITestBean innerProxy = (ITestBean) advised(inner, ptm, tas); outer.setSpouse(innerProxy); @@ -336,13 +336,13 @@ public abstract class AbstractTransactionAspectTests extends TestCase { checkTransactionStatus(false); // Will invoke inner.getName, which is non-transactional - outerProxy.exceptional(null); - + outerProxy.exceptional(null); + checkTransactionStatus(false); ptmControl.verify(); } - + public void testRollbackOnCheckedException() throws Throwable { doTestRollbackOnException(new Exception(), true, false); } @@ -419,7 +419,7 @@ public abstract class AbstractTransactionAspectTests extends TestCase { } ptmControl.replay(); - TestBean tb = new TestBean(); + TestBean tb = new TestBean(); ITestBean itb = (ITestBean) advised(tb, ptm, tas); try { @@ -437,7 +437,7 @@ public abstract class AbstractTransactionAspectTests extends TestCase { ptmControl.verify(); } - + /** * Test that TransactionStatus.setRollbackOnly works. */ @@ -466,7 +466,7 @@ public abstract class AbstractTransactionAspectTests extends TestCase { return name; } }; - + ITestBean itb = (ITestBean) advised(tb, ptm, tas); // verification!? @@ -474,7 +474,7 @@ public abstract class AbstractTransactionAspectTests extends TestCase { ptmControl.verify(); } - + /** * @return a TransactionStatus object configured for a new transaction */ @@ -507,7 +507,7 @@ public abstract class AbstractTransactionAspectTests extends TestCase { throw new UnsupportedOperationException( "Shouldn't have invoked target method when couldn't create transaction for transactional method"); } - }; + }; ITestBean itb = (ITestBean) advised(tb, ptm, tas); try { @@ -545,7 +545,7 @@ public abstract class AbstractTransactionAspectTests extends TestCase { ptmControl.setThrowable(ex); ptmControl.replay(); - TestBean tb = new TestBean(); + TestBean tb = new TestBean(); ITestBean itb = (ITestBean) advised(tb, ptm, tas); String name = "new name"; diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java index 09388b1d812..27d72c2dc4e 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -66,13 +66,13 @@ public class BeanFactoryTransactionTests extends TestCase { assertTrue("testBean is a dynamic proxy", Proxy.isProxyClass(testBean.getClass())); doTestGetsAreNotTransactional(testBean); } - + public void testGetsAreNotTransactionalWithProxyFactory2Cglib() throws NoSuchMethodException { ITestBean testBean = (ITestBean) factory.getBean("proxyFactory2Cglib"); assertTrue("testBean is CGLIB advised", AopUtils.isCglibProxy(testBean)); doTestGetsAreNotTransactional(testBean); } - + public void testProxyFactory2Lazy() throws NoSuchMethodException { ITestBean testBean = (ITestBean) factory.getBean("proxyFactory2Lazy"); assertFalse(factory.containsSingleton("target")); @@ -84,14 +84,14 @@ public class BeanFactoryTransactionTests extends TestCase { ImplementsNoInterfaces ini = (ImplementsNoInterfaces) factory.getBean("cglibNoInterfaces"); assertTrue("testBean is CGLIB advised", AopUtils.isCglibProxy(ini)); String newName = "Gordon"; - + // Install facade CallCountingTransactionManager ptm = new CallCountingTransactionManager(); PlatformTransactionManagerFacade.delegate = ptm; - + ini.setName(newName); assertEquals(newName, ini.getName()); - assertEquals(2, ptm.commits); + assertEquals(2, ptm.commits); } public void testGetsAreNotTransactionalWithProxyFactory3() throws NoSuchMethodException { @@ -171,7 +171,7 @@ public class BeanFactoryTransactionTests extends TestCase { // Ok } } - + /** * Test that we can set the target to a dynamic TargetSource. */ @@ -179,13 +179,13 @@ public class BeanFactoryTransactionTests extends TestCase { // Install facade CallCountingTransactionManager txMan = new CallCountingTransactionManager(); PlatformTransactionManagerFacade.delegate = txMan; - + TestBean tb = (TestBean) factory.getBean("hotSwapped"); assertEquals(666, tb.getAge()); int newAge = 557; tb.setAge(newAge); assertEquals(newAge, tb.getAge()); - + TestBean target2 = new TestBean(); target2.setAge(65); HotSwappableTargetSource ts = (HotSwappableTargetSource) factory.getBean("swapper"); @@ -193,7 +193,7 @@ public class BeanFactoryTransactionTests extends TestCase { assertEquals(target2.getAge(), tb.getAge()); tb.setAge(newAge); assertEquals(newAge, target2.getAge()); - + assertEquals(0, txMan.inflight); assertEquals(2, txMan.commits); assertEquals(0, txMan.rollbacks); diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/ImplementsNoInterfaces.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/ImplementsNoInterfaces.java index 90f0361eed7..75e100602f2 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/ImplementsNoInterfaces.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/ImplementsNoInterfaces.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -25,17 +25,17 @@ import org.springframework.beans.TestBean; * @author Rod Johnson */ public class ImplementsNoInterfaces { - + private TestBean testBean; - + public void setDependency(TestBean testBean) { this.testBean = testBean; } - + public String getName() { return testBean.getName(); } - + public void setName(String name) { testBean.setName(name); } diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/MyRuntimeException.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/MyRuntimeException.java index bdb09009aa8..1e804de1321 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/MyRuntimeException.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/MyRuntimeException.java @@ -20,7 +20,7 @@ import org.springframework.core.NestedRuntimeException; /** * An example {@link RuntimeException} for use in testing rollback rules. - * + * * @author Chris Beams */ @SuppressWarnings("serial") diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/PlatformTransactionManagerFacade.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/PlatformTransactionManagerFacade.java index 78360642277..7aa4a1e275b 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/PlatformTransactionManagerFacade.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/PlatformTransactionManagerFacade.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -31,7 +31,7 @@ import org.springframework.transaction.TransactionStatus; * @since 26.04.2003 */ public class PlatformTransactionManagerFacade implements PlatformTransactionManager { - + /** * This member can be changed to change behavior class-wide. */ diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/RollbackRuleTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/RollbackRuleTests.java index c9125fc6cd8..d1884954fd7 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/RollbackRuleTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/RollbackRuleTests.java @@ -39,17 +39,17 @@ public class RollbackRuleTests extends TestCase { RollbackRuleAttribute rr = new RollbackRuleAttribute(java.lang.Exception.class.getName()); assertTrue(rr.getDepth(new Exception()) == 0); } - + public void testFoundImmediatelyWithClass() { RollbackRuleAttribute rr = new RollbackRuleAttribute(Exception.class); assertTrue(rr.getDepth(new Exception()) == 0); } - + public void testNotFound() { RollbackRuleAttribute rr = new RollbackRuleAttribute(java.io.IOException.class.getName()); assertTrue(rr.getDepth(new MyRuntimeException("")) == -1); } - + public void testAncestry() { RollbackRuleAttribute rr = new RollbackRuleAttribute(java.lang.Exception.class.getName()); // Exception -> Runtime -> NestedRuntime -> MyRuntimeException 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 19abfc65232..f32779ef369 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 @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java index 8911d31bb12..81364f12b41 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,15 +23,15 @@ import org.springframework.util.SerializationTestUtils; import junit.framework.TestCase; /** - * + * * @author Rod Johnson */ public class TransactionAttributeSourceAdvisorTests extends TestCase { - + public TransactionAttributeSourceAdvisorTests(String s) { super(s); } - + public void testSerializability() throws Exception { TransactionInterceptor ti = new TransactionInterceptor(); ti.setTransactionAttributes(new Properties()); diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditorTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditorTests.java index 1c74ff2e096..3ed4ebcb35c 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditorTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceEditorTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,7 +23,7 @@ import junit.framework.TestCase; import org.springframework.transaction.TransactionDefinition; /** - * Format is + * Format is * FQN.Method=tx attribute representation * * @author Rod Johnson @@ -50,7 +50,7 @@ public class TransactionAttributeSourceEditorTests extends TestCase { // Ok } } - + public void testMatchesSpecific() throws Exception { TransactionAttributeSourceEditor pe = new TransactionAttributeSourceEditor(); // TODO need FQN? diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java index fbe4b9f6cee..5447995f5f6 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -45,14 +45,14 @@ public class TransactionInterceptorTests extends AbstractTransactionAspectTests } /** - * Template method to create an advised object given the + * Template method to create an advised object given the * target object and transaction setup. * Creates a TransactionInterceptor and applies it. */ protected Object advised(Object target, PlatformTransactionManager ptm, TransactionAttributeSource tas) { TransactionInterceptor ti = new TransactionInterceptor(); ti.setTransactionManager(ptm); - assertEquals(ptm, ti.getTransactionManager()); + assertEquals(ptm, ti.getTransactionManager()); ti.setTransactionAttributeSource(tas); assertEquals(tas, ti.getTransactionAttributeSource()); @@ -60,9 +60,9 @@ public class TransactionInterceptorTests extends AbstractTransactionAspectTests pf.addAdvice(0, ti); return pf.getProxy(); } - + /** - * A TransactionInterceptor should be serializable if its + * A TransactionInterceptor should be serializable if its * PlatformTransactionManager is. */ public void testSerializableWithAttributeProperties() throws Exception { @@ -121,6 +121,6 @@ public class TransactionInterceptorTests extends AbstractTransactionAspectTests public void rollback(TransactionStatus status) throws TransactionException { throw new UnsupportedOperationException(); } - + } } diff --git a/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java b/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java index cce8a857647..7f699d8e909 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2009 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-web/src/main/java/org/springframework/http/client/InterceptingClientHttpRequest.java b/spring-web/src/main/java/org/springframework/http/client/InterceptingClientHttpRequest.java index 37008ee8cfa..de141afc41c 100644 --- a/spring-web/src/main/java/org/springframework/http/client/InterceptingClientHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/client/InterceptingClientHttpRequest.java @@ -63,7 +63,7 @@ class InterceptingClientHttpRequest extends AbstractBufferingClientHttpRequest { @Override protected final ClientHttpResponse executeInternal(HttpHeaders headers, byte[] bufferedOutput) throws IOException { RequestExecution requestExecution = new RequestExecution(); - + return requestExecution.execute(this, bufferedOutput); } diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java index 712f4bbce08..d07fe12733a 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/HessianClientInterceptor.java @@ -223,7 +223,7 @@ public class HessianClientInterceptor extends UrlBasedRemoteAccessor implements } catch (InvocationTargetException ex) { Throwable targetEx = ex.getTargetException(); - // Hessian 4.0 check: another layer of InvocationTargetException. + // Hessian 4.0 check: another layer of InvocationTargetException. if (targetEx instanceof InvocationTargetException) { targetEx = ((InvocationTargetException) targetEx).getTargetException(); } diff --git a/spring-web/src/main/java/org/springframework/remoting/caucho/package-info.java b/spring-web/src/main/java/org/springframework/remoting/caucho/package-info.java index 498f58a674b..68e2b0ee5bf 100644 --- a/spring-web/src/main/java/org/springframework/remoting/caucho/package-info.java +++ b/spring-web/src/main/java/org/springframework/remoting/caucho/package-info.java @@ -4,11 +4,11 @@ * This package provides remoting classes for Caucho's Hessian and Burlap * protocols: a proxy factory for accessing Hessian/Burlap services, * and an exporter for making beans available to Hessian/Burlap clients. - * + * *

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

        Burlap is a slim, XML-based RPC protocol over HTTP. * For information on Burlap, see the * Burlap website diff --git a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/package-info.java b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/package-info.java index a18e047d91f..7430dc45fe5 100644 --- a/spring-web/src/main/java/org/springframework/remoting/httpinvoker/package-info.java +++ b/spring-web/src/main/java/org/springframework/remoting/httpinvoker/package-info.java @@ -4,7 +4,7 @@ * Remoting classes for transparent Java-to-Java remoting via HTTP invokers. * Uses Java serialization just like RMI, but provides the same ease of setup * as Caucho's HTTP-based Hessian and Burlap protocols. - * + * *

        HTTP invoker is the recommended protocol for Java-to-Java remoting. * It is more powerful and more extensible than Hessian and Burlap, at the * expense of being tied to Java. Neverthelesss, it is as easy to set up as diff --git a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/ServletEndpointSupport.java b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/ServletEndpointSupport.java index d2fcaf921fe..ab206aad4b6 100644 --- a/spring-web/src/main/java/org/springframework/remoting/jaxrpc/ServletEndpointSupport.java +++ b/spring-web/src/main/java/org/springframework/remoting/jaxrpc/ServletEndpointSupport.java @@ -62,7 +62,7 @@ import org.springframework.web.util.WebUtils; public abstract class ServletEndpointSupport implements ServiceLifecycle { protected final Log logger = LogFactory.getLog(getClass()); - + private ServletEndpointContext servletEndpointContext; private WebApplicationContext webApplicationContext; diff --git a/spring-web/src/main/java/org/springframework/web/bind/MethodArgumentNotValidException.java b/spring-web/src/main/java/org/springframework/web/bind/MethodArgumentNotValidException.java index 3c7534327c0..ed19bc9cd29 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/MethodArgumentNotValidException.java +++ b/spring-web/src/main/java/org/springframework/web/bind/MethodArgumentNotValidException.java @@ -29,7 +29,7 @@ import org.springframework.validation.ObjectError; public class MethodArgumentNotValidException extends Exception { private final MethodParameter parameter; - + private final BindingResult bindingResult; @@ -69,5 +69,5 @@ public class MethodArgumentNotValidException extends Exception { } return sb.toString(); } - + } diff --git a/spring-web/src/main/java/org/springframework/web/bind/ServletRequestDataBinder.java b/spring-web/src/main/java/org/springframework/web/bind/ServletRequestDataBinder.java index 838cc633b2a..6ff75e8b09f 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/ServletRequestDataBinder.java +++ b/spring-web/src/main/java/org/springframework/web/bind/ServletRequestDataBinder.java @@ -115,7 +115,7 @@ public class ServletRequestDataBinder extends WebDataBinder { /** * Extension point that subclasses can use to add extra bind values for a * request. Invoked before {@link #doBind(MutablePropertyValues)}. - * The default implementation is empty. + * The default implementation is empty. * @param mpvs the property values that will be used for data binding * @param request the current request */ diff --git a/spring-web/src/main/java/org/springframework/web/bind/WebDataBinder.java b/spring-web/src/main/java/org/springframework/web/bind/WebDataBinder.java index 15d799210ec..6c365e1783f 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/WebDataBinder.java +++ b/spring-web/src/main/java/org/springframework/web/bind/WebDataBinder.java @@ -35,7 +35,7 @@ import org.springframework.web.multipart.MultipartFile; * HTML checkboxes and select options: detecting that a field was part of * the form, but did not generate a request parameter because it was empty. * A field marker allows to detect that state and reset the corresponding - * bean property accordingly. Default values, for parameters that are otherwise + * bean property accordingly. Default values, for parameters that are otherwise * not present, can specify a value for the field other then empty. * * @author Juergen Hoeller @@ -65,7 +65,7 @@ public class WebDataBinder extends DataBinder { /** * Default prefix that field default parameters start with, followed by the field * name: e.g. "!subscribeToNewsletter" for a field "subscribeToNewsletter". - *

        Default parameters differ from field markers in that they provide a default + *

        Default parameters differ from field markers in that they provide a default * value instead of an empty value. * @see #setFieldDefaultPrefix */ @@ -134,15 +134,15 @@ public class WebDataBinder extends DataBinder { /** * Specify a prefix that can be used for parameters that indicate default - * value fields, having "prefix + field" as name. The value of the default + * value fields, having "prefix + field" as name. The value of the default * field is used when the field is not provided. *

        Default is "!", for "!FIELD" parameters (e.g. "!subscribeToNewsletter"). * Set this to null if you want to turn off the field defaults completely. *

        HTML checkboxes only send a value when they're checked, so it is not * possible to detect that a formerly checked box has just been unchecked, - * at least not with standard HTML means. A default field is especially + * at least not with standard HTML means. A default field is especially * useful when a checkbox represents a non-boolean value. - *

        The presence of a default parameter preempts the behavior of a field + *

        The presence of a default parameter preempts the behavior of a field * marker for the given field. * @see #DEFAULT_FIELD_DEFAULT_PREFIX * @see org.springframework.web.servlet.mvc.BaseCommandController#onBind @@ -208,7 +208,7 @@ public class WebDataBinder extends DataBinder { String field = pv.getName().substring(fieldDefaultPrefix.length()); if (getPropertyAccessor().isWritableProperty(field) && !mpvs.contains(field)) { mpvs.add(field, pv.getValue()); - } + } mpvs.removePropertyValue(pv); } } diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestPart.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestPart.java index 968e970aee1..47a5fe8a627 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestPart.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/RequestPart.java @@ -29,29 +29,29 @@ import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartResolver; /** - * Annotation that can be used to associate the part of a "multipart/form-data" request + * Annotation that can be used to associate the part of a "multipart/form-data" request * with a method argument. Supported method argument types include {@link MultipartFile} - * in conjunction with Spring's {@link MultipartResolver} abstraction, + * in conjunction with Spring's {@link MultipartResolver} abstraction, * {@code javax.servlet.http.Part} in conjunction with Servlet 3.0 multipart requests, - * or otherwise for any other method argument, the content of the part is passed through an - * {@link HttpMessageConverter} taking into consideration the 'Content-Type' header - * of the request part. This is analogous to what @{@link RequestBody} does to resolve + * or otherwise for any other method argument, the content of the part is passed through an + * {@link HttpMessageConverter} taking into consideration the 'Content-Type' header + * of the request part. This is analogous to what @{@link RequestBody} does to resolve * an argument based on the content of a non-multipart regular request. - * - *

        Note that @{@link RequestParam} annotation can also be used to associate the + * + *

        Note that @{@link RequestParam} annotation can also be used to associate the * part of a "multipart/form-data" request with a method argument supporting the same * method argument types. The main difference is that when the method argument is not a - * String, @{@link RequestParam} relies on type conversion via a registered + * String, @{@link RequestParam} relies on type conversion via a registered * {@link Converter} or {@link PropertyEditor} while @{@link RequestPart} relies * on {@link HttpMessageConverter}s taking into consideration the 'Content-Type' header - * of the request part. @{@link RequestParam} is likely to be used with name-value form + * of the request part. @{@link RequestParam} is likely to be used with name-value form * fields while @{@link RequestPart} is likely to be used with parts containing more - * complex content (e.g. JSON, XML). - * + * complex content (e.g. JSON, XML). + * * @author Rossen Stoyanchev * @author Arjen Poutsma * @since 3.1 - * + * * @see RequestParam * @see org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter */ @@ -64,7 +64,7 @@ public @interface RequestPart { * The name of the part in the "multipart/form-data" request to bind to. */ String value() default ""; - + /** * Whether the part is required. *

        Default is true, leading to an exception thrown in case @@ -72,5 +72,5 @@ public @interface RequestPart { * if you prefer a null in case of the part missing. */ boolean required() default true; - + } diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodInvoker.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodInvoker.java index 28b93fc403a..f9ea11e44ba 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodInvoker.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/support/HandlerMethodInvoker.java @@ -664,7 +664,7 @@ public class HandlerMethodInvoker { } throw new IllegalArgumentException( "HttpEntity parameter (" + methodParam.getParameterName() + ") is not parameterized"); - + } private Object resolveCookieValue(String cookieName, boolean required, String defaultValue, diff --git a/spring-web/src/main/java/org/springframework/web/bind/support/DefaultDataBinderFactory.java b/spring-web/src/main/java/org/springframework/web/bind/support/DefaultDataBinderFactory.java index a0ddc9713fc..92b78c17213 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/support/DefaultDataBinderFactory.java +++ b/spring-web/src/main/java/org/springframework/web/bind/support/DefaultDataBinderFactory.java @@ -20,9 +20,9 @@ import org.springframework.web.bind.WebDataBinder; import org.springframework.web.context.request.NativeWebRequest; /** - * Create a {@link WebRequestDataBinder} instance and initialize it with a + * Create a {@link WebRequestDataBinder} instance and initialize it with a * {@link WebBindingInitializer}. - * + * * @author Rossen Stoyanchev * @since 3.1 */ @@ -39,8 +39,8 @@ public class DefaultDataBinderFactory implements WebDataBinderFactory { } /** - * Create a new {@link WebDataBinder} for the given target object and - * initialize it through a {@link WebBindingInitializer}. + * Create a new {@link WebDataBinder} for the given target object and + * initialize it through a {@link WebBindingInitializer}. * @throws Exception in case of invalid state or arguments */ public final WebDataBinder createBinder(NativeWebRequest webRequest, Object target, String objectName) @@ -57,7 +57,7 @@ public class DefaultDataBinderFactory implements WebDataBinderFactory { * Extension point to create the WebDataBinder instance. * By default this is {@code WebRequestDataBinder}. * @param target the binding target or {@code null} for type conversion only - * @param objectName the binding target object name + * @param objectName the binding target object name * @param webRequest the current request * @throws Exception in case of invalid state or arguments */ @@ -67,8 +67,8 @@ public class DefaultDataBinderFactory implements WebDataBinderFactory { } /** - * Extension point to further initialize the created data binder instance - * (e.g. with {@code @InitBinder} methods) after "global" initializaton + * Extension point to further initialize the created data binder instance + * (e.g. with {@code @InitBinder} methods) after "global" initializaton * via {@link WebBindingInitializer}. * @param dataBinder the data binder instance to customize * @param webRequest the current request diff --git a/spring-web/src/main/java/org/springframework/web/bind/support/WebDataBinderFactory.java b/spring-web/src/main/java/org/springframework/web/bind/support/WebDataBinderFactory.java index ba72a92a3a8..d10d7c81dd6 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/support/WebDataBinderFactory.java +++ b/spring-web/src/main/java/org/springframework/web/bind/support/WebDataBinderFactory.java @@ -20,21 +20,21 @@ import org.springframework.web.bind.WebDataBinder; import org.springframework.web.context.request.NativeWebRequest; /** - * A factory for creating a {@link WebDataBinder} instance for a named target object. - * + * A factory for creating a {@link WebDataBinder} instance for a named target object. + * * @author Arjen Poutsma * @since 3.1 */ public interface WebDataBinderFactory { /** - * Create a {@link WebDataBinder} for the given object. + * Create a {@link WebDataBinder} for the given object. * @param webRequest the current request * @param target the object to create a data binder for, or {@code null} if creating a binder for a simple type - * @param objectName the name of the target object + * @param objectName the name of the target object * @return the created {@link WebDataBinder} instance, never null - * @throws Exception raised if the creation and initialization of the data binder fails + * @throws Exception raised if the creation and initialization of the data binder fails */ WebDataBinder createBinder(NativeWebRequest webRequest, Object target, String objectName) throws Exception; - + } \ No newline at end of file diff --git a/spring-web/src/main/java/org/springframework/web/context/WebApplicationContext.java b/spring-web/src/main/java/org/springframework/web/context/WebApplicationContext.java index 48ae350aeab..167c4db8761 100644 --- a/spring-web/src/main/java/org/springframework/web/context/WebApplicationContext.java +++ b/spring-web/src/main/java/org/springframework/web/context/WebApplicationContext.java @@ -20,7 +20,7 @@ import javax.servlet.ServletContext; import org.springframework.context.ApplicationContext; -/** +/** * Interface to provide configuration for a web application. This is read-only while * the application is running, but may be reloaded if the implementation supports this. * @@ -107,5 +107,5 @@ public interface WebApplicationContext extends ApplicationContext { *

        Also available for a Portlet application, in addition to the PortletContext. */ ServletContext getServletContext(); - + } diff --git a/spring-web/src/main/java/org/springframework/web/context/request/AbstractRequestAttributesScope.java b/spring-web/src/main/java/org/springframework/web/context/request/AbstractRequestAttributesScope.java index 04b95bac080..e65e7a75056 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/AbstractRequestAttributesScope.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/AbstractRequestAttributesScope.java @@ -28,7 +28,7 @@ import org.springframework.beans.factory.config.Scope; * *

        Subclasses may wish to override the {@link #get} and {@link #remove} * methods to add synchronization around the call back into this super class. - * + * * @author Rod Johnson * @author Juergen Hoeller * @author Rob Harrop diff --git a/spring-web/src/main/java/org/springframework/web/context/request/FacesWebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/FacesWebRequest.java index edd13a778a6..839c13b5a67 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/FacesWebRequest.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/FacesWebRequest.java @@ -93,7 +93,7 @@ public class FacesWebRequest extends FacesRequestAttributes implements NativeWeb public Iterator getParameterNames() { return getExternalContext().getRequestParameterNames(); } - + public String[] getParameterValues(String paramName) { return getExternalContext().getRequestParameterValuesMap().get(paramName); } diff --git a/spring-web/src/main/java/org/springframework/web/context/request/RequestContextHolder.java b/spring-web/src/main/java/org/springframework/web/context/request/RequestContextHolder.java index eaa52bc8ede..2377145bc09 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/RequestContextHolder.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/RequestContextHolder.java @@ -44,7 +44,7 @@ import org.springframework.util.ClassUtils; * @see org.springframework.web.portlet.DispatcherPortlet */ public abstract class RequestContextHolder { - + private static final boolean jsfPresent = ClassUtils.isPresent("javax.faces.context.FacesContext", RequestContextHolder.class.getClassLoader()); diff --git a/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java index d9a75991d33..ca6318f344a 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/ServletWebRequest.java @@ -46,7 +46,7 @@ public class ServletWebRequest extends ServletRequestAttributes implements Nativ private static final String HEADER_LAST_MODIFIED = "Last-Modified"; private static final String METHOD_GET = "GET"; - + private HttpServletResponse response; diff --git a/spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java index 9db1794781c..620708266ec 100644 --- a/spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java +++ b/spring-web/src/main/java/org/springframework/web/context/request/WebRequest.java @@ -77,7 +77,7 @@ public interface WebRequest extends RequestAttributes { * @since 3.0 */ Iterator getParameterNames(); - + /** * Return a immutable Map of the request parameters, with parameter names as map keys * and parameter values as map values. The map values will be of type String array. @@ -174,7 +174,7 @@ public interface WebRequest extends RequestAttributes { * {@link #checkNotModified(long)}, but not both. * @param eTag the entity tag that the application determined * for the underlying resource. This parameter will be padded - * with quotes (") if necessary. + * with quotes (") if necessary. * @return whether the request qualifies as not modified, * allowing to abort request processing and relying on the response * telling the client that the content has not been modified diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertySource.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertySource.java index 38251f1ad1c..4dc22c2449a 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertySource.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletContextPropertySource.java @@ -24,7 +24,7 @@ import org.springframework.util.CollectionUtils; /** * {@link PropertySource} that reads init parameters from a {@link ServletContext} object. - * + * * @author Chris Beams * @since 3.1 * @see ServletConfigPropertySource diff --git a/spring-web/src/main/java/org/springframework/web/filter/CompositeFilter.java b/spring-web/src/main/java/org/springframework/web/filter/CompositeFilter.java index 76b6b886b5f..b85cb1e23e1 100644 --- a/spring-web/src/main/java/org/springframework/web/filter/CompositeFilter.java +++ b/spring-web/src/main/java/org/springframework/web/filter/CompositeFilter.java @@ -33,11 +33,11 @@ import javax.servlet.ServletResponse; * This is useful for filters that require dependency injection, and can therefore be set up in a Spring application * context. Typically this composite would be used in conjunction with {@link DelegatingFilterProxy}, so that it can be * declared in Spring but applied to a servlet context. - * + * * @since 3.1 - * + * * @author Dave Syer - * + * */ public class CompositeFilter implements Filter { @@ -49,7 +49,7 @@ public class CompositeFilter implements Filter { /** * Clean up all the filters supplied, calling each one's destroy method in turn, but in reverse order. - * + * * @see Filter#init(FilterConfig) */ public void destroy() { @@ -61,7 +61,7 @@ public class CompositeFilter implements Filter { /** * Initialize all the filters, calling each one's init method in turn in the order supplied. - * + * * @see Filter#init(FilterConfig) */ public void init(FilterConfig config) throws ServletException { @@ -74,7 +74,7 @@ public class CompositeFilter implements Filter { * Forms a temporary chain from the list of delegate filters supplied ({@link #setFilters(List)}) and executes them * in order. Each filter delegates to the next one in the list, achieving the normal behaviour of a * {@link FilterChain}, despite the fact that this is a {@link Filter}. - * + * * @see Filter#doFilter(ServletRequest, ServletResponse, FilterChain) */ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, diff --git a/spring-web/src/main/java/org/springframework/web/jsf/el/package-info.java b/spring-web/src/main/java/org/springframework/web/jsf/el/package-info.java index aa34df937fe..ada7476aa52 100644 --- a/spring-web/src/main/java/org/springframework/web/jsf/el/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/jsf/el/package-info.java @@ -3,7 +3,7 @@ * * Support classes for integrating a JSF 1.2 web tier with a Spring middle tier * which is hosted in a Spring root WebApplicationContext. - * + * *

        Supports JSF 1.2's ELResolver mechanism, providing closer integration * than JSF 1.1's VariableResolver mechanism allowed for. * diff --git a/spring-web/src/main/java/org/springframework/web/jsf/package-info.java b/spring-web/src/main/java/org/springframework/web/jsf/package-info.java index b49913a3014..b5d645df286 100644 --- a/spring-web/src/main/java/org/springframework/web/jsf/package-info.java +++ b/spring-web/src/main/java/org/springframework/web/jsf/package-info.java @@ -3,7 +3,7 @@ * * Support classes for integrating a JSF web tier with a Spring middle tier * which is hosted in a Spring root WebApplicationContext. - * + * *

        Supports easy access to beans in the Spring root WebApplicationContext * from JSF EL expressions, for example in property values of JSF-managed beans. * diff --git a/spring-web/src/main/java/org/springframework/web/method/HandlerMethodSelector.java b/spring-web/src/main/java/org/springframework/web/method/HandlerMethodSelector.java index a8029705b78..c0ea3fc3450 100644 --- a/spring-web/src/main/java/org/springframework/web/method/HandlerMethodSelector.java +++ b/spring-web/src/main/java/org/springframework/web/method/HandlerMethodSelector.java @@ -28,18 +28,18 @@ import org.springframework.util.ReflectionUtils; import org.springframework.util.ReflectionUtils.MethodFilter; /** - * Defines the algorithm for searching handler methods exhaustively including interfaces and parent + * Defines the algorithm for searching handler methods exhaustively including interfaces and parent * classes while also dealing with parameterized methods as well as interface and class-based proxies. - * + * * @author Rossen Stoyanchev * @since 3.1 */ public abstract class HandlerMethodSelector { - + /** * Selects handler methods for the given handler type. Callers of this method define handler methods * of interest through the {@link MethodFilter} parameter. - * + * * @param handlerType the handler type to search handler methods on * @param handlerMethodFilter a {@link MethodFilter} to help recognize handler methods of interest * @return the selected methods, or an empty set diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractCookieValueMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractCookieValueMethodArgumentResolver.java index df485e1b0af..4f25d7633b9 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractCookieValueMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/AbstractCookieValueMethodArgumentResolver.java @@ -23,16 +23,16 @@ import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.CookieValue; /** - * A base abstract class to resolve method arguments annotated with + * A base abstract class to resolve method arguments annotated with * {@code @CookieValue}. Subclasses extract the cookie value from the request. - * - *

        An {@code @CookieValue} is a named value that is resolved from a cookie. - * It has a required flag and a default value to fall back on when the cookie - * does not exist. - * - *

        A {@link WebDataBinder} may be invoked to apply type conversion to the + * + *

        An {@code @CookieValue} is a named value that is resolved from a cookie. + * It has a required flag and a default value to fall back on when the cookie + * does not exist. + * + *

        A {@link WebDataBinder} may be invoked to apply type conversion to the * resolved cookie value. - * + * * @author Arjen Poutsma * @author Rossen Stoyanchev * @since 3.1 @@ -40,7 +40,7 @@ import org.springframework.web.bind.annotation.CookieValue; public abstract class AbstractCookieValueMethodArgumentResolver extends AbstractNamedValueMethodArgumentResolver { /** - * @param beanFactory a bean factory to use for resolving ${...} + * @param beanFactory a bean factory to use for resolving ${...} * placeholder and #{...} SpEL expressions in default values; * or {@code null} if default values are not expected to contain expressions */ diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolver.java index 7877e7923cc..083e6fe5e54 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolver.java @@ -26,21 +26,21 @@ import org.springframework.web.context.request.NativeWebRequest; /** * Resolves method arguments annotated with {@code @Value}. - * + * *

        An {@code @Value} does not have a name but gets resolved from the default - * value string, which may contain ${...} placeholder or Spring Expression - * Language #{...} expressions. - * - *

        A {@link WebDataBinder} may be invoked to apply type conversion to + * value string, which may contain ${...} placeholder or Spring Expression + * Language #{...} expressions. + * + *

        A {@link WebDataBinder} may be invoked to apply type conversion to * resolved argument value. - * + * * @author Rossen Stoyanchev * @since 3.1 */ public class ExpressionValueMethodArgumentResolver extends AbstractNamedValueMethodArgumentResolver { /** - * @param beanFactory a bean factory to use for resolving ${...} + * @param beanFactory a bean factory to use for resolving ${...} * placeholder and #{...} SpEL expressions in default values; * or {@code null} if default values are not expected to contain expressions */ @@ -75,5 +75,5 @@ public class ExpressionValueMethodArgumentResolver extends AbstractNamedValueMet private ExpressionValueNamedValueInfo(Value annotation) { super("@Value", false, annotation.value()); } - } + } } \ No newline at end of file diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/InitBinderDataBinderFactory.java b/spring-web/src/main/java/org/springframework/web/method/annotation/InitBinderDataBinderFactory.java index 991ab9ff862..c7520687e10 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/InitBinderDataBinderFactory.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/InitBinderDataBinderFactory.java @@ -38,7 +38,7 @@ import org.springframework.web.method.support.InvocableHandlerMethod; public class InitBinderDataBinderFactory extends DefaultDataBinderFactory { private final List binderMethods; - + /** * Create a new instance. * @param binderMethods {@code @InitBinder} methods, or {@code null} @@ -68,8 +68,8 @@ public class InitBinderDataBinderFactory extends DefaultDataBinderFactory { } /** - * Return {@code true} if the given {@code @InitBinder} method should be - * invoked to initialize the given WebDataBinder. + * Return {@code true} if the given {@code @InitBinder} method should be + * invoked to initialize the given WebDataBinder. *

        The default implementation checks if target object name is included * in the attribute names specified in the {@code @InitBinder} annotation. */ @@ -78,5 +78,5 @@ public class InitBinderDataBinderFactory extends DefaultDataBinderFactory { Collection names = Arrays.asList(annot.value()); return (names.size() == 0 || names.contains(binder.getObjectName())); } - + } diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/ModelFactory.java b/spring-web/src/main/java/org/springframework/web/method/annotation/ModelFactory.java index 3d5abfa580a..5cac3e8eb6a 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/ModelFactory.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/ModelFactory.java @@ -41,24 +41,24 @@ import org.springframework.web.method.support.InvocableHandlerMethod; import org.springframework.web.method.support.ModelAndViewContainer; /** - * Provides methods to initialize the {@link Model} before controller method - * invocation and to update it afterwards. On initialization, the model is - * populated with attributes from the session or by invoking - * {@code @ModelAttribute} methods. On update, model attributes are - * synchronized with the session -- either adding or removing them. + * Provides methods to initialize the {@link Model} before controller method + * invocation and to update it afterwards. On initialization, the model is + * populated with attributes from the session or by invoking + * {@code @ModelAttribute} methods. On update, model attributes are + * synchronized with the session -- either adding or removing them. * Also {@link BindingResult} attributes where missing. - * + * * @author Rossen Stoyanchev * @since 3.1 */ public final class ModelFactory { private final List attributeMethods; - + private final WebDataBinderFactory binderFactory; - + private final SessionAttributesHandler sessionAttributesHandler; - + /** * Create a new instance with the given {@code @ModelAttribute} methods. * @param attributeMethods for model initialization @@ -76,15 +76,15 @@ public final class ModelFactory { /** * Populate the model in the following order: *

          - *
        1. Retrieve "known" session attributes -- i.e. attributes listed via - * {@link SessionAttributes @SessionAttributes} and previously stored in + *
        2. Retrieve "known" session attributes -- i.e. attributes listed via + * {@link SessionAttributes @SessionAttributes} and previously stored in * the in the model at least once *
        3. Invoke {@link ModelAttribute @ModelAttribute} methods *
        4. Find method arguments eligible as session attributes and retrieve - * them if they're not already present in the model + * them if they're not already present in the model *
        * @param request the current request - * @param mavContainer contains the model to be initialized + * @param mavContainer contains the model to be initialized * @param handlerMethod the method for which the model is initialized * @throws Exception may arise from {@code @ModelAttribute} methods */ @@ -108,18 +108,18 @@ public final class ModelFactory { } /** - * Invoke model attribute methods to populate the model. Attributes are + * Invoke model attribute methods to populate the model. Attributes are * added only if not already present in the model. */ private void invokeModelAttributeMethods(NativeWebRequest request, ModelAndViewContainer mavContainer) throws Exception { - + for (InvocableHandlerMethod attrMethod : this.attributeMethods) { String modelName = attrMethod.getMethodAnnotation(ModelAttribute.class).value(); if (mavContainer.containsAttribute(modelName)) { continue; } - + Object returnValue = attrMethod.invokeForRequest(request, mavContainer); if (!attrMethod.isVoid()){ @@ -130,9 +130,9 @@ public final class ModelFactory { } } } - + /** - * Return all {@code @ModelAttribute} arguments declared as session + * Return all {@code @ModelAttribute} arguments declared as session * attributes via {@code @SessionAttributes}. */ private List findSessionAttributeArguments(HandlerMethod handlerMethod) { @@ -147,12 +147,12 @@ public final class ModelFactory { } return result; } - + /** - * Derive the model attribute name for the given return value using + * Derive the model attribute name for the given return value using * one of the following: *
          - *
        1. The method {@code ModelAttribute} annotation value + *
        2. The method {@code ModelAttribute} annotation value *
        3. The declared return type if it is other than {@code Object} *
        4. The actual return value type *
        @@ -176,7 +176,7 @@ public final class ModelFactory { * Derives the model attribute name for a method parameter based on: *
          *
        1. The parameter {@code @ModelAttribute} annotation value - *
        2. The parameter type + *
        3. The parameter type *
        * @return the derived name; never {@code null} or an empty string */ @@ -185,7 +185,7 @@ public final class ModelFactory { String attrName = (annot != null) ? annot.value() : null; return StringUtils.hasText(attrName) ? attrName : Conventions.getVariableNameForParameter(parameter); } - + /** * Synchronize model attributes with the session. Add {@link BindingResult} * attributes where necessary. @@ -194,17 +194,17 @@ public final class ModelFactory { * @throws Exception if creating BindingResult attributes fails */ public void updateModel(NativeWebRequest request, ModelAndViewContainer mavContainer) throws Exception { - + if (mavContainer.getSessionStatus().isComplete()){ this.sessionAttributesHandler.cleanupAttributes(request); } else { this.sessionAttributesHandler.storeAttributes(request, mavContainer.getModel()); } - + if (!mavContainer.isRequestHandled()) { updateBindingResult(request, mavContainer.getModel()); - } + } } /** @@ -217,7 +217,7 @@ public final class ModelFactory { if (isBindingCandidate(name, value)) { String bindingResultKey = BindingResult.MODEL_KEY_PREFIX + name; - + if (!model.containsAttribute(bindingResultKey)) { WebDataBinder dataBinder = binderFactory.createBinder(request, value, name); model.put(bindingResultKey, dataBinder.getBindingResult()); @@ -233,14 +233,14 @@ public final class ModelFactory { if (attributeName.startsWith(BindingResult.MODEL_KEY_PREFIX)) { return false; } - + Class attrType = (value != null) ? value.getClass() : null; if (this.sessionAttributesHandler.isHandlerSessionAttribute(attributeName, attrType)) { return true; } - - return (value != null && !value.getClass().isArray() && !(value instanceof Collection) && + + return (value != null && !value.getClass().isArray() && !(value instanceof Collection) && !(value instanceof Map) && !BeanUtils.isSimpleValueType(value.getClass())); } - + } \ No newline at end of file diff --git a/spring-web/src/main/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolver.java index 1c5c3cf04f4..57a622118e5 100644 --- a/spring-web/src/main/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolver.java @@ -27,16 +27,16 @@ import org.springframework.web.context.request.NativeWebRequest; /** * Resolves method arguments annotated with {@code @RequestHeader} except for - * {@link Map} arguments. See {@link RequestHeaderMapMethodArgumentResolver} for + * {@link Map} arguments. See {@link RequestHeaderMapMethodArgumentResolver} for * details on {@link Map} arguments annotated with {@code @RequestHeader}. - * + * *

        An {@code @RequestHeader} is a named value resolved from a request header. - * It has a required flag and a default value to fall back on when the request - * header does not exist. + * It has a required flag and a default value to fall back on when the request + * header does not exist. * - *

        A {@link WebDataBinder} is invoked to apply type conversion to resolved + *

        A {@link WebDataBinder} is invoked to apply type conversion to resolved * request header values that don't yet match the method parameter type. - * + * * @author Arjen Poutsma * @author Rossen Stoyanchev * @since 3.1 @@ -44,7 +44,7 @@ import org.springframework.web.context.request.NativeWebRequest; public class RequestHeaderMethodArgumentResolver extends AbstractNamedValueMethodArgumentResolver { /** - * @param beanFactory a bean factory to use for resolving ${...} + * @param beanFactory a bean factory to use for resolving ${...} * placeholder and #{...} SpEL expressions in default values; * or {@code null} if default values are not expected to have expressions */ diff --git a/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodArgumentResolver.java b/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodArgumentResolver.java index 9dafb6d867a..79a49c1cad9 100644 --- a/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodArgumentResolver.java +++ b/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodArgumentResolver.java @@ -22,7 +22,7 @@ import org.springframework.web.bind.support.WebDataBinderFactory; import org.springframework.web.context.request.NativeWebRequest; /** - * Strategy interface for resolving method parameters into argument values in + * Strategy interface for resolving method parameters into argument values in * the context of a given request. * * @author Arjen Poutsma @@ -31,25 +31,25 @@ import org.springframework.web.context.request.NativeWebRequest; public interface HandlerMethodArgumentResolver { /** - * Whether the given {@linkplain MethodParameter method parameter} is + * Whether the given {@linkplain MethodParameter method parameter} is * supported by this resolver. - * + * * @param parameter the method parameter to check - * @return {@code true} if this resolver supports the supplied parameter; + * @return {@code true} if this resolver supports the supplied parameter; * {@code false} otherwise */ boolean supportsParameter(MethodParameter parameter); /** - * Resolves a method parameter into an argument value from a given request. - * A {@link ModelAndViewContainer} provides access to the model for the + * Resolves a method parameter into an argument value from a given request. + * A {@link ModelAndViewContainer} provides access to the model for the * request. A {@link WebDataBinderFactory} provides a way to create - * a {@link WebDataBinder} instance when needed for data binding and + * a {@link WebDataBinder} instance when needed for data binding and * type conversion purposes. - * - * @param parameter the method parameter to resolve. This parameter must - * have previously been passed to - * {@link #supportsParameter(org.springframework.core.MethodParameter)} + * + * @param parameter the method parameter to resolve. This parameter must + * have previously been passed to + * {@link #supportsParameter(org.springframework.core.MethodParameter)} * and it must have returned {@code true} * @param mavContainer the ModelAndViewContainer for the current request * @param webRequest the current request @@ -57,9 +57,9 @@ public interface HandlerMethodArgumentResolver { * @return the resolved argument value, or {@code null}. * @throws Exception in case of errors with the preparation of argument values */ - Object resolveArgument(MethodParameter parameter, + Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, - NativeWebRequest webRequest, + NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws Exception; } \ No newline at end of file diff --git a/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodReturnValueHandler.java b/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodReturnValueHandler.java index 8def3ac532b..4b77ba622ec 100644 --- a/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodReturnValueHandler.java +++ b/spring-web/src/main/java/org/springframework/web/method/support/HandlerMethodReturnValueHandler.java @@ -20,8 +20,8 @@ import org.springframework.core.MethodParameter; import org.springframework.web.context.request.NativeWebRequest; /** - * Strategy interface to handle the value returned from the invocation of a - * handler method . + * Strategy interface to handle the value returned from the invocation of a + * handler method . * * @author Arjen Poutsma * @since 3.1 @@ -29,25 +29,25 @@ import org.springframework.web.context.request.NativeWebRequest; public interface HandlerMethodReturnValueHandler { /** - * Whether the given {@linkplain MethodParameter method return type} is + * Whether the given {@linkplain MethodParameter method return type} is * supported by this handler. * * @param returnType the method return type to check - * @return {@code true} if this handler supports the supplied return type; + * @return {@code true} if this handler supports the supplied return type; * {@code false} otherwise */ boolean supportsReturnType(MethodParameter returnType); /** - * Handle the given return value by adding attributes to the model and - * setting a view or setting the + * Handle the given return value by adding attributes to the model and + * setting a view or setting the * {@link ModelAndViewContainer#setRequestHandled} flag to {@code true} - * to indicate the response has been handled directly. - * + * to indicate the response has been handled directly. + * * @param returnValue the value returned from the handler method - * @param returnType the type of the return value. This type must have - * previously been passed to - * {@link #supportsReturnType(org.springframework.core.MethodParameter)} + * @param returnType the type of the return value. This type must have + * previously been passed to + * {@link #supportsReturnType(org.springframework.core.MethodParameter)} * and it must have returned {@code true} * @param mavContainer the ModelAndViewContainer for the current request * @param webRequest the current request diff --git a/spring-web/src/main/java/org/springframework/web/multipart/support/MultipartFilter.java b/spring-web/src/main/java/org/springframework/web/multipart/support/MultipartFilter.java index c7bff8e6e43..b22ba7af1c8 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/support/MultipartFilter.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/support/MultipartFilter.java @@ -114,7 +114,7 @@ public class MultipartFilter extends OncePerRequestFilter { logger.debug("Request [" + processedRequest.getRequestURI() + "] is not a multipart request"); } } - + try { filterChain.doFilter(processedRequest, response); } diff --git a/spring-web/src/main/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequest.java b/spring-web/src/main/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequest.java index 4cffa524bb9..2d8c260ef65 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequest.java @@ -51,15 +51,15 @@ public class RequestPartServletServerHttpRequest extends ServletServerHttpReques /** - * Create a new instance. + * Create a new instance. * @param request the current request * @param partName the name of the part to adapt to the {@link ServerHttpRequest} contract * @throws MissingServletRequestPartException if the request part cannot be found * @throws IllegalArgumentException if MultipartHttpServletRequest cannot be initialized */ - public RequestPartServletServerHttpRequest(HttpServletRequest request, String partName) + public RequestPartServletServerHttpRequest(HttpServletRequest request, String partName) throws MissingServletRequestPartException { - + super(request); this.multipartRequest = asMultipartRequest(request); @@ -78,7 +78,7 @@ public class RequestPartServletServerHttpRequest extends ServletServerHttpReques } } } - + private static MultipartHttpServletRequest asMultipartRequest(HttpServletRequest request) { if (request instanceof MultipartHttpServletRequest) { return (MultipartHttpServletRequest) request; diff --git a/spring-web/src/main/java/org/springframework/web/multipart/support/StringMultipartFileEditor.java b/spring-web/src/main/java/org/springframework/web/multipart/support/StringMultipartFileEditor.java index 9c551c315f2..7d8e8dff17a 100644 --- a/spring-web/src/main/java/org/springframework/web/multipart/support/StringMultipartFileEditor.java +++ b/spring-web/src/main/java/org/springframework/web/multipart/support/StringMultipartFileEditor.java @@ -24,7 +24,7 @@ import org.springframework.web.multipart.MultipartFile; /** * Custom {@link java.beans.PropertyEditor} for converting * {@link MultipartFile MultipartFiles} to Strings. - * + * *

        Allows one to specify the charset to use. * * @author Juergen Hoeller diff --git a/spring-web/src/main/java/org/springframework/web/util/TagUtils.java b/spring-web/src/main/java/org/springframework/web/util/TagUtils.java index 8c000e83f0b..298262392bb 100644 --- a/spring-web/src/main/java/org/springframework/web/util/TagUtils.java +++ b/spring-web/src/main/java/org/springframework/web/util/TagUtils.java @@ -63,7 +63,7 @@ public abstract class TagUtils { * 'page' or 'application', the method will return {@link PageContext#PAGE_SCOPE}. * @param scope the String to inspect * @return the scope found, or {@link PageContext#PAGE_SCOPE} if no scope matched - * @throws IllegalArgumentException if the supplied scope is null + * @throws IllegalArgumentException if the supplied scope is null */ public static int getScope(String scope) { Assert.notNull(scope, "Scope to search for cannot be null"); @@ -90,7 +90,7 @@ public abstract class TagUtils { * of the supplied type * @throws IllegalArgumentException if either of the supplied arguments is null; * or if the supplied ancestorTagClass is not type-assignable to - * the {@link Tag} class + * the {@link Tag} class */ public static boolean hasAncestorOfType(Tag tag, Class ancestorTagClass) { Assert.notNull(tag, "Tag cannot be null"); @@ -122,7 +122,7 @@ public abstract class TagUtils { * @throws IllegalArgumentException if any of the supplied arguments is null, * or in the case of the {@link String}-typed arguments, is composed wholly * of whitespace; or if the supplied ancestorTagClass is not - * type-assignable to the {@link Tag} class + * type-assignable to the {@link Tag} class * @see #hasAncestorOfType(javax.servlet.jsp.tagext.Tag, Class) */ public static void assertHasAncestorOfType(Tag tag, Class ancestorTagClass, String tagName, String ancestorTagName) { diff --git a/spring-web/src/main/java/org/springframework/web/util/UriUtils.java b/spring-web/src/main/java/org/springframework/web/util/UriUtils.java index e976a43b54a..c86b5a613e7 100644 --- a/spring-web/src/main/java/org/springframework/web/util/UriUtils.java +++ b/spring-web/src/main/java/org/springframework/web/util/UriUtils.java @@ -70,8 +70,8 @@ public abstract class UriUtils { /** * Encodes the given source URI into an encoded String. All various URI components are * encoded according to their respective valid character sets. - *

        Note that this method does not attempt to encode "=" and "&" - * characters in query parameter names and query parameter values because they cannot + *

        Note that this method does not attempt to encode "=" and "&" + * characters in query parameter names and query parameter values because they cannot * be parsed in a reliable way. Instead use: *

         	 * UriComponents uriComponents = UriComponentsBuilder.fromUri("/path?name={value}").buildAndExpand("a=b");
        @@ -111,8 +111,8 @@ public abstract class UriUtils {
         	 * encoded according to their respective valid character sets.
         	 * 

        Note that this method does not support fragments ({@code #}), * as these are not supposed to be sent to the server, but retained by the client. - *

        Note that this method does not attempt to encode "=" and "&" - * characters in query parameter names and query parameter values because they cannot + *

        Note that this method does not attempt to encode "=" and "&" + * characters in query parameter names and query parameter values because they cannot * be parsed in a reliable way. Instead use: *

         	 * UriComponents uriComponents = UriComponentsBuilder.fromHttpUrl("/path?name={value}").buildAndExpand("a=b");
        diff --git a/spring-web/src/test/java/org/springframework/beans/INestedTestBean.java b/spring-web/src/test/java/org/springframework/beans/INestedTestBean.java
        index 7d87547b5f7..c5c4ed5e679 100644
        --- a/spring-web/src/test/java/org/springframework/beans/INestedTestBean.java
        +++ b/spring-web/src/test/java/org/springframework/beans/INestedTestBean.java
        @@ -1,12 +1,12 @@
         /*
          * Copyright 2002-2005 the original author or authors.
        - * 
        + *
          * Licensed under the Apache License, Version 2.0 (the "License");
          * you may not use this file except in compliance with the License.
          * You may obtain a copy of the License at
        - * 
        + *
          *      http://www.apache.org/licenses/LICENSE-2.0
        - * 
        + *
          * Unless required by applicable law or agreed to in writing, software
          * distributed under the License is distributed on an "AS IS" BASIS,
          * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        diff --git a/spring-web/src/test/java/org/springframework/beans/IOther.java b/spring-web/src/test/java/org/springframework/beans/IOther.java
        index 797486ec44e..6a8f74187cb 100644
        --- a/spring-web/src/test/java/org/springframework/beans/IOther.java
        +++ b/spring-web/src/test/java/org/springframework/beans/IOther.java
        @@ -1,13 +1,13 @@
         
         /*
          * Copyright 2002-2005 the original author or authors.
        - * 
        + *
          * Licensed under the Apache License, Version 2.0 (the "License");
          * you may not use this file except in compliance with the License.
          * You may obtain a copy of the License at
        - * 
        + *
          *      http://www.apache.org/licenses/LICENSE-2.0
        - * 
        + *
          * Unless required by applicable law or agreed to in writing, software
          * distributed under the License is distributed on an "AS IS" BASIS,
          * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        diff --git a/spring-web/src/test/java/org/springframework/beans/NestedTestBean.java b/spring-web/src/test/java/org/springframework/beans/NestedTestBean.java
        index a06e15d150b..0eb8df5c8ae 100644
        --- a/spring-web/src/test/java/org/springframework/beans/NestedTestBean.java
        +++ b/spring-web/src/test/java/org/springframework/beans/NestedTestBean.java
        @@ -1,12 +1,12 @@
         /*
          * Copyright 2002-2005 the original author or authors.
        - * 
        + *
          * Licensed under the Apache License, Version 2.0 (the "License");
          * you may not use this file except in compliance with the License.
          * You may obtain a copy of the License at
        - * 
        + *
          *      http://www.apache.org/licenses/LICENSE-2.0
        - * 
        + *
          * Unless required by applicable law or agreed to in writing, software
          * distributed under the License is distributed on an "AS IS" BASIS,
          * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        diff --git a/spring-web/src/test/java/org/springframework/beans/Person.java b/spring-web/src/test/java/org/springframework/beans/Person.java
        index 3ebce5e2ea0..a78998ad5d4 100644
        --- a/spring-web/src/test/java/org/springframework/beans/Person.java
        +++ b/spring-web/src/test/java/org/springframework/beans/Person.java
        @@ -1,12 +1,12 @@
         /*
          * Copyright 2002-2005 the original author or authors.
        - * 
        + *
          * Licensed under the Apache License, Version 2.0 (the "License");
          * you may not use this file except in compliance with the License.
          * You may obtain a copy of the License at
        - * 
        + *
          *      http://www.apache.org/licenses/LICENSE-2.0
        - * 
        + *
          * Unless required by applicable law or agreed to in writing, software
          * distributed under the License is distributed on an "AS IS" BASIS,
          * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        diff --git a/spring-web/src/test/java/org/springframework/beans/SerializablePerson.java b/spring-web/src/test/java/org/springframework/beans/SerializablePerson.java
        index 36351352aab..34d05120aaa 100644
        --- a/spring-web/src/test/java/org/springframework/beans/SerializablePerson.java
        +++ b/spring-web/src/test/java/org/springframework/beans/SerializablePerson.java
        @@ -1,12 +1,12 @@
         /*
          * Copyright 2002-2005 the original author or authors.
        - * 
        + *
          * Licensed under the Apache License, Version 2.0 (the "License");
          * you may not use this file except in compliance with the License.
          * You may obtain a copy of the License at
        - * 
        + *
          *      http://www.apache.org/licenses/LICENSE-2.0
        - * 
        + *
          * Unless required by applicable law or agreed to in writing, software
          * distributed under the License is distributed on an "AS IS" BASIS,
          * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        diff --git a/spring-web/src/test/java/org/springframework/http/converter/HttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/HttpMessageConverterTests.java
        index 0de4c197367..e3c5072f1bb 100644
        --- a/spring-web/src/test/java/org/springframework/http/converter/HttpMessageConverterTests.java
        +++ b/spring-web/src/test/java/org/springframework/http/converter/HttpMessageConverterTests.java
        @@ -56,7 +56,7 @@ public class HttpMessageConverterTests {
         		assertFalse(converter.canRead(MyType.class, new MediaType("foo", "*")));
         		assertFalse(converter.canRead(MyType.class, MediaType.ALL));
         	}
        -	
        +
         	@Test
         	public void canWrite() {
         		AbstractHttpMessageConverter converter = new MyHttpMessageConverter(MEDIA_TYPE) {
        diff --git a/spring-web/src/test/java/org/springframework/http/converter/StringHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/StringHttpMessageConverterTests.java
        index 149a84f659e..3f5171390d4 100644
        --- a/spring-web/src/test/java/org/springframework/http/converter/StringHttpMessageConverterTests.java
        +++ b/spring-web/src/test/java/org/springframework/http/converter/StringHttpMessageConverterTests.java
        @@ -87,7 +87,7 @@ public class StringHttpMessageConverterTests {
         	}
         
         	// SPR-8867
        -	
        +
         	@Test
         	public void writeOverrideRequestedContentType() throws IOException {
         		Charset utf8 = Charset.forName("UTF-8");
        diff --git a/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTest.java b/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTest.java
        index d8c60f18272..89cbe30df74 100644
        --- a/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTest.java
        +++ b/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTest.java
        @@ -56,7 +56,7 @@ public class Jaxb2RootElementHttpMessageConverterTest {
         		AopProxy proxy = proxyFactory.createAopProxy(advisedSupport);
         		rootElementCglib = (RootElement) proxy.getProxy();
         	}
        -	
        +
         	@Test
         	public void canRead() throws Exception {
         		assertTrue("Converter does not support reading @XmlRootElement", converter.canRead(RootElement.class, null));
        @@ -79,7 +79,7 @@ public class Jaxb2RootElementHttpMessageConverterTest {
         		RootElement result = (RootElement) converter.read((Class) RootElement.class, inputMessage);
         		assertEquals("Invalid result", "Hello World", result.type.s);
         	}
        -	
        +
         	@Test
         	@SuppressWarnings("unchecked")
         	public void readXmlRootElementSubclass() throws Exception {
        diff --git a/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java
        index 3dbbb80e5f2..a273cfffab0 100644
        --- a/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java
        +++ b/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java
        @@ -120,7 +120,7 @@ public class SourceHttpMessageConverterTests {
         		assertEquals("Invalid content-length", outputMessage.getBodyAsBytes().length,
         				outputMessage.getHeaders().getContentLength());
         	}
        -	
        +
         	@Test
         	public void writeSAXSource() throws Exception {
         		String xml = "Hello World";
        diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpSession.java b/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpSession.java
        index 9e9beb05583..ae7d58af432 100644
        --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpSession.java
        +++ b/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpSession.java
        @@ -71,7 +71,7 @@ public class MockHttpSession implements HttpSession {
         
         	/**
         	 * Create a new MockHttpSession with a default {@link MockServletContext}.
        -	 * 
        +	 *
         	 * @see MockServletContext
         	 */
         	public MockHttpSession() {
        @@ -80,7 +80,7 @@ public class MockHttpSession implements HttpSession {
         
         	/**
         	 * Create a new MockHttpSession.
        -	 * 
        +	 *
         	 * @param servletContext the ServletContext that the session runs in
         	 */
         	public MockHttpSession(ServletContext servletContext) {
        @@ -89,7 +89,7 @@ public class MockHttpSession implements HttpSession {
         
         	/**
         	 * Create a new MockHttpSession.
        -	 * 
        +	 *
         	 * @param servletContext the ServletContext that the session runs in
         	 * @param id a unique identifier for this session
         	 */
        @@ -222,7 +222,7 @@ public class MockHttpSession implements HttpSession {
         	/**
         	 * Serialize the attributes of this session into an object that can be
         	 * turned into a byte array with standard Java serialization.
        -	 * 
        +	 *
         	 * @return a representation of this session's serialized state
         	 */
         	public Serializable serializeState() {
        @@ -249,7 +249,7 @@ public class MockHttpSession implements HttpSession {
         	/**
         	 * Deserialize the attributes of this session from a state object created by
         	 * {@link #serializeState()}.
        -	 * 
        +	 *
         	 * @param state a representation of this session's serialized state
         	 */
         	@SuppressWarnings("unchecked")
        diff --git a/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java b/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java
        index 6bd5bb75d30..5c18203da6b 100644
        --- a/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java
        @@ -72,7 +72,7 @@ public class RequestAndSessionScopedBeanTests {
         			// expected
         		}
         	}
        -	
        +
         	@Test
         	public void testPutBeanInSession() throws Exception {
         		String targetBeanName = "target";
        diff --git a/spring-web/src/test/java/org/springframework/web/filter/RequestContextFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/RequestContextFilterTests.java
        index 69a71bb3fc1..5eed6a55ac7 100644
        --- a/spring-web/src/test/java/org/springframework/web/filter/RequestContextFilterTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/filter/RequestContextFilterTests.java
        @@ -41,16 +41,16 @@ public class RequestContextFilterTests extends TestCase {
         	public void testHappyPath() throws Exception {
         		testFilterInvocation(null);
         	}
        -	
        +
         	public void testWithException() throws Exception {
         		testFilterInvocation(new ServletException());
         	}
        -		
        +
         	public void testFilterInvocation(final ServletException sex) throws Exception {
         		final MockHttpServletRequest req = new MockHttpServletRequest();
         		req.setAttribute("myAttr", "myValue");
         		final MockHttpServletResponse resp = new MockHttpServletResponse();
        -		
        +
         		// Expect one invocation by the filter being tested
         		class DummyFilterChain implements FilterChain {
         			public int invocations = 0;
        @@ -84,7 +84,7 @@ public class RequestContextFilterTests extends TestCase {
         		catch (ServletException ex) {
         			assertNotNull(sex);
         		}
        -		
        +
         		try {
         			RequestContextHolder.currentRequestAttributes();
         			fail();
        diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/CookieValueMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/CookieValueMethodArgumentResolverTests.java
        index 8b36851a2af..968728154e8 100644
        --- a/spring-web/src/test/java/org/springframework/web/method/annotation/CookieValueMethodArgumentResolverTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/CookieValueMethodArgumentResolverTests.java
        @@ -38,7 +38,7 @@ import org.springframework.web.method.annotation.AbstractCookieValueMethodArgume
         
         /**
          * Test fixture with {@link org.springframework.web.method.annotation.AbstractCookieValueMethodArgumentResolver}.
        - * 
        + *
          * @author Arjen Poutsma
          * @author Rossen Stoyanchev
          */
        @@ -59,7 +59,7 @@ public class CookieValueMethodArgumentResolverTests {
         	@Before
         	public void setUp() throws Exception {
         		resolver = new TestCookieValueMethodArgumentResolver();
        -		
        +
         		Method method = getClass().getMethod("params", Cookie.class, String.class, String.class);
         		paramNamedCookie = new MethodParameter(method, 0);
         		paramNamedDefaultValueString = new MethodParameter(method, 1);
        @@ -79,7 +79,7 @@ public class CookieValueMethodArgumentResolverTests {
         	@Test
         	public void resolveCookieDefaultValue() throws Exception {
         		Object result = resolver.resolveArgument(paramNamedDefaultValueString, null, webRequest, null);
        -		
        +
         		assertTrue(result instanceof String);
         		assertEquals("Invalid result", "bar", result);
         	}
        @@ -101,7 +101,7 @@ public class CookieValueMethodArgumentResolverTests {
         			return null;
         		}
         	}
        -	
        +
         	public void params(@CookieValue("name") Cookie param1,
         					   @CookieValue(value = "name", defaultValue = "bar") String param2,
         					   String param3) {
        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 719d5eda0a9..be8ce28ce3e 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
        @@ -32,7 +32,7 @@ import org.springframework.web.method.support.ModelAndViewContainer;
         
         /**
          * Test fixture with {@link ErrorsMethodArgumentResolver}.
        - * 
        + *
          * @author Rossen Stoyanchev
          */
         public class ErrorsMethodHandlerArgumentResolverTests {
        @@ -66,7 +66,7 @@ public class ErrorsMethodHandlerArgumentResolverTests {
         		mavContainer.addAttribute("ignore4", "value4");
         		mavContainer.addAttribute("ignore5", "value5");
         		mavContainer.addAllAttributes(bindingResult.getModel());
        -		
        +
         		Object actual = resolver.resolveArgument(paramErrors, mavContainer, webRequest, null);
         
         		assertSame(actual, bindingResult);
        @@ -77,10 +77,10 @@ public class ErrorsMethodHandlerArgumentResolverTests {
         		ModelAndViewContainer mavContainer = new ModelAndViewContainer();
         		mavContainer.addAllAttributes(bindingResult.getModel());
         		mavContainer.addAttribute("ignore1", "value1");
        -		
        +
         		resolver.resolveArgument(paramErrors, mavContainer, webRequest, null);
         	}
        -	
        +
         	@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/ExceptionHandlerMethodResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolverTests.java
        index 1a233bba9dc..4ac6a733487 100644
        --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolverTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ExceptionHandlerMethodResolverTests.java
        @@ -34,7 +34,7 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
         
         /**
          * Test fixture for {@link ExceptionHandlerMethodResolver} tests.
        - * 
        + *
          * @author Rossen Stoyanchev
          */
         public class ExceptionHandlerMethodResolverTests {
        @@ -83,7 +83,7 @@ public class ExceptionHandlerMethodResolverTests {
         		IOException exception = new IOException();
         		assertEquals("handleIOException", resolver.resolveMethod(exception).getName());
         	}
        -	
        +
         	@Test(expected = IllegalStateException.class)
         	public void ambiguousExceptionMapping() {
         		new ExceptionHandlerMethodResolver(AmbiguousController.class);
        @@ -96,7 +96,7 @@ public class ExceptionHandlerMethodResolverTests {
         
         	@Controller
         	static class ExceptionController {
        -		
        +
         		public void handle() {}
         
         		@ExceptionHandler(IOException.class)
        @@ -139,10 +139,10 @@ public class ExceptionHandlerMethodResolverTests {
         
         	@Controller
         	static class NoExceptionController {
        -		
        +
         		@ExceptionHandler
         		public void handle() {
         		}
         	}
        -	
        +
         }
        diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolverTests.java
        index cd6ac844ba0..73c34842733 100644
        --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolverTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolverTests.java
        @@ -37,7 +37,7 @@ import org.springframework.web.method.annotation.ExpressionValueMethodArgumentRe
         
         /**
          * Test fixture with {@link ExpressionValueMethodArgumentResolver}.
        - * 
        + *
          * @author Rossen Stoyanchev
          */
         public class ExpressionValueMethodArgumentResolverTests {
        @@ -57,18 +57,18 @@ public class ExpressionValueMethodArgumentResolverTests {
         		GenericWebApplicationContext context = new GenericWebApplicationContext();
         		context.refresh();
         		resolver = new ExpressionValueMethodArgumentResolver(context.getBeanFactory());
        -		
        +
         		Method method = getClass().getMethod("params", int.class, String.class, String.class);
         		paramSystemProperty = new MethodParameter(method, 0);
         		paramContextPath = new MethodParameter(method, 1);
         		paramNotSupported = new MethodParameter(method, 2);
         
         		webRequest = new ServletWebRequest(new MockHttpServletRequest(), new MockHttpServletResponse());
        -		
        +
         		// Expose request to the current thread (for SpEL expressions)
         		RequestContextHolder.setRequestAttributes(webRequest);
         	}
        -	
        +
         	@After
         	public void teardown() {
         		RequestContextHolder.resetRequestAttributes();
        @@ -86,7 +86,7 @@ public class ExpressionValueMethodArgumentResolverTests {
         		System.setProperty("systemProperty", "22");
         		Object value = resolver.resolveArgument(paramSystemProperty, null, webRequest, null);
         		System.clearProperty("systemProperty");
        -		
        +
         		assertEquals("22", value);
         	}
         
        @@ -94,7 +94,7 @@ public class ExpressionValueMethodArgumentResolverTests {
         	public void resolveContextPath() throws Exception {
         		webRequest.getNativeRequest(MockHttpServletRequest.class).setContextPath("/contextPath");
         		Object value = resolver.resolveArgument(paramContextPath, null, webRequest, null);
        -		
        +
         		assertEquals("/contextPath", value);
         	}
         
        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 6600ef920fc..40b600377cb 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
        @@ -53,19 +53,19 @@ public class InitBinderDataBinderFactoryTests {
         	private HandlerMethodArgumentResolverComposite argumentResolvers;
         
         	private NativeWebRequest webRequest;
        -	
        +
         	@Before
         	public void setUp() throws Exception {
         		bindingInitializer = new ConfigurableWebBindingInitializer();
         		argumentResolvers = new HandlerMethodArgumentResolverComposite();
         		webRequest = new ServletWebRequest(new MockHttpServletRequest());
         	}
        -	
        +
         	@Test
         	public void createBinder() throws Exception {
         		WebDataBinderFactory factory = createBinderFactory("initBinder", WebDataBinder.class);
         		WebDataBinder dataBinder = factory.createBinder(webRequest, null, null);
        -		
        +
         		assertNotNull(dataBinder.getDisallowedFields());
         		assertEquals("id", dataBinder.getDisallowedFields()[0]);
         	}
        @@ -74,10 +74,10 @@ public class InitBinderDataBinderFactoryTests {
         	public void createBinderWithGlobalInitialization() throws Exception {
         		ConversionService conversionService = new DefaultFormattingConversionService();
         		bindingInitializer.setConversionService(conversionService);
        -		
        +
         		WebDataBinderFactory factory = createBinderFactory("initBinder", WebDataBinder.class);
         		WebDataBinder dataBinder = factory.createBinder(webRequest, null, null);
        -		
        +
         		assertSame(conversionService, dataBinder.getConversionService());
         	}
         
        @@ -85,7 +85,7 @@ public class InitBinderDataBinderFactoryTests {
         	public void createBinderWithAttrName() throws Exception {
         		WebDataBinderFactory factory = createBinderFactory("initBinderWithAttributeName", WebDataBinder.class);
         		WebDataBinder dataBinder = factory.createBinder(webRequest, null, "foo");
        -		
        +
         		assertNotNull(dataBinder.getDisallowedFields());
         		assertEquals("id", dataBinder.getDisallowedFields()[0]);
         	}
        @@ -94,18 +94,18 @@ public class InitBinderDataBinderFactoryTests {
         	public void createBinderWithAttrNameNoMatch() throws Exception {
         		WebDataBinderFactory factory = createBinderFactory("initBinderWithAttributeName", WebDataBinder.class);
         		WebDataBinder dataBinder = factory.createBinder(webRequest, null, "invalidName");
        -		
        +
         		assertNull(dataBinder.getDisallowedFields());
         	}
        -	
        +
         	@Test
         	public void createBinderNullAttrName() throws Exception {
         		WebDataBinderFactory factory = createBinderFactory("initBinderWithAttributeName", WebDataBinder.class);
         		WebDataBinder dataBinder = factory.createBinder(webRequest, null, null);
        -		
        +
         		assertNull(dataBinder.getDisallowedFields());
         	}
        -	
        +
         	@Test(expected=IllegalStateException.class)
         	public void returnValueNotExpected() throws Exception {
         		WebDataBinderFactory factory = createBinderFactory("initBinderReturnValue", WebDataBinder.class);
        @@ -123,7 +123,7 @@ public class InitBinderDataBinderFactoryTests {
         		assertNotNull(dataBinder.getDisallowedFields());
         		assertEquals("requestParam-22", dataBinder.getDisallowedFields()[0]);
         	}
        -	
        +
         	private WebDataBinderFactory createBinderFactory(String methodName, Class... parameterTypes)
         			throws Exception {
         
        @@ -134,9 +134,9 @@ public class InitBinderDataBinderFactoryTests {
         		handlerMethod.setHandlerMethodArgumentResolvers(argumentResolvers);
         		handlerMethod.setDataBinderFactory(new DefaultDataBinderFactory(null));
         		handlerMethod.setParameterNameDiscoverer(new LocalVariableTableParameterNameDiscoverer());
        -		
        +
         		return new InitBinderDataBinderFactory(Arrays.asList(handlerMethod), bindingInitializer);
        -	}	
        +	}
         
         	private static class InitBinderHandler {
         
        @@ -145,24 +145,24 @@ public class InitBinderDataBinderFactoryTests {
         		public void initBinder(WebDataBinder dataBinder) {
         			dataBinder.setDisallowedFields("id");
         		}
        -		
        +
         		@SuppressWarnings("unused")
         		@InitBinder(value="foo")
         		public void initBinderWithAttributeName(WebDataBinder dataBinder) {
         			dataBinder.setDisallowedFields("id");
         		}
        -		
        +
         		@SuppressWarnings("unused")
         		@InitBinder
         		public String initBinderReturnValue(WebDataBinder dataBinder) {
         			return "invalid";
         		}
        -		
        +
         		@SuppressWarnings("unused")
         		@InitBinder
         		public void initBinderTypeConversion(WebDataBinder dataBinder, @RequestParam int requestParam) {
         			dataBinder.setDisallowedFields("requestParam-" + requestParam);
         		}
         	}
        -	
        +
         }
        \ No newline at end of file
        diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/MapMethodProcessorTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/MapMethodProcessorTests.java
        index 3d35b95cbd9..1b1e3028372 100644
        --- a/spring-web/src/test/java/org/springframework/web/method/annotation/MapMethodProcessorTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/MapMethodProcessorTests.java
        @@ -35,15 +35,15 @@ import org.springframework.web.method.support.ModelAndViewContainer;
         
         /**
          * Test fixture with {@link org.springframework.web.method.annotation.MapMethodProcessor}.
        - * 
        + *
          * @author Rossen Stoyanchev
          */
         public class MapMethodProcessorTests {
         
         	private MapMethodProcessor processor;
        -	
        +
         	private ModelAndViewContainer mavContainer;
        -	
        +
         	private MethodParameter paramMap;
         
         	private MethodParameter returnParamMap;
        @@ -54,8 +54,8 @@ public class MapMethodProcessorTests {
         	public void setUp() throws Exception {
         		processor = new MapMethodProcessor();
         		mavContainer = new ModelAndViewContainer();
        -		
        -		Method method = getClass().getDeclaredMethod("map", Map.class); 
        +
        +		Method method = getClass().getDeclaredMethod("map", Map.class);
         		paramMap = new MethodParameter(method, 0);
         		returnParamMap = new MethodParameter(method, 0);
         
        @@ -76,12 +76,12 @@ public class MapMethodProcessorTests {
         	public void resolveArgumentValue() throws Exception {
         		assertSame(mavContainer.getModel(), processor.resolveArgument(paramMap, mavContainer, webRequest, null));
         	}
        -	
        +
         	@Test
         	public void handleMapReturnValue() throws Exception {
         		mavContainer.addAttribute("attr1", "value1");
         		Map returnValue = new ModelMap("attr2", "value2");
        -		
        +
         		processor.handleReturnValue(returnValue , returnParamMap, mavContainer, webRequest);
         
         		assertEquals("value1", mavContainer.getModel().get("attr1"));
        @@ -92,5 +92,5 @@ public class MapMethodProcessorTests {
         	private Map map(Map map) {
         		return null;
         	}
        -	
        +
         }
        \ No newline at end of file
        diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryTests.java
        index 1007bb266cb..34ca840ce93 100644
        --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryTests.java
        @@ -50,13 +50,13 @@ import org.springframework.web.method.support.ModelAndViewContainer;
         
         /**
          * Text fixture for {@link ModelFactory} tests.
        - * 
        + *
          * @author Rossen Stoyanchev
          */
         public class ModelFactoryTests {
        -	
        +
         	private Object handler = new ModelHandler();
        -	
        +
         	private InvocableHandlerMethod handleMethod;
         
         	private InvocableHandlerMethod handleSessionAttrMethod;
        @@ -77,13 +77,13 @@ public class ModelFactoryTests {
         		sessionAttrsHandler = new SessionAttributesHandler(handlerType, sessionAttributeStore);
         		webRequest = new ServletWebRequest(new MockHttpServletRequest());
         	}
        -	
        +
         	@Test
         	public void modelAttributeMethod() throws Exception {
         		ModelFactory modelFactory = createModelFactory("modelAttr", Model.class);
         		ModelAndViewContainer mavContainer = new ModelAndViewContainer();
         		modelFactory.initModel(webRequest, mavContainer, handleMethod);
        -		
        +
         		assertEquals(Boolean.TRUE, mavContainer.getModel().get("modelAttr"));
         	}
         
        @@ -114,14 +114,14 @@ public class ModelFactoryTests {
         		assertTrue(mavContainer.containsAttribute("name"));
         		assertNull(mavContainer.getModel().get("name"));
         	}
        -	
        +
         	@Test
         	public void sessionAttribute() throws Exception {
         		sessionAttributeStore.storeAttribute(webRequest, "sessionAttr", "sessionAttrValue");
         
         		// Resolve successfully handler session attribute once
         		assertTrue(sessionAttrsHandler.isHandlerSessionAttribute("sessionAttr", null));
        -		
        +
         		ModelFactory modelFactory = createModelFactory("modelAttr", Model.class);
         		ModelAndViewContainer mavContainer = new ModelAndViewContainer();
         		modelFactory.initModel(webRequest, mavContainer, handleMethod);
        @@ -137,7 +137,7 @@ public class ModelFactoryTests {
         			modelFactory.initModel(webRequest, new ModelAndViewContainer(), handleSessionAttrMethod);
         			fail("Expected HttpSessionRequiredException");
         		} catch (HttpSessionRequiredException e) { }
        -		
        +
         		sessionAttributeStore.storeAttribute(webRequest, "sessionAttr", "sessionAttrValue");
         		ModelAndViewContainer mavContainer = new ModelAndViewContainer();
         		modelFactory.initModel(webRequest, mavContainer, handleSessionAttrMethod);
        @@ -151,19 +151,19 @@ public class ModelFactoryTests {
         		Object attrValue = new Object();
         		ModelAndViewContainer mavContainer = new ModelAndViewContainer();
         		mavContainer.addAttribute(attrName, attrValue);
        -		
        +
         		WebDataBinder dataBinder = new WebDataBinder(attrValue, attrName);
         		WebDataBinderFactory binderFactory = createMock(WebDataBinderFactory.class);
         		expect(binderFactory.createBinder(webRequest, attrValue, attrName)).andReturn(dataBinder);
         		replay(binderFactory);
        -		
        +
         		ModelFactory modelFactory = new ModelFactory(null, binderFactory, sessionAttrsHandler);
         		modelFactory.updateModel(webRequest, mavContainer);
         
         		assertEquals(attrValue, mavContainer.getModel().remove(attrName));
         		assertSame(dataBinder.getBindingResult(), mavContainer.getModel().remove(bindingResultKey(attrName)));
         		assertEquals(0, mavContainer.getModel().size());
        -		
        +
         		verify(binderFactory);
         	}
         
        @@ -171,12 +171,12 @@ public class ModelFactoryTests {
         	public void updateModelSessionStatusComplete() throws Exception {
         		String attrName = "sessionAttr";
         		String attrValue = "sessionAttrValue";
        -		
        +
         		ModelAndViewContainer mavContainer = new ModelAndViewContainer();
         		mavContainer.addAttribute(attrName, attrValue);
         		mavContainer.getSessionStatus().setComplete();
         		sessionAttributeStore.storeAttribute(webRequest, attrName, attrValue);
        -		
        +
         		// Resolve successfully handler session attribute once
         		assertTrue(sessionAttrsHandler.isHandlerSessionAttribute(attrName, null));
         
        @@ -193,11 +193,11 @@ public class ModelFactoryTests {
         
         		verify(binderFactory);
         	}
        -	
        +
         	private String bindingResultKey(String key) {
         		return BindingResult.MODEL_KEY_PREFIX + key;
         	}
        -	
        +
         	private ModelFactory createModelFactory(String methodName, Class... parameterTypes) throws Exception{
         		Method method = ModelHandler.class.getMethod(methodName, parameterTypes);
         
        @@ -208,13 +208,13 @@ public class ModelFactoryTests {
         		handlerMethod.setHandlerMethodArgumentResolvers(argResolvers);
         		handlerMethod.setDataBinderFactory(null);
         		handlerMethod.setParameterNameDiscoverer(new LocalVariableTableParameterNameDiscoverer());
        -		
        +
         		return new ModelFactory(Arrays.asList(handlerMethod), null, sessionAttrsHandler);
         	}
        -	
        +
         	@SessionAttributes("sessionAttr") @SuppressWarnings("unused")
         	private static class ModelHandler {
        -		
        +
         		@ModelAttribute
         		public void modelAttr(Model model) {
         			model.addAttribute("modelAttr", Boolean.TRUE);
        @@ -234,7 +234,7 @@ public class ModelFactoryTests {
         		public Boolean nullModelAttr() {
         			return null;
         		}
        -		
        +
         		public void handle() {
         		}
         
        diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelMethodProcessorTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelMethodProcessorTests.java
        index 7c42a0f9cfc..b55df929512 100644
        --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelMethodProcessorTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelMethodProcessorTests.java
        @@ -35,15 +35,15 @@ import org.springframework.web.method.support.ModelAndViewContainer;
         
         /**
          * Test fixture with {@link org.springframework.web.method.annotation.ModelMethodProcessor}.
        - * 
        + *
          * @author Rossen Stoyanchev
          */
         public class ModelMethodProcessorTests {
         
         	private ModelMethodProcessor processor;
        -	
        +
         	private ModelAndViewContainer mavContainer;
        -	
        +
         	private MethodParameter paramModel;
         
         	private MethodParameter returnParamModel;
        @@ -54,11 +54,11 @@ public class ModelMethodProcessorTests {
         	public void setUp() throws Exception {
         		processor = new ModelMethodProcessor();
         		mavContainer = new ModelAndViewContainer();
        -		
        -		Method method = getClass().getDeclaredMethod("model", Model.class); 
        +
        +		Method method = getClass().getDeclaredMethod("model", Model.class);
         		paramModel = new MethodParameter(method, 0);
         		returnParamModel = new MethodParameter(method, -1);
        -		
        +
         		webRequest = new ServletWebRequest(new MockHttpServletRequest());
         	}
         
        @@ -76,7 +76,7 @@ public class ModelMethodProcessorTests {
         	public void resolveArgumentValue() throws Exception {
         		assertSame(mavContainer.getModel(), processor.resolveArgument(paramModel, mavContainer, webRequest, null));
         	}
        -	
        +
         	@Test
         	public void handleModelReturnValue() throws Exception {
         		mavContainer.addAttribute("attr1", "value1");
        @@ -84,14 +84,14 @@ public class ModelMethodProcessorTests {
         		returnValue.addAttribute("attr2", "value2");
         
         		processor.handleReturnValue(returnValue , returnParamModel, mavContainer, webRequest);
        -		
        +
         		assertEquals("value1", mavContainer.getModel().get("attr1"));
         		assertEquals("value2", mavContainer.getModel().get("attr2"));
         	}
        -	
        +
         	@SuppressWarnings("unused")
         	private Model model(Model model) {
         		return null;
         	}
        -	
        +
         }
        \ No newline at end of file
        diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java
        index 25170be90d9..15b5d0a5e2d 100644
        --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java
        @@ -39,7 +39,7 @@ import org.springframework.web.method.annotation.RequestHeaderMapMethodArgumentR
         
         /**
          * Text fixture with {@link RequestHeaderMapMethodArgumentResolver}.
        - * 
        + *
          * @author Arjen Poutsma
          * @author Rossen Stoyanchev
          */
        @@ -62,7 +62,7 @@ public class RequestHeaderMapMethodArgumentResolverTests {
         	@Before
         	public void setUp() throws Exception {
         		resolver = new RequestHeaderMapMethodArgumentResolver();
        -		
        +
         		Method method = getClass().getMethod("params", Map.class, MultiValueMap.class, HttpHeaders.class, Map.class);
         		paramMap = new MethodParameter(method, 0);
         		paramMultiValueMap = new MethodParameter(method, 1);
        @@ -108,7 +108,7 @@ public class RequestHeaderMapMethodArgumentResolverTests {
         		expected.add(name, value2);
         
         		Object result = resolver.resolveArgument(paramMultiValueMap, null, webRequest, null);
        -		
        +
         		assertTrue(result instanceof MultiValueMap);
         		assertEquals("Invalid result", expected, result);
         	}
        @@ -127,7 +127,7 @@ public class RequestHeaderMapMethodArgumentResolverTests {
         		expected.add(name, value2);
         
         		Object result = resolver.resolveArgument(paramHttpHeaders, null, webRequest, null);
        -		
        +
         		assertTrue(result instanceof HttpHeaders);
         		assertEquals("Invalid result", expected, result);
         	}
        diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java
        index 0c3921d7209..fa511ad3f0b 100644
        --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java
        @@ -41,7 +41,7 @@ import org.springframework.web.method.annotation.RequestHeaderMethodArgumentReso
         
         /**
          * Test fixture with {@link org.springframework.web.method.annotation.RequestHeaderMethodArgumentResolver}.
        - * 
        + *
          * @author Arjen Poutsma
          * @author Rossen Stoyanchev
          */
        @@ -78,7 +78,7 @@ public class RequestHeaderMethodArgumentResolverTests {
         		// Expose request to the current thread (for SpEL expressions)
         		RequestContextHolder.setRequestAttributes(webRequest);
         	}
        -	
        +
         	@After
         	public void teardown() {
         		RequestContextHolder.resetRequestAttributes();
        diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java
        index 6334fcd4c9e..ee709f04ba2 100644
        --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java
        @@ -38,7 +38,7 @@ import org.springframework.web.method.annotation.RequestParamMapMethodArgumentRe
         
         /**
          * Test fixture with {@link RequestParamMapMethodArgumentResolver}.
        - * 
        + *
          * @author Arjen Poutsma
          * @author Rossen Stoyanchev
          */
        @@ -61,7 +61,7 @@ public class RequestParamMapMethodArgumentResolverTests {
         	@Before
         	public void setUp() throws Exception {
         		resolver = new RequestParamMapMethodArgumentResolver();
        -		
        +
         		Method method = getClass().getMethod("params", Map.class, MultiValueMap.class, Map.class, Map.class);
         		paramMap = new MethodParameter(method, 0);
         		paramMultiValueMap = new MethodParameter(method, 1);
        @@ -88,7 +88,7 @@ public class RequestParamMapMethodArgumentResolverTests {
         		Map expected = Collections.singletonMap(name, value);
         
         		Object result = resolver.resolveArgument(paramMap, null, webRequest, null);
        -		
        +
         		assertTrue(result instanceof Map);
         		assertEquals("Invalid result", expected, result);
         	}
        @@ -99,7 +99,7 @@ public class RequestParamMapMethodArgumentResolverTests {
         		String value1 = "bar";
         		String value2 = "baz";
         		request.addParameter(name, new String[]{value1, value2});
        -		
        +
         		MultiValueMap expected = new LinkedMultiValueMap(1);
         		expected.add(name, value1);
         		expected.add(name, value2);
        diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java
        index 272b2b59594..f8978d8b176 100644
        --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java
        @@ -50,7 +50,7 @@ import org.springframework.web.multipart.MultipartFile;
         
         /**
          * Test fixture with {@link org.springframework.web.method.annotation.RequestParamMethodArgumentResolver}.
        - * 
        + *
          * @author Arjen Poutsma
          * @author Rossen Stoyanchev
          */
        @@ -81,7 +81,7 @@ public class RequestParamMethodArgumentResolverTests {
         
         		Method method = getClass().getMethod("params", String.class, String[].class, Map.class, MultipartFile.class,
         				Map.class, String.class, MultipartFile.class, List.class, Part.class, MultipartFile.class);
        -		
        +
         		paramNamedDefaultValueString = new MethodParameter(method, 0);
         		paramNamedStringArray = new MethodParameter(method, 1);
         		paramNamedMap = new MethodParameter(method, 2);
        @@ -112,7 +112,7 @@ public class RequestParamMethodArgumentResolverTests {
         		assertTrue("Simple type params supported w/o annotations", resolver.supportsParameter(paramStringNotAnnot));
         		assertTrue("MultipartFile parameter not supported", resolver.supportsParameter(paramMultipartFileNotAnnot));
         		assertTrue("Part parameter not supported", resolver.supportsParameter(paramServlet30Part));
        -		
        +
         		resolver = new RequestParamMethodArgumentResolver(null, false);
         		assertFalse(resolver.supportsParameter(paramStringNotAnnot));
         		assertFalse(resolver.supportsParameter(paramRequestPartAnnot));
        @@ -229,7 +229,7 @@ public class RequestParamMethodArgumentResolverTests {
         	@Test
         	public void resolveDefaultValue() throws Exception {
         		Object result = resolver.resolveArgument(paramNamedDefaultValueString, null, webRequest, null);
        -		
        +
         		assertTrue(result instanceof String);
         		assertEquals("Invalid result", "bar", result);
         	}
        @@ -250,7 +250,7 @@ public class RequestParamMethodArgumentResolverTests {
         	}
         
         	// SPR-8561
        -	
        +
         	@Test
         	public void resolveSimpleTypeParamToNull() throws Exception {
         		Object result = resolver.resolveArgument(paramStringNotAnnot, null, webRequest, null);
        diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/WebArgumentResolverAdapterTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/WebArgumentResolverAdapterTests.java
        index ed392de9097..3cd926d20c5 100644
        --- a/spring-web/src/test/java/org/springframework/web/method/annotation/WebArgumentResolverAdapterTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/WebArgumentResolverAdapterTests.java
        @@ -36,7 +36,7 @@ import org.springframework.web.context.request.ServletWebRequest;
         
         /**
          * Test fixture with {@link WebArgumentResolverAdapterTests}.
        - * 
        + *
          * @author Arjen Poutsma
          * @author Rossen Stoyanchev
          */
        @@ -56,7 +56,7 @@ public class WebArgumentResolverAdapterTests {
         		adapter = new TestWebArgumentResolverAdapter(adaptee);
         		parameter = new MethodParameter(getClass().getMethod("handle", Integer.TYPE), 0);
         		webRequest = new ServletWebRequest(new MockHttpServletRequest());
        -		
        +
         		// Expose request to the current thread (for SpEL expressions)
         		RequestContextHolder.setRequestAttributes(webRequest);
         	}
        @@ -151,7 +151,7 @@ public class WebArgumentResolverAdapterTests {
         
         	public void handle(int param) {
         	}
        -	
        +
         	private class TestWebArgumentResolverAdapter extends AbstractWebArgumentResolverAdapter {
         
         		public TestWebArgumentResolverAdapter(WebArgumentResolver adaptee) {
        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 18a8a164164..4b700225e8e 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
        @@ -28,7 +28,7 @@ import org.springframework.core.MethodParameter;
         
         /**
          * Test fixture with {@link HandlerMethodArgumentResolverComposite}.
        - * 
        + *
          * @author Rossen Stoyanchev
          */
         public class HandlerMethodArgumentResolverCompositeTests {
        @@ -42,20 +42,20 @@ public class HandlerMethodArgumentResolverCompositeTests {
         	@Before
         	public void setUp() throws Exception {
         		resolvers = new HandlerMethodArgumentResolverComposite();
        -		
        +
         		Method method = getClass().getDeclaredMethod("handle", Integer.class, String.class);
         		paramInt = new MethodParameter(method, 0);
         		paramStr = new MethodParameter(method, 1);
         	}
        -	
        +
         	@Test
         	public void supportsParameter() throws Exception {
         		registerResolver(Integer.class, null);
        -		
        +
         		assertTrue(this.resolvers.supportsParameter(paramInt));
         		assertFalse(this.resolvers.supportsParameter(paramStr));
         	}
        -	
        +
         	@Test
         	public void resolveArgument() throws Exception {
         		registerResolver(Integer.class, Integer.valueOf(55));
        @@ -63,7 +63,7 @@ public class HandlerMethodArgumentResolverCompositeTests {
         
         		assertEquals(Integer.valueOf(55), resolvedValue);
         	}
        -	
        +
         	@Test
         	public void checkArgumentResolverOrder() throws Exception {
         		registerResolver(Integer.class, Integer.valueOf(1));
        @@ -72,7 +72,7 @@ public class HandlerMethodArgumentResolverCompositeTests {
         
         		assertEquals("Didn't use the first registered resolver", Integer.valueOf(1), resolvedValue);
         	}
        -	
        +
         	@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 99b53bb78b2..9acab34ec60 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
        @@ -27,7 +27,7 @@ import org.springframework.core.MethodParameter;
         
         /**
          * Test fixture with {@link HandlerMethodReturnValueHandlerComposite}.
        - * 
        + *
          * @author Rossen Stoyanchev
          */
         public class HandlerMethodReturnValueHandlerCompositeTests {
        @@ -35,7 +35,7 @@ public class HandlerMethodReturnValueHandlerCompositeTests {
         	private HandlerMethodReturnValueHandlerComposite handlers;
         
         	ModelAndViewContainer mavContainer;
        -	
        +
         	private MethodParameter paramInt;
         
         	private MethodParameter paramStr;
        @@ -43,11 +43,11 @@ public class HandlerMethodReturnValueHandlerCompositeTests {
         	@Before
         	public void setUp() throws Exception {
         		handlers = new HandlerMethodReturnValueHandlerComposite();
        -		mavContainer = new ModelAndViewContainer(); 
        +		mavContainer = new ModelAndViewContainer();
         		paramInt = new MethodParameter(getClass().getDeclaredMethod("handleInteger"), -1);
         		paramStr = new MethodParameter(getClass().getDeclaredMethod("handleString"), -1);
         	}
        -	
        +
         	@Test
         	public void supportsReturnType() throws Exception {
         		registerHandler(Integer.class);
        @@ -55,12 +55,12 @@ public class HandlerMethodReturnValueHandlerCompositeTests {
         		assertTrue(this.handlers.supportsReturnType(paramInt));
         		assertFalse(this.handlers.supportsReturnType(paramStr));
         	}
        -	
        +
         	@Test
         	public void handleReturnValue() throws Exception {
         		StubReturnValueHandler handler = registerHandler(Integer.class);
         		this.handlers.handleReturnValue(Integer.valueOf(55), paramInt, mavContainer, null);
        -		
        +
         		assertEquals(Integer.valueOf(55), handler.getReturnValue());
         	}
         
        @@ -69,28 +69,28 @@ public class HandlerMethodReturnValueHandlerCompositeTests {
         		StubReturnValueHandler h1 = registerHandler(Integer.class);
         		StubReturnValueHandler h2 = registerHandler(Integer.class);
         		this.handlers.handleReturnValue(Integer.valueOf(55), paramInt, mavContainer, null);
        -		
        +
         		assertEquals("Didn't use the 1st registered handler", Integer.valueOf(55), h1.getReturnValue());
         		assertNull("Shouldn't have use the 2nd registered handler", h2.getReturnValue());
         	}
        -	
        +
         	@Test(expected=IllegalArgumentException.class)
         	public void noSuitableReturnValueHandler() throws Exception {
         		registerHandler(Integer.class);
         		this.handlers.handleReturnValue("value", paramStr, null, null);
         	}
        -	
        +
         	private StubReturnValueHandler registerHandler(Class returnType) {
         		StubReturnValueHandler handler = new StubReturnValueHandler(returnType);
         		handlers.addHandler(handler);
         		return handler;
         	}
        -	
        +
         	@SuppressWarnings("unused")
         	private Integer handleInteger() {
         		return null;
         	}
        -	
        +
         	@SuppressWarnings("unused")
         	private String handleString() {
         		return null;
        diff --git a/spring-web/src/test/java/org/springframework/web/method/support/ModelAndViewContainerTests.java b/spring-web/src/test/java/org/springframework/web/method/support/ModelAndViewContainerTests.java
        index 7e98d2c4e64..bd0c80565c3 100644
        --- a/spring-web/src/test/java/org/springframework/web/method/support/ModelAndViewContainerTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/method/support/ModelAndViewContainerTests.java
        @@ -36,7 +36,7 @@ public class ModelAndViewContainerTests {
         	public void setup() {
         		this.mavContainer = new ModelAndViewContainer();
         	}
        -	
        +
         	@Test
         	public void getModel() {
         		this.mavContainer.addAttribute("name", "value");
        @@ -48,13 +48,13 @@ public class ModelAndViewContainerTests {
         		ModelMap redirectModel = new ModelMap("name", "redirectValue");
         		this.mavContainer.setRedirectModel(redirectModel);
         		this.mavContainer.addAttribute("name", "value");
        -		
        +
         		assertEquals("Default model should be used if not in redirect scenario",
         				"value", this.mavContainer.getModel().get("name"));
        -	
        +
         		this.mavContainer.setRedirectModelScenario(true);
        -		
        -		assertEquals("Redirect model should be used in redirect scenario", 
        +
        +		assertEquals("Redirect model should be used in redirect scenario",
         				"redirectValue", this.mavContainer.getModel().get("name"));
         	}
         
        @@ -62,13 +62,13 @@ public class ModelAndViewContainerTests {
         	public void getModelIgnoreDefaultModelOnRedirect() {
         		this.mavContainer.addAttribute("name", "value");
         		this.mavContainer.setRedirectModelScenario(true);
        -		
        -		assertEquals("Default model should be used since no redirect model was provided", 
        +
        +		assertEquals("Default model should be used since no redirect model was provided",
         				1, this.mavContainer.getModel().size());
         
         		this.mavContainer.setIgnoreDefaultModelOnRedirect(true);
        -		
        -		assertEquals("Empty model should be returned if no redirect model is available", 
        +
        +		assertEquals("Empty model should be returned if no redirect model is available",
         				0, this.mavContainer.getModel().size());
         	}
         
        diff --git a/spring-web/src/test/java/org/springframework/web/method/support/StubArgumentResolver.java b/spring-web/src/test/java/org/springframework/web/method/support/StubArgumentResolver.java
        index db89c8dea57..45c84b353b2 100644
        --- a/spring-web/src/test/java/org/springframework/web/method/support/StubArgumentResolver.java
        +++ b/spring-web/src/test/java/org/springframework/web/method/support/StubArgumentResolver.java
        @@ -26,7 +26,7 @@ import org.springframework.web.context.request.NativeWebRequest;
         /**
          * Supports parameters of a given type and resolves them using a stub value.
          * Also records the resolved parameter value.
        - * 
        + *
          * @author Rossen Stoyanchev
          */
         public class StubArgumentResolver implements HandlerMethodArgumentResolver {
        @@ -34,7 +34,7 @@ public class StubArgumentResolver implements HandlerMethodArgumentResolver {
         	private final Class parameterType;
         
         	private final Object stubValue;
        -	
        +
         	private List resolvedParameters = new ArrayList();
         
         	public StubArgumentResolver(Class supportedParameterType, Object stubValue) {
        diff --git a/spring-web/src/test/java/org/springframework/web/method/support/StubReturnValueHandler.java b/spring-web/src/test/java/org/springframework/web/method/support/StubReturnValueHandler.java
        index 61717c659ac..7f888093543 100644
        --- a/spring-web/src/test/java/org/springframework/web/method/support/StubReturnValueHandler.java
        +++ b/spring-web/src/test/java/org/springframework/web/method/support/StubReturnValueHandler.java
        @@ -20,16 +20,16 @@ import org.springframework.core.MethodParameter;
         import org.springframework.web.context.request.NativeWebRequest;
         
         /**
        - * Supports a fixed return value type. Records the last handled return value. 
        - * 
        + * Supports a fixed return value type. Records the last handled return value.
        + *
          * @author Rossen Stoyanchev
          */
         public class StubReturnValueHandler implements HandlerMethodReturnValueHandler {
         
         	private final Class returnType;
        -	
        +
         	private Object returnValue;
        -	
        +
         	public StubReturnValueHandler(Class returnType) {
         		this.returnType = returnType;
         	}
        diff --git a/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java b/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java
        index 51252eec749..60776274c52 100644
        --- a/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java
        @@ -36,19 +36,19 @@ import static org.junit.Assert.*;
         public class RequestPartServletServerHttpRequestTests {
         
         	private RequestPartServletServerHttpRequest request;
        -	
        +
         	private MockMultipartHttpServletRequest mockRequest;
         
         	private MockMultipartFile mockFile;
        -	
        +
         	@Before
         	public void create() throws Exception {
         		mockFile = new MockMultipartFile("part", "", "application/json" ,"Part Content".getBytes("UTF-8"));
         		mockRequest = new MockMultipartHttpServletRequest();
         		mockRequest.addFile(mockFile);
         		request = new RequestPartServletServerHttpRequest(mockRequest, "part");
        -	}	
        -	
        +	}
        +
         	@Test
         	public void getMethod() throws Exception {
         		mockRequest.setMethod("POST");
        @@ -80,5 +80,5 @@ public class RequestPartServletServerHttpRequestTests {
         		byte[] result = FileCopyUtils.copyToByteArray(request.getBody());
         		assertArrayEquals("Invalid content returned", mockFile.getBytes(), result);
         	}
        -	
        +
         }
        diff --git a/spring-web/src/test/java/org/springframework/web/util/Log4jWebConfigurerTests.java b/spring-web/src/test/java/org/springframework/web/util/Log4jWebConfigurerTests.java
        index 2d37f8c6ac1..baa11b9e441 100644
        --- a/spring-web/src/test/java/org/springframework/web/util/Log4jWebConfigurerTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/util/Log4jWebConfigurerTests.java
        @@ -50,7 +50,7 @@ public class Log4jWebConfigurerTests {
         	public void initLoggingWithClasspathResourceAndRefreshInterval() {
         		initLogging(CLASSPATH_RESOURCE, true);
         	}
        -	
        +
         	@Test
         	public void initLoggingWithRelativeFilePath() {
         		initLogging(RELATIVE_PATH, false);
        @@ -119,11 +119,11 @@ public class Log4jWebConfigurerTests {
         	@Test
         	public void testLog4jConfigListener() {
         		Log4jConfigListener listener = new Log4jConfigListener();
        -		
        +
         		MockServletContext sc = new MockServletContext("", new FileSystemResourceLoader());
         		sc.addInitParameter(Log4jWebConfigurer.CONFIG_LOCATION_PARAM, RELATIVE_PATH);
         		listener.contextInitialized(new ServletContextEvent(sc));
        -		
        +
         		try {
         			assertLogOutput();
         		} finally {
        diff --git a/spring-web/src/test/java/org/springframework/web/util/MockLog4jAppender.java b/spring-web/src/test/java/org/springframework/web/util/MockLog4jAppender.java
        index 83963b8c06b..bb078da54c4 100644
        --- a/spring-web/src/test/java/org/springframework/web/util/MockLog4jAppender.java
        +++ b/spring-web/src/test/java/org/springframework/web/util/MockLog4jAppender.java
        @@ -1,12 +1,12 @@
         /*
          * Copyright 2002-2005 the original author or authors.
        - * 
        + *
          * Licensed under the Apache License, Version 2.0 (the "License");
          * you may not use this file except in compliance with the License.
          * You may obtain a copy of the License at
        - * 
        + *
          *      http://www.apache.org/licenses/LICENSE-2.0
        - * 
        + *
          * Unless required by applicable law or agreed to in writing, software
          * distributed under the License is distributed on an "AS IS" BASIS,
          * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        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 9484a2c514b..e93aa884fad 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
        @@ -1,12 +1,12 @@
         /*
          * Copyright 2002-2006 the original author or authors.
        - * 
        + *
          * Licensed under the Apache License, Version 2.0 (the "License");
          * you may not use this file except in compliance with the License.
          * You may obtain a copy of the License at
        - * 
        + *
          *      http://www.apache.org/licenses/LICENSE-2.0
        - * 
        + *
          * Unless required by applicable law or agreed to in writing, software
          * distributed under the License is distributed on an "AS IS" BASIS,
          * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        diff --git a/spring-web/src/test/java/org/springframework/web/util/UriComponentsTests.java b/spring-web/src/test/java/org/springframework/web/util/UriComponentsTests.java
        index 234a21c0904..50b1fc07ee5 100644
        --- a/spring-web/src/test/java/org/springframework/web/util/UriComponentsTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/util/UriComponentsTests.java
        @@ -45,7 +45,7 @@ public class UriComponentsTests {
                 UriComponents uriComponents = UriComponentsBuilder.fromUriString("http://example.com/hotel list/Z\u00fcrich").build();
                 assertEquals(new URI("http://example.com/hotel%20list/Z\u00fcrich"), uriComponents.toUri());
             }
        -	
        +
         	@Test
         	public void expand() {
         		UriComponents uriComponents = UriComponentsBuilder.fromUriString("http://example.com").path("/{foo} {bar}").build();
        @@ -63,7 +63,7 @@ public class UriComponentsTests {
         	public void invalidCharacters() {
         		UriComponentsBuilder.fromPath("/{foo}").build(true);
         	}
        -	
        +
         	@Test(expected = IllegalArgumentException.class)
         	public void invalidEncodedSequence() {
         		UriComponentsBuilder.fromPath("/fo%2o").build(true);
        diff --git a/spring-web/src/test/java/org/springframework/web/util/UriTemplateTests.java b/spring-web/src/test/java/org/springframework/web/util/UriTemplateTests.java
        index ba2d7a796d2..557ba7ca9ff 100644
        --- a/spring-web/src/test/java/org/springframework/web/util/UriTemplateTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/util/UriTemplateTests.java
        @@ -80,7 +80,7 @@ public class UriTemplateTests {
         		URI result = template.expand(uriVariables);
         		assertEquals("Invalid expanded template", new URI("http://example.com/hotels/1/bookings/42"), result);
         	}
        -    
        +
             @Test
             public void expandMapEncoded() throws Exception {
                 Map uriVariables = Collections.singletonMap("hotel", "Z\u00fcrich");
        @@ -113,7 +113,7 @@ public class UriTemplateTests {
         		assertFalse("UriTemplate matches", template.matches(""));
         		assertFalse("UriTemplate matches", template.matches(null));
         	}
        -	
        +
         	@Test
         	public void matchesCustomRegex() throws Exception {
         		UriTemplate template = new UriTemplate("http://example.com/hotels/{hotel:\\d+}");
        diff --git a/spring-web/src/test/java/org/springframework/web/util/UriUtilsTests.java b/spring-web/src/test/java/org/springframework/web/util/UriUtilsTests.java
        index 444b7ec43c2..0439504c8c5 100644
        --- a/spring-web/src/test/java/org/springframework/web/util/UriUtilsTests.java
        +++ b/spring-web/src/test/java/org/springframework/web/util/UriUtilsTests.java
        @@ -29,7 +29,7 @@ public class UriUtilsTests {
         
         	private static final String ENC = "UTF-8";
         
        -	
        +
         
         	@Test
         	public void encodeScheme() throws UnsupportedEncodingException {
        diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/FrameworkPortlet.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/FrameworkPortlet.java
        index ce8d4ad18b3..29b0c091c53 100644
        --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/FrameworkPortlet.java
        +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/FrameworkPortlet.java
        @@ -609,7 +609,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean
         		if (userName != null) {
         			return userName;
         		}
        -		
        +
         		// Try the Portlet USER_INFO map.
         		Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);
         		if (userInfo != null) {
        @@ -620,7 +620,7 @@ public abstract class FrameworkPortlet extends GenericPortletBean
         				}
         			}
         		}
        -		
        +
         		// Nothing worked...
         		return null;
         	}
        diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java
        index 1006cd34054..dcc6f3260a5 100644
        --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java
        +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/GenericPortletBean.java
        @@ -74,7 +74,7 @@ public abstract class GenericPortletBean extends GenericPortlet
         	/** Logger available to subclasses */
         	protected final Log logger = LogFactory.getLog(getClass());
         
        -	/** 
        +	/**
         	 * Set of required properties (Strings) that must be supplied as
         	 * config parameters to this portlet.
         	 */
        @@ -105,7 +105,7 @@ public abstract class GenericPortletBean extends GenericPortlet
         		if (logger.isInfoEnabled()) {
         			logger.info("Initializing portlet '" + getPortletName() + "'");
         		}
        -		
        +
         		// Set bean properties from init parameters.
         		try {
         			PropertyValues pvs = new PortletConfigPropertyValues(getPortletConfig(), this.requiredProperties);
        @@ -127,7 +127,7 @@ public abstract class GenericPortletBean extends GenericPortlet
         			logger.info("Portlet '" + getPortletName() + "' configured successfully");
         		}
         	}
        -	
        +
         	/**
         	 * Initialize the BeanWrapper for this GenericPortletBean,
         	 * possibly with custom editors.
        @@ -215,7 +215,7 @@ public abstract class GenericPortletBean extends GenericPortlet
         		 */
         		private PortletConfigPropertyValues(PortletConfig config, Set requiredProperties)
         			throws PortletException {
        -				
        +
         			Set missingProps = (requiredProperties != null && !requiredProperties.isEmpty()) ?
         					new HashSet(requiredProperties) : null;
         
        diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerAdapter.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerAdapter.java
        index c1e618fa6d4..ae952850f17 100644
        --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerAdapter.java
        +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerAdapter.java
        @@ -48,7 +48,7 @@ import javax.portlet.ResourceResponse;
          * @see org.springframework.web.portlet.mvc.SimpleControllerHandlerAdapter
          */
         public interface HandlerAdapter {
        -	
        +
         	/**
         	 * Given a handler instance, return whether or not this HandlerAdapter can
         	 * support it. Typical HandlerAdapters will base the decision on the handler
        @@ -60,7 +60,7 @@ public interface HandlerAdapter {
         	 * @param handler handler object to check
         	 * @return whether or not this object can use the given handler
         	 */
        -	boolean supports(Object handler); 
        +	boolean supports(Object handler);
         
         	/**
         	 * Use the given handler to handle this action request.
        diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerMapping.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerMapping.java
        index 7c79d8482ff..cc0913e9439 100644
        --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerMapping.java
        +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/HandlerMapping.java
        @@ -54,7 +54,7 @@ import javax.portlet.PortletRequest;
          * @see org.springframework.web.portlet.handler.PortletModeParameterHandlerMapping
          */
         public interface HandlerMapping {
        -	
        +
         	/**
         	 * Return a handler and any interceptors for this request. The choice may be made
         	 * on portlet mode, session state, or any factor the implementing class chooses.
        diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/ModelAndViewDefiningException.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/ModelAndViewDefiningException.java
        index dcb2a64e4ea..ce35bb669f6 100644
        --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/ModelAndViewDefiningException.java
        +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/ModelAndViewDefiningException.java
        @@ -1,12 +1,12 @@
         /*
          * Copyright 2002-2005 the original author or authors.
        - * 
        + *
          * Licensed under the Apache License, Version 2.0 (the "License");
          * you may not use this file except in compliance with the License.
          * You may obtain a copy of the License at
        - * 
        + *
          *      http://www.apache.org/licenses/LICENSE-2.0
        - * 
        + *
          * Unless required by applicable law or agreed to in writing, software
          * distributed under the License is distributed on an "AS IS" BASIS,
          * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationContextUtils.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationContextUtils.java
        index fa139ff53d6..e9bd670d8f7 100644
        --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationContextUtils.java
        +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationContextUtils.java
        @@ -55,7 +55,7 @@ import org.springframework.web.context.support.WebApplicationContextUtils;
          * @see org.springframework.web.portlet.DispatcherPortlet
          */
         public abstract class PortletApplicationContextUtils {
        -	
        +
         	/**
         	 * Find the root WebApplicationContext for this portlet application, which is
         	 * typically loaded via ContextLoaderListener or ContextLoaderServlet.
        diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationObjectSupport.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationObjectSupport.java
        index 574b4d80d7c..2f074204e9e 100644
        --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationObjectSupport.java
        +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletApplicationObjectSupport.java
        @@ -1,12 +1,12 @@
         /*
          * Copyright 2002-2005 the original author or authors.
        - * 
        + *
          * Licensed under the Apache License, Version 2.0 (the "License");
          * you may not use this file except in compliance with the License.
          * You may obtain a copy of the License at
        - * 
        + *
          *      http://www.apache.org/licenses/LICENSE-2.0
        - * 
        + *
          * Unless required by applicable law or agreed to in writing, software
          * distributed under the License is distributed on an "AS IS" BASIS,
          * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletConfigAware.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletConfigAware.java
        index 2a3fee97f0f..7e64034a49c 100644
        --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletConfigAware.java
        +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletConfigAware.java
        @@ -1,12 +1,12 @@
         /*
          * Copyright 2002-2011 the original author or authors.
        - * 
        + *
          * Licensed under the Apache License, Version 2.0 (the "License");
          * you may not use this file except in compliance with the License.
          * You may obtain a copy of the License at
        - * 
        + *
          *      http://www.apache.org/licenses/LICENSE-2.0
        - * 
        + *
          * Unless required by applicable law or agreed to in writing, software
          * distributed under the License is distributed on an "AS IS" BASIS,
          * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextAware.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextAware.java
        index 3fa1a56a6a4..5b0b1e40aef 100644
        --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextAware.java
        +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextAware.java
        @@ -1,12 +1,12 @@
         /*
          * Copyright 2002-2011 the original author or authors.
        - * 
        + *
          * Licensed under the Apache License, Version 2.0 (the "License");
          * you may not use this file except in compliance with the License.
          * You may obtain a copy of the License at
        - * 
        + *
          *      http://www.apache.org/licenses/LICENSE-2.0
        - * 
        + *
          * Unless required by applicable law or agreed to in writing, software
          * distributed under the License is distributed on an "AS IS" BASIS,
          * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
        diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextAwareProcessor.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextAwareProcessor.java
        index 1daacb553ec..07e60b45ad8 100644
        --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextAwareProcessor.java
        +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletContextAwareProcessor.java
        @@ -49,7 +49,7 @@ public class PortletContextAwareProcessor implements BeanPostProcessor {
         	public PortletContextAwareProcessor(PortletContext portletContext) {
         		this(portletContext, null);
         	}
        -	
        +
         	/**
         	 * Create a new PortletContextAwareProcessor for the given config.
         	 */
        diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletWebRequest.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletWebRequest.java
        index d407f40fa9e..ee0c5ffee1e 100644
        --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletWebRequest.java
        +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/PortletWebRequest.java
        @@ -111,7 +111,7 @@ public class PortletWebRequest extends PortletRequestAttributes implements Nativ
         	public Iterator getParameterNames() {
         		return CollectionUtils.toIterator(getRequest().getParameterNames());
         	}
        -	
        +
         	public Map getParameterMap() {
         		return getRequest().getParameterMap();
         	}
        diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/StaticPortletApplicationContext.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/StaticPortletApplicationContext.java
        index 7452f6b34cd..ce44602bb6d 100644
        --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/StaticPortletApplicationContext.java
        +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/context/StaticPortletApplicationContext.java
        @@ -51,7 +51,7 @@ public class StaticPortletApplicationContext extends StaticApplicationContext
         		implements ConfigurablePortletApplicationContext {
         
         	private ServletContext servletContext;
        -	
        +
         	private PortletContext portletContext;
         
         	private PortletConfig portletConfig;
        diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/ParameterMappingInterceptor.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/ParameterMappingInterceptor.java
        index cd5f1570115..700ef95078a 100644
        --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/ParameterMappingInterceptor.java
        +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/ParameterMappingInterceptor.java
        @@ -26,7 +26,7 @@ import javax.portlet.ActionResponse;
          * 

        This can be useful when using {@link ParameterHandlerMapping ParameterHandlerMapping} * or {@link PortletModeParameterHandlerMapping PortletModeParameterHandlerMapping}. * It will ensure that the parameter that was used to map the ActionRequest - * to a handler will be forwarded to the RenderRequest so that it will also be + * to a handler will be forwarded to the RenderRequest so that it will also be * mapped the same way. * *

        When using this Interceptor, you can still change the value of the mapping parameter diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/PortletContentGenerator.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/PortletContentGenerator.java index 318c5d1ceb6..b23756f87c4 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/PortletContentGenerator.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/PortletContentGenerator.java @@ -95,7 +95,7 @@ public abstract class PortletContentGenerator extends PortletApplicationObjectSu /** * Check and prepare the given request and response according to the settings - * of this generator. Checks for a required session, and applies the number of + * of this generator. Checks for a required session, and applies the number of * cache seconds configured for this generator (if it is a render request/response). * @param request current portlet request * @param response current portlet response @@ -109,7 +109,7 @@ public abstract class PortletContentGenerator extends PortletApplicationObjectSu /** * Check and prepare the given request and response according to the settings - * of this generator. Checks for a required session, and applies the given + * of this generator. Checks for a required session, and applies the given * number of cache seconds (if it is a render request/response). * @param request current portlet request * @param response current portlet response diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletHandlerAdapter.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletHandlerAdapter.java index b8e85ab7450..7d1eacd87f8 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletHandlerAdapter.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/SimplePortletHandlerAdapter.java @@ -59,7 +59,7 @@ import org.springframework.web.portlet.util.PortletUtils; * @see org.springframework.web.portlet.mvc.PortletWrappingController */ public class SimplePortletHandlerAdapter implements HandlerAdapter, PortletContextAware { - + private PortletContext portletContext; diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/DefaultMultipartActionRequest.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/DefaultMultipartActionRequest.java index ca644eaddcd..550e08867dd 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/DefaultMultipartActionRequest.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/DefaultMultipartActionRequest.java @@ -91,7 +91,7 @@ public class DefaultMultipartActionRequest extends ActionRequestWrapper implemen return Collections.emptyList(); } } - + public Map getFileMap() { return getMultipartFiles().toSingleValueMap(); diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/PortletMultipartResolver.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/PortletMultipartResolver.java index 0370c8b77b4..4add8c5cc81 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/PortletMultipartResolver.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/multipart/PortletMultipartResolver.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2007 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractController.java index fa56a66a317..f8721abb760 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractController.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractController.java @@ -204,7 +204,7 @@ public abstract class AbstractController extends PortletContentGenerator impleme if (WindowState.MINIMIZED.equals(request.getWindowState()) && !this.renderWhenMinimized) { return null; } - + // Delegate to PortletContentGenerator for checking and preparing. checkAndPrepare(request, response); diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java index 5b081df6dd1..56c0b3a4b3c 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractFormController.java @@ -638,7 +638,7 @@ public abstract class AbstractFormController extends BaseCommandController { binder.bind(request); onBindOnNewForm(request, command, errors); } - + // Return BindException object that resulted from binding. return errors; } @@ -690,7 +690,7 @@ public abstract class AbstractFormController extends BaseCommandController { if (!isSessionForm()) { return formBackingObject(request); } - + // Session-form mode: retrieve form object from portlet session attribute. PortletSession session = request.getPortletSession(false); if (session == null) { @@ -821,7 +821,7 @@ public abstract class AbstractFormController extends BaseCommandController { // Fetch errors model as starting point, containing form object under // "commandName", and corresponding Errors instance under internal key. Map model = errors.getModel(); - + // Merge reference data into model, if any. Map referenceData = referenceData(request, errors.getTarget(), errors); if (referenceData != null) { diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractWizardFormController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractWizardFormController.java index ef52eec3458..5183bfaa5b9 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractWizardFormController.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/AbstractWizardFormController.java @@ -342,7 +342,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle if (logger.isDebugEnabled()) { logger.debug("Showing wizard page " + page + " for form bean '" + getCommandName() + "'"); } - + // Set page session attribute, expose overriding request attribute. Integer pageInteger = new Integer(page); String pageAttrName = getPageSessionAttributeName(request); @@ -353,7 +353,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle request.getPortletSession().setAttribute(pageAttrName, pageInteger); } request.setAttribute(pageAttrName, pageInteger); - + // Set page request attribute for evaluation by views. Map controlModel = new HashMap(); if (this.pageAttribute != null) { @@ -647,7 +647,7 @@ public abstract class AbstractWizardFormController extends AbstractFormControlle request.getPortletSession().removeAttribute(pageAttrName); } request.setAttribute(pageAttrName, new Integer(currentPage)); - + // cancel? if (isCancelRequest(request)) { if (logger.isDebugEnabled()) { diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/BaseCommandController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/BaseCommandController.java index 162843b29b9..f90ef730295 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/BaseCommandController.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/BaseCommandController.java @@ -41,7 +41,7 @@ import org.springframework.web.portlet.handler.PortletSessionRequiredException; *

        This controller is the base for all controllers wishing to populate * JavaBeans based on request parameters, validate the content of such * JavaBeans using {@link Validator Validators} and use custom editors (in the form of - * {@link java.beans.PropertyEditor PropertyEditors}) to transform + * {@link java.beans.PropertyEditor PropertyEditors}) to transform * objects into strings and vice versa, for example. Three notions are mentioned here:

        * *

        Command class:
        @@ -54,7 +54,7 @@ import org.springframework.web.portlet.handler.PortletSessionRequiredException; * Upon receiving a request, any BaseCommandController will attempt to fill the * command object using the request parameters. This is done using the typical * and well-known JavaBeans property notation. When a request parameter named - * 'firstName' exists, the framework will attempt to call + * 'firstName' exists, the framework will attempt to call * setFirstName([value]) passing the value of the parameter. Nested properties * are of course supported. For instance a parameter named 'address.city' * will result in a getAddress().setCity([value]) call on the @@ -155,14 +155,14 @@ public abstract class BaseCommandController extends AbstractController { * session is that we have no way of knowing when we are done re-rendering * the request and so we don't know when we can remove the objects from * the session. So we will end up polluting the session with old objects - * when we finally leave the render of this controller and move on to + * when we finally leave the render of this controller and move on to * somthing else. To minimize the pollution, we will use a static string * value as the session attribute name. At least this way we are only ever * leaving one orphaned set behind. The methods that return these names * can be overridden if you want to use a different method, but be aware * of the session pollution that may occur. */ - private static final String RENDER_COMMAND_SESSION_ATTRIBUTE = + private static final String RENDER_COMMAND_SESSION_ATTRIBUTE = "org.springframework.web.portlet.mvc.RenderCommand"; private static final String RENDER_ERRORS_SESSION_ATTRIBUTE = @@ -172,13 +172,13 @@ public abstract class BaseCommandController extends AbstractController { private String commandName = DEFAULT_COMMAND_NAME; - + private Class commandClass; - + private Validator[] validators; - + private boolean validateOnBinding = true; - + private MessageCodesResolver messageCodesResolver; private BindingErrorProcessor bindingErrorProcessor; @@ -405,7 +405,7 @@ public abstract class BaseCommandController extends AbstractController { protected final boolean checkCommand(Object command) { return (this.commandClass == null || this.commandClass.isInstance(command)); } - + /** * Bind the parameters of the given request to the given command object. @@ -416,7 +416,7 @@ public abstract class BaseCommandController extends AbstractController { */ protected final PortletRequestDataBinder bindAndValidate(PortletRequest request, Object command) throws Exception { - + PortletRequestDataBinder binder = createBinder(request, command); if (!suppressBinding(request)) { binder.bind(request); @@ -464,7 +464,7 @@ public abstract class BaseCommandController extends AbstractController { */ protected PortletRequestDataBinder createBinder(PortletRequest request, Object command) throws Exception { - + PortletRequestDataBinder binder = new PortletRequestDataBinder(command, getCommandName()); prepareBinder(binder); initBinder(request, binder); @@ -598,7 +598,7 @@ public abstract class BaseCommandController extends AbstractController { return RENDER_COMMAND_SESSION_ATTRIBUTE; } - /** + /** * Return the name of the session attribute that holds * the render phase command object for this form controller. * @return the name of the render phase command object session attribute diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/Controller.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/Controller.java index 356898f97ba..c8f3096eb87 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/Controller.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/Controller.java @@ -24,8 +24,8 @@ import javax.portlet.RenderResponse; import org.springframework.web.portlet.ModelAndView; /** - * Base portlet Controller interface, representing a component that receives - * RenderRequest/RenderResponse and ActionRequest/ActionResponse like a + * Base portlet Controller interface, representing a component that receives + * RenderRequest/RenderResponse and ActionRequest/ActionResponse like a * Portlet but is able to participate in an MVC workflow. * *

        Any implementation of the portlet Controller interface should be a @@ -46,7 +46,7 @@ import org.springframework.web.portlet.ModelAndView; * So actually, these method are the main entrypoint for the * {@link org.springframework.web.portlet.DispatcherPortlet DispatcherPortlet} * which delegates requests to controllers.

        - * + * *

        So basically any direct implementation of the Controller interface * just handles RenderRequests/ActionRequests and should return a ModelAndView, to be * further used by the DispatcherPortlet. Any additional functionality such as diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/ParameterizableViewController.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/ParameterizableViewController.java index 5fdfd335968..0a39a2fd0ca 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/ParameterizableViewController.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/mvc/ParameterizableViewController.java @@ -63,7 +63,7 @@ import org.springframework.web.portlet.ModelAndView; * @since 2.0 */ public class ParameterizableViewController extends AbstractController { - + private String viewName; diff --git a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/PortletUtils.java b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/PortletUtils.java index 2beb0352b86..34ef4b64ca5 100644 --- a/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/PortletUtils.java +++ b/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/util/PortletUtils.java @@ -194,7 +194,7 @@ public abstract class PortletUtils { /** * Get the specified session attribute under the {@link javax.portlet.PortletSession#PORTLET_SCOPE}, - * creating and setting a new attribute if no existing found. The given class + * creating and setting a new attribute if no existing found. The given class * needs to have a public no-arg constructor. * Useful for on-demand state objects in a web tier, like shopping carts. * @param session current portlet session @@ -211,7 +211,7 @@ public abstract class PortletUtils { /** * Get the specified session attribute in the given scope, - * creating and setting a new attribute if no existing found. The given class + * creating and setting a new attribute if no existing found. The given class * needs to have a public no-arg constructor. * Useful for on-demand state objects in a web tier, like shopping carts. * @param session current portlet session @@ -369,7 +369,7 @@ public abstract class PortletUtils { } /** - * Return the full name of a specific input type="submit" parameter + * Return the full name of a specific input type="submit" parameter * if it was sent in the request, either via a button (directly with name) * or via an image (name + ".x" or name + ".y"). * @param request current portlet request diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/beans/INestedTestBean.java b/spring-webmvc-portlet/src/test/java/org/springframework/beans/INestedTestBean.java index 7d87547b5f7..c5c4ed5e679 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/beans/INestedTestBean.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/beans/INestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/beans/IOther.java b/spring-webmvc-portlet/src/test/java/org/springframework/beans/IOther.java index 797486ec44e..6a8f74187cb 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/beans/IOther.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/beans/IOther.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/beans/NestedTestBean.java b/spring-webmvc-portlet/src/test/java/org/springframework/beans/NestedTestBean.java index a06e15d150b..0eb8df5c8ae 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/beans/NestedTestBean.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/beans/NestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/beans/factory/MustBeInitialized.java b/spring-webmvc-portlet/src/test/java/org/springframework/beans/factory/MustBeInitialized.java index b85110e1cbc..4715fe448f6 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/beans/factory/MustBeInitialized.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/beans/factory/MustBeInitialized.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/context/ACATester.java b/spring-webmvc-portlet/src/test/java/org/springframework/context/ACATester.java index f77a7bda504..72c129ca4e3 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/context/ACATester.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/context/ACATester.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,7 +24,7 @@ import org.springframework.context.ApplicationContextException; import org.springframework.context.NoSuchMessageException; public class ACATester implements ApplicationContextAware { - + private ApplicationContext ac; public void setApplicationContext(ApplicationContext ctx) throws ApplicationContextException { diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/context/AbstractApplicationContextTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/context/AbstractApplicationContextTests.java index d014d770e16..619bfba6fbd 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/context/AbstractApplicationContextTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/context/AbstractApplicationContextTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/context/LifecycleContextBean.java b/spring-webmvc-portlet/src/test/java/org/springframework/context/LifecycleContextBean.java index d8be8ec9667..50c9936c444 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/context/LifecycleContextBean.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/context/LifecycleContextBean.java @@ -7,12 +7,12 @@ import org.springframework.beans.factory.LifecycleBean; /** * Simple bean to test ApplicationContext lifecycle methods for beans - * + * * @author Colin Sampaleanu * @since 03.07.2004 */ public class LifecycleContextBean extends LifecycleBean implements ApplicationContextAware { - + protected ApplicationContext owningContext; public void setBeanFactory(BeanFactory beanFactory) { @@ -20,18 +20,18 @@ public class LifecycleContextBean extends LifecycleBean implements ApplicationCo if (this.owningContext != null) throw new RuntimeException("Factory called setBeanFactory after setApplicationContext"); } - + public void afterPropertiesSet() { super.afterPropertiesSet(); if (this.owningContext == null) throw new RuntimeException("Factory didn't call setAppliationContext before afterPropertiesSet on lifecycle bean"); } - + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { if (this.owningFactory == null) throw new RuntimeException("Factory called setApplicationContext before setBeanFactory"); - + this.owningContext = applicationContext; } - + } diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/MockHttpServletResponse.java b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/MockHttpServletResponse.java index 3e2701c576b..88f3dbab08e 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/MockHttpServletResponse.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/MockHttpServletResponse.java @@ -51,7 +51,7 @@ public class MockHttpServletResponse implements HttpServletResponse { private static final String CHARSET_PREFIX = "charset="; private static final String CONTENT_TYPE_HEADER = "Content-Type"; - + private static final String CONTENT_LENGTH_HEADER = "Content-Length"; private static final String LOCATION_HEADER = "Location"; @@ -65,7 +65,7 @@ public class MockHttpServletResponse implements HttpServletResponse { private boolean writerAccessAllowed = true; private String characterEncoding = WebUtils.DEFAULT_CHARACTER_ENCODING; - + private boolean charset = false; private final ByteArrayOutputStream content = new ByteArrayOutputStream(); @@ -141,7 +141,7 @@ public class MockHttpServletResponse implements HttpServletResponse { this.charset = true; updateContentTypeHeader(); } - + private void updateContentTypeHeader() { if (this.contentType != null) { StringBuilder sb = new StringBuilder(this.contentType); @@ -151,7 +151,7 @@ public class MockHttpServletResponse implements HttpServletResponse { doAddHeaderValue(CONTENT_TYPE_HEADER, sb.toString(), true); } } - + public String getCharacterEncoding() { return this.characterEncoding; } @@ -457,7 +457,7 @@ public class MockHttpServletResponse implements HttpServletResponse { } doAddHeaderValue(name, value, false); } - + private boolean setSpecialHeader(String name, Object value) { if (CONTENT_TYPE_HEADER.equalsIgnoreCase(name)) { setContentType((String) value); diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/MockHttpSession.java b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/MockHttpSession.java index bc08077830f..1855230d2c5 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/MockHttpSession.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/MockHttpSession.java @@ -71,7 +71,7 @@ public class MockHttpSession implements HttpSession { /** * Create a new MockHttpSession with a default {@link MockServletContext}. - * + * * @see MockServletContext */ public MockHttpSession() { @@ -80,7 +80,7 @@ public class MockHttpSession implements HttpSession { /** * Create a new MockHttpSession. - * + * * @param servletContext the ServletContext that the session runs in */ public MockHttpSession(ServletContext servletContext) { @@ -89,7 +89,7 @@ public class MockHttpSession implements HttpSession { /** * Create a new MockHttpSession. - * + * * @param servletContext the ServletContext that the session runs in * @param id a unique identifier for this session */ @@ -222,7 +222,7 @@ public class MockHttpSession implements HttpSession { /** * Serialize the attributes of this session into an object that can be * turned into a byte array with standard Java serialization. - * + * * @return a representation of this session's serialized state */ public Serializable serializeState() { @@ -249,7 +249,7 @@ public class MockHttpSession implements HttpSession { /** * Deserialize the attributes of this session from a state object created by * {@link #serializeState()}. - * + * * @param state a representation of this session's serialized state */ @SuppressWarnings("unchecked") diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletConfig.java b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletConfig.java index d69e75d0c11..985c1e20dca 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletConfig.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletConfig.java @@ -95,15 +95,15 @@ public class MockPortletConfig implements PortletConfig { this.portletName = portletName; } - + public String getPortletName() { return this.portletName; } - + public PortletContext getPortletContext() { return this.portletContext; } - + public void setResourceBundle(Locale locale, ResourceBundle resourceBundle) { Assert.notNull(locale, "Locale must not be null"); this.resourceBundles.put(locale, resourceBundle); diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletContext.java b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletContext.java index 0cf9f24ffe8..cd8c997e37d 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletContext.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/mock/web/portlet/MockPortletContext.java @@ -55,7 +55,7 @@ public class MockPortletContext implements PortletContext { private final Log logger = LogFactory.getLog(getClass()); private final String resourceBasePath; - + private final ResourceLoader resourceLoader; private final Map attributes = new LinkedHashMap(); @@ -68,7 +68,7 @@ public class MockPortletContext implements PortletContext { /** - * Create a new MockPortletContext with no base path and a + * Create a new MockPortletContext with no base path and a * DefaultResourceLoader (i.e. the classpath root as WAR root). * @see org.springframework.core.io.DefaultResourceLoader */ @@ -123,7 +123,7 @@ public class MockPortletContext implements PortletContext { return this.resourceBasePath + path; } - + public String getServerInfo() { return "MockPortal/1.0"; } @@ -158,7 +158,7 @@ public class MockPortletContext implements PortletContext { public int getMinorVersion() { return 0; } - + public String getMimeType(String filePath) { return null; } diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/ComplexPortletApplicationContext.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/ComplexPortletApplicationContext.java index fbbdcaefaa3..cef74bee416 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/ComplexPortletApplicationContext.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/ComplexPortletApplicationContext.java @@ -84,7 +84,7 @@ public class ComplexPortletApplicationContext extends StaticPortletApplicationCo registerSingleton("standardHandlerAdapter", SimpleControllerHandlerAdapter.class); registerSingleton("portletHandlerAdapter", SimplePortletHandlerAdapter.class); registerSingleton("myHandlerAdapter", MyHandlerAdapter.class); - + registerSingleton("viewController", ViewController.class); registerSingleton("editController", EditController.class); registerSingleton("helpController1", HelpController1.class); @@ -93,21 +93,21 @@ public class ComplexPortletApplicationContext extends StaticPortletApplicationCo registerSingleton("testController2", TestController2.class); registerSingleton("requestLocaleCheckingController", RequestLocaleCheckingController.class); registerSingleton("localeContextCheckingController", LocaleContextCheckingController.class); - + registerSingleton("exceptionThrowingHandler1", ExceptionThrowingHandler.class); registerSingleton("exceptionThrowingHandler2", ExceptionThrowingHandler.class); registerSingleton("unknownHandler", Object.class); - + registerSingleton("myPortlet", MyPortlet.class); registerSingleton("portletMultipartResolver", MockMultipartResolver.class); registerSingleton("portletPostProcessor", SimplePortletPostProcessor.class); registerSingleton("testListener", TestApplicationListener.class); - + ConstructorArgumentValues cvs = new ConstructorArgumentValues(); cvs.addIndexedArgumentValue(0, new MockPortletContext()); cvs.addIndexedArgumentValue(1, "complex"); registerBeanDefinition("portletConfig", new RootBeanDefinition(MockPortletConfig.class, cvs, null)); - + UserRoleAuthorizationInterceptor userRoleInterceptor = new UserRoleAuthorizationInterceptor(); userRoleInterceptor.setAuthorizedRoles(new String[] {"role1", "role2"}); @@ -129,7 +129,7 @@ public class ComplexPortletApplicationContext extends StaticPortletApplicationCo pvs.add("portletModeMap", portletModeMap); pvs.add("interceptors", interceptors); registerSingleton("handlerMapping3", PortletModeHandlerMapping.class, pvs); - + pvs = new MutablePropertyValues(); Map parameterMap = new ManagedMap(); parameterMap.put("test1", new RuntimeBeanReference("testController1")); @@ -144,7 +144,7 @@ public class ComplexPortletApplicationContext extends StaticPortletApplicationCo pvs.add("parameterName", "myParam"); pvs.add("order", "2"); registerSingleton("handlerMapping2", ParameterHandlerMapping.class, pvs); - + pvs = new MutablePropertyValues(); Map innerMap = new ManagedMap(); innerMap.put("help1", new RuntimeBeanReference("helpController1")); @@ -178,7 +178,7 @@ public class ComplexPortletApplicationContext extends StaticPortletApplicationCo addMessage("test", Locale.ENGLISH, "test message"); addMessage("test", Locale.CANADA, "Canadian & test message"); addMessage("test.args", Locale.ENGLISH, "test {0} and {1}"); - + super.refresh(); } @@ -214,7 +214,7 @@ public class ComplexPortletApplicationContext extends StaticPortletApplicationCo return new ModelAndView("someViewName", "result", "view was here"); } } - + public static class EditController implements Controller { @@ -226,7 +226,7 @@ public class ComplexPortletApplicationContext extends StaticPortletApplicationCo return new ModelAndView(request.getParameter("param")); } } - + public static class HelpController1 implements Controller { @@ -250,7 +250,7 @@ public class ComplexPortletApplicationContext extends StaticPortletApplicationCo return new ModelAndView("help2-view"); } } - + public static class RequestLocaleCheckingController implements Controller { public void handleActionRequest(ActionRequest request, ActionResponse response) throws PortletException { @@ -258,8 +258,8 @@ public class ComplexPortletApplicationContext extends StaticPortletApplicationCo throw new PortletException("Incorrect Locale in ActionRequest"); } } - - public ModelAndView handleRenderRequest(RenderRequest request, RenderResponse response) + + public ModelAndView handleRenderRequest(RenderRequest request, RenderResponse response) throws PortletException, IOException { if (!Locale.CANADA.equals(request.getLocale())) { throw new PortletException("Incorrect Locale in RenderRequest"); @@ -277,8 +277,8 @@ public class ComplexPortletApplicationContext extends StaticPortletApplicationCo throw new PortletException("Incorrect Locale in LocaleContextHolder"); } } - - public ModelAndView handleRenderRequest(RenderRequest request, RenderResponse response) + + public ModelAndView handleRenderRequest(RenderRequest request, RenderResponse response) throws PortletException, IOException { if (!Locale.CANADA.equals(LocaleContextHolder.getLocale())) { throw new PortletException("Incorrect Locale in LocaleContextHolder"); @@ -304,7 +304,7 @@ public class ComplexPortletApplicationContext extends StaticPortletApplicationCo public void render(RenderRequest request, RenderResponse response) throws PortletException, IOException { response.getWriter().write("myPortlet was here"); } - + public PortletConfig getPortletConfig() { return this.portletConfig; } @@ -319,7 +319,7 @@ public class ComplexPortletApplicationContext extends StaticPortletApplicationCo public void doSomething(PortletRequest request) throws Exception; } - + public static class ExceptionThrowingHandler implements MyHandler { diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/GenericPortletBeanTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/GenericPortletBeanTests.java index dd6f8006c01..e0256a341de 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/GenericPortletBeanTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/GenericPortletBeanTests.java @@ -40,7 +40,7 @@ public class GenericPortletBeanTests extends TestCase { assertNotNull(portletBean.getTestParam()); assertEquals(testValue, portletBean.getTestParam()); } - + public void testInitParameterNotSet() throws Exception { PortletContext portletContext = new MockPortletContext(); MockPortletConfig portletConfig = new MockPortletConfig(portletContext); @@ -112,7 +112,7 @@ public class GenericPortletBeanTests extends TestCase { // expected } } - + public void testRequiredInitParameterNotSetOtherParameterNotSet() throws Exception { PortletContext portletContext = new MockPortletContext(); MockPortletConfig portletConfig = new MockPortletConfig(portletContext); @@ -153,22 +153,22 @@ public class GenericPortletBeanTests extends TestCase { private static class TestPortletBean extends GenericPortletBean { - - private String testParam; + + private String testParam; private String anotherParam; - + public void setTestParam(String value) { this.testParam = value; } - + public String getTestParam() { return this.testParam; } - + public void setAnotherParam(String value) { this.anotherParam = value; } - + public String getAnotherParam() { return this.anotherParam; } diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/SimplePortletApplicationContext.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/SimplePortletApplicationContext.java index 748414ff48a..b2bc75c7033 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/SimplePortletApplicationContext.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/SimplePortletApplicationContext.java @@ -47,7 +47,7 @@ public class SimplePortletApplicationContext extends StaticPortletApplicationCon public void refresh() throws BeansException { MutablePropertyValues pvs = new MutablePropertyValues(); registerSingleton("controller1", TestFormController.class, pvs); - + pvs = new MutablePropertyValues(); pvs.add("bindOnNewForm", "true"); registerSingleton("controller2", TestFormController.class, pvs); @@ -65,7 +65,7 @@ public class SimplePortletApplicationContext extends StaticPortletApplicationCon registerSingleton("controller4", TestFormController.class, pvs); pvs = new MutablePropertyValues(); - Map parameterMap = new ManagedMap(); + Map parameterMap = new ManagedMap(); parameterMap.put("form", new RuntimeBeanReference("controller1")); parameterMap.put("form-bind", new RuntimeBeanReference("controller2")); parameterMap.put("form-session-bind", new RuntimeBeanReference("controller3")); diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestParameterPropertyValuesTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestParameterPropertyValuesTests.java index 54166c7e91a..765e4c65523 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestParameterPropertyValuesTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestParameterPropertyValuesTests.java @@ -30,14 +30,14 @@ public class PortletRequestParameterPropertyValuesTests extends TestCase { PortletRequestParameterPropertyValues pvs = new PortletRequestParameterPropertyValues(request); assertTrue("Should not have any property values", pvs.getPropertyValues().length == 0); } - + public void testWithNoPrefix() { MockPortletRequest request = new MockPortletRequest(); request.addParameter("param", "value"); PortletRequestParameterPropertyValues pvs = new PortletRequestParameterPropertyValues(request); assertEquals("value", pvs.getPropertyValue("param").getValue()); } - + public void testWithPrefix() { MockPortletRequest request = new MockPortletRequest(); request.addParameter("test_param", "value"); @@ -60,5 +60,5 @@ public class PortletRequestParameterPropertyValuesTests extends TestCase { assertFalse(pvs.contains("other")); assertTrue(pvs.contains("param")); assertEquals("value", pvs.getPropertyValue("param").getValue()); - } + } } diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestUtilsTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestUtilsTests.java index e82de4420e6..3730a69e12b 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestUtilsTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/bind/PortletRequestUtilsTests.java @@ -103,7 +103,7 @@ public class PortletRequestUtilsTests extends TestCase { assertEquals(PortletRequestUtils.getLongParameter(request, "param1", 6L), 5L); assertEquals(PortletRequestUtils.getRequiredIntParameter(request, "param1"), 5L); assertEquals(PortletRequestUtils.getLongParameter(request, "param2", 6L), 6L); - + try { PortletRequestUtils.getRequiredLongParameter(request, "param2"); fail("Should have thrown PortletRequestBindingException"); diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/AbstractXmlWebApplicationContextTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/AbstractXmlWebApplicationContextTests.java index 19ed8741eb8..4c9447b34ba 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/AbstractXmlWebApplicationContextTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/AbstractXmlWebApplicationContextTests.java @@ -31,9 +31,9 @@ import org.springframework.web.context.support.XmlWebApplicationContext; /** * Should ideally be eliminated. Copied when splitting .testsuite up into individual bundles. - * + * * @see org.springframework.web.context.XmlWebApplicationContextTests - * + * * @author Rod Johnson * @author Juergen Hoeller * @author Chris Beams @@ -52,7 +52,7 @@ public abstract class AbstractXmlWebApplicationContextTests extends AbstractAppl listener.zeroCounter(); TestListener parentListener = (TestListener) this.applicationContext.getParent().getBean("parentListener"); parentListener.zeroCounter(); - + parentListener.zeroCounter(); assertTrue("0 events before publication", listener.getEventCount() == 0); assertTrue("0 parent events before publication", parentListener.getEventCount() == 0); diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletConfigAwareBean.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletConfigAwareBean.java index 2b22f26bd7e..3492556e9a1 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletConfigAwareBean.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletConfigAwareBean.java @@ -24,11 +24,11 @@ import javax.portlet.PortletConfig; public class PortletConfigAwareBean implements PortletConfigAware { private PortletConfig portletConfig; - + public void setPortletConfig(PortletConfig portletConfig) { this.portletConfig = portletConfig; } - + public PortletConfig getPortletConfig() { return portletConfig; } diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletContextAwareBean.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletContextAwareBean.java index 87bbe58758e..b89b393ea78 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletContextAwareBean.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletContextAwareBean.java @@ -22,13 +22,13 @@ import javax.portlet.PortletContext; * @author Mark Fisher */ public class PortletContextAwareBean implements PortletContextAware { - + private PortletContext portletContext; - + public void setPortletContext(PortletContext portletContext) { this.portletContext = portletContext; } - + public PortletContext getPortletContext() { return portletContext; } diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletContextAwareProcessorTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletContextAwareProcessorTests.java index d2ad1dd355c..28b89a96cf7 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletContextAwareProcessorTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/PortletContextAwareProcessorTests.java @@ -38,7 +38,7 @@ public class PortletContextAwareProcessorTests extends TestCase { assertNotNull("PortletContext should have been set", bean.getPortletContext()); assertEquals(portletContext, bean.getPortletContext()); } - + public void testPortletContextAwareWithPortletConfig() { PortletContext portletContext = new MockPortletContext(); PortletConfig portletConfig = new MockPortletConfig(portletContext); @@ -47,9 +47,9 @@ public class PortletContextAwareProcessorTests extends TestCase { assertNull(bean.getPortletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("PortletContext should have been set", bean.getPortletContext()); - assertEquals(portletContext, bean.getPortletContext()); + assertEquals(portletContext, bean.getPortletContext()); } - + public void testPortletContextAwareWithPortletContextAndPortletConfig() { PortletContext portletContext = new MockPortletContext(); PortletConfig portletConfig = new MockPortletConfig(portletContext); @@ -58,9 +58,9 @@ public class PortletContextAwareProcessorTests extends TestCase { assertNull(bean.getPortletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("PortletContext should have been set", bean.getPortletContext()); - assertEquals(portletContext, bean.getPortletContext()); + assertEquals(portletContext, bean.getPortletContext()); } - + public void testPortletContextAwareWithNullPortletContextAndNonNullPortletConfig() { PortletContext portletContext = new MockPortletContext(); PortletConfig portletConfig = new MockPortletConfig(portletContext); @@ -69,9 +69,9 @@ public class PortletContextAwareProcessorTests extends TestCase { assertNull(bean.getPortletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("PortletContext should have been set", bean.getPortletContext()); - assertEquals(portletContext, bean.getPortletContext()); + assertEquals(portletContext, bean.getPortletContext()); } - + public void testPortletContextAwareWithNonNullPortletContextAndNullPortletConfig() { PortletContext portletContext = new MockPortletContext(); PortletContextAwareProcessor processor = new PortletContextAwareProcessor(portletContext, null); @@ -79,7 +79,7 @@ public class PortletContextAwareProcessorTests extends TestCase { assertNull(bean.getPortletContext()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("PortletContext should have been set", bean.getPortletContext()); - assertEquals(portletContext, bean.getPortletContext()); + assertEquals(portletContext, bean.getPortletContext()); } public void testPortletContextAwareWithNullPortletContext() { @@ -90,7 +90,7 @@ public class PortletContextAwareProcessorTests extends TestCase { processor.postProcessBeforeInitialization(bean, "testBean"); assertNull(bean.getPortletContext()); } - + public void testPortletConfigAwareWithPortletContextOnly() { PortletContext portletContext = new MockPortletContext(); PortletContextAwareProcessor processor = new PortletContextAwareProcessor(portletContext); @@ -99,7 +99,7 @@ public class PortletContextAwareProcessorTests extends TestCase { processor.postProcessBeforeInitialization(bean, "testBean"); assertNull(bean.getPortletConfig()); } - + public void testPortletConfigAwareWithPortletConfig() { PortletContext portletContext = new MockPortletContext(); PortletConfig portletConfig = new MockPortletConfig(portletContext); @@ -108,9 +108,9 @@ public class PortletContextAwareProcessorTests extends TestCase { assertNull(bean.getPortletConfig()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("PortletConfig should have been set", bean.getPortletConfig()); - assertEquals(portletConfig, bean.getPortletConfig()); + assertEquals(portletConfig, bean.getPortletConfig()); } - + public void testPortletConfigAwareWithPortletContextAndPortletConfig() { PortletContext portletContext = new MockPortletContext(); PortletConfig portletConfig = new MockPortletConfig(portletContext); @@ -119,9 +119,9 @@ public class PortletContextAwareProcessorTests extends TestCase { assertNull(bean.getPortletConfig()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("PortletConfig should have been set", bean.getPortletConfig()); - assertEquals(portletConfig, bean.getPortletConfig()); + assertEquals(portletConfig, bean.getPortletConfig()); } - + public void testPortletConfigAwareWithNullPortletContextAndNonNullPortletConfig() { PortletContext portletContext = new MockPortletContext(); PortletConfig portletConfig = new MockPortletConfig(portletContext); @@ -130,9 +130,9 @@ public class PortletContextAwareProcessorTests extends TestCase { assertNull(bean.getPortletConfig()); processor.postProcessBeforeInitialization(bean, "testBean"); assertNotNull("PortletConfig should have been set", bean.getPortletConfig()); - assertEquals(portletConfig, bean.getPortletConfig()); + assertEquals(portletConfig, bean.getPortletConfig()); } - + public void testPortletConfigAwareWithNonNullPortletContextAndNullPortletConfig() { PortletContext portletContext = new MockPortletContext(); PortletContextAwareProcessor processor = new PortletContextAwareProcessor(portletContext, null); diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/XmlPortletApplicationContextTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/XmlPortletApplicationContextTests.java index d968e5fd3fb..148943c06de 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/XmlPortletApplicationContextTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/context/XmlPortletApplicationContextTests.java @@ -40,7 +40,7 @@ import org.springframework.mock.web.portlet.MockPortletContext; public class XmlPortletApplicationContextTests extends AbstractXmlWebApplicationContextTests { private ConfigurablePortletApplicationContext root; - + protected ConfigurableApplicationContext createContext() throws Exception { root = new XmlPortletApplicationContext(); PortletContext portletContext = new MockPortletContext(); @@ -72,7 +72,7 @@ public class XmlPortletApplicationContextTests extends AbstractXmlWebApplication pac.refresh(); return pac; } - + /** * Overridden in order to use MockPortletConfig * @see org.springframework.web.context.XmlWebApplicationContextTests#testWithoutMessageSource() @@ -96,7 +96,7 @@ public class XmlPortletApplicationContextTests extends AbstractXmlWebApplication String msg = pac.getMessage("someMessage", null, "default", Locale.getDefault()); assertTrue("Default message returned", "default".equals(msg)); } - + /** * Overridden in order to access the root ApplicationContext * @see org.springframework.web.context.XmlWebApplicationContextTests#testContextNesting() @@ -115,12 +115,12 @@ public class XmlPortletApplicationContextTests extends AbstractXmlWebApplication assertTrue("Bean from root context", "Roderick".equals(rod.getName())); assertTrue("Custom BeanPostProcessor applied", rod.getFriends().contains("myFriend")); } - + public void testCount() { assertTrue("should have 16 beans, not "+ this.applicationContext.getBeanDefinitionCount(), this.applicationContext.getBeanDefinitionCount() == 16); } - + public void testPortletContextAwareBean() { PortletContextAwareBean bean = (PortletContextAwareBean)this.applicationContext.getBean("portletContextAwareBean"); assertNotNull(bean.getPortletContext()); diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/ParameterHandlerMappingTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/ParameterHandlerMappingTests.java index fbacd30f1f6..8f3c4a539d9 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/ParameterHandlerMappingTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/ParameterHandlerMappingTests.java @@ -30,9 +30,9 @@ import org.springframework.web.portlet.context.XmlPortletApplicationContext; public class ParameterHandlerMappingTests extends TestCase { public static final String CONF = "/org/springframework/web/portlet/handler/parameterMapping.xml"; - - private ConfigurablePortletApplicationContext pac; - + + private ConfigurablePortletApplicationContext pac; + public void setUp() throws Exception { MockPortletContext portletContext = new MockPortletContext(); pac = new XmlPortletApplicationContext(); @@ -40,55 +40,55 @@ public class ParameterHandlerMappingTests extends TestCase { pac.setConfigLocations(new String[] {CONF}); pac.refresh(); } - + public void testParameterMapping() throws Exception { HandlerMapping hm = (HandlerMapping)pac.getBean("handlerMapping"); - + MockPortletRequest addRequest = new MockPortletRequest(); addRequest.addParameter("action", "add"); MockPortletRequest removeRequest = new MockPortletRequest(); removeRequest.addParameter("action", "remove"); - + Object addHandler = hm.getHandler(addRequest).getHandler(); Object removeHandler = hm.getHandler(removeRequest).getHandler(); - + assertEquals(pac.getBean("addItemHandler"), addHandler); assertEquals(pac.getBean("removeItemHandler"), removeHandler); } - + public void testUnregisteredHandlerWithNoDefault() throws Exception { HandlerMapping hm = (HandlerMapping)pac.getBean("handlerMapping"); - + MockPortletRequest request = new MockPortletRequest(); request.addParameter("action", "modify"); - assertNull(hm.getHandler(request)); + assertNull(hm.getHandler(request)); } public void testUnregisteredHandlerWithDefault() throws Exception { ParameterHandlerMapping hm = (ParameterHandlerMapping)pac.getBean("handlerMapping"); Object defaultHandler = new Object(); hm.setDefaultHandler(defaultHandler); - + MockPortletRequest request = new MockPortletRequest(); request.addParameter("action", "modify"); assertNotNull(hm.getHandler(request)); assertEquals(defaultHandler, hm.getHandler(request).getHandler()); } - + public void testConfiguredParameterName() throws Exception { ParameterHandlerMapping hm = (ParameterHandlerMapping)pac.getBean("handlerMapping"); hm.setParameterName("someParam"); - + MockPortletRequest request = new MockPortletRequest(); request.addParameter("someParam", "add"); - + Object handler = hm.getHandler(request).getHandler(); assertEquals(pac.getBean("addItemHandler"), handler); } - + public void testDuplicateMappingAttempt() { ParameterHandlerMapping hm = (ParameterHandlerMapping)pac.getBean("handlerMapping"); try { diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/ParameterMappingInterceptorTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/ParameterMappingInterceptorTests.java index 644786283c7..4c071f74023 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/ParameterMappingInterceptorTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/ParameterMappingInterceptorTests.java @@ -42,7 +42,7 @@ public class ParameterMappingInterceptorTests extends TestCase { assertNotNull(response.getRenderParameter(param)); assertEquals(value, response.getRenderParameter(param)); } - + public void testNonDefaultParameterNotMapped() throws Exception { ParameterMappingInterceptor interceptor = new ParameterMappingInterceptor(); Object handler = new Object(); @@ -57,7 +57,7 @@ public class ParameterMappingInterceptorTests extends TestCase { assertNull(response.getRenderParameter(param)); assertNull(response.getRenderParameter(ParameterHandlerMapping.DEFAULT_PARAMETER_NAME)); } - + public void testNonDefaultParameterMappedWhenHandlerMappingProvided() throws Exception { String param = "myParam"; String value = "someValue"; @@ -88,7 +88,7 @@ public class ParameterMappingInterceptorTests extends TestCase { boolean shouldProceed = interceptor.preHandle(request, response, handler); assertTrue(shouldProceed); } - + public void testNoParameterValueSetWithDefaultParameterName() throws Exception { ParameterMappingInterceptor interceptor = new ParameterMappingInterceptor(); Object handler = new Object(); @@ -100,7 +100,7 @@ public class ParameterMappingInterceptorTests extends TestCase { assertTrue(shouldProceed); assertNull(response.getRenderParameter(param)); } - + public void testNoParameterValueSetWithNonDefaultParameterName() throws Exception { ParameterMappingInterceptor interceptor = new ParameterMappingInterceptor(); Object handler = new Object(); @@ -127,5 +127,5 @@ public class ParameterMappingInterceptorTests extends TestCase { assertTrue(shouldProceed); assertNull(response.getRenderParameter(param)); } - + } diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/PortletModeHandlerMappingTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/PortletModeHandlerMappingTests.java index f1bda016299..cff6418b88b 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/PortletModeHandlerMappingTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/PortletModeHandlerMappingTests.java @@ -32,9 +32,9 @@ import org.springframework.web.portlet.context.XmlPortletApplicationContext; public class PortletModeHandlerMappingTests extends TestCase { public static final String CONF = "/org/springframework/web/portlet/handler/portletModeMapping.xml"; - - private ConfigurablePortletApplicationContext pac; - + + private ConfigurablePortletApplicationContext pac; + public void setUp() throws Exception { MockPortletContext portletContext = new MockPortletContext(); pac = new XmlPortletApplicationContext(); @@ -42,37 +42,37 @@ public class PortletModeHandlerMappingTests extends TestCase { pac.setConfigLocations(new String[] {CONF}); pac.refresh(); } - + public void testPortletModeView() throws Exception { HandlerMapping hm = (HandlerMapping)pac.getBean("handlerMapping"); - + MockPortletRequest request = new MockPortletRequest(); request.setPortletMode(PortletMode.VIEW); - + Object handler = hm.getHandler(request).getHandler(); assertEquals(pac.getBean("viewHandler"), handler); } public void testPortletModeEdit() throws Exception { HandlerMapping hm = (HandlerMapping)pac.getBean("handlerMapping"); - + MockPortletRequest request = new MockPortletRequest(); request.setPortletMode(PortletMode.EDIT); - + Object handler = hm.getHandler(request).getHandler(); assertEquals(pac.getBean("editHandler"), handler); } - + public void testPortletModeHelp() throws Exception { HandlerMapping hm = (HandlerMapping)pac.getBean("handlerMapping"); - + MockPortletRequest request = new MockPortletRequest(); request.setPortletMode(PortletMode.HELP); - + Object handler = hm.getHandler(request).getHandler(); assertEquals(pac.getBean("helpHandler"), handler); } - + public void testDuplicateMappingAttempt() { PortletModeHandlerMapping hm = (PortletModeHandlerMapping)pac.getBean("handlerMapping"); try { @@ -83,5 +83,5 @@ public class PortletModeHandlerMappingTests extends TestCase { // expected } } - + } diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/PortletModeParameterHandlerMappingTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/PortletModeParameterHandlerMappingTests.java index 1bf68e45fa4..687e4938e4a 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/PortletModeParameterHandlerMappingTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/PortletModeParameterHandlerMappingTests.java @@ -32,9 +32,9 @@ import org.springframework.web.portlet.context.XmlPortletApplicationContext; public class PortletModeParameterHandlerMappingTests extends TestCase { public static final String CONF = "/org/springframework/web/portlet/handler/portletModeParameterMapping.xml"; - - private ConfigurablePortletApplicationContext pac; - + + private ConfigurablePortletApplicationContext pac; + public void setUp() throws Exception { MockPortletContext portletContext = new MockPortletContext(); pac = new XmlPortletApplicationContext(); @@ -42,10 +42,10 @@ public class PortletModeParameterHandlerMappingTests extends TestCase { pac.setConfigLocations(new String[] {CONF}); pac.refresh(); } - + public void testPortletModeViewWithParameter() throws Exception { HandlerMapping hm = (HandlerMapping)pac.getBean("handlerMapping"); - + MockPortletRequest addRequest = new MockPortletRequest(); addRequest.setPortletMode(PortletMode.VIEW); addRequest.setParameter("action", "add"); @@ -53,25 +53,25 @@ public class PortletModeParameterHandlerMappingTests extends TestCase { MockPortletRequest removeRequest = new MockPortletRequest(); removeRequest.setPortletMode(PortletMode.VIEW); removeRequest.setParameter("action", "remove"); - + Object addHandler = hm.getHandler(addRequest).getHandler(); Object removeHandler = hm.getHandler(removeRequest).getHandler(); - + assertEquals(pac.getBean("addItemHandler"), addHandler); assertEquals(pac.getBean("removeItemHandler"), removeHandler); } public void testPortletModeEditWithParameter() throws Exception { HandlerMapping hm = (HandlerMapping)pac.getBean("handlerMapping"); - + MockPortletRequest request = new MockPortletRequest(); request.setPortletMode(PortletMode.EDIT); request.setParameter("action", "prefs"); - + Object handler = hm.getHandler(request).getHandler(); assertEquals(pac.getBean("preferencesHandler"), handler); } - + public void testDuplicateMappingInSamePortletMode() { PortletModeParameterHandlerMapping hm = (PortletModeParameterHandlerMapping)pac.getBean("handlerMapping"); try { @@ -93,18 +93,18 @@ public class PortletModeParameterHandlerMappingTests extends TestCase { // expected } } - + public void testAllowDuplicateMappingInDifferentPortletMode() throws Exception { PortletModeParameterHandlerMapping hm = (PortletModeParameterHandlerMapping)pac.getBean("handlerMapping"); hm.setAllowDuplicateParameters(true); - + Object editRemoveHandler = new Object(); hm.registerHandler(PortletMode.EDIT, "remove", editRemoveHandler); - + MockPortletRequest request = new MockPortletRequest(); request.setPortletMode(PortletMode.EDIT); request.setParameter("action", "remove"); - + Object handler = hm.getHandler(request).getHandler(); assertEquals(editRemoveHandler, handler); } diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/SimpleMappingExceptionResolverTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/SimpleMappingExceptionResolverTests.java index 8cc1ec1fe93..5539c8eb937 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/SimpleMappingExceptionResolverTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/SimpleMappingExceptionResolverTests.java @@ -33,7 +33,7 @@ import org.springframework.web.portlet.ModelAndView; * @author Juergen Hoeller */ public class SimpleMappingExceptionResolverTests extends TestCase { - + private static final String DEFAULT_VIEW = "default-view"; private SimpleMappingExceptionResolver exceptionResolver; @@ -51,19 +51,19 @@ public class SimpleMappingExceptionResolverTests extends TestCase { handler2 = new Object(); genericException = new Exception(); } - + public void testSetOrder() { exceptionResolver.setOrder(2); assertEquals(2, exceptionResolver.getOrder()); } - + public void testDefaultErrorView() { exceptionResolver.setDefaultErrorView(DEFAULT_VIEW); ModelAndView mav = exceptionResolver.resolveException(request, response, handler1, genericException); assertEquals(DEFAULT_VIEW, mav.getViewName()); assertEquals(genericException, mav.getModel().get(SimpleMappingExceptionResolver.DEFAULT_EXCEPTION_ATTRIBUTE)); } - + public void testDefaultErrorViewDifferentHandler() { exceptionResolver.setDefaultErrorView(DEFAULT_VIEW); exceptionResolver.setMappedHandlers(Collections.singleton(handler1)); @@ -90,14 +90,14 @@ public class SimpleMappingExceptionResolverTests extends TestCase { assertEquals(DEFAULT_VIEW, mav.getViewName()); assertNull(mav.getModel().get(SimpleMappingExceptionResolver.DEFAULT_EXCEPTION_ATTRIBUTE)); } - + public void testNullExceptionMappings() { exceptionResolver.setExceptionMappings(null); exceptionResolver.setDefaultErrorView(DEFAULT_VIEW); ModelAndView mav = exceptionResolver.resolveException(request, response, handler1, genericException); assertEquals(DEFAULT_VIEW, mav.getViewName()); } - + public void testDefaultNoRenderWhenMinimized() { exceptionResolver.setDefaultErrorView(DEFAULT_VIEW); request.setWindowState(WindowState.MINIMIZED); @@ -113,7 +113,7 @@ public class SimpleMappingExceptionResolverTests extends TestCase { assertNotNull("ModelAndView should not be null", mav); assertEquals(DEFAULT_VIEW, mav.getViewName()); } - + public void testSimpleExceptionMapping() { Properties props = new Properties(); props.setProperty("Exception", "error"); @@ -122,7 +122,7 @@ public class SimpleMappingExceptionResolverTests extends TestCase { ModelAndView mav = exceptionResolver.resolveException(request, response, handler1, genericException); assertEquals("error", mav.getViewName()); } - + public void testExactExceptionMappingWithHandlerSpecified() { Properties props = new Properties(); props.setProperty("java.lang.Exception", "error"); @@ -131,7 +131,7 @@ public class SimpleMappingExceptionResolverTests extends TestCase { ModelAndView mav = exceptionResolver.resolveException(request, response, handler1, genericException); assertEquals("error", mav.getViewName()); } - + public void testExactExceptionMappingWithHandlerClassSpecified() { Properties props = new Properties(); props.setProperty("java.lang.Exception", "error"); @@ -176,7 +176,7 @@ public class SimpleMappingExceptionResolverTests extends TestCase { ModelAndView mav = exceptionResolver.resolveException(request, response, handler1, genericException); assertNull("Exception not mapped - ModelAndView should be null", mav); } - + public void testTwoMappings() { Properties props = new Properties(); props.setProperty("java.lang.Exception", "error"); @@ -186,7 +186,7 @@ public class SimpleMappingExceptionResolverTests extends TestCase { ModelAndView mav = exceptionResolver.resolveException(request, response, handler1, genericException); assertEquals("error", mav.getViewName()); } - + public void testTwoMappingsOneShortOneLong() { Properties props = new Properties(); props.setProperty("Exception", "error"); @@ -196,7 +196,7 @@ public class SimpleMappingExceptionResolverTests extends TestCase { ModelAndView mav = exceptionResolver.resolveException(request, response, handler1, genericException); assertEquals("error", mav.getViewName()); } - + public void testTwoMappingsOneShortOneLongThrowOddException() { Exception oddException = new SomeOddException(); Properties props = new Properties(); @@ -207,7 +207,7 @@ public class SimpleMappingExceptionResolverTests extends TestCase { ModelAndView mav = exceptionResolver.resolveException(request, response, handler1, oddException); assertEquals("error", mav.getViewName()); } - + public void testTwoMappingsThrowOddExceptionUseLongExceptionMapping() { Exception oddException = new SomeOddException(); Properties props = new Properties(); @@ -218,7 +218,7 @@ public class SimpleMappingExceptionResolverTests extends TestCase { ModelAndView mav = exceptionResolver.resolveException(request, response, handler1, oddException); assertEquals("another-error", mav.getViewName()); } - + public void testThreeMappings() { Exception oddException = new AnotherOddException(); Properties props = new Properties(); @@ -230,7 +230,7 @@ public class SimpleMappingExceptionResolverTests extends TestCase { ModelAndView mav = exceptionResolver.resolveException(request, response, handler1, oddException); assertEquals("another-some-error", mav.getViewName()); } - + public void testExceptionWithSubstringMatchingParent() { Exception oddException = new SomeOddExceptionChild(); Properties props = new Properties(); @@ -240,9 +240,9 @@ public class SimpleMappingExceptionResolverTests extends TestCase { exceptionResolver.setMappedHandlers(Collections.singleton(handler1)); exceptionResolver.setExceptionMappings(props); ModelAndView mav = exceptionResolver.resolveException(request, response, handler1, oddException); - assertEquals("child-error", mav.getViewName()); + assertEquals("child-error", mav.getViewName()); } - + public void testMostSpecificExceptionInHierarchyWins() { Exception oddException = new NoSubstringMatchesThisException(); Properties props = new Properties(); @@ -251,19 +251,19 @@ public class SimpleMappingExceptionResolverTests extends TestCase { exceptionResolver.setMappedHandlers(Collections.singleton(handler1)); exceptionResolver.setExceptionMappings(props); ModelAndView mav = exceptionResolver.resolveException(request, response, handler1, oddException); - assertEquals("parent-error", mav.getViewName()); + assertEquals("parent-error", mav.getViewName()); } private static class SomeOddException extends Exception { } - + private static class SomeOddExceptionChild extends SomeOddException { } - + private static class NoSubstringMatchesThisException extends SomeOddException { @@ -273,5 +273,5 @@ public class SimpleMappingExceptionResolverTests extends TestCase { private static class AnotherOddException extends Exception { } - + } diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/UserRoleAuthorizationInterceptorTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/UserRoleAuthorizationInterceptorTests.java index 7185dee9860..ef70c03718e 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/UserRoleAuthorizationInterceptorTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/handler/UserRoleAuthorizationInterceptorTests.java @@ -91,7 +91,7 @@ public class UserRoleAuthorizationInterceptorTests extends TestCase { // expected } } - + public void testInterceptorWithNoAuthorizedRoles() throws Exception { UserRoleAuthorizationInterceptor interceptor = new UserRoleAuthorizationInterceptor(); MockRenderRequest request = new MockRenderRequest(); diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/CommandControllerTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/CommandControllerTests.java index 52a566fd398..fdf57bb0af2 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/CommandControllerTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/CommandControllerTests.java @@ -53,7 +53,7 @@ import org.springframework.web.portlet.handler.PortletSessionRequiredException; * @author Mark Fisher */ public class CommandControllerTests extends TestCase { - + private static final String ERRORS_KEY = "errors"; public void testRenderRequestWithNoParams() throws Exception { @@ -71,7 +71,7 @@ public class CommandControllerTests extends TestCase { public void testRenderRequestWithParams() throws Exception { TestController tc = new TestController(); - MockRenderRequest request = new MockRenderRequest(); + MockRenderRequest request = new MockRenderRequest(); MockRenderResponse response = new MockRenderResponse(); String name = "test"; int age = 30; @@ -87,10 +87,10 @@ public class CommandControllerTests extends TestCase { assertNotNull(errors); assertEquals("There should be no errors", 0, errors.getErrorCount()); } - + public void testRenderRequestWithMismatch() throws Exception { TestController tc = new TestController(); - MockRenderRequest request = new MockRenderRequest(); + MockRenderRequest request = new MockRenderRequest(); MockRenderResponse response = new MockRenderResponse(); String name = "test"; request.addParameter("name", name); @@ -102,11 +102,11 @@ public class CommandControllerTests extends TestCase { assertNotNull(command); assertEquals("Name should be bound", name, command.getName()); BindException errors = (BindException)mav.getModel().get(ERRORS_KEY); - assertEquals("There should be 1 error", 1, errors.getErrorCount()); + assertEquals("There should be 1 error", 1, errors.getErrorCount()); assertNotNull(errors.getFieldError("age")); assertEquals("typeMismatch", errors.getFieldError("age").getCode()); } - + public void testRenderWhenMinimizedReturnsNull() throws Exception { TestController tc = new TestController(); assertFalse(tc.isRenderWhenMinimized()); @@ -125,13 +125,13 @@ public class CommandControllerTests extends TestCase { request.setContextPath("test"); MockRenderResponse response = new MockRenderResponse(); ModelAndView mav = tc.handleRenderRequest(request, response); - assertNotNull("ModelAndView should not be null", mav); + assertNotNull("ModelAndView should not be null", mav); assertEquals("test-view", mav.getViewName()); assertNotNull(mav.getModel().get(tc.getCommandName())); BindException errors = (BindException)mav.getModel().get(ERRORS_KEY); assertEquals("There should be no errors", 0, errors.getErrorCount()); } - + public void testRequiresSessionWithoutSession() throws Exception { TestController tc = new TestController(); tc.setRequireSession(true); @@ -151,7 +151,7 @@ public class CommandControllerTests extends TestCase { tc.setRequireSession(true); MockRenderRequest request = new MockRenderRequest(); MockRenderResponse response = new MockRenderResponse(); - + // create the session request.getPortletSession(true); try { @@ -161,7 +161,7 @@ public class CommandControllerTests extends TestCase { fail("Should not have thrown PortletSessionRequiredException"); } } - + public void testRenderRequestWithoutCacheSetting() throws Exception { TestController tc = new TestController(); MockRenderRequest request = new MockRenderRequest(); @@ -176,17 +176,17 @@ public class CommandControllerTests extends TestCase { tc.setCacheSeconds(-99); MockRenderRequest request = new MockRenderRequest(); MockRenderResponse response = new MockRenderResponse(); - tc.handleRenderRequest(request, response); + tc.handleRenderRequest(request, response); String cacheProperty = response.getProperty(RenderResponse.EXPIRATION_CACHE); assertNull("Expiration-cache should be null", cacheProperty); } - + public void testRenderRequestWithZeroCacheSetting() throws Exception { TestController tc = new TestController(); tc.setCacheSeconds(0); MockRenderRequest request = new MockRenderRequest(); MockRenderResponse response = new MockRenderResponse(); - tc.handleRenderRequest(request, response); + tc.handleRenderRequest(request, response); String cacheProperty = response.getProperty(RenderResponse.EXPIRATION_CACHE); assertEquals("Expiration-cache should be set to 0 seconds", "0", cacheProperty); } @@ -196,11 +196,11 @@ public class CommandControllerTests extends TestCase { tc.setCacheSeconds(30); MockRenderRequest request = new MockRenderRequest(); MockRenderResponse response = new MockRenderResponse(); - tc.handleRenderRequest(request, response); + tc.handleRenderRequest(request, response); String cacheProperty = response.getProperty(RenderResponse.EXPIRATION_CACHE); assertEquals("Expiration-cache should be set to 30 seconds", "30", cacheProperty); } - + public void testActionRequest() throws Exception { TestController tc = new TestController(); MockActionRequest request = new MockActionRequest(); @@ -209,14 +209,14 @@ public class CommandControllerTests extends TestCase { TestBean command = (TestBean)request.getPortletSession().getAttribute(tc.getRenderCommandSessionAttributeName()); assertTrue(command.isJedi()); } - + public void testSuppressBinding() throws Exception { TestController tc = new TestController() { protected boolean suppressBinding(PortletRequest request) { return true; } }; - MockRenderRequest request = new MockRenderRequest(); + MockRenderRequest request = new MockRenderRequest(); MockRenderResponse response = new MockRenderResponse(); String name = "test"; int age = 30; @@ -232,7 +232,7 @@ public class CommandControllerTests extends TestCase { BindException errors = (BindException)mav.getModel().get(ERRORS_KEY); assertEquals("There should be no errors", 0, errors.getErrorCount()); } - + public void testWithCustomDateEditor() throws Exception { final DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy"); TestController tc = new TestController() { @@ -240,7 +240,7 @@ public class CommandControllerTests extends TestCase { binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false)); } }; - MockRenderRequest request = new MockRenderRequest(); + MockRenderRequest request = new MockRenderRequest(); MockRenderResponse response = new MockRenderResponse(); String name = "test"; int age = 30; @@ -265,7 +265,7 @@ public class CommandControllerTests extends TestCase { binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false)); } }; - MockRenderRequest request = new MockRenderRequest(); + MockRenderRequest request = new MockRenderRequest(); MockRenderResponse response = new MockRenderResponse(); String name = "test"; int age = 30; @@ -278,7 +278,7 @@ public class CommandControllerTests extends TestCase { assertEquals(name, command.getName()); assertEquals(age, command.getAge()); BindException errors = (BindException)mav.getModel().get(ERRORS_KEY); - assertEquals("There should be 1 error", 1, errors.getErrorCount()); + assertEquals("There should be 1 error", 1, errors.getErrorCount()); assertNotNull(errors.getFieldError("date")); assertEquals("typeMismatch", errors.getFieldError("date").getCode()); assertEquals(emptyString, errors.getFieldError("date").getRejectedValue()); @@ -291,7 +291,7 @@ public class CommandControllerTests extends TestCase { binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); } }; - MockRenderRequest request = new MockRenderRequest(); + MockRenderRequest request = new MockRenderRequest(); MockRenderResponse response = new MockRenderResponse(); String name = "test"; int age = 30; @@ -304,10 +304,10 @@ public class CommandControllerTests extends TestCase { assertEquals(name, command.getName()); assertEquals(age, command.getAge()); BindException errors = (BindException)mav.getModel().get(ERRORS_KEY); - assertEquals("There should be 0 errors", 0, errors.getErrorCount()); + assertEquals("There should be 0 errors", 0, errors.getErrorCount()); assertNull("date should be null", command.getDate()); } - + public void testNestedBindingWithPropertyEditor() throws Exception { TestController tc = new TestController() { protected void initBinder(PortletRequest request, PortletRequestDataBinder binder) { @@ -318,7 +318,7 @@ public class CommandControllerTests extends TestCase { }); } }; - MockRenderRequest request = new MockRenderRequest(); + MockRenderRequest request = new MockRenderRequest(); MockRenderResponse response = new MockRenderResponse(); String name = "test"; String spouseName = "testSpouse"; @@ -338,7 +338,7 @@ public class CommandControllerTests extends TestCase { BindException errors = (BindException)mav.getModel().get(ERRORS_KEY); assertEquals("There should be no errors", 0, errors.getErrorCount()); } - + public void testWithValidatorNotSupportingCommandClass() throws Exception { Validator v = new Validator() { public boolean supports(Class c) { @@ -443,7 +443,7 @@ public class CommandControllerTests extends TestCase { private TestController() { super(TestBean.class, "testBean"); } - + protected void handleAction(ActionRequest request, ActionResponse response, Object command, BindException errors) { ((TestBean)command).setJedi(true); } diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/ParameterizableViewControllerTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/ParameterizableViewControllerTests.java index cef2df048c5..dc35d85acde 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/ParameterizableViewControllerTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/ParameterizableViewControllerTests.java @@ -56,7 +56,7 @@ public class ParameterizableViewControllerTests extends TestCase { // expected } } - + public void testActionRequestNotHandled() throws Exception { ParameterizableViewController controller = new ParameterizableViewController(); ActionRequest request = new MockActionRequest(); @@ -69,5 +69,5 @@ public class ParameterizableViewControllerTests extends TestCase { // expected } } - + } diff --git a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/PortletModeNameViewControllerTests.java b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/PortletModeNameViewControllerTests.java index 5fa8569bb67..008ccfaeeb6 100644 --- a/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/PortletModeNameViewControllerTests.java +++ b/spring-webmvc-portlet/src/test/java/org/springframework/web/portlet/mvc/PortletModeNameViewControllerTests.java @@ -33,11 +33,11 @@ import org.springframework.web.portlet.ModelAndView; public class PortletModeNameViewControllerTests extends TestCase { private PortletModeNameViewController controller; - + public void setUp() { controller = new PortletModeNameViewController(); } - + public void testEditPortletMode() throws Exception { MockRenderRequest request = new MockRenderRequest(); MockRenderResponse response = new MockRenderResponse(); @@ -53,7 +53,7 @@ public class PortletModeNameViewControllerTests extends TestCase { ModelAndView mav = controller.handleRenderRequest(request, response); assertEquals("help", mav.getViewName()); } - + public void testViewPortletMode() throws Exception { MockRenderRequest request = new MockRenderRequest(); MockRenderResponse response = new MockRenderResponse(); @@ -61,7 +61,7 @@ public class PortletModeNameViewControllerTests extends TestCase { ModelAndView mav = controller.handleRenderRequest(request, response); assertEquals("view", mav.getViewName()); } - + public void testActionRequest() throws Exception { MockActionRequest request = new MockActionRequest(); MockActionResponse response = new MockActionResponse(); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerAdapter.java index 3be0e0902b8..27d392e7cd5 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/HandlerAdapter.java @@ -46,7 +46,7 @@ import javax.servlet.http.HttpServletResponse; * @see org.springframework.web.servlet.handler.SimpleServletHandlerAdapter */ public interface HandlerAdapter { - + /** * Given a handler instance, return whether or not this HandlerAdapter can * support it. Typical HandlerAdapters will base the decision on the handler @@ -58,8 +58,8 @@ public interface HandlerAdapter { * @param handler handler object to check * @return whether or not this object can use the given handler */ - boolean supports(Object handler); - + boolean supports(Object handler); + /** * Use the given handler to handle this request. * The workflow that is required may vary widely. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java index e35e00ccfa9..aeee264e486 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/HttpServletBean.java @@ -86,7 +86,7 @@ public abstract class HttpServletBean extends HttpServlet /** Logger available to subclasses */ protected final Log logger = LogFactory.getLog(getClass()); - /** + /** * Set of required properties (Strings) that must be supplied as * config parameters to this servlet. */ @@ -230,7 +230,7 @@ public abstract class HttpServletBean extends HttpServlet */ public ServletConfigPropertyValues(ServletConfig config, Set requiredProperties) throws ServletException { - + Set missingProps = (requiredProperties != null && !requiredProperties.isEmpty()) ? new HashSet(requiredProperties) : null; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/ModelAndViewDefiningException.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/ModelAndViewDefiningException.java index 36ef10866fc..52f3d7c29eb 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/ModelAndViewDefiningException.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/ModelAndViewDefiningException.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java index 3f40bbd08c6..dea8fddc991 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/ResourceServlet.java @@ -29,7 +29,7 @@ import org.springframework.util.StringUtils; import org.springframework.web.context.support.ServletContextResource; /** - * Simple servlet that can expose an internal resource, including a + * Simple servlet that can expose an internal resource, including a * default URL if the specified resource is not found. An alternative, * for example, to trying and catching exceptions when using JSP include. * diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/SmartView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/SmartView.java index 3ac6526f669..209c1bc092c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/SmartView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/SmartView.java @@ -17,8 +17,8 @@ package org.springframework.web.servlet; /** - * Provides additional information about a View such as whether it - * performs redirects. + * Provides additional information about a View such as whether it + * performs redirects. * * @author Rossen Stoyanchev * @since 3.1 diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/ThemeResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/ThemeResolver.java index c1463fc9e94..c44619e313f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/ThemeResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/ThemeResolver.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewResolver.java index 650c6a6e5f2..12868f403ec 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/ViewResolver.java @@ -35,12 +35,12 @@ import java.util.Locale; */ public interface ViewResolver { - /** + /** * Resolve the given view by name. *

        Note: To allow for ViewResolver chaining, a ViewResolver should * return null if a view with the given name is not defined in it. * However, this is not required: Some ViewResolvers will always attempt - * to build View objects with the given name, unable to return null + * to build View objects with the given name, unable to return null * (rather throwing an exception when View creation failed). * @param viewName name of the view to resolve * @param locale Locale in which to resolve the view. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/DefaultServletHandlerBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/DefaultServletHandlerBeanDefinitionParser.java index c85df515170..68f0220540c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/DefaultServletHandlerBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/DefaultServletHandlerBeanDefinitionParser.java @@ -32,11 +32,11 @@ import org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter; import org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler; /** - * {@link BeanDefinitionParser} that parses a {@code default-servlet-handler} element to - * register a {@link DefaultServletHttpRequestHandler}. Will also register a - * {@link SimpleUrlHandlerMapping} for mapping resource requests, and a - * {@link HttpRequestHandlerAdapter}. - * + * {@link BeanDefinitionParser} that parses a {@code default-servlet-handler} element to + * register a {@link DefaultServletHttpRequestHandler}. Will also register a + * {@link SimpleUrlHandlerMapping} for mapping resource requests, and a + * {@link HttpRequestHandlerAdapter}. + * * @author Jeremy Grelle * @author Rossen Stoyanchev * @since 3.0.4 @@ -45,8 +45,8 @@ class DefaultServletHandlerBeanDefinitionParser implements BeanDefinitionParser public BeanDefinition parse(Element element, ParserContext parserContext) { Object source = parserContext.extractSource(element); - - String defaultServletName = element.getAttribute("default-servlet-name"); + + String defaultServletName = element.getAttribute("default-servlet-name"); RootBeanDefinition defaultServletHandlerDef = new RootBeanDefinition(DefaultServletHttpRequestHandler.class); defaultServletHandlerDef.setSource(source); defaultServletHandlerDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); @@ -56,20 +56,20 @@ class DefaultServletHandlerBeanDefinitionParser implements BeanDefinitionParser String defaultServletHandlerName = parserContext.getReaderContext().generateBeanName(defaultServletHandlerDef); parserContext.getRegistry().registerBeanDefinition(defaultServletHandlerName, defaultServletHandlerDef); parserContext.registerComponent(new BeanComponentDefinition(defaultServletHandlerDef, defaultServletHandlerName)); - + Map urlMap = new ManagedMap(); urlMap.put("/**", defaultServletHandlerName); - + RootBeanDefinition handlerMappingDef = new RootBeanDefinition(SimpleUrlHandlerMapping.class); handlerMappingDef.setSource(source); handlerMappingDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); handlerMappingDef.getPropertyValues().add("urlMap", urlMap); - + String handlerMappingBeanName = parserContext.getReaderContext().generateBeanName(handlerMappingDef); parserContext.getRegistry().registerBeanDefinition(handlerMappingBeanName, handlerMappingDef); parserContext.registerComponent(new BeanComponentDefinition(handlerMappingDef, handlerMappingBeanName)); - - // Ensure BeanNameUrlHandlerMapping (SPR-8289) and default HandlerAdapters are not "turned off" + + // Ensure BeanNameUrlHandlerMapping (SPR-8289) and default HandlerAdapters are not "turned off" MvcNamespaceUtils.registerDefaultComponents(parserContext, source); return null; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceHandler.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceHandler.java index ecf70c794b9..2b4af21e86f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceHandler.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceHandler.java @@ -31,7 +31,7 @@ public class MvcNamespaceHandler extends NamespaceHandlerSupport { public void init() { registerBeanDefinitionParser("annotation-driven", new AnnotationDrivenBeanDefinitionParser()); registerBeanDefinitionParser("default-servlet-handler", new DefaultServletHandlerBeanDefinitionParser()); - registerBeanDefinitionParser("interceptors", new InterceptorsBeanDefinitionParser()); + registerBeanDefinitionParser("interceptors", new InterceptorsBeanDefinitionParser()); registerBeanDefinitionParser("resources", new ResourcesBeanDefinitionParser()); registerBeanDefinitionParser("view-controller", new ViewControllerBeanDefinitionParser()); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java index 49db0579e4d..a0defb43f11 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java @@ -26,19 +26,19 @@ import org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter; /** * Convenience methods for use in MVC namespace BeanDefinitionParsers. - * + * * @author Rossen Stoyanchev * @since 3.1 */ abstract class MvcNamespaceUtils { - private static final String BEAN_NAME_URL_HANDLER_MAPPING_BEAN_NAME = + private static final String BEAN_NAME_URL_HANDLER_MAPPING_BEAN_NAME = BeanNameUrlHandlerMapping.class.getName(); - private static final String SIMPLE_CONTROLLER_HANDLER_ADAPTER_BEAN_NAME = + private static final String SIMPLE_CONTROLLER_HANDLER_ADAPTER_BEAN_NAME = SimpleControllerHandlerAdapter.class.getName(); - private static final String HTTP_REQUEST_HANDLER_ADAPTER_BEAN_NAME = + private static final String HTTP_REQUEST_HANDLER_ADAPTER_BEAN_NAME = HttpRequestHandlerAdapter.class.getName(); public static void registerDefaultComponents(ParserContext parserContext, Object source) { @@ -48,7 +48,7 @@ abstract class MvcNamespaceUtils { } /** - * Registers an {@link HttpRequestHandlerAdapter} under a well-known + * Registers an {@link HttpRequestHandlerAdapter} under a well-known * name unless already registered. */ private static void registerBeanNameUrlHandlerMapping(ParserContext parserContext, Object source) { @@ -63,7 +63,7 @@ abstract class MvcNamespaceUtils { } /** - * Registers an {@link HttpRequestHandlerAdapter} under a well-known + * Registers an {@link HttpRequestHandlerAdapter} under a well-known * name unless already registered. */ private static void registerHttpRequestHandlerAdapter(ParserContext parserContext, Object source) { @@ -75,9 +75,9 @@ abstract class MvcNamespaceUtils { parserContext.registerComponent(new BeanComponentDefinition(handlerAdapterDef, HTTP_REQUEST_HANDLER_ADAPTER_BEAN_NAME)); } } - + /** - * Registers a {@link SimpleControllerHandlerAdapter} under a well-known + * Registers a {@link SimpleControllerHandlerAdapter} under a well-known * name unless already registered. */ private static void registerSimpleControllerHandlerAdapter(ParserContext parserContext, Object source) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java index a3e423b7f0a..d218be939cd 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/ViewControllerBeanDefinitionParser.java @@ -39,7 +39,7 @@ import org.w3c.dom.Element; */ class ViewControllerBeanDefinitionParser implements BeanDefinitionParser { - private static final String HANDLER_MAPPING_BEAN_NAME = + private static final String HANDLER_MAPPING_BEAN_NAME = "org.springframework.web.servlet.config.viewControllerHandlerMapping"; @@ -49,14 +49,14 @@ class ViewControllerBeanDefinitionParser implements BeanDefinitionParser { // Register SimpleUrlHandlerMapping for view controllers BeanDefinition handlerMappingDef = registerHandlerMapping(parserContext, source); - // Ensure BeanNameUrlHandlerMapping (SPR-8289) and default HandlerAdapters are not "turned off" + // Ensure BeanNameUrlHandlerMapping (SPR-8289) and default HandlerAdapters are not "turned off" MvcNamespaceUtils.registerDefaultComponents(parserContext, source); // Create view controller bean definition RootBeanDefinition viewControllerDef = new RootBeanDefinition(ParameterizableViewController.class); viewControllerDef.setSource(source); if (element.hasAttribute("view-name")) { - viewControllerDef.getPropertyValues().add("viewName", element.getAttribute("view-name")); + viewControllerDef.getPropertyValues().add("viewName", element.getAttribute("view-name")); } Map urlMap; if (handlerMappingDef.getPropertyValues().contains("urlMap")) { @@ -64,13 +64,13 @@ class ViewControllerBeanDefinitionParser implements BeanDefinitionParser { } else { urlMap = new ManagedMap(); - handlerMappingDef.getPropertyValues().add("urlMap", urlMap); + handlerMappingDef.getPropertyValues().add("urlMap", urlMap); } urlMap.put(element.getAttribute("path"), viewControllerDef); return null; } - + private BeanDefinition registerHandlerMapping(ParserContext parserContext, Object source) { if (!parserContext.getRegistry().containsBeanDefinition(HANDLER_MAPPING_BEAN_NAME)) { RootBeanDefinition handlerMappingDef = new RootBeanDefinition(SimpleUrlHandlerMapping.class); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/DefaultServletHandlerConfigurer.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/DefaultServletHandlerConfigurer.java index 1506df31ccd..eaae024b2b7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/DefaultServletHandlerConfigurer.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/DefaultServletHandlerConfigurer.java @@ -29,9 +29,9 @@ import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; import org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler; /** - * Configures a request handler for serving static resources by forwarding the request to the Servlet container's + * Configures a request handler for serving static resources by forwarding the request to the Servlet container's * "default" Servlet. This is intended to be used when the Spring MVC {@link DispatcherServlet} is mapped to "/" - * thus overriding the Servlet container's default handling of static resources. Since this handler is configured + * thus overriding the Servlet container's default handling of static resources. Since this handler is configured * at the lowest precedence, effectively it allows all other handler mappings to handle the request, and if none * of them do, this handler can forward it to the "default" Servlet. * @@ -57,7 +57,7 @@ public class DefaultServletHandlerConfigurer { /** * Enable forwarding to the "default" Servlet. When this method is used the {@link DefaultServletHttpRequestHandler} - * will try to auto-detect the "default" Servlet name. Alternatively, you can specify the name of the default + * will try to auto-detect the "default" Servlet name. Alternatively, you can specify the name of the default * Servlet via {@link #enable(String)}. * @see DefaultServletHttpRequestHandler */ @@ -78,14 +78,14 @@ public class DefaultServletHandlerConfigurer { /** * Return a handler mapping instance ordered at {@link Integer#MAX_VALUE} containing the - * {@link DefaultServletHttpRequestHandler} instance mapped to {@code "/**"}; or {@code null} if + * {@link DefaultServletHttpRequestHandler} instance mapped to {@code "/**"}; or {@code null} if * default servlet handling was not been enabled. */ protected AbstractHandlerMapping getHandlerMapping() { if (handler == null) { return null; } - + Map urlMap = new HashMap(); urlMap.put("/**", handler); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/EnableWebMvc.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/EnableWebMvc.java index 9928410edb2..2daa59c4761 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/EnableWebMvc.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/EnableWebMvc.java @@ -23,7 +23,7 @@ import org.springframework.context.annotation.Import; /** * Add this annotation to an {@code @Configuration} class to have the Spring MVC * configuration defined in {@link WebMvcConfigurationSupport} imported: - * + * *

          * @Configuration
          * @EnableWebMvc
        @@ -33,9 +33,9 @@ import org.springframework.context.annotation.Import;
          * }
          * 
        *

        Customize the imported configuration by implementing the - * {@link WebMvcConfigurer} interface or more likely by extending the - * {@link WebMvcConfigurerAdapter} base class and overriding individual methods: - * + * {@link WebMvcConfigurer} interface or more likely by extending the + * {@link WebMvcConfigurerAdapter} base class and overriding individual methods: + * *

          * @Configuration
          * @EnableWebMvc
        @@ -56,11 +56,11 @@ import org.springframework.context.annotation.Import;
          * }
          * 
        * - *

        If the customization options of {@link WebMvcConfigurer} do not expose - * something you need to configure, consider removing the {@code @EnableWebMvc} - * annotation and extending directly from {@link WebMvcConfigurationSupport} + *

        If the customization options of {@link WebMvcConfigurer} do not expose + * something you need to configure, consider removing the {@code @EnableWebMvc} + * annotation and extending directly from {@link WebMvcConfigurationSupport} * overriding selected {@code @Bean} methods: - * + * *

          * @Configuration
          * @ComponentScan(basePackageClasses = { MyConfiguration.class })
        diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java
        index cbad096879b..b406d284ae4 100644
        --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java
        +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java
        @@ -27,25 +27,25 @@ import org.springframework.web.servlet.resource.ResourceHttpRequestHandler;
         
         /**
          * Encapsulates information required to create a resource handlers.
        - * 
        + *
          * @author Rossen Stoyanchev
          * @author Keith Donald
        - * 
        + *
          * @since 3.1
          */
         public class ResourceHandlerRegistration {
         
         	private final ResourceLoader resourceLoader;
        -	
        +
         	private final String[] pathPatterns;
        -	
        +
         	private final List locations = new ArrayList();
        -	
        +
         	private Integer cachePeriod;
         
         	/**
         	 * Create a {@link ResourceHandlerRegistration} instance.
        -	 * @param resourceLoader a resource loader for turning a String location into a {@link Resource} 
        +	 * @param resourceLoader a resource loader for turning a String location into a {@link Resource}
         	 * @param pathPatterns one or more resource URL path patterns
         	 */
         	public ResourceHandlerRegistration(ResourceLoader resourceLoader, String... pathPatterns) {
        @@ -53,7 +53,7 @@ public class ResourceHandlerRegistration {
         		this.resourceLoader = resourceLoader;
         		this.pathPatterns = pathPatterns;
         	}
        -	
        +
         	/**
         	 * Add one or more resource locations from which to serve static content. Each location must point to a valid
         	 * directory. Multiple locations may be specified as a comma-separated list, and the locations will be checked
        @@ -69,7 +69,7 @@ public class ResourceHandlerRegistration {
         		}
         		return this;
         	}
        -	
        +
         	/**
         	 * Specify the cache period for the resources served by the resource handler, in seconds. The default is to not
         	 * send any cache headers but to rely on last-modified timestamps only. Set to 0 in order to send cache headers
        diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistry.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistry.java
        index e95cc82aaca..914c9cfaa39 100644
        --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistry.java
        +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistry.java
        @@ -32,15 +32,15 @@ import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
         import org.springframework.web.servlet.resource.ResourceHttpRequestHandler;
         
         /**
        - * Stores registrations of resource handlers for serving static resources such as images, css files and others 
        - * through Spring MVC including setting cache headers optimized for efficient loading in a web browser. 
        + * Stores registrations of resource handlers for serving static resources such as images, css files and others
        + * through Spring MVC including setting cache headers optimized for efficient loading in a web browser.
          * Resources can be served out of locations under web application root, from the classpath, and others.
          *
        - * 

        To create a resource handler, use {@link #addResourceHandler(String...)} providing the URL path patterns + *

        To create a resource handler, use {@link #addResourceHandler(String...)} providing the URL path patterns * for which the handler should be invoked to serve static resources (e.g. {@code "/resources/**"}). * - *

        Then use additional methods on the returned {@link ResourceHandlerRegistration} to add one or more - * locations from which to serve static content from (e.g. {{@code "/"}, + *

        Then use additional methods on the returned {@link ResourceHandlerRegistration} to add one or more + * locations from which to serve static content from (e.g. {{@code "/"}, * {@code "classpath:/META-INF/public-web-resources/"}}) or to specify a cache period for served resources. * * @author Rossen Stoyanchev @@ -57,7 +57,7 @@ public class ResourceHandlerRegistry { private final List registrations = new ArrayList(); private int order = Integer.MAX_VALUE -1; - + public ResourceHandlerRegistry(ApplicationContext applicationContext, ServletContext servletContext) { Assert.notNull(applicationContext, "ApplicationContext is required"); this.applicationContext = applicationContext; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistration.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistration.java index 48700f905d7..155aa38536c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistration.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistration.java @@ -22,7 +22,7 @@ import org.springframework.web.servlet.mvc.ParameterizableViewController; /** * Encapsulates information required to create a view controller. - * + * * @author Rossen Stoyanchev * @author Keith Donald * @since 3.1 @@ -30,7 +30,7 @@ import org.springframework.web.servlet.mvc.ParameterizableViewController; public class ViewControllerRegistration { private final String urlPath; - + private String viewName; /** @@ -41,11 +41,11 @@ public class ViewControllerRegistration { Assert.notNull(urlPath, "A URL path is required to create a view controller."); this.urlPath = urlPath; } - + /** - * Sets the view name to use for this view controller. This field is optional. If not specified the + * Sets the view name to use for this view controller. This field is optional. If not specified the * view controller will return a {@code null} view name, which will be resolved through the configured - * {@link RequestToViewNameTranslator}. By default that means "/foo/bar" would resolve to "foo/bar". + * {@link RequestToViewNameTranslator}. By default that means "/foo/bar" would resolve to "foo/bar". */ public void setViewName(String viewName) { this.viewName = viewName; @@ -66,5 +66,5 @@ public class ViewControllerRegistration { controller.setViewName(viewName); return controller; } - + } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistry.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistry.java index 55d3d457d05..9cbbadf4f19 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistry.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistry.java @@ -26,8 +26,8 @@ import org.springframework.web.servlet.handler.AbstractHandlerMapping; import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; /** - * Stores registrations of view controllers. A view controller does nothing more than return a specified - * view name. It saves you from having to write a controller when you want to forward the request straight + * Stores registrations of view controllers. A view controller does nothing more than return a specified + * view name. It saves you from having to write a controller when you want to forward the request straight * through to a view such as a JSP. * * @author Rossen Stoyanchev @@ -37,7 +37,7 @@ import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; public class ViewControllerRegistry { private final List registrations = new ArrayList(); - + private int order = 1; public ViewControllerRegistration addViewController(String urlPath) { @@ -45,10 +45,10 @@ public class ViewControllerRegistry { registrations.add(registration); return registration; } - + /** - * Specify the order to use for ViewControllers mappings relative to other {@link HandlerMapping}s - * configured in the Spring MVC application context. The default value for view controllers is 1, + * Specify the order to use for ViewControllers mappings relative to other {@link HandlerMapping}s + * configured in the Spring MVC application context. The default value for view controllers is 1, * which is 1 higher than the value used for annotated controllers. */ public void setOrder(int order) { @@ -67,11 +67,11 @@ public class ViewControllerRegistry { for (ViewControllerRegistration registration : registrations) { urlMap.put(registration.getUrlPath(), registration.getViewController()); } - + SimpleUrlHandlerMapping handlerMapping = new SimpleUrlHandlerMapping(); handlerMapping.setOrder(order); handlerMapping.setUrlMap(urlMap); return handlerMapping; } - + } \ No newline at end of file diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/ConversionServiceExposingInterceptor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/ConversionServiceExposingInterceptor.java index f32c255c01a..203a25c206c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/ConversionServiceExposingInterceptor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/ConversionServiceExposingInterceptor.java @@ -36,7 +36,7 @@ import org.springframework.util.Assert; * @since 3.0.1 */ public class ConversionServiceExposingInterceptor extends HandlerInterceptorAdapter { - + private final ConversionService conversionService; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerExceptionResolverComposite.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerExceptionResolverComposite.java index 47463cad552..f9e1e7c393b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerExceptionResolverComposite.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerExceptionResolverComposite.java @@ -47,7 +47,7 @@ public class HandlerExceptionResolverComposite implements HandlerExceptionResolv } /** - * Set the list of exception resolvers to delegate to. + * Set the list of exception resolvers to delegate to. */ public void setExceptionResolvers(List exceptionResolvers) { this.resolvers = exceptionResolvers; @@ -61,7 +61,7 @@ public class HandlerExceptionResolverComposite implements HandlerExceptionResolv } /** - * Resolve the exception by iterating over the list of configured exception resolvers. + * Resolve the exception by iterating over the list of configured exception resolvers. * The first one to return a ModelAndView instance wins. Otherwise {@code null} is returned. */ public ModelAndView resolveException(HttpServletRequest request, diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletHandlerAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletHandlerAdapter.java index 189e674d75f..a0ce3299fbf 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletHandlerAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleServletHandlerAdapter.java @@ -59,7 +59,7 @@ public class SimpleServletHandlerAdapter implements HandlerAdapter { public ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { - + ((Servlet) handler).service(request, response); return null; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMapping.java index 383c6d20e50..9d798afc335 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/SimpleUrlHandlerMapping.java @@ -54,7 +54,7 @@ import org.springframework.util.CollectionUtils; * @see BeanNameUrlHandlerMapping */ public class SimpleUrlHandlerMapping extends AbstractUrlHandlerMapping { - + private final Map urlMap = new HashMap(); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java index 638133a71e0..56a7b29f3ed 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.java @@ -45,5 +45,5 @@ public class AcceptHeaderLocaleResolver implements LocaleResolver { throw new UnsupportedOperationException( "Cannot change HTTP accept header - use a different locale resolution strategy"); } - + } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java index 02127271778..230e1cc7b6c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/i18n/SessionLocaleResolver.java @@ -50,7 +50,7 @@ public class SessionLocaleResolver extends AbstractLocaleResolver { * @see org.springframework.web.servlet.support.RequestContextUtils#getLocale */ public static final String LOCALE_SESSION_ATTRIBUTE_NAME = SessionLocaleResolver.class.getName() + ".LOCALE"; - + public Locale resolveLocale(HttpServletRequest request) { Locale locale = (Locale) WebUtils.getSessionAttribute(request, LOCALE_SESSION_ATTRIBUTE_NAME); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractController.java index f20d4df337f..ab85c87aa92 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractController.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractController.java @@ -27,7 +27,7 @@ import org.springframework.web.util.WebUtils; /** *

        Convenient superclass for controller implementations, using the Template * Method design pattern.

        - * + * *

        As stated in the {@link org.springframework.web.servlet.mvc.Controller Controller} * interface, a lot of functionality is already provided by certain abstract * base controllers. The AbstractController is one of the most important @@ -149,7 +149,7 @@ public abstract class AbstractController extends WebContentGenerator implements } } } - + return handleRequestInternal(request, response); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractFormController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractFormController.java index 4b1518f1c9f..44f0ac4769b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractFormController.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractFormController.java @@ -76,7 +76,7 @@ import org.springframework.web.servlet.ModelAndView; * gets applied to populate the new form object with initial request parameters and the * {@link #onBindOnNewForm(HttpServletRequest, Object, BindException)} callback method is * called. Note: any defined Validators are not applied at this point, to allow - * partial binding. However be aware that any Binder customizations applied via + * partial binding. However be aware that any Binder customizations applied via * initBinder() (such as * {@link org.springframework.validation.DataBinder#setRequiredFields(String[])} will * still apply. As such, if using bindOnNewForm=true and initBinder() customizations are diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/BaseCommandController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/BaseCommandController.java index 9082bbf993b..47f3df7c866 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/BaseCommandController.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/BaseCommandController.java @@ -37,7 +37,7 @@ import org.springframework.web.context.request.ServletWebRequest; * JavaBeans based on request parameters, validate the content of such * JavaBeans using {@link org.springframework.validation.Validator Validators} * and use custom editors (in the form of - * {@link java.beans.PropertyEditor PropertyEditors}) to transform + * {@link java.beans.PropertyEditor PropertyEditors}) to transform * objects into strings and vice versa, for example. Three notions are mentioned here:

        * *

        Command class:
        @@ -50,7 +50,7 @@ import org.springframework.web.context.request.ServletWebRequest; * Upon receiving a request, any BaseCommandController will attempt to fill the * command object using the request parameters. This is done using the typical * and well-known JavaBeans property notation. When a request parameter named - * 'firstName' exists, the framework will attempt to call + * 'firstName' exists, the framework will attempt to call * setFirstName([value]) passing the value of the parameter. Nested properties * are of course supported. For instance a parameter named 'address.city' * will result in a getAddress().setCity([value]) call on the diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ParameterizableViewController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ParameterizableViewController.java index 68499f29455..657d5fb0596 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ParameterizableViewController.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ParameterizableViewController.java @@ -68,7 +68,7 @@ import org.springframework.web.servlet.support.RequestContextUtils; * @author Keith Donald */ public class ParameterizableViewController extends AbstractController { - + private String viewName; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletForwardingController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletForwardingController.java index 3ddaa4fb694..5322957ce52 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletForwardingController.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/ServletForwardingController.java @@ -90,7 +90,7 @@ public class ServletForwardingController extends AbstractController implements B private String servletName; private String beanName; - + /** * Set the name of the servlet to forward to, diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/UrlFilenameViewController.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/UrlFilenameViewController.java index 00d4f03035b..faff41fb9f4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/UrlFilenameViewController.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/UrlFilenameViewController.java @@ -26,7 +26,7 @@ import org.springframework.web.servlet.HandlerMapping; /** * Simple Controller implementation that transforms the virtual * path of a URL into a view name and returns that view. - * + * *

        Can optionally prepend a {@link #setPrefix prefix} and/or append a * {@link #setSuffix suffix} to build the viewname from the URL filename. * diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractNameValueExpression.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractNameValueExpression.java index b6ebb6d717b..dd050ca81c3 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractNameValueExpression.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractNameValueExpression.java @@ -19,8 +19,8 @@ package org.springframework.web.servlet.mvc.condition; import javax.servlet.http.HttpServletRequest; /** - * Supports "name=value" style expressions as described in: - * {@link org.springframework.web.bind.annotation.RequestMapping#params()} and + * Supports "name=value" style expressions as described in: + * {@link org.springframework.web.bind.annotation.RequestMapping#params()} and * {@link org.springframework.web.bind.annotation.RequestMapping#headers()}. * * @author Rossen Stoyanchev @@ -48,7 +48,7 @@ abstract class AbstractNameValueExpression implements NameValueExpression this.value = parseValue(expression.substring(separator + 1)); } } - + public String getName() { return this.name; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractRequestCondition.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractRequestCondition.java index 98385ae9115..5328d5e799a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractRequestCondition.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/AbstractRequestCondition.java @@ -20,21 +20,21 @@ import java.util.Collection; import java.util.Iterator; /** - * A base class for {@link RequestCondition} types providing implementations of - * {@link #equals(Object)}, {@link #hashCode()}, and {@link #toString()}. - * + * A base class for {@link RequestCondition} types providing implementations of + * {@link #equals(Object)}, {@link #hashCode()}, and {@link #toString()}. + * * @author Rossen Stoyanchev * @since 3.1 */ public abstract class AbstractRequestCondition> implements RequestCondition { - + /** * Return the discrete items a request condition is composed of. * For example URL patterns, HTTP request methods, param expressions, etc. * @return a collection of objects, never {@code null} */ protected abstract Collection getContent(); - + @Override public boolean equals(Object o) { if (this == o) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/HeadersRequestCondition.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/HeadersRequestCondition.java index ab005ad2bf6..20b4ee8381a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/HeadersRequestCondition.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/HeadersRequestCondition.java @@ -26,13 +26,13 @@ import javax.servlet.http.HttpServletRequest; import org.springframework.web.bind.annotation.RequestMapping; /** - * A logical conjunction (' && ') request condition that matches a request against + * A logical conjunction (' && ') request condition that matches a request against * a set of header expressions with syntax defined in {@link RequestMapping#headers()}. - * - *

        Expressions passed to the constructor with header names 'Accept' or + * + *

        Expressions passed to the constructor with header names 'Accept' or * 'Content-Type' are ignored. See {@link ConsumesRequestCondition} and - * {@link ProducesRequestCondition} for those. - * + * {@link ProducesRequestCondition} for those. + * * @author Arjen Poutsma * @author Rossen Stoyanchev * @since 3.1 @@ -42,20 +42,20 @@ public final class HeadersRequestCondition extends AbstractRequestCondition expressions; /** - * Create a new instance from the given header expressions. Expressions with - * header names 'Accept' or 'Content-Type' are ignored. See {@link ConsumesRequestCondition} - * and {@link ProducesRequestCondition} for those. + * Create a new instance from the given header expressions. Expressions with + * header names 'Accept' or 'Content-Type' are ignored. See {@link ConsumesRequestCondition} + * and {@link ProducesRequestCondition} for those. * @param headers media type expressions with syntax defined in {@link RequestMapping#headers()}; * if 0, the condition will match to every request. */ public HeadersRequestCondition(String... headers) { this(parseExpressions(headers)); } - + private HeadersRequestCondition(Collection conditions) { this.expressions = Collections.unmodifiableSet(new LinkedHashSet(conditions)); } - + private static Collection parseExpressions(String... headers) { Set expressions = new LinkedHashSet(); if (headers != null) { @@ -76,7 +76,7 @@ public final class HeadersRequestCondition extends AbstractRequestCondition> getExpressions() { return new LinkedHashSet>(this.expressions); } - + @Override protected Collection getContent() { return this.expressions; @@ -88,7 +88,7 @@ public final class HeadersRequestCondition extends AbstractRequestCondition0 if the two conditions have the same number of header expressions *

      26. Less than 0 if "this" instance has more header expressions *
      27. Greater than 0 if the "other" instance has more header expressions - * - * - *

        It is assumed that both instances have been obtained via - * {@link #getMatchingCondition(HttpServletRequest)} and each instance + * + * + *

        It is assumed that both instances have been obtained via + * {@link #getMatchingCondition(HttpServletRequest)} and each instance * contains the matching header expression only or is otherwise empty. */ public int compareTo(HeadersRequestCondition other, HttpServletRequest request) { @@ -127,7 +127,7 @@ public final class HeadersRequestCondition extends AbstractRequestCondition { @@ -157,5 +157,5 @@ public final class HeadersRequestCondition extends AbstractRequestCondition { private final Set expressions; - + /** - * Create a new instance from the given param expressions. - * @param params expressions with syntax defined in {@link RequestMapping#params()}; + * Create a new instance from the given param expressions. + * @param params expressions with syntax defined in {@link RequestMapping#params()}; * if 0, the condition will match to every request. */ public ParamsRequestCondition(String... params) { this(parseExpressions(params)); } - + private ParamsRequestCondition(Collection conditions) { this.expressions = Collections.unmodifiableSet(new LinkedHashSet(conditions)); } @@ -79,7 +79,7 @@ public final class ParamsRequestCondition extends AbstractRequestCondition0 if the two conditions have the same number of parameter expressions *

      28. Less than 0 if "this" instance has more parameter expressions *
      29. Greater than 0 if the "other" instance has more parameter expressions - * - * - *

        It is assumed that both instances have been obtained via - * {@link #getMatchingCondition(HttpServletRequest)} and each instance + * + * + *

        It is assumed that both instances have been obtained via + * {@link #getMatchingCondition(HttpServletRequest)} and each instance * contains the matching parameter expressions only or is otherwise empty. */ public int compareTo(ParamsRequestCondition other, HttpServletRequest request) { @@ -118,7 +118,7 @@ public final class ParamsRequestCondition extends AbstractRequestCondition { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/RequestCondition.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/RequestCondition.java index fd99e6ffced..d4c69a9360d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/RequestCondition.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/RequestCondition.java @@ -67,5 +67,5 @@ public interface RequestCondition { * to ensure they have content relevant to current request only. */ int compareTo(T other, HttpServletRequest request); - + } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/AbstractHandlerMethodAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/AbstractHandlerMethodAdapter.java index 653628ceaa2..b6028a667ee 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/AbstractHandlerMethodAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/AbstractHandlerMethodAdapter.java @@ -26,7 +26,7 @@ import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.support.WebContentGenerator; /** - * Abstract base class for {@link HandlerAdapter} implementations that support + * Abstract base class for {@link HandlerAdapter} implementations that support * handlers of type {@link HandlerMethod}. * * @author Arjen Poutsma @@ -53,7 +53,7 @@ public abstract class AbstractHandlerMethodAdapter extends WebContentGenerator i public int getOrder() { return this.order; } - + /** * {@inheritDoc}

        This implementation expects the handler to be an {@link HandlerMethod}. * @@ -85,9 +85,9 @@ public abstract class AbstractHandlerMethodAdapter extends WebContentGenerator i * * @param request current HTTP request * @param response current HTTP response - * @param handlerMethod handler method to use. This object must have previously been passed to the + * @param handlerMethod handler method to use. This object must have previously been passed to the * {@link #supportsInternal(HandlerMethod)} this interface, which must have returned {@code true}. - * @return ModelAndView object with the name of the view and the required model data, or {@code null} if + * @return ModelAndView object with the name of the view and the required model data, or {@code null} if * the request has been handled directly * @throws Exception in case of errors */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java index 26ffe935792..765ed74a645 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/RequestMappingInfo.java @@ -38,7 +38,7 @@ import org.springframework.web.servlet.mvc.condition.RequestMethodsRequestCondit *

      30. {@link ProducesRequestCondition} *
      31. {@code RequestCondition} (optional, custom request condition) *
      - * + * * @author Arjen Poutsma * @author Rossen Stoyanchev * @since 3.1 @@ -56,7 +56,7 @@ public final class RequestMappingInfo implements RequestCondition custom) { @@ -89,7 +89,7 @@ public final class RequestMappingInfo implements RequestConditionFor example the returned instance may contain the subset of URL patterns that match to + * Checks if all conditions in this request mapping info match the provided request and returns + * a potentially new request mapping info with conditions tailored to the current request. + *

      For example the returned instance may contain the subset of URL patterns that match to * the current request, sorted with best matching patterns on top. * @return a new instance in case all conditions match; or {@code null} otherwise */ @@ -173,27 +173,27 @@ public final class RequestMappingInfo implements RequestConditionNote: it is assumed both instances have been obtained via + * Compares "this" info (i.e. the current instance) with another info in the context of a request. + *

      Note: it is assumed both instances have been obtained via * {@link #getMatchingCondition(HttpServletRequest)} to ensure they have conditions with * content relevant to current request. */ @@ -241,7 +241,7 @@ public final class RequestMappingInfo implements RequestCondition mavResolvers; - + private final ModelAttributeMethodProcessor modelAttributeProcessor = new ModelAttributeMethodProcessor(true); /** @@ -94,7 +94,7 @@ public class ModelAndViewResolverMethodReturnValueHandler implements HandlerMeth } // No suitable ModelAndViewResolver.. - + if (this.modelAttributeProcessor.supportsReturnType(returnType)) { this.modelAttributeProcessor.handleReturnValue(returnValue, returnType, mavContainer, request); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.java index cec0544ecf6..315cf8f68e8 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerMapping.java @@ -58,7 +58,7 @@ public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMappi private final List fileExtensions = new ArrayList(); - + /** * Whether to use suffix pattern match (".*") when matching patterns to * requests. If enabled a method mapped to "/users" also matches to "/users.*". diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletCookieValueMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletCookieValueMethodArgumentResolver.java index d2a64b7987d..ee09382f23a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletCookieValueMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletCookieValueMethodArgumentResolver.java @@ -29,7 +29,7 @@ import org.springframework.web.util.WebUtils; /** * An {@link org.springframework.web.method.annotation.AbstractCookieValueMethodArgumentResolver} that resolves cookie * values from an {@link HttpServletRequest}. - * + * * @author Rossen Stoyanchev * @since 3.1 */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletModelAttributeMethodProcessor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletModelAttributeMethodProcessor.java index 56c45e033b7..3b54676ed31 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletModelAttributeMethodProcessor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletModelAttributeMethodProcessor.java @@ -80,7 +80,7 @@ public class ServletModelAttributeMethodProcessor extends ModelAttributeMethodPr return super.createAttribute(attributeName, parameter, binderFactory, request); } - + /** * Obtain a value from the request that may be used to instantiate the * model attribute through type conversion from String to the target type. @@ -140,7 +140,7 @@ public class ServletModelAttributeMethodProcessor extends ModelAttributeMethodPr } return null; } - + /** * {@inheritDoc} *

      Downcast {@link WebDataBinder} to {@link ServletRequestDataBinder} before binding. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolver.java index a6e9f7f9333..d0c3a020247 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolver.java @@ -71,12 +71,12 @@ public class ServletRequestMethodArgumentResolver implements HandlerMethodArgume MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws IOException { - + Class paramType = parameter.getParameterType(); if (WebRequest.class.isAssignableFrom(paramType)) { return webRequest; } - + HttpServletRequest request = webRequest.getNativeRequest(HttpServletRequest.class); if (ServletRequest.class.isAssignableFrom(paramType) || MultipartRequest.class.isAssignableFrom(paramType)) { Object nativeRequest = webRequest.getNativeRequest(paramType); @@ -107,5 +107,5 @@ public class ServletRequestMethodArgumentResolver implements HandlerMethodArgume throw new UnsupportedOperationException("Unknown parameter type: " + paramType + " in method: " + method); } } - + } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolver.java index f1eaa6607da..14c216258f7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolver.java @@ -89,5 +89,5 @@ public class ServletResponseMethodArgumentResolver implements HandlerMethodArgum throw new UnsupportedOperationException("Unknown parameter type: " + paramType + " in method: " + method); } } - + } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletWebArgumentResolverAdapter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletWebArgumentResolverAdapter.java index b19d0f362aa..54a4e2265eb 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletWebArgumentResolverAdapter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletWebArgumentResolverAdapter.java @@ -27,12 +27,12 @@ import org.springframework.web.method.annotation.AbstractWebArgumentResolverAdap /** * A Servlet-specific {@link org.springframework.web.method.annotation.AbstractWebArgumentResolverAdapter} that creates a * {@link NativeWebRequest} from {@link ServletRequestAttributes}. - * + * *

      Note: This class is provided for backwards compatibility. - * However it is recommended to re-write a {@code WebArgumentResolver} as - * {@code HandlerMethodArgumentResolver}. For more details see javadoc of + * However it is recommended to re-write a {@code WebArgumentResolver} as + * {@code HandlerMethodArgumentResolver}. For more details see javadoc of * {@link org.springframework.web.method.annotation.AbstractWebArgumentResolverAdapter}. - * + * * @author Rossen Stoyanchev * @since 3.1 */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MethodNameResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MethodNameResolver.java index d073b320731..53740ed959f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MethodNameResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/MethodNameResolver.java @@ -30,7 +30,7 @@ import javax.servlet.http.HttpServletRequest; * @see MultiActionController#setMethodNameResolver */ public interface MethodNameResolver { - + /** * Return a method name that can handle this request. Such * mappings are typically, but not necessarily, based on URL. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java index 81f62223569..003ab61ef8a 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/ParameterMethodNameResolver.java @@ -30,12 +30,12 @@ import org.springframework.web.util.WebUtils; /** * Implementation of {@link MethodNameResolver} which supports several strategies * for mapping parameter values to the names of methods to invoke. - * + * *

      The simplest strategy looks for a specific named parameter, whose value is * considered the name of the method to invoke. The name of the parameter may be * specified as a JavaBean property, if the default action is not * acceptable. - * + * *

      The alternative strategy uses the very existence of a request parameter ( * i.e. a request parameter with a certain name is found) as an indication that a * method with the same name should be dispatched to. In this case, the actual @@ -47,18 +47,18 @@ import org.springframework.web.util.WebUtils; * button should be set to the mapped method name, while the 'value' attribute * is normally displayed as the button label by the browser, and will be * ignored by the resolver. - * + * *

      Note that the second strategy also supports the use of submit buttons of * type 'image'. That is, an image submit button named 'reset' will normally be * submitted by the browser as two request paramters called 'reset.x', and - * 'reset.y'. When checking for the existence of a paramter from the + * 'reset.y'. When checking for the existence of a paramter from the * methodParamNames list, to indicate that a specific method should * be called, the code will look for request parameter in the "reset" form * (exactly as spcified in the list), and in the "reset.x" form ('.x' appended to * the name in the list). In this way it can handle both normal and image submit * buttons. The actual method name resolved if there is a match will always be - * the bare form without the ".x". - * + * the bare form without the ".x". + * *

      Note: If both strategies are configured, i.e. both "paramName" * and "methodParamNames" are specified, then both will be checked for any given * request. A match for an explicit request parameter in the "methodParamNames" @@ -66,7 +66,7 @@ import org.springframework.web.util.WebUtils; * *

      For use with either strategy, the name of a default handler method to use * when there is no match, can be specified as a JavaBean property. - * + * *

      For both resolution strategies, the method name is of course coming from * some sort of view code, (such as a JSP page). While this may be acceptable, * it is sometimes desireable to treat this only as a 'logical' method name, diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/PropertiesMethodNameResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/PropertiesMethodNameResolver.java index 62759f96e64..96bdac9c305 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/PropertiesMethodNameResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/PropertiesMethodNameResolver.java @@ -48,7 +48,7 @@ import org.springframework.util.PathMatcher; */ public class PropertiesMethodNameResolver extends AbstractUrlMethodNameResolver implements InitializingBean { - + private Properties mappings; private PathMatcher pathMatcher = new AntPathMatcher(); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/package-info.java index d84339fd05f..320384a29f5 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/multiaction/package-info.java @@ -5,18 +5,18 @@ * at method rather than class level. This is useful when * we want to avoid having many trivial controller classes, as can * easily happen when using an MVC framework. - * + * *

      Typically a controller that handles multiple request types will * extend MultiActionController, and implement multiple request handling * methods that will be invoked by reflection if they follow this class' * naming convention. Classes are analyzed at startup and methods cached, * so the performance overhead of reflection in this approach is negligible. - * + * *

      This approach is analogous to the Struts 1.1 DispatcherAction * class, but more sophisticated, as it supports configurable mapping from * requests to URLs and allows for delegation as well as subclassing. - * - *

      This package is discussed in Chapter 12 of Expert One-On-One J2EE Design and Development + * + *

      This package is discussed in Chapter 12 of Expert One-On-One J2EE Design and Development * by Rod Johnson, and used in the sample application. * */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/package-info.java index d6b21ffa389..3f8948780b7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/package-info.java @@ -6,7 +6,7 @@ * with Spring. Provides both abstract base classes and concrete implementations * for often seen use cases. *

      - * + * *

      * A Controller - as defined in this package - is analogous to a Struts * Action. Usually Controllers are JavaBeans @@ -18,7 +18,7 @@ * independent of the view, PDF views are possible, as well as for instance Excel * views. *

      - * + * *

      * How to actually set up a (web)application using the MVC framework Spring * provides is explained in more detail in the @@ -29,7 +29,7 @@ * workflow of some of the abstract and concrete controller and how to extend * and fully use their functionality. *

      - * + * *

      * Especially useful to read, while getting into the Spring MVC framework * are the following: diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributes.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributes.java index 4e2d8d5acf7..daeaa970c51 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributes.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributes.java @@ -24,17 +24,17 @@ import org.springframework.web.servlet.FlashMap; /** * A specialization of the {@link Model} interface that controllers can use to - * select attributes for a redirect scenario. Since the intent of adding - * redirect attributes is very explicit -- i.e. to be used for a redirect URL, - * attribute values may be formatted as Strings and stored that way to make - * them eligible to be appended to the query string or expanded as URI + * select attributes for a redirect scenario. Since the intent of adding + * redirect attributes is very explicit -- i.e. to be used for a redirect URL, + * attribute values may be formatted as Strings and stored that way to make + * them eligible to be appended to the query string or expanded as URI * variables in {@code org.springframework.web.servlet.view.RedirectView}. - * - *

      This interface also provides a way to add flash attributes. For a - * general overview of flash attributes see {@link FlashMap}. You can use - * {@link RedirectAttributes} to store flash attributes and they will be - * automatically propagated to the "output" FlashMap of the current request. - * + * + *

      This interface also provides a way to add flash attributes. For a + * general overview of flash attributes see {@link FlashMap}. You can use + * {@link RedirectAttributes} to store flash attributes and they will be + * automatically propagated to the "output" FlashMap of the current request. + * *

      Example usage in an {@code @Controller}: *

        * @RequestMapping(value = "/accounts", method = RequestMethod.POST)
      @@ -47,13 +47,13 @@ import org.springframework.web.servlet.FlashMap;
        *   return "redirect:/accounts/{id}";
        * }
        * 
      - * + * *

      A RedirectAttributes model is empty when the method is called and is never * used unless the method returns a redirect view name or a RedirectView. - * + * *

      After the redirect, flash attributes are automatically added to the model * of the controller that serves the target URL. - * + * * @author Rossen Stoyanchev * @since 3.1 */ @@ -64,11 +64,11 @@ public interface RedirectAttributes extends Model { RedirectAttributes addAttribute(Object attributeValue); RedirectAttributes addAllAttributes(Collection attributeValues); - + RedirectAttributes mergeAttributes(Map attributes); /** - * Add the given flash attribute. + * Add the given flash attribute. * @param attributeName the attribute name; never {@code null} * @param attributeValue the attribute value; may be {@code null} */ @@ -76,7 +76,7 @@ public interface RedirectAttributes extends Model { /** * Add the given flash storage using a - * {@link org.springframework.core.Conventions#getVariableName generated name}. + * {@link org.springframework.core.Conventions#getVariableName generated name}. * @param attributeValue the flash attribute value; never {@code null} */ RedirectAttributes addFlashAttribute(Object attributeValue); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMap.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMap.java index 7b28b729b6c..27c0e25bbc8 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMap.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMap.java @@ -24,10 +24,10 @@ import org.springframework.validation.DataBinder; /** * A {@link ModelMap} implementation of {@link RedirectAttributes} that formats - * values as Strings using a {@link DataBinder}. Also provides a place to store - * flash attributes so they can survive a redirect without the need to be + * values as Strings using a {@link DataBinder}. Also provides a place to store + * flash attributes so they can survive a redirect without the need to be * embedded in the redirect URL. - * + * * @author Rossen Stoyanchev * @since 3.1 */ @@ -45,9 +45,9 @@ public class RedirectAttributesModelMap extends ModelMap implements RedirectAttr public RedirectAttributesModelMap(DataBinder dataBinder) { this.dataBinder = dataBinder; } - + /** - * Default constructor without a DataBinder. + * Default constructor without a DataBinder. * Attribute values are converted to String via {@link #toString()}. */ public RedirectAttributesModelMap() { @@ -153,7 +153,7 @@ public class RedirectAttributesModelMap extends ModelMap implements RedirectAttr this.flashAttributes.addAttribute(attributeName, attributeValue); return this; } - + public RedirectAttributes addFlashAttribute(Object attributeValue) { this.flashAttributes.addAttribute(attributeValue); return this; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/package-info.java index 3913b20d49a..117cbb726ed 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/package-info.java @@ -4,7 +4,7 @@ * Provides servlets that integrate with the application context * infrastructure, and the core interfaces and classes for the * Spring web MVC framework. - * + * *

      This package and related packages are discussed in Chapters 12 and 13 of * Expert One-On-One J2EE Design and Development * by Rod Johnson (Wrox, 2002). diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContext.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContext.java index 8de20780525..9d10b61b261 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContext.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContext.java @@ -231,7 +231,7 @@ public class RequestContext { // Ignored } } - + /** * Determine the fallback locale for this context.

      The default implementation checks for a JSTL locale attribute * in request, session or application scope; if not found, returns the HttpServletRequest.getLocale(). diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java index 8c284e37edf..87be6bcedbc 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestContextUtils.java @@ -158,9 +158,9 @@ public abstract class RequestContextUtils { /** * Return a read-only {@link Map} with "input" flash attributes saved on a - * previous request. + * previous request. * @param request the current request - * @return a read-only Map, or {@code null} + * @return a read-only Map, or {@code null} * @see FlashMap */ @SuppressWarnings("unchecked") diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestDataValueProcessor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestDataValueProcessor.java index 82bd0398f5f..a8ca8ca2562 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestDataValueProcessor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/RequestDataValueProcessor.java @@ -22,17 +22,17 @@ import javax.servlet.http.HttpServletRequest; /** * A contract for inspecting and potentially modifying request data values such - * as URL query parameters or form field values before they are rendered by a + * as URL query parameters or form field values before they are rendered by a * view or before a redirect. - * - *

      Implementations may use this contract for example as part of a solution - * to provide data integrity, confidentiality, protection against cross-site + * + *

      Implementations may use this contract for example as part of a solution + * to provide data integrity, confidentiality, protection against cross-site * request forgery (CSRF), and others or for other tasks such as automatically * adding a hidden field to all forms and URLs. - * + * *

      View technologies that support this contract can obtain an instance to * delegate to via {@link RequestContext#getRequestDataValueProcessor()}. - * + * * @author Rossen Stoyanchev * @since 3.1 */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/package-info.java index 35f4258dd67..bea2cac64c1 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/support/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/support/package-info.java @@ -3,7 +3,7 @@ * * Support classes for Spring's web MVC framework. * Provides easy evaluation of the request context in views, - * and miscellaneous HandlerInterceptor implementations. + * and miscellaneous HandlerInterceptor implementations. * */ package org.springframework.web.servlet.support; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EvalTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EvalTag.java index 2d3e74b5247..4c455506897 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EvalTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/EvalTag.java @@ -147,7 +147,7 @@ public class EvalTag extends HtmlEscapingAwareTag { } return context; } - + private ConversionService getConversionService(PageContext pageContext) { return (ConversionService) pageContext.getRequest().getAttribute(ConversionService.class.getName()); } @@ -188,7 +188,7 @@ public class EvalTag extends HtmlEscapingAwareTag { public void write(EvaluationContext context, Object target, String name, Object newValue) { throw new UnsupportedOperationException(); } - + private Object resolveImplicitVariable(String name) throws AccessException { if (this.variableResolver == null) { return null; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/HtmlEscapeTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/HtmlEscapeTag.java index b7dfb13d813..9107a16d0b4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/HtmlEscapeTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/HtmlEscapeTag.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/MessageTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/MessageTag.java index 3ad70541900..ae093bc04c6 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/MessageTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/MessageTag.java @@ -68,9 +68,9 @@ public class MessageTag extends HtmlEscapingAwareTag { private String argumentSeparator = DEFAULT_ARGUMENT_SEPARATOR; private String text; - + private String var; - + private String scope = TagUtils.SCOPE_PAGE; private boolean javaScriptEscape = false; @@ -118,7 +118,7 @@ public class MessageTag extends HtmlEscapingAwareTag { public void setText(String text) { this.text = text; } - + /** * Set PageContext attribute name under which to expose * a variable that contains the resolved message. @@ -128,7 +128,7 @@ public class MessageTag extends HtmlEscapingAwareTag { public void setVar(String var) { this.var = var; } - + /** * Set the scope to export the variable to. * Default is SCOPE_PAGE ("page"). diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/Param.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/Param.java index 0dfa4b24bfd..d37d05a9eb2 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/Param.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/Param.java @@ -1,12 +1,12 @@ /* * Copyright 2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,10 +19,10 @@ package org.springframework.web.servlet.tags; /** * Bean used to pass name-value pair parameters from a {@link ParamTag} to a * {@link ParamAware} tag. - * - *

      Attributes are the raw values passed to the spring:param tag and have not - * been encoded or escaped. - * + * + *

      Attributes are the raw values passed to the spring:param tag and have not + * been encoded or escaped. + * * @author Scott Andrews * @since 3.0 * @see ParamTag diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ParamTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ParamTag.java index 3d085074017..b502de7fe35 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ParamTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/ParamTag.java @@ -1,12 +1,12 @@ /* * Copyright 2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -22,9 +22,9 @@ import javax.servlet.jsp.tagext.BodyTagSupport; /** * JSP tag for collecting name-value parameters and passing them to a * {@link ParamAware} ancestor in the tag hierarchy. - * + * *

      This tag must be nested under a param aware tag. - * + * * @author Scott Andrews * @since 3.0 * @see Param @@ -69,10 +69,10 @@ public class ParamTag extends BodyTagSupport { /** * Sets the name of the parameter - * + * *

      * Required - * + * * @param name the parameter name */ public void setName(String name) { @@ -81,10 +81,10 @@ public class ParamTag extends BodyTagSupport { /** * Sets the value of the parameter - * + * *

      * Optional. If not set, the tag's body content is evaluated - * + * * @param value the parameter value */ public void setValue(String value) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/RequestContextAwareTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/RequestContextAwareTag.java index 959d7f95326..21be4a4fd9d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/RequestContextAwareTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/RequestContextAwareTag.java @@ -29,7 +29,7 @@ import org.springframework.web.servlet.support.RequestContext; /** * Superclass for all tags that require a {@link RequestContext}. - * + * *

      The RequestContext instance provides easy access * to current state like the * {@link org.springframework.web.context.WebApplicationContext}, @@ -54,7 +54,7 @@ public abstract class RequestContextAwareTag extends TagSupport implements TryCa public static final String REQUEST_CONTEXT_PAGE_ATTRIBUTE = "org.springframework.web.servlet.tags.REQUEST_CONTEXT"; - + /** Logger available to subclasses */ protected final Log logger = LogFactory.getLog(getClass()); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java index 034339c14e2..18c58d91a6b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java @@ -40,37 +40,37 @@ import org.springframework.web.util.UriUtils; /** * JSP tag for creating URLs. Modeled after the JSTL c:url tag with backwards * compatibility in mind. - * + * *

      Enhancements to the JSTL functionality include: *

        *
      • URL encoded template URI variables
      • *
      • HTML/XML escaping of URLs
      • *
      • JavaScript escaping of URLs
      • *
      - * + * *

      Template URI variables are indicated in the {@link #setValue(String) 'value'} * attribute and marked by braces '{variableName}'. The braces and attribute name are - * replaced by the URL encoded value of a parameter defined with the spring:param tag - * in the body of the url tag. If no parameter is available the literal value is - * passed through. Params matched to template variables will not be added to the query + * replaced by the URL encoded value of a parameter defined with the spring:param tag + * in the body of the url tag. If no parameter is available the literal value is + * passed through. Params matched to template variables will not be added to the query * string. - * - *

      Use of the spring:param tag for URI template variables is strongly recommended - * over direct EL substitution as the values are URL encoded. Failure to properly + * + *

      Use of the spring:param tag for URI template variables is strongly recommended + * over direct EL substitution as the values are URL encoded. Failure to properly * encode URL can leave an application vulnerable to XSS and other injection attacks. - * - *

      URLs can be HTML/XML escaped by setting the {@link #setHtmlEscape(String) - * 'htmlEscape'} attribute to 'true'. Detects an HTML escaping setting, either on - * this tag instance, the page level, or the web.xml level. The default + * + *

      URLs can be HTML/XML escaped by setting the {@link #setHtmlEscape(String) + * 'htmlEscape'} attribute to 'true'. Detects an HTML escaping setting, either on + * this tag instance, the page level, or the web.xml level. The default * is 'false'. When setting the URL value into a variable, escaping is not recommended. - * + * *

      Example usage: *

      <spring:url value="/url/path/{variableName}">
        *   <spring:param name="variableName" value="more than JSTL c:url" />
        * </spring:url>
      * Results in: * /currentApplicationContext/url/path/more%20than%20JSTL%20c%3Aurl - * + * * @author Scott Andrews * @since 3.0 * @see ParamTag @@ -171,13 +171,13 @@ public class UrlTag extends HtmlEscapingAwareTag implements ParamAware { @Override public int doEndTag() throws JspException { String url = createUrl(); - + RequestDataValueProcessor processor = getRequestContext().getRequestDataValueProcessor(); ServletRequest request = this.pageContext.getRequest(); if ((processor != null) && (request instanceof HttpServletRequest)) { url = processor.processUrl((HttpServletRequest) request, url); } - + if (this.var == null) { // print the url to the writer try { @@ -229,7 +229,7 @@ public class UrlTag extends HtmlEscapingAwareTag implements ParamAware { // HTML and/or JavaScript escape, if demanded. urlStr = isHtmlEscape() ? HtmlUtils.htmlEscape(urlStr) : urlStr; urlStr = this.javaScriptEscape ? JavaScriptUtils.javaScriptEscape(urlStr) : urlStr; - + return urlStr; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractCheckedElementTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractCheckedElementTag.java index ff1420f401b..10a31b974d7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractCheckedElementTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractCheckedElementTag.java @@ -96,7 +96,7 @@ public abstract class AbstractCheckedElementTag extends AbstractHtmlInputElement protected boolean isValidDynamicAttribute(String localName, Object value) { return !"type".equals(localName); } - + /** * Return the type of the HTML input element to generate: * "checkbox" or "radio". diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java index bc098505a17..438fab44682 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementBodyTag.java @@ -27,7 +27,7 @@ import org.springframework.util.StringUtils; /** * Convenient super class for many html tags that render content using the databinding * features of the {@link AbstractHtmlElementTag AbstractHtmlElementTag}. The only thing sub tags - * need to do is override {@link #renderDefaultContent(TagWriter)}. + * need to do is override {@link #renderDefaultContent(TagWriter)}. * * @author Rob Harrop * @author Juergen Hoeller diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTag.java index 32b5f206538..b497d010678 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTag.java @@ -29,13 +29,13 @@ import org.springframework.util.StringUtils; /** * Base class for databinding-aware JSP tags that render HTML element. Provides * a set of properties corresponding to the set of HTML attributes that are common - * across elements. - * - *

      Additionally, this base class allows for rendering non-standard attributes - * as part of the tag's output. These attributes are accessible to subclasses if - * needed via the {@link AbstractHtmlElementTag#getDynamicAttributes() dynamicAttributes} + * across elements. + * + *

      Additionally, this base class allows for rendering non-standard attributes + * as part of the tag's output. These attributes are accessible to subclasses if + * needed via the {@link AbstractHtmlElementTag#getDynamicAttributes() dynamicAttributes} * map. - * + * * @author Rob Harrop * @author Jeremy Grelle * @author Rossen Stoyanchev @@ -109,7 +109,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen private String onkeyup; private String onkeydown; - + private Map dynamicAttributes; @@ -383,14 +383,14 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen protected String getOnkeydown() { return this.onkeydown; } - + /** - * Get the map of dynamic attributes. + * Get the map of dynamic attributes. */ protected Map getDynamicAttributes() { return this.dynamicAttributes; } - + /** * {@inheritDoc} */ @@ -404,7 +404,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen } dynamicAttributes.put(localName, value); } - + /** * Whether the given name-value pair is a valid dynamic attribute. */ @@ -445,7 +445,7 @@ public abstract class AbstractHtmlElementTag extends AbstractDataBoundFormElemen writeOptionalAttribute(tagWriter, ONKEYPRESS_ATTRIBUTE, getOnkeypress()); writeOptionalAttribute(tagWriter, ONKEYUP_ATTRIBUTE, getOnkeyup()); writeOptionalAttribute(tagWriter, ONKEYDOWN_ATTRIBUTE, getOnkeydown()); - + if (!CollectionUtils.isEmpty(this.dynamicAttributes)) { for (String attr : this.dynamicAttributes.keySet()) { tagWriter.writeOptionalAttributeValue(attr, getDisplayString(this.dynamicAttributes.get(attr))); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlInputElementTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlInputElementTag.java index c5a3d549ae2..4d9ca3fb011 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlInputElementTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlInputElementTag.java @@ -162,7 +162,7 @@ public abstract class AbstractHtmlInputElementTag extends AbstractHtmlElementTag /** * Gets the value of the 'readonly' attribute. * May be a runtime expression. - * @see #isReadonly() + * @see #isReadonly() */ protected String getReadonly() { return this.readonly; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractMultiCheckedElementTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractMultiCheckedElementTag.java index 6cf8af15712..2aec3de7056 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractMultiCheckedElementTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractMultiCheckedElementTag.java @@ -199,7 +199,7 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem if (itemsObject == null && boundType != null && boundType.isEnum()) { itemsObject = boundType.getEnumConstants(); } - + if (itemsObject == null) { throw new IllegalArgumentException("Attribute 'items' is required and must be a Collection, an Array or a Map"); } @@ -241,10 +241,10 @@ public abstract class AbstractMultiCheckedElementTag extends AbstractCheckedElem Object renderValue; if (valueProperty != null) { renderValue = wrapper.getPropertyValue(valueProperty); - } + } else if (item instanceof Enum) { renderValue = ((Enum) item).name(); - } + } else { renderValue = item; } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ButtonTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ButtonTag.java index e96b1eecba7..22a3971cb9f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ButtonTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/ButtonTag.java @@ -21,7 +21,7 @@ import javax.servlet.jsp.JspException; import org.springframework.web.servlet.support.RequestDataValueProcessor; /** - * An HTML button tag. This tag is provided for completeness if the application + * An HTML button tag. This tag is provided for completeness if the application * relies on a {@link RequestDataValueProcessor}. * * @author Rossen Stoyanchev @@ -38,7 +38,7 @@ public class ButtonTag extends AbstractHtmlElementTag { private TagWriter tagWriter; private String name; - + private String value; private String disabled; @@ -63,21 +63,21 @@ public class ButtonTag extends AbstractHtmlElementTag { public String getValue() { return this.value; } - + /** * Set the value of the 'value' attribute. */ public void setValue(String value) { this.value = value; } - + /** * Get the value of the 'disabled' attribute. */ public String getDisabled() { return this.disabled; } - + /** * Set the value of the 'disabled' attribute. * May be a runtime expression. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/HiddenInputTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/HiddenInputTag.java index 1afec35d8a7..70ccd7d3473 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/HiddenInputTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/HiddenInputTag.java @@ -48,7 +48,7 @@ public class HiddenInputTag extends AbstractHtmlElementTag { public String getDisabled() { return this.disabled; } - + /** * Set the value of the 'disabled' attribute. * May be a runtime expression. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/InputTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/InputTag.java index 258da68648e..0306aac6369 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/InputTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/InputTag.java @@ -21,7 +21,7 @@ import javax.servlet.jsp.JspException; /** * Data-binding-aware JSP tag for rendering an HTML 'input' * element with a 'type' of 'text'. - * + * * @author Rob Harrop * @author Juergen Hoeller * @author Rossen Stoyanchev @@ -172,7 +172,7 @@ public class InputTag extends AbstractHtmlInputElementTag { } /** - * Flags {@code type="checkbox"} and {@code type="radio"} as illegal + * Flags {@code type="checkbox"} and {@code type="radio"} as illegal * dynamic attributes. */ @Override @@ -184,7 +184,7 @@ public class InputTag extends AbstractHtmlInputElementTag { } return true; } - + /** * Get the value of the 'type' attribute. Subclasses * can override this to change the type of 'input' element diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/LabelTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/LabelTag.java index b2237cad903..2dcf87a747b 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/LabelTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/LabelTag.java @@ -62,7 +62,7 @@ public class LabelTag extends AbstractHtmlElementTag { /** * Set the value of the 'for' attribute. *

      Defaults to the value of {@link #getPath}; may be a runtime expression. - * @throws IllegalArgumentException if the supplied value is null + * @throws IllegalArgumentException if the supplied value is null */ public void setFor(String forId) { Assert.notNull(forId, "'forId' must not be null"); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionTag.java index 0fa3de81d97..57d2d75cef4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionTag.java @@ -26,9 +26,9 @@ import org.springframework.web.util.TagUtils; /** * JSP tag for rendering an HTML 'option' tag. - * + * *

      Must be used nested inside a {@link SelectTag}. - * + * *

      Provides full support for databinding by marking an * 'option' as 'selected' if the {@link #setValue value} * matches the value bound to the out {@link SelectTag}. @@ -67,7 +67,7 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag { * The name of the 'value' attribute. */ private static final String VALUE_ATTRIBUTE = VALUE_VARIABLE_NAME; - + /** * The name of the 'disabled' attribute. */ @@ -87,7 +87,7 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag { private Object oldValue; private Object oldDisplayValue; - + private String disabled; @@ -105,7 +105,7 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag { protected Object getValue() { return this.value; } - + /** * Set the value of the 'disabled' attribute. *

      May be a runtime expression. @@ -121,10 +121,10 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag { protected String getDisabled() { return this.disabled; } - + /** * Is the current HTML tag disabled? - * @return true if this tag is disabled + * @return true if this tag is disabled */ protected boolean isDisabled() throws JspException { return evaluateBoolean(DISABLED_ATTRIBUTE, getDisabled()); @@ -239,7 +239,7 @@ public class OptionTag extends AbstractHtmlElementBodyTag implements BodyTag { private void assertUnderSelectTag() { TagUtils.assertHasAncestorOfType(this, SelectTag.class, "option", "select"); } - + private SelectTag getSelectTag() { return (SelectTag) findAncestorWithClass(this, SelectTag.class); } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionWriter.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionWriter.java index 8fb4edbd5ce..cc1cb878c11 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionWriter.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionWriter.java @@ -47,7 +47,7 @@ import org.springframework.web.servlet.support.RequestContext; * the labelProperty). These properties are then used when * rendering each element of the array/{@link Collection} as an 'option'. * If either property name is omitted, the value of {@link Object#toString()} of - * the corresponding array/{@link Collection} element is used instead. However, + * the corresponding array/{@link Collection} element is used instead. However, * if the item is an enum, {@link Enum#name()} is used as the default value. *

      *

      Using a {@link Map}:

      @@ -228,7 +228,7 @@ class OptionWriter { String valueDisplayString = getDisplayString(value); String labelDisplayString = getDisplayString(label); - + valueDisplayString = processOptionValue(valueDisplayString); // allows render values to handle some strange browser compat issues. @@ -254,13 +254,13 @@ class OptionWriter { } /** - * Process the option value before it is written. - * The default implementation simply returns the same value unchanged. + * Process the option value before it is written. + * The default implementation simply returns the same value unchanged. */ protected String processOptionValue(String resolvedValue) { return resolvedValue; } - + /** * Determine whether the supplied values matched the selected value. * Delegates to {@link SelectedValueComparator#isSelected}. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionsTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionsTag.java index bf145a9c9ce..7c016a431c7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionsTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionsTag.java @@ -29,16 +29,16 @@ import org.springframework.web.util.TagUtils; * Convenient tag that allows one to supply a collection of objects * that are to be rendered as 'option' tags within a * 'select' tag. - * + * *

      Must be used within a {@link SelectTag 'select' tag}. - * + * * @author Rob Harrop * @author Juergen Hoeller * @author Scott Andrews * @since 2.0 */ public class OptionsTag extends AbstractHtmlElementTag { - + /** * The {@link java.util.Collection}, {@link java.util.Map} or array of * objects used to generate the inner 'option' tags. @@ -200,8 +200,8 @@ public class OptionsTag extends AbstractHtmlElementTag { * Inner class that adapts OptionWriter for multiple options to be rendered. */ private class OptionsWriter extends OptionWriter { - - private final String selectName; + + private final String selectName; public OptionsWriter(String selectName, Object optionSource, String valueProperty, String labelProperty) { super(optionSource, getBindStatus(), valueProperty, labelProperty, isHtmlEscape()); @@ -223,7 +223,7 @@ public class OptionsTag extends AbstractHtmlElementTag { protected String processOptionValue(String value) { return processFieldValue(this.selectName, value, "option"); } - + } } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/RadioButtonTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/RadioButtonTag.java index e2014ed7146..44c650ab10e 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/RadioButtonTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/RadioButtonTag.java @@ -27,7 +27,7 @@ import javax.servlet.jsp.JspException; * *

      A typical usage pattern will involved multiple tag instances bound * to the same property but with different values. - * + * * @author Rob Harrop * @author Juergen Hoeller * @since 2.0 diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectTag.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectTag.java index aab847886da..446e6dcba27 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectTag.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectTag.java @@ -312,5 +312,5 @@ public class SelectTag extends AbstractHtmlInputElementTag { this.tagWriter = null; this.pageContext.removeAttribute(LIST_VALUE_PAGE_ATTRIBUTE); } - + } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectedValueComparator.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectedValueComparator.java index 510c2f16a01..490a0f0a2c0 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectedValueComparator.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/SelectedValueComparator.java @@ -32,14 +32,14 @@ import org.springframework.web.servlet.support.BindStatus; * inequality, logical (String-representation-based) equality and {@link PropertyEditor}-based comparison. * *

      Full support is provided for comparing arrays, {@link Collection Collections} and {@link Map Maps}. - * + * *

      Equality Contract

      * For single-valued objects equality is first tested using standard {@link Object#equals Java equality}. As * such, user code should endeavour to implement {@link Object#equals} to speed up the comparison process. If * {@link Object#equals} returns false then an attempt is made at an * {@link #exhaustiveCompare exhaustive comparison} with the aim being to prove equality rather * than disprove it. - * + * *

      Special support is given for instances of {@link LabeledEnum} with a String-based * comparison of the candidate value against the code of the {@link LabeledEnum}. This can be useful when a * {@link LabeledEnum} is used to define a list of '<option>' elements in HTML. @@ -47,7 +47,7 @@ import org.springframework.web.servlet.support.BindStatus; *

      Next, an attempt is made to compare the String representations of both the candidate and bound * values. This may result in true in a number of cases due to the fact both values will be represented * as Strings when shown to the user. - * + * *

      Next, if the candidate value is a String, an attempt is made to compare the bound value to * result of applying the corresponding {@link PropertyEditor} to the candidate. This comparison may be * executed twice, once against the direct String instances, and then against the String diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java index 7ff5301bd53..c01fde5f516 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/CookieThemeResolver.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java index 5de95d1ab1f..b810a51f671 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/SessionThemeResolver.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/package-info.java index ffe608db914..a29b6a03043 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/theme/package-info.java @@ -4,17 +4,17 @@ * Theme support classes for Spring's web MVC framework. * Provides standard ThemeResolver implementations, * and a HandlerInterceptor for theme changes. - * + * *

      *

        - *
      • If you don't provide a bean of one of these classes as themeResolver, + *
      • If you don't provide a bean of one of these classes as themeResolver, * a FixedThemeResolver will be provided with the default theme name 'theme'.
      • - *
      • If you use a defined FixedThemeResolver, you will able to use another theme + *
      • If you use a defined FixedThemeResolver, you will able to use another theme * name for default, but the users will stick on this theme.
      • *
      • With a CookieThemeResolver or SessionThemeResolver, you can allow * the user to change his current theme.
      • *
      • Generally, you will put in the themes resource bundles the paths of CSS files, images and HTML constructs.
      • - *
      • For retrieving themes data, you can either use the spring:theme tag in JSP or access via the + *
      • For retrieving themes data, you can either use the spring:theme tag in JSP or access via the * RequestContext for other view technologies.
      • *
      • The pagedlist demo application uses themes
      • *
      diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractCachingViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractCachingViewResolver.java index 71706e80523..70498baa6a4 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractCachingViewResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/AbstractCachingViewResolver.java @@ -160,7 +160,7 @@ public abstract class AbstractCachingViewResolver extends WebApplicationObjectSu */ public void removeFromCache(String viewName, Locale locale) { if (!isCache()) { - logger.warn("View caching is SWITCHED OFF -- removal not necessary"); + logger.warn("View caching is SWITCHED OFF -- removal not necessary"); } else { Object cacheKey = getCacheKey(viewName, locale); @@ -173,7 +173,7 @@ public abstract class AbstractCachingViewResolver extends WebApplicationObjectSu if (logger.isDebugEnabled()) { logger.debug("No cached instance for view '" + cacheKey + "' was found"); } - } + } else { if (logger.isDebugEnabled()) { logger.debug("Cache for view " + cacheKey + " has been cleared"); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java index 14adcfa3ea8..673dc6db440 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/RedirectView.java @@ -54,13 +54,13 @@ import org.springframework.web.util.WebUtils; /** *

      View that redirects to an absolute, context relative, or current request - * relative URL. The URL may be a URI template in which case the URI template - * variables will be replaced with values available in the model. By default - * all primitive model attributes (or collections thereof) are exposed as HTTP - * query parameters (assuming they've not been used as URI template variables), - * but this behavior can be changed by overriding the + * relative URL. The URL may be a URI template in which case the URI template + * variables will be replaced with values available in the model. By default + * all primitive model attributes (or collections thereof) are exposed as HTTP + * query parameters (assuming they've not been used as URI template variables), + * but this behavior can be changed by overriding the * {@link #isEligibleProperty(String, Object)} method. - * + * *

      A URL for this view is supposed to be a HTTP redirect URL, i.e. * suitable for HttpServletResponse's sendRedirect method, which * is what actually does the redirect if the HTTP 1.0 flag is on, or via sending @@ -262,7 +262,7 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView { String targetUrl = createTargetUrl(model, request); targetUrl = updateTargetUrl(targetUrl, model, request, response); - + FlashMap flashMap = RequestContextUtils.getOutputFlashMap(request); if (!CollectionUtils.isEmpty(flashMap)) { UriComponents uriComponents = UriComponentsBuilder.fromUriString(targetUrl).build(); @@ -277,13 +277,13 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView { } /** - * Creates the target URL by checking if the redirect string is a URI template first, - * expanding it with the given model, and then optionally appending simple type model + * Creates the target URL by checking if the redirect string is a URI template first, + * expanding it with the given model, and then optionally appending simple type model * attributes as query String parameters. */ protected final String createTargetUrl(Map model, HttpServletRequest request) throws UnsupportedEncodingException { - + // Prepare target URL. StringBuilder targetUrl = new StringBuilder(); if (this.contextRelative && getUrl().startsWith("/")) { @@ -304,7 +304,7 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView { Map variables = getCurrentRequestUriVariables(request); targetUrl = replaceUriTemplateVariables(targetUrl.toString(), model, variables, enc); } - + if (this.exposeModelAttributes) { appendQueryProperties(targetUrl, model, enc); } @@ -313,9 +313,9 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView { } /** - * Replace URI template variables in the target URL with encoded model + * Replace URI template variables in the target URL with encoded model * attributes or URI variables from the current request. Model attributes - * referenced in the URL are removed from the model. + * referenced in the URL are removed from the model. * @param targetUrl the redirect URL * @param model Map that contains model attributes * @param currentUriVariables current request URI variables to use @@ -325,7 +325,7 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView { protected StringBuilder replaceUriTemplateVariables( String targetUrl, Map model, Map currentUriVariables, String encodingScheme) throws UnsupportedEncodingException { - + StringBuilder result = new StringBuilder(); Matcher m = URI_TEMPLATE_VARIABLE_PATTERN.matcher(targetUrl); int endLastMatch = 0; @@ -343,11 +343,11 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView { @SuppressWarnings("unchecked") private Map getCurrentRequestUriVariables(HttpServletRequest request) { - Map uriVars = + Map uriVars = (Map) request.getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE); return (uriVars != null) ? uriVars : Collections. emptyMap(); } - + /** * Append query properties to the redirect URL. * Stringifies, URL-encodes and formats model attributes as query properties. @@ -503,9 +503,9 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView { * it to update the redirect target URL. * @return the updated URL or the same as URL as the one passed in */ - protected String updateTargetUrl(String targetUrl, Map model, + protected String updateTargetUrl(String targetUrl, Map model, HttpServletRequest request, HttpServletResponse response) { - + RequestContext requestContext = null; if (getWebApplicationContext() != null) { requestContext = createRequestContext(request, response, model); @@ -523,10 +523,10 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView { targetUrl = processor.processUrl(request, targetUrl); } } - + return targetUrl; } - + /** * Send a redirect back to the HTTP client * @param request current HTTP request (allows for reacting to request method) @@ -540,7 +540,7 @@ public class RedirectView extends AbstractUrlBasedView implements SmartView { throws IOException { String encodedRedirectURL = response.encodeRedirectURL(targetUrl); - + if (http10Compatible) { if (this.statusCode != null) { response.setStatus(this.statusCode.value()); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java index 93959d2ded8..ff5315a4a3d 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/ResourceBundleViewResolver.java @@ -36,10 +36,10 @@ import org.springframework.web.context.support.GenericWebApplicationContext; import org.springframework.web.servlet.View; /** - * {@link org.springframework.web.servlet.ViewResolver} implementation + * {@link org.springframework.web.servlet.ViewResolver} implementation * that uses bean definitions in a {@link ResourceBundle}, specified by * the bundle basename. - * + * *

      The bundle is typically defined in a properties file, located in * the class path. The default bundle basename is "views". * diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/UrlBasedViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/UrlBasedViewResolver.java index b9a6b6bf119..e150e4e3a76 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/UrlBasedViewResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/UrlBasedViewResolver.java @@ -341,13 +341,13 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements /** * Whether views resolved by this resolver should add path variables the model or not. * The default setting is to allow each View decide (see {@link AbstractView#setExposePathVariables(boolean)}. - * However, you can use this property to override that. + * However, you can use this property to override that. * @param exposePathVariables *

        *
      • {@code true} - all Views resolved by this resolver will expose path variables *
      • {@code false} - no Views resolved by this resolver will expose path variables - *
      • {@code null} - individual Views can decide for themselves (this is used by the default) - *
          + *
        • {@code null} - individual Views can decide for themselves (this is used by the default) + *
            * @see AbstractView#setExposePathVariables(boolean) */ public void setExposePathVariables(Boolean exposePathVariables) { diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractJExcelView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractJExcelView.java index 2a920bc6349..0050f40313c 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractJExcelView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractJExcelView.java @@ -33,7 +33,7 @@ import org.springframework.web.servlet.view.AbstractView; /** * Convenient superclass for Excel document views. - * + * *

            This class uses the JExcelAPI instead of POI. More * information on JExcelAPI can be found on their website. @@ -43,19 +43,19 @@ import org.springframework.web.servlet.view.AbstractView; *

          • url (optional): The url of an existing Excel document to pick as a * starting point. It is done without localization part nor the .xls extension. *
          - * + * *

          The file will be searched with locations in the following order: *

            *
          • [url]_[language]_[country].xls *
          • [url]_[language].xls *
          • [url].xls *
          - * + * *

          For working with the workbook in the subclass, see Java Excel API site - * + * *

          As an example, you can try this snippet: - * + * *

            * protected void buildExcelDocument(
            *      Map<String, Object> model, WritableWorkbook workbook,
          @@ -64,15 +64,15 @@ import org.springframework.web.servlet.view.AbstractView;
            * 	 if (workbook.getNumberOfSheets() == 0) {
            * 	     workbook.createSheet("Spring", 0);
            *   }
          - * 
          + *
            * 	 WritableSheet sheet = workbook.getSheet("Spring");
            * 	 Label label = new Label(0, 0, "This is a nice label");
            * 	 sheet.addCell(label);
            * }
          - * + * * The use of this view is close to the AbstractExcelView class, * just using the JExcel API instead of the Apache POI API. - * + * * @author Bram Smeets * @author Alef Arendsen * @author Juergen Hoeller @@ -120,7 +120,7 @@ public abstract class AbstractJExcelView extends AbstractView { @Override protected final void renderMergedOutputModel( Map model, HttpServletRequest request, HttpServletResponse response) throws Exception { - + // Set the content type and get the output stream. response.setContentType(getContentType()); OutputStream out = response.getOutputStream(); @@ -129,7 +129,7 @@ public abstract class AbstractJExcelView extends AbstractView { if (this.url != null) { Workbook template = getTemplateSource(this.url, request); workbook = Workbook.createWorkbook(out, template); - } + } else { logger.debug("Creating Excel Workbook from scratch"); workbook = Workbook.createWorkbook(out); diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfView.java index 1f4fd24a9bd..30416bdc0e7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/document/AbstractPdfView.java @@ -28,7 +28,7 @@ import com.lowagie.text.PageSize; import com.lowagie.text.pdf.PdfWriter; import org.springframework.web.servlet.view.AbstractView; - + /** * Abstract superclass for PDF views, using Bruno Lowagie's * iText package. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsViewResolver.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsViewResolver.java index c24fc71cf1d..7fc3a86d3e7 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsViewResolver.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/jasperreports/JasperReportsViewResolver.java @@ -28,7 +28,7 @@ import org.springframework.web.servlet.view.UrlBasedViewResolver; * {@link org.springframework.web.servlet.ViewResolver} implementation that * resolves instances of {@link AbstractJasperReportsView} by translating * the supplied view name into the URL of the report file. - * + * * @author Rob Harrop * @since 1.2.6 */ diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/package-info.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/package-info.java index d71ad9134f8..c6250f65dfd 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/package-info.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/package-info.java @@ -3,7 +3,7 @@ * * Provides standard View and ViewResolver implementations, * including abstract base classes for custom implementations. - * + * *

          Application developers don't usually need to implement views, * as the framework provides standard views for JSPs, Velocity, * XSLT, etc. However, the ability to implement custom views easily diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfig.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfig.java index dd767b5a4a0..f8b7c475921 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfig.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/VelocityConfig.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,7 +28,7 @@ import org.apache.velocity.app.VelocityEngine; * @see VelocityView */ public interface VelocityConfig { - + /** * Return the VelocityEngine for the current web application context. * May be unique to one servlet, or shared in the root context. diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/AbstractXsltView.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/AbstractXsltView.java index f1937dea7fc..5d23e339595 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/AbstractXsltView.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/view/xslt/AbstractXsltView.java @@ -51,7 +51,7 @@ import org.springframework.web.util.NestedServletException; /** * Convenient superclass for views rendered using an XSLT stylesheet. - * + * *

          Subclasses typically must provide the {@link Source} to transform * by overriding {@link #createXsltSource}. Subclasses do not need to * concern themselves with XSLT other than providing a valid stylesheet location. @@ -67,7 +67,7 @@ import org.springframework.web.util.NestedServletException; * the {@link ErrorListener} implementation instance for custom handling of warnings and errors during TransformerFactory operations *

        • {@link #setIndent(boolean) indent} (optional): whether additional whitespace * may be added when outputting the result; defaults to true - *
        • {@link #setCache(boolean) cache} (optional): are templates to be cached; debug setting only; defaults to true + *
        • {@link #setCache(boolean) cache} (optional): are templates to be cached; debug setting only; defaults to true *
        * *

        Note that setting {@link #setCache(boolean) "cache"} to false diff --git a/spring-webmvc/src/test/java/org/springframework/beans/INestedTestBean.java b/spring-webmvc/src/test/java/org/springframework/beans/INestedTestBean.java index 7d87547b5f7..c5c4ed5e679 100644 --- a/spring-webmvc/src/test/java/org/springframework/beans/INestedTestBean.java +++ b/spring-webmvc/src/test/java/org/springframework/beans/INestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/test/java/org/springframework/beans/IOther.java b/spring-webmvc/src/test/java/org/springframework/beans/IOther.java index 797486ec44e..6a8f74187cb 100644 --- a/spring-webmvc/src/test/java/org/springframework/beans/IOther.java +++ b/spring-webmvc/src/test/java/org/springframework/beans/IOther.java @@ -1,13 +1,13 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/test/java/org/springframework/beans/NestedTestBean.java b/spring-webmvc/src/test/java/org/springframework/beans/NestedTestBean.java index a06e15d150b..0eb8df5c8ae 100644 --- a/spring-webmvc/src/test/java/org/springframework/beans/NestedTestBean.java +++ b/spring-webmvc/src/test/java/org/springframework/beans/NestedTestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/test/java/org/springframework/beans/Person.java b/spring-webmvc/src/test/java/org/springframework/beans/Person.java index 3ebce5e2ea0..a78998ad5d4 100644 --- a/spring-webmvc/src/test/java/org/springframework/beans/Person.java +++ b/spring-webmvc/src/test/java/org/springframework/beans/Person.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/test/java/org/springframework/beans/SerializablePerson.java b/spring-webmvc/src/test/java/org/springframework/beans/SerializablePerson.java index 36351352aab..34d05120aaa 100644 --- a/spring-webmvc/src/test/java/org/springframework/beans/SerializablePerson.java +++ b/spring-webmvc/src/test/java/org/springframework/beans/SerializablePerson.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/test/java/org/springframework/beans/factory/MustBeInitialized.java b/spring-webmvc/src/test/java/org/springframework/beans/factory/MustBeInitialized.java index b85110e1cbc..4715fe448f6 100644 --- a/spring-webmvc/src/test/java/org/springframework/beans/factory/MustBeInitialized.java +++ b/spring-webmvc/src/test/java/org/springframework/beans/factory/MustBeInitialized.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/test/java/org/springframework/beans/factory/access/TestBean.java b/spring-webmvc/src/test/java/org/springframework/beans/factory/access/TestBean.java index eaf1d5ec0b0..3a77af2f711 100644 --- a/spring-webmvc/src/test/java/org/springframework/beans/factory/access/TestBean.java +++ b/spring-webmvc/src/test/java/org/springframework/beans/factory/access/TestBean.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,7 @@ import java.util.List; /** * Scrap bean for use in tests. - * + * * @author Colin Sampaleanu */ public class TestBean { diff --git a/spring-webmvc/src/test/java/org/springframework/context/ACATester.java b/spring-webmvc/src/test/java/org/springframework/context/ACATester.java index f77a7bda504..72c129ca4e3 100644 --- a/spring-webmvc/src/test/java/org/springframework/context/ACATester.java +++ b/spring-webmvc/src/test/java/org/springframework/context/ACATester.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -24,7 +24,7 @@ import org.springframework.context.ApplicationContextException; import org.springframework.context.NoSuchMessageException; public class ACATester implements ApplicationContextAware { - + private ApplicationContext ac; public void setApplicationContext(ApplicationContext ctx) throws ApplicationContextException { diff --git a/spring-webmvc/src/test/java/org/springframework/context/LifecycleContextBean.java b/spring-webmvc/src/test/java/org/springframework/context/LifecycleContextBean.java index d8be8ec9667..50c9936c444 100644 --- a/spring-webmvc/src/test/java/org/springframework/context/LifecycleContextBean.java +++ b/spring-webmvc/src/test/java/org/springframework/context/LifecycleContextBean.java @@ -7,12 +7,12 @@ import org.springframework.beans.factory.LifecycleBean; /** * Simple bean to test ApplicationContext lifecycle methods for beans - * + * * @author Colin Sampaleanu * @since 03.07.2004 */ public class LifecycleContextBean extends LifecycleBean implements ApplicationContextAware { - + protected ApplicationContext owningContext; public void setBeanFactory(BeanFactory beanFactory) { @@ -20,18 +20,18 @@ public class LifecycleContextBean extends LifecycleBean implements ApplicationCo if (this.owningContext != null) throw new RuntimeException("Factory called setBeanFactory after setApplicationContext"); } - + public void afterPropertiesSet() { super.afterPropertiesSet(); if (this.owningContext == null) throw new RuntimeException("Factory didn't call setAppliationContext before afterPropertiesSet on lifecycle bean"); } - + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { if (this.owningFactory == null) throw new RuntimeException("Factory called setApplicationContext before setBeanFactory"); - + this.owningContext = applicationContext; } - + } diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java index 509861a6800..cca608e9f19 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -95,7 +95,7 @@ public class XmlWebApplicationContextTests extends AbstractApplicationContextTes listener.zeroCounter(); TestListener parentListener = (TestListener) this.applicationContext.getParent().getBean("parentListener"); parentListener.zeroCounter(); - + parentListener.zeroCounter(); assertTrue("0 events before publication", listener.getEventCount() == 0); assertTrue("0 parent events before publication", parentListener.getEventCount() == 0); diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/support/WebApplicationObjectSupportTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/support/WebApplicationObjectSupportTests.java index 892a546e9a6..391f464d035 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/support/WebApplicationObjectSupportTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/support/WebApplicationObjectSupportTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/FlashMapTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/FlashMapTests.java index 6583b5d5c07..dba96246098 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/FlashMapTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/FlashMapTests.java @@ -26,7 +26,7 @@ import org.springframework.util.MultiValueMap; /** * Test fixture for {@link FlashMap} tests. - * + * * @author Rossen Stoyanchev */ public class FlashMapTests { @@ -78,7 +78,7 @@ public class FlashMapTests { flashMap.addTargetRequestParam("text", "abc"); flashMap.addTargetRequestParam("empty", " "); flashMap.addTargetRequestParam("null", null); - + assertEquals(1, flashMap.getTargetRequestParams().size()); assertEquals("abc", flashMap.getTargetRequestParams().getFirst("text")); } @@ -89,10 +89,10 @@ public class FlashMapTests { params.add("key", "abc"); params.add("key", " "); params.add("key", null); - + FlashMap flashMap = new FlashMap(); flashMap.addTargetRequestParams(params); - + assertEquals(1, flashMap.getTargetRequestParams().size()); assertEquals(1, flashMap.getTargetRequestParams().get("key").size()); assertEquals("abc", flashMap.getTargetRequestParams().getFirst("key")); @@ -103,7 +103,7 @@ public class FlashMapTests { FlashMap flashMap = new FlashMap(); flashMap.addTargetRequestParam(" ", "abc"); flashMap.addTargetRequestParam(null, "abc"); - + assertTrue(flashMap.getTargetRequestParams().isEmpty()); } @@ -112,11 +112,11 @@ public class FlashMapTests { MultiValueMap params = new LinkedMultiValueMap(); params.add(" ", "abc"); params.add(null, " "); - + FlashMap flashMap = new FlashMap(); flashMap.addTargetRequestParams(params); - + assertTrue(flashMap.getTargetRequestParams().isEmpty()); } - + } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/SimpleWebApplicationContext.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/SimpleWebApplicationContext.java index 36824364d0f..70c40be9fd1 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/SimpleWebApplicationContext.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/SimpleWebApplicationContext.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParserTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParserTests.java index 0e08da83bde..e1c8898604f 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParserTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParserTests.java @@ -143,7 +143,7 @@ public class AnnotationDrivenBeanDefinitionParserTests { assertTrue(converters.get(0) instanceof StringHttpMessageConverter); assertTrue(converters.get(1) instanceof ResourceHttpMessageConverter); } - + } class TestWebArgumentResolver implements WebArgumentResolver { @@ -176,7 +176,7 @@ class TestHandlerMethodReturnValueHandler implements HandlerMethodReturnValueHan MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception { } - + } class TestMessageCodesResolver implements MessageCodesResolver { diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistryTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistryTests.java index 54c2e0bc0cb..816cdc82225 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistryTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistryTests.java @@ -37,7 +37,7 @@ import org.springframework.web.servlet.resource.ResourceHttpRequestHandler; public class ResourceHandlerRegistryTests { private ResourceHandlerRegistry registry; - + private ResourceHandlerRegistration registration; private MockHttpServletResponse response; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistryTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistryTests.java index b6e3ad28385..888cdfe9b28 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistryTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/ViewControllerRegistryTests.java @@ -63,7 +63,7 @@ public class ViewControllerRegistryTests { assertNotNull(controller); assertEquals("viewName", controller.getViewName()); } - + @Test public void order() { registry.addViewController("/path"); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/BeanNameUrlHandlerMappingTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/BeanNameUrlHandlerMappingTests.java index 18ec7f90685..6e018218fd7 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/BeanNameUrlHandlerMappingTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/handler/BeanNameUrlHandlerMappingTests.java @@ -35,7 +35,7 @@ import org.springframework.web.servlet.HandlerMapping; public class BeanNameUrlHandlerMappingTests extends TestCase { public static final String CONF = "/org/springframework/web/servlet/handler/map1.xml"; - + private ConfigurableWebApplicationContext wac; public void setUp() throws Exception { @@ -82,7 +82,7 @@ public class BeanNameUrlHandlerMappingTests extends TestCase { req.setContextPath("/myapp"); hec = hm.getHandler(req); assertTrue("Handler is correct bean", hec != null && hec.getHandler() == bean); - + req = new MockHttpServletRequest("GET", "/myapp/mypath/welcome.html"); req.setContextPath("/myapp"); req.setServletPath("/mypath/welcome.html"); @@ -109,7 +109,7 @@ public class BeanNameUrlHandlerMappingTests extends TestCase { hec = hm.getHandler(req); assertTrue("Handler is correct bean", hec != null && hec.getHandler() == bean); } - + public void testRequestsWithFullPaths() throws Exception { BeanNameUrlHandlerMapping hm = new BeanNameUrlHandlerMapping(); hm.setAlwaysUseFullPath(true); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/i18n/LocaleResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/i18n/LocaleResolverTests.java index b109bc81ad9..bb6fd2b5da7 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/i18n/LocaleResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/i18n/LocaleResolverTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/CommandControllerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/CommandControllerTests.java index ff5ecdeb49f..26b73b097fd 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/CommandControllerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/CommandControllerTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2012 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -78,7 +78,7 @@ public class CommandControllerTests extends TestCase { assertTrue("command name bound ok", person.getName().equals(name)); assertTrue("command age bound ok", person.getAge() == age); } - + public void test2Args1Mismatch() throws Exception { TestController mc = new TestController(); MockHttpServletRequest request = new MockHttpServletRequest("GET", "/ok.html"); @@ -492,11 +492,11 @@ public class CommandControllerTests extends TestCase { private static class TestController extends AbstractCommandController { - + private TestController() { super(TestBean.class, "person"); } - + protected ModelAndView handle(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) { Map m = new HashMap(); assertTrue("Command not null", command != null); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/ParameterizableViewControllerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/ParameterizableViewControllerTests.java index 9a8c94a6510..6afd4b9b7ba 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/ParameterizableViewControllerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/ParameterizableViewControllerTests.java @@ -39,7 +39,7 @@ public class ParameterizableViewControllerTests { private ParameterizableViewController controller; private MockHttpServletRequest request; - + @Before public void setup() { this.controller = new ParameterizableViewController(); @@ -54,7 +54,7 @@ public class ParameterizableViewControllerTests { assertEquals(viewName, mav.getViewName()); assertTrue(mav.getModel().isEmpty()); } - + @Test public void handleRequestWithoutViewName() throws Exception { ModelAndView mav = this.controller.handleRequest(this.request, new MockHttpServletResponse()); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/WebContentInterceptorTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/WebContentInterceptorTests.java index 095276a6e79..73528894df1 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/WebContentInterceptorTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/WebContentInterceptorTests.java @@ -76,7 +76,7 @@ public class WebContentInterceptorTests { WebContentInterceptor interceptor = new WebContentInterceptor(); interceptor.setCacheSeconds(10); interceptor.setCacheMappings(mappings); - + request.setRequestURI("http://localhost:7070/example/adminhandle.vm"); interceptor.preHandle(request, response, null); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationControllerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationControllerTests.java index 236bd3666f3..6ca97221662 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationControllerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationControllerTests.java @@ -285,7 +285,7 @@ public class ServletAnnotationControllerTests { } }; servlet.init(new MockServletConfig()); - + MockHttpServletRequest request = new MockHttpServletRequest("GET", "/myApp/myPath.do"); request.setContextPath("/myApp"); MockHttpServletResponse response = new MockHttpServletResponse(); @@ -1705,7 +1705,7 @@ public class ServletAnnotationControllerTests { assertEquals("handle", response.getContentAsString()); } - + @Test public void trailingSlash() throws Exception { initServlet(TrailingSlashController.class); @@ -2824,7 +2824,7 @@ public class ServletAnnotationControllerTests { @XmlRootElement public static class A { - + } @XmlRootElement @@ -3144,7 +3144,7 @@ public class ServletAnnotationControllerTests { public void root(Writer writer) throws IOException { writer.write("root"); } - + @RequestMapping(value = "/{templatePath}/", method = RequestMethod.GET) public void templatePath(Writer writer) throws IOException { writer.write("templatePath"); @@ -3256,10 +3256,10 @@ public class ServletAnnotationControllerTests { writer.write("handle2"); } } - + @Controller static class HeadersConditionController { - + @RequestMapping(value = "/", method = RequestMethod.GET) public String home() { return "home"; @@ -3279,5 +3279,5 @@ public class ServletAnnotationControllerTests { public void handle(RedirectAttributes redirectAttrs) { } } - + } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationMappingUtilsTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationMappingUtilsTests.java index 9da4b087d34..9bff0224218 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationMappingUtilsTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationMappingUtilsTests.java @@ -68,7 +68,7 @@ public class ServletAnnotationMappingUtilsTests { boolean result = ServletAnnotationMappingUtils.checkParameters(params, request); assertTrue("Invalid request method result", result); } - + @Test public void checkParametersKeyValueNoMatch() { MockHttpServletRequest request = new MockHttpServletRequest("GET", "/"); @@ -77,7 +77,7 @@ public class ServletAnnotationMappingUtilsTests { boolean result = ServletAnnotationMappingUtils.checkParameters(params, request); assertFalse("Invalid request method result", result); } - + @Test public void checkParametersNegatedValueMatch() { MockHttpServletRequest request = new MockHttpServletRequest("GET", "/"); @@ -86,7 +86,7 @@ public class ServletAnnotationMappingUtilsTests { boolean result = ServletAnnotationMappingUtils.checkParameters(params, request); assertTrue("Invalid request method result", result); } - + @Test public void checkParametersNegatedValueNoMatch() { MockHttpServletRequest request = new MockHttpServletRequest("GET", "/"); @@ -143,8 +143,8 @@ public class ServletAnnotationMappingUtilsTests { assertFalse("Invalid request method result", result); } - // SPR-8862 - + // SPR-8862 + @Test public void checkHeadersKeyValueNoMatchWithNegation() { MockHttpServletRequest request = new MockHttpServletRequest("GET", "/"); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7766Tests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7766Tests.java index 8abb0b2a72c..b88c10fa9f7 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7766Tests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7766Tests.java @@ -44,7 +44,7 @@ public class Spr7766Tests { MockHttpServletResponse response = new MockHttpServletResponse(); adapter.handle(request, response, controller); } - + public class ColorConverter implements Converter { public Color convert(String source) { if (!source.startsWith("#")) source = "#" + source; return Color.decode(source); } } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7839Tests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7839Tests.java index 54fec80ce94..e7aa5e97bc5 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7839Tests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/Spr7839Tests.java @@ -69,7 +69,7 @@ public class Spr7839Tests { request.addParameter("nested.list", "Nested1,Nested2"); adapter.handle(request, response, controller); } - + @Test public void listElement() throws Exception { request.setRequestURI("/nested/listElement"); @@ -124,14 +124,14 @@ public class Spr7839Tests { @Test public void map() throws Exception { - request.setRequestURI("/nested/map"); + request.setRequestURI("/nested/map"); request.addParameter("nested.map['apple'].foo", "bar"); adapter.handle(request, response, controller); } @Test public void mapOfLists() throws Exception { - request.setRequestURI("/nested/mapOfLists"); + request.setRequestURI("/nested/mapOfLists"); request.addParameter("nested.mapOfLists['apples'][0]", "1"); adapter.handle(request, response, controller); } @@ -173,14 +173,14 @@ public class Spr7839Tests { public void handlerMap(JavaBean bean) { assertEquals("bar", bean.nested.map.get("apple").foo); } - + @RequestMapping("/nested/mapOfLists") public void handlerMapOfLists(JavaBean bean) { assertEquals(new Integer(1), bean.nested.mapOfLists.get("apples").get(0)); } } - + public static class JavaBean { private NestedBean nested; @@ -193,7 +193,7 @@ public class Spr7839Tests { this.nested = nested; } - + } public static class NestedBean { @@ -209,15 +209,15 @@ public class Spr7839Tests { private Map map; private Map> mapOfLists; - + public NestedBean() { - + } - + public NestedBean(String foo) { this.foo = foo; } - + public String getFoo() { return foo; } @@ -265,7 +265,7 @@ public class Spr7839Tests { public void setMapOfLists(Map> mapOfLists) { this.mapOfLists = mapOfLists; } - + } - + } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/HeadersRequestConditionTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/HeadersRequestConditionTests.java index 10586067da9..0d8642b9c5d 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/HeadersRequestConditionTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/condition/HeadersRequestConditionTests.java @@ -134,7 +134,7 @@ public class HeadersRequestConditionTests { assertTrue("Invalid comparison result: " + result, result > 0); } - + @Test public void combine() { HeadersRequestCondition condition1 = new HeadersRequestCondition("foo=bar"); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoTests.java index d9c881dc9ea..ea7e21b24f1 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoTests.java @@ -48,7 +48,7 @@ public class RequestMappingInfoTests { @Test public void createEmpty() { RequestMappingInfo info = new RequestMappingInfo(null, null, null, null, null, null, null); - + assertEquals(0, info.getPatternsCondition().getPatterns().size()); assertEquals(0, info.getMethodsCondition().getMethods().size()); assertEquals(true, info.getConsumesCondition().isEmpty()); @@ -57,7 +57,7 @@ public class RequestMappingInfoTests { assertNotNull(info.getHeadersCondition()); assertNull(info.getCustomCondition()); } - + @Test public void matchPatternsCondition() { MockHttpServletRequest request = new MockHttpServletRequest("GET", "/foo"); @@ -66,14 +66,14 @@ public class RequestMappingInfoTests { new PatternsRequestCondition("/foo*", "/bar"), null, null, null, null, null, null); RequestMappingInfo expected = new RequestMappingInfo( new PatternsRequestCondition("/foo*"), null, null, null, null, null, null); - + assertEquals(expected, info.getMatchingCondition(request)); info = new RequestMappingInfo( new PatternsRequestCondition("/**", "/foo*", "/foo"), null, null, null, null, null, null); expected = new RequestMappingInfo( new PatternsRequestCondition("/foo", "/foo*", "/**"), null, null, null, null, null, null); - + assertEquals(expected, info.getMatchingCondition(request)); } @@ -84,14 +84,14 @@ public class RequestMappingInfoTests { RequestMappingInfo info = new RequestMappingInfo( - new PatternsRequestCondition("/foo"), null, + new PatternsRequestCondition("/foo"), null, new ParamsRequestCondition("foo=bar"), null, null, null, null); RequestMappingInfo match = info.getMatchingCondition(request); assertNotNull(match); info = new RequestMappingInfo( - new PatternsRequestCondition("/foo"), null, + new PatternsRequestCondition("/foo"), null, new ParamsRequestCondition("foo!=bar"), null, null, null, null); match = info.getMatchingCondition(request); @@ -105,14 +105,14 @@ public class RequestMappingInfoTests { RequestMappingInfo info = new RequestMappingInfo( - new PatternsRequestCondition("/foo"), null, null, + new PatternsRequestCondition("/foo"), null, null, new HeadersRequestCondition("foo=bar"), null, null, null); RequestMappingInfo match = info.getMatchingCondition(request); assertNotNull(match); info = new RequestMappingInfo( - new PatternsRequestCondition("/foo"), null, null, + new PatternsRequestCondition("/foo"), null, null, new HeadersRequestCondition("foo!=bar"), null, null, null); match = info.getMatchingCondition(request); @@ -124,7 +124,7 @@ public class RequestMappingInfoTests { MockHttpServletRequest request = new MockHttpServletRequest("GET", "/foo"); request.setContentType("text/plain"); - RequestMappingInfo info = + RequestMappingInfo info = new RequestMappingInfo( new PatternsRequestCondition("/foo"), null, null, null, new ConsumesRequestCondition("text/plain"), null, null); @@ -145,9 +145,9 @@ public class RequestMappingInfoTests { MockHttpServletRequest request = new MockHttpServletRequest("GET", "/foo"); request.addHeader("Accept", "text/plain"); - RequestMappingInfo info = + RequestMappingInfo info = new RequestMappingInfo( - new PatternsRequestCondition("/foo"), null, null, null, null, + new PatternsRequestCondition("/foo"), null, null, null, null, new ProducesRequestCondition("text/plain"), null); RequestMappingInfo match = info.getMatchingCondition(request); @@ -168,38 +168,38 @@ public class RequestMappingInfoTests { RequestMappingInfo info = new RequestMappingInfo( - new PatternsRequestCondition("/foo"), null, null, null, null, null, + new PatternsRequestCondition("/foo"), null, null, null, null, null, new ParamsRequestCondition("foo=bar")); RequestMappingInfo match = info.getMatchingCondition(request); assertNotNull(match); info = new RequestMappingInfo( - new PatternsRequestCondition("/foo"), null, - new ParamsRequestCondition("foo!=bar"), null, null, null, + new PatternsRequestCondition("/foo"), null, + new ParamsRequestCondition("foo!=bar"), null, null, null, new ParamsRequestCondition("foo!=bar")); match = info.getMatchingCondition(request); assertNull(match); - } - + } + @Test public void compareTwoHttpMethodsOneParam() { RequestMappingInfo none = new RequestMappingInfo(null, null, null, null, null, null, null); - RequestMappingInfo oneMethod = - new RequestMappingInfo(null, + RequestMappingInfo oneMethod = + new RequestMappingInfo(null, new RequestMethodsRequestCondition(RequestMethod.GET), null, null, null, null, null); RequestMappingInfo oneMethodOneParam = - new RequestMappingInfo(null, - new RequestMethodsRequestCondition(RequestMethod.GET), + new RequestMappingInfo(null, + new RequestMethodsRequestCondition(RequestMethod.GET), new ParamsRequestCondition("foo"), null, null, null, null); - + Comparator comparator = new Comparator() { public int compare(RequestMappingInfo info, RequestMappingInfo otherInfo) { return info.compareTo(otherInfo, new MockHttpServletRequest()); } }; - + List list = asList(none, oneMethod, oneMethodOneParam); Collections.shuffle(list); Collections.sort(list, comparator); @@ -211,22 +211,22 @@ public class RequestMappingInfoTests { @Test public void equals() { - + RequestMappingInfo info1 = new RequestMappingInfo( - new PatternsRequestCondition("/foo"), - new RequestMethodsRequestCondition(RequestMethod.GET), - new ParamsRequestCondition("foo=bar"), + new PatternsRequestCondition("/foo"), + new RequestMethodsRequestCondition(RequestMethod.GET), + new ParamsRequestCondition("foo=bar"), new HeadersRequestCondition("foo=bar"), - new ConsumesRequestCondition("text/plain"), + new ConsumesRequestCondition("text/plain"), new ProducesRequestCondition("text/plain"), new ParamsRequestCondition("customFoo=customBar")); RequestMappingInfo info2 = new RequestMappingInfo( - new PatternsRequestCondition("/foo"), - new RequestMethodsRequestCondition(RequestMethod.GET), - new ParamsRequestCondition("foo=bar"), + new PatternsRequestCondition("/foo"), + new RequestMethodsRequestCondition(RequestMethod.GET), + new ParamsRequestCondition("foo=bar"), new HeadersRequestCondition("foo=bar"), - new ConsumesRequestCondition("text/plain"), + new ConsumesRequestCondition("text/plain"), new ProducesRequestCondition("text/plain"), new ParamsRequestCondition("customFoo=customBar")); @@ -234,86 +234,86 @@ public class RequestMappingInfoTests { assertEquals(info1.hashCode(), info2.hashCode()); info2 = new RequestMappingInfo( - new PatternsRequestCondition("/foo", "/NOOOOOO"), - new RequestMethodsRequestCondition(RequestMethod.GET), - new ParamsRequestCondition("foo=bar"), + new PatternsRequestCondition("/foo", "/NOOOOOO"), + new RequestMethodsRequestCondition(RequestMethod.GET), + new ParamsRequestCondition("foo=bar"), new HeadersRequestCondition("foo=bar"), - new ConsumesRequestCondition("text/plain"), + new ConsumesRequestCondition("text/plain"), new ProducesRequestCondition("text/plain"), new ParamsRequestCondition("customFoo=customBar")); - + assertFalse(info1.equals(info2)); assertTrue(info1.hashCode() != info2.hashCode()); info2 = new RequestMappingInfo( new PatternsRequestCondition("/foo"), - new RequestMethodsRequestCondition(RequestMethod.GET, RequestMethod.POST), - new ParamsRequestCondition("foo=bar"), + new RequestMethodsRequestCondition(RequestMethod.GET, RequestMethod.POST), + new ParamsRequestCondition("foo=bar"), new HeadersRequestCondition("foo=bar"), - new ConsumesRequestCondition("text/plain"), + new ConsumesRequestCondition("text/plain"), new ProducesRequestCondition("text/plain"), new ParamsRequestCondition("customFoo=customBar")); - + assertFalse(info1.equals(info2)); assertTrue(info1.hashCode() != info2.hashCode()); info2 = new RequestMappingInfo( - new PatternsRequestCondition("/foo"), - new RequestMethodsRequestCondition(RequestMethod.GET), - new ParamsRequestCondition("/NOOOOOO"), + new PatternsRequestCondition("/foo"), + new RequestMethodsRequestCondition(RequestMethod.GET), + new ParamsRequestCondition("/NOOOOOO"), new HeadersRequestCondition("foo=bar"), - new ConsumesRequestCondition("text/plain"), + new ConsumesRequestCondition("text/plain"), new ProducesRequestCondition("text/plain"), new ParamsRequestCondition("customFoo=customBar")); - + assertFalse(info1.equals(info2)); assertTrue(info1.hashCode() != info2.hashCode()); info2 = new RequestMappingInfo( - new PatternsRequestCondition("/foo"), - new RequestMethodsRequestCondition(RequestMethod.GET), - new ParamsRequestCondition("foo=bar"), + new PatternsRequestCondition("/foo"), + new RequestMethodsRequestCondition(RequestMethod.GET), + new ParamsRequestCondition("foo=bar"), new HeadersRequestCondition("/NOOOOOO"), - new ConsumesRequestCondition("text/plain"), + new ConsumesRequestCondition("text/plain"), new ProducesRequestCondition("text/plain"), new ParamsRequestCondition("customFoo=customBar")); - + assertFalse(info1.equals(info2)); assertTrue(info1.hashCode() != info2.hashCode()); - + info2 = new RequestMappingInfo( - new PatternsRequestCondition("/foo"), - new RequestMethodsRequestCondition(RequestMethod.GET), - new ParamsRequestCondition("foo=bar"), + new PatternsRequestCondition("/foo"), + new RequestMethodsRequestCondition(RequestMethod.GET), + new ParamsRequestCondition("foo=bar"), new HeadersRequestCondition("foo=bar"), - new ConsumesRequestCondition("text/NOOOOOO"), + new ConsumesRequestCondition("text/NOOOOOO"), new ProducesRequestCondition("text/plain"), new ParamsRequestCondition("customFoo=customBar")); - + assertFalse(info1.equals(info2)); assertTrue(info1.hashCode() != info2.hashCode()); info2 = new RequestMappingInfo( - new PatternsRequestCondition("/foo"), - new RequestMethodsRequestCondition(RequestMethod.GET), - new ParamsRequestCondition("foo=bar"), + new PatternsRequestCondition("/foo"), + new RequestMethodsRequestCondition(RequestMethod.GET), + new ParamsRequestCondition("foo=bar"), new HeadersRequestCondition("foo=bar"), - new ConsumesRequestCondition("text/plain"), + new ConsumesRequestCondition("text/plain"), new ProducesRequestCondition("text/NOOOOOO"), new ParamsRequestCondition("customFoo=customBar")); - + assertFalse(info1.equals(info2)); assertTrue(info1.hashCode() != info2.hashCode()); info2 = new RequestMappingInfo( - new PatternsRequestCondition("/foo"), - new RequestMethodsRequestCondition(RequestMethod.GET), - new ParamsRequestCondition("foo=bar"), + new PatternsRequestCondition("/foo"), + new RequestMethodsRequestCondition(RequestMethod.GET), + new ParamsRequestCondition("foo=bar"), new HeadersRequestCondition("foo=bar"), - new ConsumesRequestCondition("text/plain"), + new ConsumesRequestCondition("text/plain"), new ProducesRequestCondition("text/plain"), new ParamsRequestCondition("customFoo=NOOOOOO")); - + assertFalse(info1.equals(info2)); assertTrue(info1.hashCode() != info2.hashCode()); } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java index 4d4ac569286..1ff5a6303ee 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java @@ -41,7 +41,7 @@ import org.springframework.web.servlet.mvc.method.annotation.ModelAndViewResolve /** * Test fixture with {@link ModelAndViewResolverMethodReturnValueHandler}. - * + * * @author Rossen Stoyanchev */ public class ModelAndViewResolverMethodReturnValueHandlerTests { @@ -69,7 +69,7 @@ public class ModelAndViewResolverMethodReturnValueHandlerTests { TestBean testBean = new TestBean("name"); handler.handleReturnValue(testBean, returnType, mavContainer, request); - + assertEquals("viewName", mavContainer.getViewName()); assertSame(testBean, mavContainer.getModel().get("modelAttrName")); assertFalse(mavContainer.isRequestHandled()); @@ -86,12 +86,12 @@ public class ModelAndViewResolverMethodReturnValueHandlerTests { public void handleNull() throws Exception { MethodParameter returnType = new MethodParameter(getClass().getDeclaredMethod("testBeanReturnValue"), -1); handler.handleReturnValue(null, returnType, mavContainer, request); - + assertNull(mavContainer.getView()); assertNull(mavContainer.getViewName()); assertTrue(mavContainer.getModel().isEmpty()); } - + @Test(expected=UnsupportedOperationException.class) public void handleSimpleType() throws Exception { MethodParameter returnType = new MethodParameter(getClass().getDeclaredMethod("intReturnValue"), -1); @@ -102,7 +102,7 @@ public class ModelAndViewResolverMethodReturnValueHandlerTests { public void handleNonSimpleType() throws Exception{ MethodParameter returnType = new MethodParameter(getClass().getDeclaredMethod("testBeanReturnValue"), -1); handler.handleReturnValue(new TestBean(), returnType, mavContainer, request); - + assertTrue(mavContainer.containsAttribute("testBean")); } @@ -115,11 +115,11 @@ public class ModelAndViewResolverMethodReturnValueHandlerTests { private TestBean testBeanReturnValue() { return null; } - + private static class TestModelAndViewResolver implements ModelAndViewResolver { - + private Class returnValueType; - + public TestModelAndViewResolver(Class returnValueType) { this.returnValueType = returnValueType; } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMethodArgumentResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMethodArgumentResolverTests.java index 8c9cfaec552..4deb2412e71 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMethodArgumentResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/PathVariableMethodArgumentResolverTests.java @@ -41,21 +41,21 @@ import org.springframework.web.servlet.mvc.method.annotation.PathVariableMethodA /** * Test fixture with {@link PathVariableMethodArgumentResolver}. - * + * * @author Rossen Stoyanchev */ public class PathVariableMethodArgumentResolverTests { private PathVariableMethodArgumentResolver resolver; - + private MethodParameter paramNamedString; private MethodParameter paramString; private ModelAndViewContainer mavContainer; - + private ServletWebRequest webRequest; - + private MockHttpServletRequest request; @Before @@ -70,7 +70,7 @@ public class PathVariableMethodArgumentResolverTests { request = new MockHttpServletRequest(); webRequest = new ServletWebRequest(request, new MockHttpServletResponse()); } - + @Test public void supportsParameter() { assertTrue("Parameter with @PathVariable annotation", resolver.supportsParameter(paramNamedString)); @@ -85,14 +85,14 @@ public class PathVariableMethodArgumentResolverTests { String result = (String) resolver.resolveArgument(paramNamedString, mavContainer, webRequest, null); assertEquals("PathVariable not resolved correctly", "value", result); - + @SuppressWarnings("unchecked") Map pathVars = (Map) request.getAttribute(View.PATH_VARIABLES); assertNotNull(pathVars); assertEquals(1, pathVars.size()); assertEquals("value", pathVars.get("name")); } - + @SuppressWarnings("unchecked") @Test public void resolveArgumentWithExistingPathVars() throws Exception { @@ -106,20 +106,20 @@ public class PathVariableMethodArgumentResolverTests { String result = (String) resolver.resolveArgument(paramNamedString, mavContainer, webRequest, null); assertEquals("PathVariable not resolved correctly", "value", result); - + pathVars = (Map) request.getAttribute(View.PATH_VARIABLES); assertNotNull(pathVars); assertEquals(2, pathVars.size()); assertEquals("value", pathVars.get("name")); assertEquals("oldValue", pathVars.get("oldName")); } - + @Test(expected = ServletRequestBindingException.class) public void handleMissingValue() throws Exception { resolver.resolveArgument(paramNamedString, mavContainer, webRequest, null); fail("Unresolved path variable should lead to exception."); } - + public void handle(@PathVariable(value = "name") String param1, String param2) { } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolverTests.java index 7f18922e49a..813c7819a9f 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestPartMethodArgumentResolverTests.java @@ -68,7 +68,7 @@ import org.springframework.web.servlet.mvc.method.annotation.RequestPartMethodAr /** * Test fixture with {@link RequestPartMethodArgumentResolver} and mock {@link HttpMessageConverter}. - * + * * @author Rossen Stoyanchev */ public class RequestPartMethodArgumentResolverTests { @@ -76,7 +76,7 @@ public class RequestPartMethodArgumentResolverTests { private RequestPartMethodArgumentResolver resolver; private HttpMessageConverter messageConverter; - + private MultipartFile multipartFile1; private MultipartFile multipartFile2; @@ -99,10 +99,10 @@ public class RequestPartMethodArgumentResolverTests { @SuppressWarnings("unchecked") @Before public void setUp() throws Exception { - + Method method = getClass().getMethod("handle", SimpleBean.class, SimpleBean.class, SimpleBean.class, MultipartFile.class, List.class, Integer.TYPE, MultipartFile.class, Part.class, MultipartFile.class); - + paramRequestPart = new MethodParameter(method, 0); paramRequestPart.initParameterNameDiscovery(new LocalVariableTableParameterNameDiscoverer()); paramNamedRequestPart = new MethodParameter(method, 1); @@ -122,7 +122,7 @@ public class RequestPartMethodArgumentResolverTests { resolver = new RequestPartMethodArgumentResolver(Collections.>singletonList(messageConverter)); reset(messageConverter); - + multipartFile1 = new MockMultipartFile("requestPart", "", "text/plain", (byte[]) null); multipartFile2 = new MockMultipartFile("requestPart", "", "text/plain", (byte[]) null); multipartRequest = new MockMultipartHttpServletRequest(); @@ -139,16 +139,16 @@ public class RequestPartMethodArgumentResolverTests { assertTrue("Part parameter not supported", resolver.supportsParameter(paramServlet30Part)); assertFalse("non-RequestPart parameter supported", resolver.supportsParameter(paramInt)); assertFalse("@RequestParam args not supported", resolver.supportsParameter(paramRequestParamAnnot)); - } + } - @Test + @Test public void resolveMultipartFile() throws Exception { Object actual = resolver.resolveArgument(paramMultipartFile, null, webRequest, null); assertNotNull(actual); assertSame(multipartFile1, actual); } - @Test + @Test public void resolveMultipartFileList() throws Exception { Object actual = resolver.resolveArgument(paramMultipartFileList, null, webRequest, null); assertNotNull(actual); @@ -193,7 +193,7 @@ public class RequestPartMethodArgumentResolverTests { public void resolveNamedRequestPart() throws Exception { testResolveArgument(new SimpleBean("foo"), paramNamedRequestPart); } - + @Test public void resolveRequestPartNotValid() throws Exception { try { @@ -205,12 +205,12 @@ public class RequestPartMethodArgumentResolverTests { assertNotNull(e.getBindingResult().getFieldError("name")); } } - + @Test public void resolveRequestPartValid() throws Exception { testResolveArgument(new SimpleBean("foo"), paramNamedRequestPart); } - + @Test public void resolveRequestPartRequired() throws Exception { try { @@ -225,7 +225,7 @@ public class RequestPartMethodArgumentResolverTests { public void resolveRequestPartNotRequired() throws Exception { testResolveArgument(new SimpleBean("foo"), paramValidRequestPart); } - + @Test(expected=MultipartException.class) public void isMultipartRequest() throws Exception { MockHttpServletRequest request = new MockHttpServletRequest(); @@ -255,9 +255,9 @@ public class RequestPartMethodArgumentResolverTests { assertEquals("Invalid argument value", argValue, actualValue); assertFalse("The requestHandled flag shouldn't change", mavContainer.isRequestHandled()); - + verify(messageConverter); - } + } private static class SimpleBean { @@ -273,7 +273,7 @@ public class RequestPartMethodArgumentResolverTests { return name; } } - + private final class ValidatingBinderFactory implements WebDataBinderFactory { public WebDataBinder createBinder(NativeWebRequest webRequest, Object target, String objectName) throws Exception { LocalValidatorFactoryBean validator = new LocalValidatorFactoryBean(); @@ -284,9 +284,9 @@ public class RequestPartMethodArgumentResolverTests { } } - public void handle(@RequestPart SimpleBean requestPart, - @RequestPart(value="requestPart", required=false) SimpleBean namedRequestPart, - @Valid @RequestPart("requestPart") SimpleBean validRequestPart, + public void handle(@RequestPart SimpleBean requestPart, + @RequestPart(value="requestPart", required=false) SimpleBean namedRequestPart, + @Valid @RequestPart("requestPart") SimpleBean validRequestPart, @RequestPart("requestPart") MultipartFile multipartFile, @RequestPart("requestPart") List multipartFileList, int i, diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/SerlvetModelAttributeMethodProcessorTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/SerlvetModelAttributeMethodProcessorTests.java index d0b6e815ecb..21ef1b19592 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/SerlvetModelAttributeMethodProcessorTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/SerlvetModelAttributeMethodProcessorTests.java @@ -40,7 +40,7 @@ import org.springframework.web.servlet.HandlerMapping; /** * Test fixture for {@link ServletModelAttributeMethodProcessor} specific tests. * Also see org.springframework.web.method.annotation.support.ModelAttributeMethodProcessorTests - * + * * @author Rossen Stoyanchev */ public class SerlvetModelAttributeMethodProcessorTests { @@ -48,7 +48,7 @@ public class SerlvetModelAttributeMethodProcessorTests { private ServletModelAttributeMethodProcessor processor; private MethodParameter testBeanModelAttr; - + private MethodParameter testBeanWithoutStringConstructorModelAttr; private ModelAndViewContainer mavContainer; @@ -63,18 +63,18 @@ public class SerlvetModelAttributeMethodProcessorTests { public void setUp() throws Exception { this.processor = new ServletModelAttributeMethodProcessor(false); - Method method = getClass().getDeclaredMethod("modelAttribute", + Method method = getClass().getDeclaredMethod("modelAttribute", TestBean.class, TestBeanWithoutStringConstructor.class); - + this.testBeanModelAttr = new MethodParameter(method, 0); this.testBeanWithoutStringConstructorModelAttr = new MethodParameter(method, 1); - + ConfigurableWebBindingInitializer initializer = new ConfigurableWebBindingInitializer(); initializer.setConversionService(new DefaultConversionService()); - + this.binderFactory = new ServletRequestDataBinderFactory(null, initializer ); this.mavContainer = new ModelAndViewContainer(); - + this.request = new MockHttpServletRequest(); this.webRequest = new ServletWebRequest(request); } @@ -87,10 +87,10 @@ public class SerlvetModelAttributeMethodProcessorTests { // Type conversion from "Patty" to TestBean via TestBean(String) constructor - TestBean testBean = + TestBean testBean = (TestBean) this.processor.resolveArgument( this.testBeanModelAttr, this.mavContainer, this.webRequest, this.binderFactory); - + assertEquals("Patty", testBean.getName()); } @@ -100,10 +100,10 @@ public class SerlvetModelAttributeMethodProcessorTests { uriTemplateVars.put("testBean2", "Patty"); request.setAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE, uriTemplateVars); - TestBeanWithoutStringConstructor testBean = + TestBeanWithoutStringConstructor testBean = (TestBeanWithoutStringConstructor) this.processor.resolveArgument( this.testBeanWithoutStringConstructorModelAttr, this.mavContainer, this.webRequest, this.binderFactory); - + assertNotNull(testBean); } @@ -113,10 +113,10 @@ public class SerlvetModelAttributeMethodProcessorTests { // Type conversion from "Patty" to TestBean via TestBean(String) constructor - TestBean testBean = + TestBean testBean = (TestBean) this.processor.resolveArgument( this.testBeanModelAttr, this.mavContainer, this.webRequest, this.binderFactory); - + assertEquals("Patty", testBean.getName()); } @@ -124,17 +124,17 @@ public class SerlvetModelAttributeMethodProcessorTests { public void createAttributeRequestParameterCannotConvert() throws Exception { this.request.addParameter("testBean1", "Patty"); - TestBeanWithoutStringConstructor testBean = + TestBeanWithoutStringConstructor testBean = (TestBeanWithoutStringConstructor) this.processor.resolveArgument( this.testBeanWithoutStringConstructorModelAttr, this.mavContainer, this.webRequest, this.binderFactory); - + assertNotNull(testBean); } - + @SuppressWarnings("unused") - private void modelAttribute(@ModelAttribute("testBean1") TestBean testBean1, - @ModelAttribute("testBean2") TestBeanWithoutStringConstructor testBean2) { + private void modelAttribute(@ModelAttribute("testBean1") TestBean testBean1, + @ModelAttribute("testBean2") TestBeanWithoutStringConstructor testBean2) { } @@ -143,10 +143,10 @@ public class SerlvetModelAttributeMethodProcessorTests { public TestBeanWithoutStringConstructor() { } - + public TestBeanWithoutStringConstructor(int i) { } - + } } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletCookieValueMethodArgumentResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletCookieValueMethodArgumentResolverTests.java index 7590c2ceb60..b1118f4c46f 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletCookieValueMethodArgumentResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletCookieValueMethodArgumentResolverTests.java @@ -33,7 +33,7 @@ import org.springframework.web.servlet.mvc.method.annotation.ServletCookieValueM /** * Test fixture with {@link ServletCookieValueMethodArgumentResolver}. - * + * * @author Arjen Poutsma * @author Rossen Stoyanchev */ @@ -52,7 +52,7 @@ public class ServletCookieValueMethodArgumentResolverTests { @Before public void setUp() throws Exception { resolver = new ServletCookieValueMethodArgumentResolver(null); - + Method method = getClass().getMethod("params", Cookie.class, String.class); cookieParameter = new MethodParameter(method, 0); cookieStringParameter = new MethodParameter(method, 1); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolverTests.java index ba68354ee75..f3c51db5a8b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestMethodArgumentResolverTests.java @@ -41,7 +41,7 @@ import static org.junit.Assert.*; /** * Test fixture with {@link ServletRequestMethodArgumentResolver}. - * + * * @author Arjen Poutsma * @author Rossen Stoyanchev */ @@ -52,7 +52,7 @@ public class ServletRequestMethodArgumentResolverTests { private Method method; private ModelAndViewContainer mavContainer; - + private ServletWebRequest webRequest; private MockHttpServletRequest servletRequest; @@ -69,10 +69,10 @@ public class ServletRequestMethodArgumentResolverTests { @Test public void servletRequest() throws Exception { MethodParameter servletRequestParameter = new MethodParameter(method, 0); - + boolean isSupported = resolver.supportsParameter(servletRequestParameter); Object result = resolver.resolveArgument(servletRequestParameter, mavContainer, webRequest, null); - + assertTrue("ServletRequest not supported", isSupported); assertSame("Invalid result", servletRequest, result); assertFalse("The requestHandled flag shouldn't change", mavContainer.isRequestHandled()); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolverTests.java index e7b7acb168e..e29bb77226d 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletResponseMethodArgumentResolverTests.java @@ -35,7 +35,7 @@ import static org.junit.Assert.*; /** * Test fixture with {@link org.springframework.web.servlet.mvc.method.annotation.ServletRequestMethodArgumentResolver}. - * + * * @author Arjen Poutsma */ public class ServletResponseMethodArgumentResolverTests { diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/UriComponentsBuilderMethodArgumentResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/UriComponentsBuilderMethodArgumentResolverTests.java index 5c8054c319b..043467e47a9 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/UriComponentsBuilderMethodArgumentResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/UriComponentsBuilderMethodArgumentResolverTests.java @@ -35,7 +35,7 @@ import org.springframework.web.util.UriComponentsBuilder; /** * Test fixture with {@link UriComponentsBuilderMethodArgumentResolver}. - * + * * @author Rossen Stoyanchev */ public class UriComponentsBuilderMethodArgumentResolverTests { @@ -45,7 +45,7 @@ public class UriComponentsBuilderMethodArgumentResolverTests { private MethodParameter builderParam; private MethodParameter servletBuilderParam; - + private MethodParameter intParam; private ServletWebRequest webRequest; @@ -62,22 +62,22 @@ public class UriComponentsBuilderMethodArgumentResolverTests { this.servletRequest = new MockHttpServletRequest(); this.webRequest = new ServletWebRequest(this.servletRequest); } - + @Test public void supportsParameter() throws Exception { assertTrue(this.resolver.supportsParameter(this.builderParam)); assertTrue(this.resolver.supportsParameter(this.servletBuilderParam)); assertFalse(this.resolver.supportsParameter(this.intParam)); } - + @Test public void resolveArgument() throws Exception { this.servletRequest.setContextPath("/myapp"); this.servletRequest.setServletPath("/main"); this.servletRequest.setPathInfo("/accounts"); - + Object actual = this.resolver.resolveArgument(this.builderParam, new ModelAndViewContainer(), this.webRequest, null); - + assertNotNull(actual); assertEquals(ServletUriComponentsBuilder.class, actual.getClass()); assertEquals("http://localhost/myapp/main", ((ServletUriComponentsBuilder) actual).build().toUriString()); @@ -86,5 +86,5 @@ public class UriComponentsBuilderMethodArgumentResolverTests { void handle(UriComponentsBuilder builder, ServletUriComponentsBuilder servletBuilder, int value) { } - + } \ No newline at end of file diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewMethodReturnValueHandlerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewMethodReturnValueHandlerTests.java index 1f2b04df292..21c9c76c7a8 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewMethodReturnValueHandlerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewMethodReturnValueHandlerTests.java @@ -36,7 +36,7 @@ import org.springframework.web.servlet.view.RedirectView; /** * Test fixture with {@link ViewMethodReturnValueHandler}. - * + * * @author Rossen Stoyanchev */ public class ViewMethodReturnValueHandlerTests { @@ -53,7 +53,7 @@ public class ViewMethodReturnValueHandlerTests { this.mavContainer = new ModelAndViewContainer(); this.webRequest = new ServletWebRequest(new MockHttpServletRequest()); } - + @Test public void supportsReturnType() throws Exception { assertTrue(this.handler.supportsReturnType(createReturnValueParam("view"))); @@ -63,7 +63,7 @@ public class ViewMethodReturnValueHandlerTests { public void returnView() throws Exception { InternalResourceView view = new InternalResourceView("testView"); this.handler.handleReturnValue(view, createReturnValueParam("view"), this.mavContainer, this.webRequest); - + assertSame(view, this.mavContainer.getView()); } @@ -74,7 +74,7 @@ public class ViewMethodReturnValueHandlerTests { this.mavContainer.setRedirectModel(redirectModel); MethodParameter param = createReturnValueParam("view"); this.handler.handleReturnValue(redirectView, param, this.mavContainer, this.webRequest); - + assertSame(redirectView, this.mavContainer.getView()); assertSame("Should have switched to the RedirectModel", redirectModel, this.mavContainer.getModel()); } @@ -83,7 +83,7 @@ public class ViewMethodReturnValueHandlerTests { Method method = getClass().getDeclaredMethod(methodName); return new MethodParameter(method, -1); } - + View view() { return null; } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewNameMethodReturnValueHandlerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewNameMethodReturnValueHandlerTests.java index 50f41b337b4..d5db099445a 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewNameMethodReturnValueHandlerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ViewNameMethodReturnValueHandlerTests.java @@ -34,7 +34,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributesModelMap; /** * Test fixture with {@link ViewNameMethodReturnValueHandler}. - * + * * @author Rossen Stoyanchev */ public class ViewNameMethodReturnValueHandlerTests { @@ -51,17 +51,17 @@ public class ViewNameMethodReturnValueHandlerTests { this.mavContainer = new ModelAndViewContainer(); this.webRequest = new ServletWebRequest(new MockHttpServletRequest()); } - + @Test public void supportsReturnType() throws Exception { assertTrue(this.handler.supportsReturnType(createReturnValueParam("viewName"))); } - + @Test public void returnViewName() throws Exception { MethodParameter param = createReturnValueParam("viewName"); this.handler.handleReturnValue("testView", param, this.mavContainer, this.webRequest); - + assertEquals("testView", this.mavContainer.getViewName()); } @@ -80,9 +80,9 @@ public class ViewNameMethodReturnValueHandlerTests { Method method = getClass().getDeclaredMethod(methodName); return new MethodParameter(method, -1); } - + String viewName() { return null; } - + } \ No newline at end of file diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java index 6662b3acb9f..e229bac169a 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java @@ -31,7 +31,7 @@ import org.springframework.format.support.FormattingConversionService; import org.springframework.validation.DataBinder; /** - * + * * Test fixture for {@link RedirectAttributesModelMap} tests. * * @author Rossen Stoyanchev @@ -40,7 +40,7 @@ import org.springframework.validation.DataBinder; public class RedirectAttributesModelMapTests { private RedirectAttributesModelMap redirectAttributes; - + private FormattingConversionService conversionService; @Before @@ -48,10 +48,10 @@ public class RedirectAttributesModelMapTests { this.conversionService = new DefaultFormattingConversionService(); DataBinder dataBinder = new DataBinder(null); dataBinder.setConversionService(conversionService); - + this.redirectAttributes = new RedirectAttributesModelMap(dataBinder); } - + @Test public void addAttributePrimitiveType() { this.redirectAttributes.addAttribute("speed", 65); @@ -62,12 +62,12 @@ public class RedirectAttributesModelMapTests { public void addAttributeCustomType() { String attrName = "person"; this.redirectAttributes.addAttribute(attrName, new TestBean("Fred")); - + assertEquals("ConversionService should have invoked toString()", "Fred", this.redirectAttributes.get(attrName)); this.conversionService.addConverter(new TestBeanConverter()); this.redirectAttributes.addAttribute(attrName, new TestBean("Fred")); - + assertEquals("Type converter should have been used", "[Fred]", this.redirectAttributes.get(attrName)); } @@ -83,14 +83,14 @@ public class RedirectAttributesModelMapTests { @Test public void addAttributeValue() { this.redirectAttributes.addAttribute(new TestBean("Fred")); - + assertEquals("Fred", this.redirectAttributes.get("testBean")); } @Test public void addAllAttributesList() { this.redirectAttributes.addAllAttributes(Arrays.asList(new TestBean("Fred"), new Integer(5))); - + assertEquals("Fred", this.redirectAttributes.get("testBean")); assertEquals("5", this.redirectAttributes.get("integer")); } @@ -101,7 +101,7 @@ public class RedirectAttributesModelMapTests { map.put("person", new TestBean("Fred")); map.put("age", 33); this.redirectAttributes.addAllAttributes(map); - + assertEquals("Fred", this.redirectAttributes.get("person")); assertEquals("33", this.redirectAttributes.get("age")); } @@ -111,18 +111,18 @@ public class RedirectAttributesModelMapTests { Map map = new HashMap(); map.put("person", new TestBean("Fred")); map.put("age", 33); - + this.redirectAttributes.addAttribute("person", new TestBean("Ralph")); this.redirectAttributes.mergeAttributes(map); - + assertEquals("Ralph", this.redirectAttributes.get("person")); assertEquals("33", this.redirectAttributes.get("age")); } - + @Test public void put() { this.redirectAttributes.put("testBean", new TestBean("Fred")); - + assertEquals("Fred", this.redirectAttributes.get("testBean")); } @@ -132,16 +132,16 @@ public class RedirectAttributesModelMapTests { map.put("person", new TestBean("Fred")); map.put("age", 33); this.redirectAttributes.putAll(map); - + assertEquals("Fred", this.redirectAttributes.get("person")); assertEquals("33", this.redirectAttributes.get("age")); } - + public static class TestBeanConverter implements Converter { - + public String convert(TestBean source) { return "[" + source.getName() + "]"; } - } - + } + } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/RequestContextTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/RequestContextTests.java index c568339b0c6..ecde8326f68 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/RequestContextTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/RequestContextTests.java @@ -67,7 +67,7 @@ public class RequestContextTests { map.put("spam", "bucket"); assertEquals("foo/bar?spam=bucket", context.getContextUrl("{foo}?spam={spam}", map)); } - + @Test public void testGetContextUrlWithMapEscaping() throws Exception { request.setContextPath("foo/"); @@ -83,12 +83,12 @@ public class RequestContextTests { request.setContextPath("/app"); request.setServletPath("/servlet"); RequestContext context = new RequestContext(request, response, servletContext, model); - + assertEquals("/app/servlet", context.getPathToServlet()); request.setAttribute(WebUtils.FORWARD_CONTEXT_PATH_ATTRIBUTE, "/origApp"); request.setAttribute(WebUtils.FORWARD_SERVLET_PATH_ATTRIBUTE, "/origServlet"); - + assertEquals("/origApp/origServlet", context.getPathToServlet()); } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/RequestDataValueProcessorWrapper.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/RequestDataValueProcessorWrapper.java index d26f18d1205..84e940352ac 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/RequestDataValueProcessorWrapper.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/RequestDataValueProcessorWrapper.java @@ -25,7 +25,7 @@ import org.springframework.web.servlet.support.RequestDataValueProcessor; public class RequestDataValueProcessorWrapper implements RequestDataValueProcessor { private RequestDataValueProcessor processor; - + public void setRequestDataValueProcessor(RequestDataValueProcessor processor) { this.processor = processor; } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/ServletUriComponentsBuilderTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/ServletUriComponentsBuilderTests.java index 50304a348b2..d87212008c9 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/support/ServletUriComponentsBuilderTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/support/ServletUriComponentsBuilderTests.java @@ -39,7 +39,7 @@ public class ServletUriComponentsBuilderTests { this.request.setServerPort(80); this.request.setContextPath("/mvc-showcase"); } - + @Test public void fromRequest() { request.setRequestURI("/mvc-showcase/data/param"); @@ -61,16 +61,16 @@ public class ServletUriComponentsBuilderTests { public void fromRequestAtypicalHttpPort() { request.setServerPort(8080); String result = ServletUriComponentsBuilder.fromRequest(request).build().toUriString(); - + assertEquals("http://localhost:8080", result); } - + @Test public void fromRequestAtypicalHttpsPort() { request.setScheme("https"); request.setServerPort(9043); String result = ServletUriComponentsBuilder.fromRequest(request).build().toUriString(); - + assertEquals("https://localhost:9043", result); } @@ -88,9 +88,9 @@ public class ServletUriComponentsBuilderTests { request.setRequestURI("/mvc-showcase/data/param"); request.setQueryString("foo=123"); String result = ServletUriComponentsBuilder.fromContextPath(request).build().toUriString(); - + assertEquals("http://localhost/mvc-showcase", result); - } + } @Test public void fromServletMapping() { @@ -98,9 +98,9 @@ public class ServletUriComponentsBuilderTests { request.setServletPath("/app"); request.setQueryString("foo=123"); String result = ServletUriComponentsBuilder.fromServletMapping(request).build().toUriString(); - + assertEquals("http://localhost/mvc-showcase/app", result); - } + } @Test public void fromCurrentRequest() { @@ -116,5 +116,5 @@ public class ServletUriComponentsBuilderTests { RequestContextHolder.resetRequestAttributes(); } } - + } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/EvalTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/EvalTagTests.java index 6b02ec16278..a8a3167c56e 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/EvalTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/EvalTagTests.java @@ -159,16 +159,16 @@ public class EvalTagTests extends AbstractTagTests { public static class Bean { - + public String method() { return "foo"; } - + @NumberFormat(style=Style.PERCENT) public BigDecimal getFormattable() { return new BigDecimal(".25"); } - + public String html() { return "

        "; } @@ -176,7 +176,7 @@ public class EvalTagTests extends AbstractTagTests { public String getBean() { return "not the bean object"; } - + public Object getNull() { return null; } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/MessageTagOutsideDispatcherServletTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/MessageTagOutsideDispatcherServletTests.java index 66090324b63..d2205f8fcc0 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/MessageTagOutsideDispatcherServletTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/MessageTagOutsideDispatcherServletTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/MessageTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/MessageTagTests.java index 50f7110a3c5..3d33e75a040 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/MessageTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/MessageTagTests.java @@ -300,7 +300,7 @@ public class MessageTagTests extends AbstractTagTests { assertTrue("Correct doStartTag return value", tag.doStartTag() == Tag.EVAL_BODY_INCLUDE); assertEquals("Correct message", "test & text", message.toString()); } - + public void testMessageTagWithTextAndExpressionArgumentFormat() throws JspException { PageContext pc = createPageContext(); final StringBuffer message = new StringBuffer(); @@ -354,12 +354,12 @@ public class MessageTagTests extends AbstractTagTests { MessageTag tag = new MessageTag(); tag.setPageContext(pc); tag.setText("text & text"); - tag.setVar("testvar"); + tag.setVar("testvar"); tag.setScope("page"); tag.doStartTag(); assertEquals("text & text", pc.getAttribute("testvar")); tag.release(); - + tag = new MessageTag(); tag.setPageContext(pc); tag.setCode("test"); @@ -374,7 +374,7 @@ public class MessageTagTests extends AbstractTagTests { MessageTag tag = new MessageTag(); tag.setPageContext(pc); tag.setText("text & text"); - tag.setVar("testvar"); + tag.setVar("testvar"); tag.doStartTag(); assertEquals("text & text", pc.getAttribute("testvar")); tag.release(); @@ -383,11 +383,11 @@ public class MessageTagTests extends AbstractTagTests { tag.setPageContext(pc); tag.setCode("test"); tag.setVar("testvar"); - + tag.doStartTag(); assertEquals("Correct message", "test message", pc.getAttribute("testvar")); } - + public void testNullMessageSource() throws JspException { PageContext pc = createPageContext(); ConfigurableWebApplicationContext ctx = (ConfigurableWebApplicationContext) diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ParamTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ParamTagTests.java index 66b6aa90d56..943ebcbd12d 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ParamTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ParamTagTests.java @@ -1,12 +1,12 @@ /* * Copyright 2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -26,7 +26,7 @@ import org.springframework.mock.web.test.MockHttpServletResponse; /** * Unit tests for ParamTag - * + * * @author Scott Andrews */ public class ParamTagTests extends AbstractTagTests { diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ParamTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ParamTests.java index 4cd6406a55f..49d305cc4e5 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ParamTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ParamTests.java @@ -1,12 +1,12 @@ /* * Copyright 2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,7 @@ import junit.framework.TestCase; /** * Unit tests for Param - * + * * @author Scott Andrews */ public class ParamTests extends TestCase { diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ThemeTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ThemeTagTests.java index e1de2505de0..be9f385a84c 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ThemeTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/ThemeTagTests.java @@ -1,12 +1,12 @@ /* * Copyright 2002-2005 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/UrlTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/UrlTagTests.java index 1faac4d93a4..85839b405ff 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/UrlTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/UrlTagTests.java @@ -1,12 +1,12 @@ /* * Copyright 2008 the original author or authors. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,7 +34,7 @@ import org.springframework.util.ReflectionUtils; /** * Unit tests for UrlTag - * + * * @author Scott Andrews */ public class UrlTagTests extends AbstractTagTests { diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTagTests.java index 53f3303cab0..e101be304be 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTagTests.java @@ -104,7 +104,7 @@ public abstract class AbstractHtmlElementTagTests extends AbstractTagTests { RequestDataValueProcessor mockProcessor = createMock(RequestDataValueProcessor.class); ServletRequest request = getPageContext().getRequest(); StaticWebApplicationContext wac = (StaticWebApplicationContext) RequestContextUtils.getWebApplicationContext(request); - wac.getBean(RequestDataValueProcessorWrapper.class).setRequestDataValueProcessor(mockProcessor); + wac.getBean(RequestDataValueProcessorWrapper.class).setRequestDataValueProcessor(mockProcessor); return mockProcessor; } diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java index 3208aa74f63..431f85d03d2 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java @@ -37,11 +37,11 @@ public class ButtonTagTests extends AbstractFormTagTests { this.tag.setName("My Name"); this.tag.setValue("My Button"); } - + public void testButtonTag() throws Exception { assertEquals(Tag.EVAL_BODY_INCLUDE, this.tag.doStartTag()); assertEquals(Tag.EVAL_PAGE, this.tag.doEndTag()); - + String output = getOutput(); assertTagOpened(output); assertTagClosed(output); @@ -52,10 +52,10 @@ public class ButtonTagTests extends AbstractFormTagTests { assertContainsAttribute(output, "value", "My Button"); assertAttributeNotPresent(output, "disabled"); } - + public void testDisabled() throws Exception { this.tag.setDisabled("true"); - + this.tag.doStartTag(); this.tag.doEndTag(); @@ -65,7 +65,7 @@ public class ButtonTagTests extends AbstractFormTagTests { assertContainsAttribute(output, "disabled", "disabled"); } - + @Override protected TestBean createTestBean() { return new TestBean(); @@ -78,7 +78,7 @@ public class ButtonTagTests extends AbstractFormTagTests { protected final void assertTagOpened(String output) { assertTrue("Tag not opened properly", output.startsWith("