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
This commit is contained in:
Phillip Webb
2012-12-18 13:45:00 -08:00
committed by Chris Beams
parent 44a474a014
commit 1762157ad1
1400 changed files with 5920 additions and 5923 deletions

View File

@@ -38,15 +38,15 @@ import org.springframework.web.context.support.XmlWebApplicationContext;
/**
* Integration tests for scoped proxy use in conjunction with aop: namespace.
* Deemed an integration test because .web mocks and application contexts are required.
*
*
* @see org.springframework.aop.config.AopNamespaceHandlerTests;
*
*
* @author Rob Harrop
* @author Juergen Hoeller
* @author Chris Beams
*/
public final class AopNamespaceHandlerScopeIntegrationTests {
private static final String CLASSNAME = AopNamespaceHandlerScopeIntegrationTests.class.getName();
private static final String CONTEXT = format("classpath:%s-context.xml", ClassUtils.convertClassNameToResourcePath(CLASSNAME));

View File

@@ -44,7 +44,7 @@ import test.interceptor.NopInterceptor;
/**
* Integration tests for auto proxy creation by advisor recognition working in
* conjunction with transaction managment resources.
*
*
* @see org.springframework.aop.framework.autoproxy.AdvisorAutoProxyCreatorTests;
*
* @author Rod Johnson
@@ -54,7 +54,7 @@ public final class AdvisorAutoProxyCreatorIntegrationTests {
private static final Class<?> CLASS = AdvisorAutoProxyCreatorIntegrationTests.class;
private static final String CLASSNAME = CLASS.getSimpleName();
private static final String DEFAULT_CONTEXT = CLASSNAME + "-context.xml";
private static final String ADVISOR_APC_BEAN_NAME = "aapc";
@@ -66,7 +66,7 @@ public final class AdvisorAutoProxyCreatorIntegrationTests {
protected BeanFactory getBeanFactory() throws IOException {
return new ClassPathXmlApplicationContext(DEFAULT_CONTEXT, CLASS);
}
@Test
public void testDefaultExclusionPrefix() throws Exception {
DefaultAdvisorAutoProxyCreator aapc = (DefaultAdvisorAutoProxyCreator) getBeanFactory().getBean(ADVISOR_APC_BEAN_NAME);
@@ -100,7 +100,7 @@ public final class AdvisorAutoProxyCreatorIntegrationTests {
test.getName();
assertEquals(1, counter.getCalls());
}
@Test
public void testTransactionAttributeOnMethod() throws Exception {
BeanFactory bf = getBeanFactory();
@@ -157,7 +157,7 @@ public final class AdvisorAutoProxyCreatorIntegrationTests {
CallCountingTransactionManager txMan = (CallCountingTransactionManager) bf.getBean(TXMANAGER_BEAN_NAME);
assertEquals(0, txMan.commits);
// Should NOT roll back on ServletException
// Should NOT roll back on ServletException
try {
rb.echoException(new ServletException());
}
@@ -190,18 +190,18 @@ public final class AdvisorAutoProxyCreatorIntegrationTests {
@SuppressWarnings("serial")
class NeverMatchAdvisor extends StaticMethodMatcherPointcutAdvisor {
public NeverMatchAdvisor() {
super(new NopInterceptor());
}
/**
* This method is solely to allow us to create a mixture of dependencies in
* the bean definitions. The dependencies don't have any meaning, and don't
* <b>do</b> anything.
*/
public void setDependencies(List<?> l) {
}
/**
@@ -215,11 +215,11 @@ class NeverMatchAdvisor extends StaticMethodMatcherPointcutAdvisor {
class NoSetters {
public void A() {
}
public int getB() {
return -1;
}
@@ -282,7 +282,7 @@ class OrderedTxCheckAdvisor extends StaticMethodMatcherPointcutAdvisor implement
class Rollback {
/**
* Inherits transaction attribute.
* Illustrates programmatic rollback.
@@ -293,7 +293,7 @@ class Rollback {
setRollbackOnly();
}
}
/**
* Extracted in a protected method to facilitate testing
*/
@@ -342,7 +342,7 @@ class CallCountingTransactionManager extends AbstractPlatformTransactionManager
++rollbacks;
--inflight;
}
public void clear() {
begun = commits = rollbacks = inflight = 0;
}

