Polishing

This commit is contained in:
Juergen Hoeller
2016-07-26 17:15:15 +02:00
parent 7b564b72a1
commit e03dea1d64
193 changed files with 324 additions and 323 deletions

View File

@@ -36,7 +36,7 @@ import static org.mockito.BDDMockito.*;
* @author Rod Johnson
* @author Chris Beams
*/
public final class AfterAdviceBindingTests {
public class AfterAdviceBindingTests {
private AdviceBindingCollaborator mockCollaborator;

View File

@@ -37,7 +37,7 @@ import static org.mockito.BDDMockito.*;
* @author Juergen Hoeller
* @author Chris Beams
*/
public final class AfterReturningAdviceBindingTests {
public class AfterReturningAdviceBindingTests {
private AfterReturningAdviceBindingTestAspect afterAdviceAspect;

View File

@@ -31,7 +31,7 @@ import static org.mockito.BDDMockito.*;
* @author Adrian Colyer
* @author Chris Beams
*/
public final class AfterThrowingAdviceBindingTests {
public class AfterThrowingAdviceBindingTests {
private ITestBean testBean;
@@ -51,20 +51,20 @@ public final class AfterThrowingAdviceBindingTests {
afterThrowingAdviceAspect.setCollaborator(mockCollaborator);
}
@Test(expected=Throwable.class)
@Test(expected = Throwable.class)
public void testSimpleAfterThrowing() throws Throwable {
this.testBean.exceptional(new Throwable());
verify(mockCollaborator).noArgs();
}
@Test(expected=Throwable.class)
@Test(expected = Throwable.class)
public void testAfterThrowingWithBinding() throws Throwable {
Throwable t = new Throwable();
this.testBean.exceptional(t);
verify(mockCollaborator).oneThrowable(t);
}
@Test(expected=Throwable.class)
@Test(expected = Throwable.class)
public void testAfterThrowingWithNamedTypeRestriction() throws Throwable {
Throwable t = new Throwable();
this.testBean.exceptional(t);
@@ -73,20 +73,20 @@ public final class AfterThrowingAdviceBindingTests {
verify(mockCollaborator).noArgsOnThrowableMatch();
}
@Test(expected=Throwable.class)
@Test(expected = Throwable.class)
public void testAfterThrowingWithRuntimeExceptionBinding() throws Throwable {
RuntimeException ex = new RuntimeException();
this.testBean.exceptional(ex);
verify(mockCollaborator).oneRuntimeException(ex);
}
@Test(expected=Throwable.class)
@Test(expected = Throwable.class)
public void testAfterThrowingWithTypeSpecified() throws Throwable {
this.testBean.exceptional(new Throwable());
verify(mockCollaborator).noArgsOnThrowableMatch();
}
@Test(expected=Throwable.class)
@Test(expected = Throwable.class)
public void testAfterThrowingWithRuntimeTypeSpecified() throws Throwable {
this.testBean.exceptional(new RuntimeException());
verify(mockCollaborator).noArgsOnRuntimeExceptionMatch();

View File

@@ -26,7 +26,7 @@ import static org.junit.Assert.*;
* @author Juergen Hoeller
* @author Chris Beams
*/
public final class AroundAdviceCircularTests extends AroundAdviceBindingTests {
public class AroundAdviceCircularTests extends AroundAdviceBindingTests {
@Test
public void testBothBeansAreProxies() {

View File

@@ -34,7 +34,7 @@ import static org.junit.Assert.*;
* @author Adrian Colyer
* @author Chris Beams
*/
public final class AspectAndAdvicePrecedenceTests {
public class AspectAndAdvicePrecedenceTests {
private PrecedenceTestAspect highPrecedenceAspect;

View File

@@ -31,7 +31,7 @@ import static org.junit.Assert.*;
* @author Juergen Hoeller
* @author Chris Beams
*/
public final class AspectJExpressionPointcutAdvisorTests {
public class AspectJExpressionPointcutAdvisorTests {
private ITestBean testBean;

View File

@@ -37,7 +37,7 @@ import static org.junit.Assert.*;
* @author Juergen Hoeller
* @author Chris Beams
*/
public final class BeanNamePointcutTests {
public class BeanNamePointcutTests {
private ITestBean testBean1;
private ITestBean testBean2;

View File

@@ -36,7 +36,7 @@ import static org.mockito.BDDMockito.*;
* @author Rod Johnson
* @author Chris Beams
*/
public final class BeforeAdviceBindingTests {
public class BeforeAdviceBindingTests {
private AdviceBindingCollaborator mockCollaborator;

View File

@@ -31,7 +31,7 @@ import static org.junit.Assert.*;
* @author Adrian Colyer
* @author Chris Beams
*/
public final class DeclarationOrderIndependenceTests {
public class DeclarationOrderIndependenceTests {
private TopsyTurvyAspect aspect;

View File

@@ -33,7 +33,7 @@ import static org.junit.Assert.*;
* @author Rod Johnson
* @author Chris Beams
*/
public final class DeclareParentsTests {
public class DeclareParentsTests {
private ITestBean testBeanProxy;

View File

@@ -30,7 +30,7 @@ import org.springframework.tests.sample.beans.TestBean;
* @author Ramnivas Laddad
* @author Chris Beams
*/
public final class ImplicitJPArgumentMatchingAtAspectJTests {
public class ImplicitJPArgumentMatchingAtAspectJTests {
@Test
public void testAspect() {

View File

@@ -27,7 +27,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
* @author Ramnivas Laddad
* @author Chris Beams
*/
public final class ImplicitJPArgumentMatchingTests {
public class ImplicitJPArgumentMatchingTests {
@Test
public void testAspect() {

View File

@@ -29,7 +29,7 @@ import static org.junit.Assert.*;
* @author Adrian Colyer
* @author Chris Beams
*/
public final class OverloadedAdviceTests {
public class OverloadedAdviceTests {
@Test
public void testExceptionOnConfigParsingWithMismatchedAdviceMethod() {

View File

@@ -33,7 +33,7 @@ import static org.junit.Assert.*;
* @author Adrian Colyer
* @author Chris Beams
*/
public final class ProceedTests {
public class ProceedTests {
private SimpleBean testBean;

View File

@@ -36,7 +36,7 @@ import static org.junit.Assert.*;
* @author Chris Beams
*/
@SuppressWarnings("resource")
public final class PropertyDependentAspectTests {
public class PropertyDependentAspectTests {
@Test
public void propertyDependentAspectWithPropertyDeclaredBeforeAdvice()

View File

@@ -27,7 +27,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
* @author Adrian Colyer
* @author Chris Beams
*/
public final class SharedPointcutWithArgsMismatchTests {
public class SharedPointcutWithArgsMismatchTests {
private ToBeAdvised toBeAdvised;

View File

@@ -30,7 +30,7 @@ import static org.junit.Assert.*;
* @author Adrian Colyer
* @author Chris Beams
*/
public final class SubtypeSensitiveMatchingTests {
public class SubtypeSensitiveMatchingTests {
private NonSerializableFoo nonSerializableBean;

View File

@@ -33,7 +33,7 @@ import static org.junit.Assert.*;
* @author Ramnivas Laddad
* @author Chris Beams
*/
public final class TargetPointcutSelectionTests {
public class TargetPointcutSelectionTests {
public TestInterface testImpl1;

View File

@@ -30,7 +30,7 @@ import static org.junit.Assert.*;
* @author Ramnivas Laddad
* @author Chris Beams
*/
public final class ThisAndTargetSelectionOnlyPointcutsAtAspectJTests {
public class ThisAndTargetSelectionOnlyPointcutsAtAspectJTests {
private TestInterface testBean;

View File

@@ -27,7 +27,7 @@ import static org.junit.Assert.*;
* @author Ramnivas Laddad
* @author Chris Beams
*/
public final class ThisAndTargetSelectionOnlyPointcutsTests {
public class ThisAndTargetSelectionOnlyPointcutsTests {
private TestInterface testBean;

View File

@@ -29,7 +29,7 @@ import static org.junit.Assert.*;
* @author Juergen Hoeller
* @author Chris Beams
*/
public final class AnnotationPointcutTests {
public class AnnotationPointcutTests {
private AnnotatedTestBean testBean;

View File

@@ -31,7 +31,7 @@ import static org.junit.Assert.*;
* @author Ramnivas Laddad
* @author Chris Beams
*/
public final class AspectImplementingInterfaceTests {
public class AspectImplementingInterfaceTests {
@Test
public void testProxyCreation() {

View File

@@ -29,7 +29,7 @@ import static org.junit.Assert.*;
* @author Rob Harrop
* @author Chris Beams
*/
public final class AspectJAutoProxyCreatorAndLazyInitTargetSourceTests {
public class AspectJAutoProxyCreatorAndLazyInitTargetSourceTests {
@Test
public void testAdrian() {

View File

@@ -68,7 +68,7 @@ import static org.junit.Assert.*;
* @author Chris Beams
* @author Sam Brannen
*/
public final class AspectJAutoProxyCreatorTests {
public class AspectJAutoProxyCreatorTests {
private static final Log factoryLog = LogFactory.getLog(DefaultListableBeanFactory.class);

View File

@@ -33,7 +33,7 @@ import static org.junit.Assert.*;
* @author Chris Beams
* @since 2.0
*/
public final class AtAspectJAfterThrowingTests {
public class AtAspectJAfterThrowingTests {
@Test
public void testAccessThrowable() throws Exception {

View File

@@ -33,7 +33,7 @@ import static org.junit.Assert.*;
* @author Juergen Hoeller
* @author Chris Beams
*/
public final class AtAspectJAnnotationBindingTests {
public class AtAspectJAnnotationBindingTests {
private AnnotatedTestBean testBean;
private ClassPathXmlApplicationContext ctx;

View File

@@ -45,7 +45,7 @@ import static org.junit.Assert.*;
* @author Rod Johnson
* @author Chris Beams
*/
public final class BenchmarkTests {
public class BenchmarkTests {
private static final Class<?> CLASS = BenchmarkTests.class;

View File

@@ -32,7 +32,7 @@ import static org.junit.Assert.*;
* @author Adrian Colyer
* @author Chris Beams
*/
public final class SPR3064Tests {
public class SPR3064Tests {
private Service service;

View File

@@ -40,7 +40,7 @@ import static org.junit.Assert.*;
* @author Ramnivas Laddad
* @author Chris Beams
*/
public final class AfterReturningGenericTypeMatchingTests {
public class AfterReturningGenericTypeMatchingTests {
private GenericReturnTypeVariationClass testBean;

View File

@@ -30,7 +30,7 @@ import static org.junit.Assert.*;
* @author Ramnivas Laddad
* @author Chris Beams
*/
public final class GenericBridgeMethodMatchingClassProxyTests extends GenericBridgeMethodMatchingTests {
public class GenericBridgeMethodMatchingClassProxyTests extends GenericBridgeMethodMatchingTests {
@Test
public void testGenericDerivedInterfaceMethodThroughClass() {

View File

@@ -34,7 +34,7 @@ import static org.junit.Assert.*;
* @author Ramnivas Laddad
* @author Chris Beams
*/
public final class GenericParameterMatchingTests {
public class GenericParameterMatchingTests {
private CounterAspect counterAspect;

View File

@@ -28,7 +28,7 @@ import static org.junit.Assert.*;
* @author Adrian Colyer
* @author Chris Beams
*/
public final class AopNamespaceHandlerAdviceTypeTests {
public class AopNamespaceHandlerAdviceTypeTests {
@Test
public void testParsingOfAdviceTypes() {

View File

@@ -27,7 +27,7 @@ import static org.junit.Assert.*;
* @author Adrian Colyer
* @author Chris Beams
*/
public final class AopNamespaceHandlerArgNamesTests {
public class AopNamespaceHandlerArgNamesTests {
@Test
public void testArgNamesOK() {

View File

@@ -28,7 +28,7 @@ import static org.junit.Assert.*;
* @author Rob Harrop
* @author Chris Beams
*/
public final class AopNamespaceHandlerProxyTargetClassTests extends AopNamespaceHandlerTests {
public class AopNamespaceHandlerProxyTargetClassTests extends AopNamespaceHandlerTests {
@Test
public void testIsClassProxy() {

View File

@@ -28,7 +28,7 @@ import static org.junit.Assert.*;
* @author Adrian Colyer
* @author Chris Beams
*/
public final class AopNamespaceHandlerReturningTests {
public class AopNamespaceHandlerReturningTests {
@Test
public void testReturningOnReturningAdvice() {

View File

@@ -28,7 +28,7 @@ import static org.junit.Assert.*;
* @author Adrian Colyer
* @author Chris Beams
*/
public final class AopNamespaceHandlerThrowingTests {
public class AopNamespaceHandlerThrowingTests {
@Test
public void testThrowingOnThrowingAdvice() {

View File

@@ -30,7 +30,7 @@ import static org.mockito.BDDMockito.*;
* @author Rick Evans
* @author Chris Beams
*/
public final class MethodLocatingFactoryBeanTests {
public class MethodLocatingFactoryBeanTests {
private static final String BEAN_NAME = "string";
private MethodLocatingFactoryBean factory;
@@ -52,33 +52,33 @@ public final class MethodLocatingFactoryBeanTests {
assertEquals(Method.class, factory.getObjectType());
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testWithNullTargetBeanName() {
factory.setMethodName("toString()");
factory.setBeanFactory(beanFactory);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testWithEmptyTargetBeanName() {
factory.setTargetBeanName("");
factory.setMethodName("toString()");
factory.setBeanFactory(beanFactory);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testWithNullTargetMethodName() {
factory.setTargetBeanName(BEAN_NAME);
factory.setBeanFactory(beanFactory);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testWithEmptyTargetMethodName() {
factory.setTargetBeanName(BEAN_NAME);
factory.setMethodName("");
factory.setBeanFactory(beanFactory);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testWhenTargetBeanClassCannotBeResolved() {
factory.setTargetBeanName(BEAN_NAME);
factory.setMethodName("toString()");
@@ -100,7 +100,7 @@ public final class MethodLocatingFactoryBeanTests {
assertEquals("Bingo", method.invoke("Bingo"));
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
@SuppressWarnings("unchecked")
public void testWhereMethodCannotBeResolved() {
given(beanFactory.getType(BEAN_NAME)).willReturn((Class)String.class);

View File

@@ -24,7 +24,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
* @author Juergen Hoeller
* @author Chris Beams
*/
public final class PrototypeProxyTests {
public class PrototypeProxyTests {
@Test
public void testInjectionBeforeWrappingCheckDoesNotKickInForPrototypeProxy() {

View File

@@ -69,7 +69,7 @@ import static org.junit.Assert.*;
* @author Juergen Hoeller
* @author Chris Beams
*/
public final class ProxyFactoryBeanTests {
public class ProxyFactoryBeanTests {
private static final Class<?> CLASS = ProxyFactoryBeanTests.class;
private static final String CLASSNAME = CLASS.getSimpleName();

View File

@@ -39,7 +39,7 @@ import static org.junit.Assert.*;
* @author Dmitriy Kopylenko
* @author Chris Beams
*/
public final class AdvisorAdapterRegistrationTests {
public class AdvisorAdapterRegistrationTests {
@Before
@After

View File

@@ -31,9 +31,9 @@ import static org.junit.Assert.*;
* @author Dave Syer
* @author Chris Beams
*/
public final class BeanNameAutoProxyCreatorInitTests {
public class BeanNameAutoProxyCreatorInitTests {
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testIgnoreAdvisorThatIsCurrentlyCreation() {
ClassPathXmlApplicationContext ctx =
new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-context.xml", getClass());

View File

@@ -33,7 +33,7 @@ import static org.junit.Assert.*;
* @author Juergen Hoeller
* @author Chris Beams
*/
public final class LookupMethodWrappedByCglibProxyTests {
public class LookupMethodWrappedByCglibProxyTests {
private static final Class<?> CLASS = LookupMethodWrappedByCglibProxyTests.class;
private static final String CLASSNAME = CLASS.getSimpleName();

View File

@@ -43,7 +43,7 @@ import static org.springframework.util.ClassUtils.*;
* @author Juergen Hoeller
* @author Chris Beams
*/
public final class QualifierAnnotationTests {
public class QualifierAnnotationTests {
private static final String CLASSNAME = QualifierAnnotationTests.class.getName();
private static final String CONFIG_LOCATION =

View File

@@ -26,7 +26,7 @@ import org.springframework.cache.interceptor.KeyGenerator;
*
* @author Stephane Nicoll
*/
public final class SomeCustomKeyGenerator implements KeyGenerator {
public class SomeCustomKeyGenerator implements KeyGenerator {
@Override
public Object generate(Object target, Method method, Object... params) {

View File

@@ -34,7 +34,7 @@ import static org.junit.Assert.*;
* @author Colin Sampaleanu
* @author Chris Beams
*/
public final class ContextJndiBeanFactoryLocatorTests {
public class ContextJndiBeanFactoryLocatorTests {
private static final String BEAN_FACTORY_PATH_ENVIRONMENT_KEY = "java:comp/env/ejb/BeanFactoryPath";

View File

@@ -146,7 +146,7 @@ public class ConfigurationClassProcessingTests {
assertSame(ac.getBean("customName"), ConfigWithSetWithProviderImplementation.set);
}
@Test(expected=BeanDefinitionParsingException.class)
@Test(expected = BeanDefinitionParsingException.class)
public void testFinalBeanMethod() {
initBeanFactory(ConfigWithFinalBean.class);
}

View File

@@ -33,7 +33,7 @@ import org.springframework.tests.sample.beans.TestBean;
* @author Juergen Hoeller
*/
@Component
public final class FactoryMethodComponent {
public class FactoryMethodComponent {
private int i;

View File

@@ -49,14 +49,14 @@ public class EventPublicationInterceptorTests {
this.publisher = mock(ApplicationEventPublisher.class);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testWithNoApplicationEventClassSupplied() throws Exception {
EventPublicationInterceptor interceptor = new EventPublicationInterceptor();
interceptor.setApplicationEventPublisher(this.publisher);
interceptor.afterPropertiesSet();
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testWithNonApplicationEventClassSupplied() throws Exception {
EventPublicationInterceptor interceptor = new EventPublicationInterceptor();
interceptor.setApplicationEventPublisher(this.publisher);
@@ -64,7 +64,7 @@ public class EventPublicationInterceptorTests {
interceptor.afterPropertiesSet();
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testWithAbstractStraightApplicationEventClassSupplied() throws Exception {
EventPublicationInterceptor interceptor = new EventPublicationInterceptor();
interceptor.setApplicationEventPublisher(this.publisher);
@@ -72,7 +72,7 @@ public class EventPublicationInterceptorTests {
interceptor.afterPropertiesSet();
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testWithApplicationEventClassThatDoesntExposeAValidCtor() throws Exception {
EventPublicationInterceptor interceptor = new EventPublicationInterceptor();
interceptor.setApplicationEventPublisher(this.publisher);

View File

@@ -91,7 +91,7 @@ public class ConversionServiceFactoryBeanTests {
assertTrue(service.canConvert(String.class, Baz.class));
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void createDefaultConversionServiceWithInvalidSupplements() {
ConversionServiceFactoryBean factory = new ConversionServiceFactoryBean();
Set<Object> converters = new HashSet<>();

View File

@@ -59,7 +59,7 @@ public class CurrencyStyleFormatterTests {
assertEquals(new BigDecimal("23.00"), formatter.parse("$23", Locale.US));
}
@Test(expected=ParseException.class)
@Test(expected = ParseException.class)
public void parseValueNotLenientFailure() throws ParseException {
formatter.parse("$23.56bogus", Locale.US);
}

View File

@@ -263,13 +263,13 @@ public class FormattingConversionServiceTests {
assertNull(formattingService.convert(" ", TypeDescriptor.valueOf(String.class), TypeDescriptor.valueOf(Integer.class)));
}
@Test(expected=ConversionFailedException.class)
@Test(expected = ConversionFailedException.class)
public void testParseParserReturnsNull() throws ParseException {
formattingService.addFormatterForFieldType(Integer.class, new NullReturningFormatter());
assertNull(formattingService.convert("1", TypeDescriptor.valueOf(String.class), TypeDescriptor.valueOf(Integer.class)));
}
@Test(expected=ConversionFailedException.class)
@Test(expected = ConversionFailedException.class)
public void testParseNullPrimitiveProperty() throws ParseException {
formattingService.addFormatterForFieldType(Integer.class, new NumberStyleFormatter());
assertNull(formattingService.convert(null, TypeDescriptor.valueOf(String.class), TypeDescriptor.valueOf(int.class)));

View File

@@ -29,14 +29,14 @@ import static org.junit.Assert.*;
* @author Rick Evans
* @author Chris Beams
*/
public final class ReflectiveLoadTimeWeaverTests {
public class ReflectiveLoadTimeWeaverTests {
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testCtorWithNullClassLoader() {
new ReflectiveLoadTimeWeaver(null);
}
@Test(expected=IllegalStateException.class)
@Test(expected = IllegalStateException.class)
public void testCtorWithClassLoaderThatDoesNotExposeAnAddTransformerMethod() {
new ReflectiveLoadTimeWeaver(getClass().getClassLoader());
}
@@ -54,7 +54,7 @@ public final class ReflectiveLoadTimeWeaverTests {
assertEquals(1, classLoader.getNumTimesGetThrowawayClassLoaderCalled());
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testAddTransformerWithNullTransformer() {
new ReflectiveLoadTimeWeaver(new JustAddTransformerClassLoader()).addTransformer(null);
}

View File

@@ -69,7 +69,7 @@ import static org.junit.Assert.*;
* @author Stephane Nicoll
*/
@SuppressWarnings("deprecation")
public final class MBeanExporterTests extends AbstractMBeanServerTests {
public class MBeanExporterTests extends AbstractMBeanServerTests {
@Rule
public final ExpectedException thrown = ExpectedException.none();

View File

@@ -33,24 +33,24 @@ import static org.junit.Assert.*;
* @author Rick Evans
* @author Chris Beams
*/
public final class ModelMBeanNotificationPublisherTests {
public class ModelMBeanNotificationPublisherTests {
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testCtorWithNullMBean() throws Exception {
new ModelMBeanNotificationPublisher(null, createObjectName(), this);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testCtorWithNullObjectName() throws Exception {
new ModelMBeanNotificationPublisher(new SpringModelMBean(), null, this);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testCtorWithNullManagedResource() throws Exception {
new ModelMBeanNotificationPublisher(new SpringModelMBean(), createObjectName(), null);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testSendNullNotification() throws Exception {
NotificationPublisher publisher
= new ModelMBeanNotificationPublisher(new SpringModelMBean(), createObjectName(), this);

View File

@@ -24,7 +24,7 @@ import org.aspectj.lang.ProceedingJoinPoint;
*
* @author Rick Evans
*/
public final class MessengerScrambler {
public class MessengerScrambler {
public String scramble(ProceedingJoinPoint pjp) throws Throwable {
String message = (String) pjp.proceed();

View File

@@ -26,7 +26,7 @@ import static org.junit.Assert.*;
* @author Rick Evans
* @author Sam Brannen
*/
public final class StaticScriptSourceTests {
public class StaticScriptSourceTests {
private static final String SCRIPT_TEXT = "print($hello) if $true;";

View File

@@ -21,7 +21,7 @@ import org.springframework.scripting.ConfigurableMessenger;
/**
* @author Rick Evans
*/
public final class StubMessenger implements ConfigurableMessenger {
public class StubMessenger implements ConfigurableMessenger {
private String message = "I used to be smart... now I'm just stupid.";

View File

@@ -24,7 +24,7 @@ package org.springframework.tests.sample.beans;
* @author Juergen Hoeller
* @author Chris Beams
*/
public final class FactoryMethods {
public class FactoryMethods {
public static FactoryMethods nullInstance() {
return null;

View File

@@ -41,7 +41,7 @@ import static org.junit.Assert.*;
* @author Juergen Hoeller
* @author Chris Beams
*/
public final class ModelMapTests {
public class ModelMapTests {
@Test
public void testNoArgCtorYieldsEmptyModel() throws Exception {
@@ -96,7 +96,7 @@ public final class ModelMapTests {
assertEquals("bing", string);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testOneArgCtorWithNull() {
//Null model arguments added without a name being explicitly supplied are not allowed
new ModelMap(null);
@@ -120,7 +120,7 @@ public final class ModelMapTests {
assertEquals(0, model.size());
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testAddObjectWithNull() throws Exception {
// Null model arguments added without a name being explicitly supplied are not allowed
ModelMap model = new ModelMap();
@@ -150,7 +150,7 @@ public final class ModelMapTests {
assertEquals(0, model.size());
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testAddAllObjectsWithSparseArrayList() throws Exception {
// Null model arguments added without a name being explicitly supplied are not allowed
ModelMap model = new ModelMap();

View File

@@ -32,14 +32,14 @@ import static org.junit.Assert.*;
*/
public class ValidationUtilsTests {
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testInvokeValidatorWithNullValidator() throws Exception {
TestBean tb = new TestBean();
Errors errors = new BeanPropertyBindingResult(tb, "tb");
ValidationUtils.invokeValidator(null, tb, errors);
}
@Test(expected=IllegalArgumentException.class)
@Test(expected = IllegalArgumentException.class)
public void testInvokeValidatorWithNullErrors() throws Exception {
TestBean tb = new TestBean();
ValidationUtils.invokeValidator(new EmptyValidator(), tb, null);