Merge branch 'SPR-10127' into cleanup-3.2.x
* SPR-10127: Replace space indentation with tabs Remove trailing whitespace in source files
This commit is contained in:
commit
84e2be4412
|
|
@ -78,8 +78,10 @@ public class ThreadLocalTargetSource extends AbstractPrototypeBasedTargetSource
|
||||||
Object target = this.targetInThread.get();
|
Object target = this.targetInThread.get();
|
||||||
if (target == null) {
|
if (target == null) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("No target for prototype '" + getTargetBeanName() + "' bound to thread: " +
|
logger.debug("No target for prototype '" + getTargetBeanName() +
|
||||||
"creating one and binding it to thread '" + Thread.currentThread().getName() + "'");
|
"' bound to thread: " +
|
||||||
|
"creating one and binding it to thread '" +
|
||||||
|
Thread.currentThread().getName() + "'");
|
||||||
}
|
}
|
||||||
// Associate target with ThreadLocal.
|
// Associate target with ThreadLocal.
|
||||||
target = newPrototypeInstance();
|
target = newPrototypeInstance();
|
||||||
|
|
|
||||||
|
|
@ -411,6 +411,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests {
|
||||||
CannotBeUnlocked.class);
|
CannotBeUnlocked.class);
|
||||||
assertFalse("Type pattern must have excluded mixin", proxy instanceof Lockable);
|
assertFalse("Type pattern must have excluded mixin", proxy instanceof Lockable);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* prereq AspectJ 1.6.7
|
/* prereq AspectJ 1.6.7
|
||||||
@Test
|
@Test
|
||||||
public void testIntroductionBasedOnAnnotationMatch_Spr5307() {
|
public void testIntroductionBasedOnAnnotationMatch_Spr5307() {
|
||||||
|
|
@ -427,7 +428,9 @@ public abstract class AbstractAspectJAdvisorFactoryTests {
|
||||||
lockable.locked();
|
lockable.locked();
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// TODO: Why does this test fail? It hasn't been run before, so it maybe never actually passed...
|
// TODO: Why does this test fail? It hasn't been run before, so it maybe never actually passed...
|
||||||
|
|
||||||
public void XtestIntroductionWithArgumentBinding() {
|
public void XtestIntroductionWithArgumentBinding() {
|
||||||
TestBean target = new TestBean();
|
TestBean target = new TestBean();
|
||||||
|
|
||||||
|
|
@ -765,7 +768,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests {
|
||||||
|
|
||||||
@Around(value="setAge(age)",argNames="age")
|
@Around(value="setAge(age)",argNames="age")
|
||||||
// @ArgNames({"age"}) // AMC needs more work here? ignoring pjp arg... ok??
|
// @ArgNames({"age"}) // AMC needs more work here? ignoring pjp arg... ok??
|
||||||
// // argNames should be suported in Around as it is in Pointcut
|
// argNames should be suported in Around as it is in Pointcut
|
||||||
public void changeReturnType(ProceedingJoinPoint pjp, int age) throws Throwable {
|
public void changeReturnType(ProceedingJoinPoint pjp, int age) throws Throwable {
|
||||||
pjp.proceed(new Object[] {age*2});
|
pjp.proceed(new Object[] {age*2});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -85,8 +85,8 @@ public class CustomNumberEditor extends PropertyEditorSupport {
|
||||||
* @see java.text.NumberFormat#parse
|
* @see java.text.NumberFormat#parse
|
||||||
* @see java.text.NumberFormat#format
|
* @see java.text.NumberFormat#format
|
||||||
*/
|
*/
|
||||||
public CustomNumberEditor(Class<? extends Number> numberClass, NumberFormat numberFormat, boolean allowEmpty)
|
public CustomNumberEditor(Class<? extends Number> numberClass,
|
||||||
throws IllegalArgumentException {
|
NumberFormat numberFormat, boolean allowEmpty) throws IllegalArgumentException {
|
||||||
|
|
||||||
if (numberClass == null || !Number.class.isAssignableFrom(numberClass)) {
|
if (numberClass == null || !Number.class.isAssignableFrom(numberClass)) {
|
||||||
throw new IllegalArgumentException("Property class must be a subclass of Number");
|
throw new IllegalArgumentException("Property class must be a subclass of Number");
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,8 @@ public class MutableSortDefinition implements SortDefinition, Serializable {
|
||||||
}
|
}
|
||||||
SortDefinition otherSd = (SortDefinition) other;
|
SortDefinition otherSd = (SortDefinition) other;
|
||||||
return (getProperty().equals(otherSd.getProperty()) &&
|
return (getProperty().equals(otherSd.getProperty()) &&
|
||||||
isAscending() == otherSd.isAscending() && isIgnoreCase() == otherSd.isIgnoreCase());
|
isAscending() == otherSd.isAscending() &&
|
||||||
|
isIgnoreCase() == otherSd.isIgnoreCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -319,8 +319,7 @@ public final class ClassPathXmlApplicationContextTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testResourceAndInputStream() throws IOException {
|
public void testResourceAndInputStream() throws IOException {
|
||||||
ClassPathXmlApplicationContext ctx =
|
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(RESOURCE_CONTEXT) {
|
||||||
new ClassPathXmlApplicationContext(RESOURCE_CONTEXT) {
|
|
||||||
public Resource getResource(String location) {
|
public Resource getResource(String location) {
|
||||||
if (TEST_PROPERTIES.equals(location)) {
|
if (TEST_PROPERTIES.equals(location)) {
|
||||||
return new ClassPathResource(TEST_PROPERTIES, ClassPathXmlApplicationContextTests.class);
|
return new ClassPathResource(TEST_PROPERTIES, ClassPathXmlApplicationContextTests.class);
|
||||||
|
|
|
||||||
|
|
@ -82,11 +82,11 @@ public class ExceptionDepthComparatorTests {
|
||||||
assertEquals(LowestDepthException.class, foundClass);
|
assertEquals(LowestDepthException.class, foundClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Class<? extends Throwable> findClosestMatch(Class<? extends Throwable>... classes) {
|
private Class<? extends Throwable> findClosestMatch(
|
||||||
|
Class<? extends Throwable>... classes) {
|
||||||
return ExceptionDepthComparator.findClosestMatch(Arrays.asList(classes), new TargetException());
|
return ExceptionDepthComparator.findClosestMatch(Arrays.asList(classes), new TargetException());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class HighestDepthException extends Throwable {
|
public class HighestDepthException extends Throwable {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,4 +35,3 @@ public interface BeanResolver {
|
||||||
Object resolve(EvaluationContext context, String beanName) throws AccessException;
|
Object resolve(EvaluationContext context, String beanName) throws AccessException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -435,8 +435,8 @@ public class SpelDocumentationTests extends ExpressionTestCase {
|
||||||
ExpressionParser parser = new SpelExpressionParser();
|
ExpressionParser parser = new SpelExpressionParser();
|
||||||
StandardEvaluationContext context = new StandardEvaluationContext();
|
StandardEvaluationContext context = new StandardEvaluationContext();
|
||||||
|
|
||||||
context.registerFunction("reverseString",
|
context.registerFunction("reverseString", StringUtils.class.getDeclaredMethod(
|
||||||
StringUtils.class.getDeclaredMethod("reverseString", new Class[] { String.class }));
|
"reverseString", new Class[] { String.class }));
|
||||||
|
|
||||||
String helloWorldReversed = parser.parseExpression("#reverseString('hello world')").getValue(context, String.class);
|
String helloWorldReversed = parser.parseExpression("#reverseString('hello world')").getValue(context, String.class);
|
||||||
Assert.assertEquals("dlrow olleh",helloWorldReversed);
|
Assert.assertEquals("dlrow olleh",helloWorldReversed);
|
||||||
|
|
@ -456,8 +456,8 @@ public class SpelDocumentationTests extends ExpressionTestCase {
|
||||||
parser.parseExpression("Name").setValue(societyContext, "IEEE");
|
parser.parseExpression("Name").setValue(societyContext, "IEEE");
|
||||||
societyContext.setVariable("queryName", "Nikola Tesla");
|
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'";
|
+ "+ Name + ' Society' : #queryName + ' is not a member of the ' + Name + ' Society'";
|
||||||
|
|
||||||
String queryResultString = parser.parseExpression(expression).getValue(societyContext, String.class);
|
String queryResultString = parser.parseExpression(expression).getValue(societyContext, String.class);
|
||||||
Assert.assertEquals("Nikola Tesla is a member of the IEEE Society",queryResultString);
|
Assert.assertEquals("Nikola Tesla is a member of the IEEE Society",queryResultString);
|
||||||
|
|
|
||||||
|
|
@ -60,4 +60,3 @@ public interface RowMapper<T> {
|
||||||
T mapRow(ResultSet rs, int rowNum) throws SQLException;
|
T mapRow(ResultSet rs, int rowNum) throws SQLException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -35,4 +35,3 @@ public class ConfigurableJasperReportsViewWithStreamTests extends AbstractConfig
|
||||||
return "application/pdf";
|
return "application/pdf";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue