Use tabs rather than spaces in tests

Update tests to ensure that tabs are used instead of spaces. Also
consistently apply a new line at the end of each file.

Issue: SPR-16968
This commit is contained in:
Phillip Webb
2018-06-25 09:24:30 -07:00
committed by Juergen Hoeller
parent 1c25cec44f
commit a89e716cc7
209 changed files with 528 additions and 529 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -77,24 +77,24 @@ public class AspectAndAdvicePrecedenceTests {
private static final String[] EXPECTED = {
// this order confirmed by running the same aspects (minus the Spring AOP advisors)
// through AspectJ...
"beforeAdviceOne(highPrecedenceAspect)", // 1
"beforeAdviceTwo(highPrecedenceAspect)", // 2
"aroundAdviceOne(highPrecedenceAspect)", // 3, before proceed
"aroundAdviceTwo(highPrecedenceAspect)", // 4, before proceed
"beforeAdviceOne(highPrecedenceSpringAdvice)", // 5
"beforeAdviceOne(lowPrecedenceSpringAdvice)", // 6
"beforeAdviceOne(lowPrecedenceAspect)", // 7
"beforeAdviceTwo(lowPrecedenceAspect)", // 8
"aroundAdviceOne(lowPrecedenceAspect)", // 9, before proceed
"aroundAdviceTwo(lowPrecedenceAspect)", // 10, before proceed
"aroundAdviceTwo(lowPrecedenceAspect)", // 11, after proceed
"aroundAdviceOne(lowPrecedenceAspect)", // 12, after proceed
"afterAdviceOne(lowPrecedenceAspect)", // 13
"afterAdviceTwo(lowPrecedenceAspect)", // 14
"aroundAdviceTwo(highPrecedenceAspect)", // 15, after proceed
"aroundAdviceOne(highPrecedenceAspect)", // 16, after proceed
"afterAdviceOne(highPrecedenceAspect)", // 17
"afterAdviceTwo(highPrecedenceAspect)" // 18
"beforeAdviceOne(highPrecedenceAspect)", // 1
"beforeAdviceTwo(highPrecedenceAspect)", // 2
"aroundAdviceOne(highPrecedenceAspect)", // 3, before proceed
"aroundAdviceTwo(highPrecedenceAspect)", // 4, before proceed
"beforeAdviceOne(highPrecedenceSpringAdvice)", // 5
"beforeAdviceOne(lowPrecedenceSpringAdvice)", // 6
"beforeAdviceOne(lowPrecedenceAspect)", // 7
"beforeAdviceTwo(lowPrecedenceAspect)", // 8
"aroundAdviceOne(lowPrecedenceAspect)", // 9, before proceed
"aroundAdviceTwo(lowPrecedenceAspect)", // 10, before proceed
"aroundAdviceTwo(lowPrecedenceAspect)", // 11, after proceed
"aroundAdviceOne(lowPrecedenceAspect)", // 12, after proceed
"afterAdviceOne(lowPrecedenceAspect)", // 13
"afterAdviceTwo(lowPrecedenceAspect)", // 14
"aroundAdviceTwo(highPrecedenceAspect)", // 15, after proceed
"aroundAdviceOne(highPrecedenceAspect)", // 16, after proceed
"afterAdviceOne(highPrecedenceAspect)", // 17
"afterAdviceTwo(highPrecedenceAspect)" // 18
};
private int adviceInvocationNumber = 0;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -74,4 +74,4 @@ class CallCountingInterceptor implements MethodInterceptor {
public void reset() {
this.count = 0;
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -91,4 +91,4 @@ class NonAnnotatedMakeLockable {
}
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -148,4 +148,4 @@ class JoinPointMonitorAtAspectJAspect {
this.counter = counter;
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -95,4 +95,4 @@ class SubtypeMatchingTestClassC implements Bar {
@Override
public void bar(Object o) {}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -119,4 +119,4 @@ class TestImpl implements TestInterface {
@Override
public void doIt() {
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -99,4 +99,4 @@ class ResourceArrayFactoryBean implements FactoryBean<Object> {
return true;
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,4 +31,4 @@ public class AnnotationDrivenCacheConfigTests extends AbstractCacheAnnotationTes
"/org/springframework/cache/config/annotationDrivenCacheConfig.xml");
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,19 +28,19 @@ import org.springframework.cache.interceptor.KeyGenerator;
*/
public class SomeCustomKeyGenerator implements KeyGenerator {
@Override
public Object generate(Object target, Method method, Object... params) {
return generateKey(method.getName(), params);
}
@Override
public Object generate(Object target, Method method, Object... params) {
return generateKey(method.getName(), params);
}
/**
* @see #generate(Object, java.lang.reflect.Method, Object...)
*/
static Object generateKey(String methodName, Object... params) {
final StringBuilder sb = new StringBuilder(methodName);
for (Object param : params) {
sb.append(param);
}
return sb.toString();
}
/**
* @see #generate(Object, java.lang.reflect.Method, Object...)
*/
static Object generateKey(String methodName, Object... params) {
final StringBuilder sb = new StringBuilder(methodName);
for (Object param : params) {
sb.append(param);
}
return sb.toString();
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,4 +27,4 @@ public class DoubleScanTests extends SimpleScanTests {
return new String[] {"doubleScanTests.xml"};
}
}
}

View File

@@ -394,7 +394,7 @@ public class ImportSelectorTests {
public Iterable<Entry> selectImports() {
LinkedList<Entry> content = new LinkedList<>();
TestImportGroup.imports.forEach((metadata, values) ->
values.forEach(value -> content.add(new Entry(metadata, value))));
values.forEach(value -> content.add(new Entry(metadata, value))));
Collections.reverse(content);
return content;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@ public class Spr16217Tests {
@Ignore("TODO")
public void baseConfigurationIsIncludedWhenFirstSuperclassReferenceIsSkippedInRegisterBeanPhase() {
try (AnnotationConfigApplicationContext context =
new AnnotationConfigApplicationContext(RegisterBeanPhaseImportingConfiguration.class)) {
new AnnotationConfigApplicationContext(RegisterBeanPhaseImportingConfiguration.class)) {
context.getBean("someBean");
}
}
@@ -39,7 +39,7 @@ public class Spr16217Tests {
@Test
public void baseConfigurationIsIncludedWhenFirstSuperclassReferenceIsSkippedInParseConfigurationPhase() {
try (AnnotationConfigApplicationContext context =
new AnnotationConfigApplicationContext(ParseConfigurationPhaseImportingConfiguration.class)) {
new AnnotationConfigApplicationContext(ParseConfigurationPhaseImportingConfiguration.class)) {
context.getBean("someBean");
}
}
@@ -58,7 +58,7 @@ public class Spr16217Tests {
}
}
public static class RegisterBeanPhaseCondition implements ConfigurationCondition {
@Override
@@ -72,7 +72,7 @@ public class Spr16217Tests {
}
}
public static class ParseConfigurationPhaseCondition implements ConfigurationCondition {
@Override
@@ -91,7 +91,7 @@ public class Spr16217Tests {
public static class RegisterBeanPhaseImportingConfiguration {
}
@Import({ParseConfigurationPhaseConditionConfiguration.class, BarConfiguration.class})
public static class ParseConfigurationPhaseImportingConfiguration {
}
@@ -101,7 +101,7 @@ public class Spr16217Tests {
public static class UnconditionalImportingConfiguration {
}
public static class BaseConfiguration {
@Bean

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,4 +28,4 @@ public class Level1Config {
public TestBean level1Bean() {
return new TestBean("level1Bean");
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2011 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,4 +40,4 @@ public abstract class BaseConfig {
public Bar workaroundBar() {
return protectedBar();
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,4 +25,4 @@ import org.springframework.stereotype.Component;
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
@Description("A Component with a role")
public class ComponentWithRole {
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2011 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,4 +20,4 @@ import org.springframework.stereotype.Component;
@Component("componentWithoutRole")
public class ComponentWithoutRole {
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -127,4 +127,4 @@ public class FactoryBeanAccessTests {
}
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -95,4 +95,4 @@ public class MapAccessorTests {
return map2;
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -117,4 +117,4 @@ public class LiveBeansViewTests {
return ManagementFactory.getPlatformMBeanServer().queryNames(new ObjectName(objectName), null);
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -125,7 +125,7 @@ public class MBeanExporterTests extends AbstractMBeanServerTests {
ObjectNameManager.getInstance(OBJECT_NAME));
}
finally {
exporter.destroy();
exporter.destroy();
}
}
@@ -148,7 +148,7 @@ public class MBeanExporterTests extends AbstractMBeanServerTests {
assertFalse("Assembler should not have been invoked", asm.invoked);
}
finally {
exporter.destroy();
exporter.destroy();
}
}

View File

@@ -1,5 +1,6 @@
package org.springframework.scripting.groovy;
public interface TestService {
public String sayHello();
public String sayHello();
}

View File

@@ -2,8 +2,9 @@ package org.springframework.scripting.groovy;
@Log
public class TestServiceImpl implements TestService{
@Override
public String sayHello() {
throw new TestException("TestServiceImpl");
}
@Override
public String sayHello() {
throw new TestException("TestServiceImpl");
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2005 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -49,4 +49,4 @@ public class TestMethodInvokingTask {
}
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2005 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -32,4 +32,4 @@ public class BeanWithObjectProperty {
this.object = object;
}
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,4 +40,4 @@ public class FieldAccessBean {
return spouse;
}
}
}