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:
committed by
Chris Beams
parent
44a474a014
commit
1762157ad1
@@ -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));
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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{}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ public class CallCountingTransactionManager extends AbstractPlatformTransactionM
|
||||
++rollbacks;
|
||||
--inflight;
|
||||
}
|
||||
|
||||
|
||||
public void clear() {
|
||||
begun = commits = rollbacks = inflight = 0;
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* Abstract superclass for counting advices etc.
|
||||
*
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Chris Beams
|
||||
*/
|
||||
|
||||
@@ -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,5 +19,5 @@ package test.beans;
|
||||
public interface INestedTestBean {
|
||||
|
||||
public String getCompany();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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 test.beans;
|
||||
|
||||
public interface IOther {
|
||||
|
||||
|
||||
void absquatulate();
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public interface ITestBean {
|
||||
|
||||
void setAge(int age);
|
||||
|
||||
String getName();
|
||||
String getName();
|
||||
|
||||
void setName(String name);
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,25 +22,25 @@ import java.io.Serializable;
|
||||
/**
|
||||
* Subclass of NopInterceptor that is serializable and
|
||||
* can be used to test proxy serialization.
|
||||
*
|
||||
*
|
||||
* @author Rod Johnson
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user