View File

@@ -21,7 +21,7 @@ import org.springframework.test.jpa.AbstractJpaTests;
/**
* Test to ensure that component scanning work with load-time weaver.
* See SPR-3873 for more details.
*
*
* @author Ramnivas Laddad
*/
public class ComponentScanningWithLTWTests extends AbstractJpaTests {
@@ -29,7 +29,7 @@ public class ComponentScanningWithLTWTests extends AbstractJpaTests {
public ComponentScanningWithLTWTests() {
setDependencyCheck(false);
}
@Override
protected String getConfigPath() {
return "ComponentScanningWithLTWTests.xml";

View File

@@ -49,7 +49,7 @@ public class ClassPathBeanDefinitionScannerScopeIntegrationTests {
private ServletRequestAttributes oldRequestAttributes;
private ServletRequestAttributes newRequestAttributes;
private ServletRequestAttributes newRequestAttributes;
private ServletRequestAttributes oldRequestAttributesWithSession;
@@ -234,7 +234,7 @@ public class ClassPathBeanDefinitionScannerScopeIntegrationTests {
assertTrue(bean instanceof AnotherScopeTestInterface);
assertEquals(DEFAULT_NAME, bean.getName());
bean.setName(MODIFIED_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributesWithSession);
// this is a proxy so it should be reset to default
@@ -262,7 +262,7 @@ public class ClassPathBeanDefinitionScannerScopeIntegrationTests {
assertTrue(bean instanceof SessionScopedTestBean);
assertEquals(DEFAULT_NAME, bean.getName());
bean.setName(MODIFIED_NAME);
bean.setName(MODIFIED_NAME);
RequestContextHolder.setRequestAttributes(newRequestAttributesWithSession);
// this is a proxy so it should be reset to default

View File

@@ -11,39 +11,39 @@ import org.springframework.core.convert.TypeDescriptor;
import org.springframework.expression.MethodExecutor;
public class Spr7538Tests {
@Ignore @Test
public void repro() throws Exception {
AlwaysTrueReleaseStrategy target = new AlwaysTrueReleaseStrategy();
BeanFactoryTypeConverter converter = new BeanFactoryTypeConverter();
StandardEvaluationContext context = new StandardEvaluationContext();
context.setTypeConverter(converter);
List<Foo> arguments = new ArrayList<Foo>();
// !!!! With the below line commented you'll get NPE. Uncomment and everything is OK!
//arguments.add(new Foo());
List<TypeDescriptor> paramDescriptors = new ArrayList<TypeDescriptor>();
Method method = AlwaysTrueReleaseStrategy.class.getMethod("checkCompleteness", List.class);
paramDescriptors.add(new TypeDescriptor(new MethodParameter(method, 0)));
List<TypeDescriptor> argumentTypes = new ArrayList<TypeDescriptor>();
argumentTypes.add(TypeDescriptor.forObject(arguments));
ReflectiveMethodResolver resolver = new ReflectiveMethodResolver();
MethodExecutor executor = resolver.resolve(context, target, "checkCompleteness", argumentTypes);
Object result = executor.execute(context, target, arguments);
System.out.println("Result: " + result);
}
public static class AlwaysTrueReleaseStrategy {
public boolean checkCompleteness(List<Foo> messages) {
return true;
}
}
public static class Foo{}
}

View File

@@ -51,7 +51,7 @@ public class CallCountingTransactionManager extends AbstractPlatformTransactionM
++rollbacks;
--inflight;
}
public void clear() {
begun = commits = rollbacks = inflight = 0;
}