提交 a89e716c 编写于 作者: P Phillip Webb 提交者: Juergen Hoeller

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
上级 1c25cec4
/*
* 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 @@ public class ClassWithConstructor {
public void method() {
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -216,7 +216,7 @@ public class ProxyFactoryTests {
TimeStamped ts = (TimeStamped) factory.getProxy();
assertTrue(ts.getTimeStamp() == t);
// Shouldn't fail;
((IOther) ts).absquatulate();
((IOther) ts).absquatulate();
}
@Test
......
/*
* 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.
......@@ -28,20 +28,20 @@ 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();
}
}
/*
* 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.
......@@ -295,7 +295,7 @@ public class AnnotationAsyncExecutionAspectTests {
@Async
public void failWithVoid() {
throw new UnsupportedOperationException("failWithVoid");
throw new UnsupportedOperationException("failWithVoid");
}
}
......
/*
* 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.
......@@ -52,4 +52,4 @@ public abstract class AbstractPropertyValuesTests {
assertTrue("Map size is 0", m.size() == 0);
}
}
\ No newline at end of file
}
......@@ -444,9 +444,9 @@ public class BeanUtilsTests {
value = aValue;
}
}
private static class BeanWithSingleNonDefaultConstructor {
private final String name;
public BeanWithSingleNonDefaultConstructor(String name) {
......
/*
* 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.
......@@ -644,25 +644,25 @@ public class BeanWrapperGenericsTests {
public interface ObjectWithId<T extends Comparable<T>> {
T getId();
T getId();
void setId(T aId);
void setId(T aId);
}
public class Promotion implements ObjectWithId<Long> {
private Long id;
private Long id;
@Override
public Long getId() {
return id;
}
@Override
public Long getId() {
return id;
}
@Override
public void setId(Long aId) {
this.id = aId;
}
@Override
public void setId(Long aId) {
this.id = aId;
}
}
}
/*
* 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.
......@@ -65,4 +65,4 @@ public class CountingFactory implements FactoryBean {
return true;
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -64,4 +64,4 @@ public class DummyReferencer {
return testBean2;
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -165,4 +165,4 @@ class ProtectedLifecycleBean implements BeanNameAware, BeanFactoryAware, Initial
}
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -22,4 +22,4 @@ package org.springframework.beans.support;
*/
public class DerivedFromProtectedBaseBean extends ProtectedBaseBean {
}
\ No newline at end of file
}
/*
* 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 @@ class ProtectedBaseBean {
return someProperty;
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -43,4 +43,4 @@ public class BooleanTestBean {
this.bool2 = bool2;
}
}
\ No newline at end of file
}
/*
* Copyright 2002-2007 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 enum CustomEnum {
return "CustomEnum: " + name();
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -182,4 +182,4 @@ public class DummyFactory
}
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -22,4 +22,4 @@ package org.springframework.tests.sample.beans;
*/
public class GenericIntegerBean extends GenericBean<Integer> {
}
\ No newline at end of file
}
/*
* 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.
......@@ -23,4 +23,4 @@ import java.util.Set;
*/
public class GenericSetOfIntegerBean extends GenericBean<Set<Integer>> {
}
\ No newline at end of file
}
/*
* 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.
......@@ -20,4 +20,4 @@ public interface INestedTestBean {
public String getCompany();
}
\ No newline at end of file
}
/*
* 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.
......@@ -21,4 +21,4 @@ public interface IOther {
void absquatulate();
}
\ No newline at end of file
}
/*
* 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.
......@@ -142,4 +142,4 @@ public class IndexedTestBean {
this.sortedMap = sortedMap;
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -167,4 +167,4 @@ public class LifecycleBean implements BeanNameAware, BeanFactoryAware, Initializ
}
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -61,4 +61,4 @@ public class NestedTestBean implements INestedTestBean {
return "NestedTestBean: " + this.company;
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -140,4 +140,4 @@ public class NumberTestBean {
this.bigDecimal = bigDecimal;
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -183,4 +183,4 @@ public class DummyFactory
}
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -19,4 +19,4 @@
*
* @author Stephane Nicoll
*/
package org.springframework.context.index.sample.jpa;
\ No newline at end of file
package org.springframework.context.index.sample.jpa;
/*
* 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.
......@@ -34,4 +34,4 @@ public @interface DevComponent {
String value() default "";
}
\ No newline at end of file
}
/*
* 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.
......@@ -22,4 +22,4 @@ import org.springframework.context.annotation.ScopedProxyMode;
public @interface MyScope {
String value() default BeanDefinition.SCOPE_SINGLETON;
ScopedProxyMode proxyMode() default ScopedProxyMode.DEFAULT;
}
\ No newline at end of file
}
/*
* 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;
......
/*
* 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;
}
}
\ No newline at end of file
}
/*
* 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 {
}
}
}
\ No newline at end of file
}
/*
* 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;
}
}
\ No newline at end of file
}
/*
* 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) {}
}
\ No newline at end of file
}
/*
* 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() {
}
}
\ No newline at end of file
}
/*
* 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;
}
}
\ No newline at end of file
}
/*
* 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");
}
}
\ No newline at end of file
}
/*
* 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();
}
}
/*
* 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"};
}
}
\ No newline at end of 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;
}
......
/*
* 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
......
/*
* 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");
}
}
\ No newline at end of file
}
/*
* 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();
}
}
\ No newline at end of file
}
/*
* 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 {
}
\ No newline at end of file
}
/*
* 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 {
}
\ No newline at end of file
}
/*
* 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 {
}
}
}
\ No newline at end of file
}
/*
* 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;
}
}
\ No newline at end of file
}
/*
* 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);
}
}
\ No newline at end of file
}
/*
* 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();
}
}
......
package org.springframework.scripting.groovy;
public interface TestService {
public String sayHello();
public String sayHello();
}
......@@ -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");
}
}
/*
* 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 {
}
}
}
\ No newline at end of file
}
/*
* 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;
}
}
\ No newline at end of file
}
/*
* 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;
}
}
\ No newline at end of file
}
......@@ -47,4 +47,4 @@ public class PerTargetAspect implements Ordered {
public void setOrder(int order) {
this.order = order;
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package test.mixin;
package test.mixin;
/**
......
/*
* 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.
......@@ -30,4 +30,4 @@ public interface Lockable {
void unlock();
boolean locked();
}
\ No newline at end of file
}
......@@ -431,7 +431,7 @@ public class ResolvableTypeTests {
interfaces.add(interfaceType.toString());
}
assertThat(interfaces.toString(), equalTo(
"["
"["
+ "java.io.Serializable, "
+ "java.lang.Cloneable, "
+ "java.util.List<java.lang.CharSequence>, "
......
/*
* 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.
......@@ -31,21 +31,21 @@ import static org.hamcrest.MatcherAssert.*;
* @author Rob Winch
*/
public class StandardReflectionParameterNameDiscoverTests {
private ParameterNameDiscoverer parameterNameDiscoverer;
@Before
public void setup() {
parameterNameDiscoverer = new StandardReflectionParameterNameDiscoverer();
}
@Test
public void getParameterNamesOnInterface() {
Method method = ReflectionUtils.findMethod(MessageService.class,"sendMessage", String.class);
String[] actualParams = parameterNameDiscoverer.getParameterNames(method);
assertThat(actualParams, is(new String[]{"message"}));
}
public interface MessageService {
void sendMessage(String message);
}
private ParameterNameDiscoverer parameterNameDiscoverer;
@Before
public void setup() {
parameterNameDiscoverer = new StandardReflectionParameterNameDiscoverer();
}
@Test
public void getParameterNamesOnInterface() {
Method method = ReflectionUtils.findMethod(MessageService.class,"sendMessage", String.class);
String[] actualParams = parameterNameDiscoverer.getParameterNames(method);
assertThat(actualParams, is(new String[]{"message"}));
}
public interface MessageService {
void sendMessage(String message);
}
}
/*
* 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.
......@@ -82,4 +82,4 @@ public class ByteArrayDecoderTests extends AbstractDataBufferAllocatingTestCase
.verify();
}
}
\ No newline at end of file
}
......@@ -73,4 +73,4 @@ public class ResourceDecoderTests extends AbstractDataBufferAllocatingTestCase {
.verify();
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -74,4 +74,4 @@ public class ResourceEncoderTests extends AbstractDataBufferAllocatingTestCase {
.verify();
}
}
\ No newline at end of file
}
......@@ -200,4 +200,4 @@ public class StreamConverterTests {
public List rawList;
}
}
\ No newline at end of file
}
......@@ -537,4 +537,4 @@ public class DataBufferTests extends AbstractDataBufferAllocatingTestCase {
release(buffer);
}
}
\ No newline at end of file
}
......@@ -283,7 +283,7 @@ public class DataBufferUtilsTests extends AbstractDataBufferAllocatingTestCase {
assertReleased(bar);
assertReleased(baz);
}
private static void assertReleased(DataBuffer dataBuffer) {
if (dataBuffer instanceof NettyDataBuffer) {
ByteBuf byteBuf = ((NettyDataBuffer) dataBuffer).getNativeBuffer();
......
/*
* 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.
......@@ -70,4 +70,4 @@ public class PooledDataBufferTests {
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -57,4 +57,4 @@ public class DataBufferTestUtilsTests extends AbstractDataBufferAllocatingTestCa
release(buffer);
}
}
\ No newline at end of file
}
/*
* Copyright 2002-2009 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.
......@@ -79,4 +79,4 @@ public class StaxResultTests {
assertThat("Invalid result", stringWriter.toString(), isSimilarTo(XML));
}
}
\ No newline at end of file
}
......@@ -143,7 +143,7 @@ public class SpelDocumentationTests extends AbstractExpressionTests {
@Test
public void testXMLBasedConfig() {
evaluate("(T(java.lang.Math).random() * 100.0 )>0",true,Boolean.class);
evaluate("(T(java.lang.Math).random() * 100.0 )>0",true,Boolean.class);
}
// Section 7.5
......@@ -394,7 +394,7 @@ public class SpelDocumentationTests extends AbstractExpressionTests {
StandardEvaluationContext societyContext = new StandardEvaluationContext();
societyContext.setRootObject(new IEEE());
Inventor einstein =
parser.parseExpression("new org.springframework.expression.spel.testresources.Inventor('Albert Einstein',new java.util.Date(), 'German')").getValue(Inventor.class);
parser.parseExpression("new org.springframework.expression.spel.testresources.Inventor('Albert Einstein',new java.util.Date(), 'German')").getValue(Inventor.class);
assertEquals("Albert Einstein", einstein.getName());
//create new inventor instance within add method of List
parser.parseExpression("Members2.add(new org.springframework.expression.spel.testresources.Inventor('Albert Einstein', 'German'))").getValue(societyContext);
......@@ -483,7 +483,7 @@ public class SpelDocumentationTests extends AbstractExpressionTests {
@Test
public void testTemplating() throws Exception {
String randomPhrase =
parser.parseExpression("random number is ${T(java.lang.Math).random()}", new TemplatedParserContext()).getValue(String.class);
parser.parseExpression("random number is ${T(java.lang.Math).random()}", new TemplatedParserContext()).getValue(String.class);
assertTrue(randomPhrase.startsWith("random number"));
}
......
/*
* Copyright 2014 the original author or authors.
* Copyright 2014-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.
......@@ -35,4 +35,4 @@ public class PersonInOtherPackage {
public void setAge(int age) {
this.age = age;
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -41,4 +41,4 @@ public class ArrayContainer {
booleans[0] = true;
floats[0] = 42.0f;
}
}
\ No newline at end of file
}
......@@ -14,4 +14,4 @@ public class Company {
public String getAddress() {
return address;
}
}
\ No newline at end of file
}
......@@ -38,4 +38,4 @@ public class Fruit {
public String toString() {
return "A" + (colorName != null && colorName.startsWith("o") ? "n " : " ") + colorName + " " + name;
}
}
\ No newline at end of file
}
......@@ -25,4 +25,4 @@ public class Person {
public Company getCompany() {
return company;
}
}
\ No newline at end of file
}
......@@ -44,4 +44,4 @@ public class PlaceOfBirth {
return city.hashCode();
}
}
\ No newline at end of file
}
......@@ -16,4 +16,4 @@ public class TestPerson {
public void setAddress(TestAddress address) {
this.address = address;
}
}
\ No newline at end of file
}
......@@ -257,7 +257,7 @@ public class NamedParameterUtilsTests {
public void parseSqlStatementWithSingleLetterInBrackets() {
String expectedSql = "select foo from bar where baz = b?z";
String sql = "select foo from bar where baz = b:{p}z";
ParsedSql parsedSql = NamedParameterUtils.parseSqlStatement(sql);
assertEquals(1, parsedSql.getParameterNames().size());
assertEquals("p", parsedSql.getParameterNames().get(0));
......
/*
* 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.
......@@ -54,4 +54,4 @@ public abstract class AbstractPerson {
this.birth_date = birth_date;
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -34,4 +34,4 @@ public class ConcretePerson extends AbstractPerson {
this.balance = balance;
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -32,4 +32,4 @@ public class ExtendedPerson extends ConcretePerson {
this.someField = someField;
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -64,4 +64,4 @@ public class Person {
this.balance = balanace;
}
}
\ No newline at end of file
}
......@@ -209,8 +209,8 @@ public class DataSourceTransactionManagerTests {
}
final DataSource dsToUse = (lazyConnection ? new LazyConnectionDataSourceProxy(ds) : ds);
tm = new DataSourceTransactionManager(dsToUse);
TransactionTemplate tt = new TransactionTemplate(tm);
tm = new DataSourceTransactionManager(dsToUse);
TransactionTemplate tt = new TransactionTemplate(tm);
assertTrue("Hasn't thread connection", !TransactionSynchronizationManager.hasResource(dsToUse));
assertTrue("Synchronization not active", !TransactionSynchronizationManager.isSynchronizationActive());
......
/*
* 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.
......@@ -104,4 +104,4 @@ public class MarshallingMessageConverterTests {
}
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -100,4 +100,4 @@ public class DestinationVariableMethodArgumentResolverTests {
String param3) {
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -136,4 +136,4 @@ public class SimpAttributesContextHolderTests {
SimpAttributesContextHolder.currentAttributes();
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -135,4 +135,4 @@ public class SimpAttributesTests {
verify(callback1, times(1)).run();
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -202,4 +202,4 @@ public class SimpMessagingTemplateTests {
assertEquals("/queue/foo-user123", ((StompHeaderAccessor) sentAccessor).getDestination());
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -146,7 +146,7 @@ public class BrokerMessageHandlerTests {
@Override
public void publishEvent(ApplicationEvent event) {
publishEvent((Object) event);
publishEvent((Object) event);
}
@Override
......
/*
* 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.
......@@ -229,4 +229,4 @@ public class NativeMessageHeaderAccessorTests {
headerAccessor.setImmutable();
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -168,8 +168,8 @@ public abstract class AbstractMarshallerTests<M extends Marshaller> {
assertThat("Marshaller writes invalid StreamResult", writer.toString(), isSimilarTo(EXPECTED_STRING));
}
private static CompareMatcher isSimilarTo(final Object content) {
return CompareMatcher.isSimilarTo(content)
.ignoreWhitespace();
}
private static CompareMatcher isSimilarTo(final Object content) {
return CompareMatcher.isSimilarTo(content)
.ignoreWhitespace();
}
}
/*
* 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.
......@@ -42,4 +42,4 @@ public class CastorObject {
public void setValue(Integer value) {
this.value = value;
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -29,4 +29,4 @@ public class XmlRegObjectFactory {
public JAXBElement<Airplane> createAirplane(Airplane airplane) {
return new JAXBElement<>(new QName("brand-airplane"), Airplane.class, null, airplane);
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -36,4 +36,4 @@ interface ContextConfigurationTestInterface {
}
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -29,4 +29,4 @@ import org.springframework.test.context.jdbc.SqlConfig;
@DirtiesContext
@SqlConfig(commentPrefix = "`", blockCommentStartDelimiter = "#$", blockCommentEndDelimiter = "$#", separator = "@@")
interface SqlConfigTestInterface {
}
\ No newline at end of file
}
/*
* 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.
......@@ -34,4 +34,4 @@ interface WebAppConfigurationTestInterface {
/* no user beans required for these tests */
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -36,4 +36,4 @@ class PersonController {
return new Person("Wally");
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -33,4 +33,4 @@ class WebConfig {
return new PersonController();
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -229,4 +229,4 @@ public class SpringJUnit4ClassRunnerAppCtxTests implements ApplicationContextAwa
assertEquals("The bar method should have been wired via @Resource.", "Bar", this.bar);
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -29,4 +29,4 @@ public class DevProfileInitializer implements ApplicationContextInitializer<Gene
public void initialize(GenericApplicationContext applicationContext) {
applicationContext.getEnvironment().setActiveProfiles("dev");
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -29,4 +29,4 @@ public class FooBarAliasInitializer implements ApplicationContextInitializer<Gen
public void initialize(GenericApplicationContext applicationContext) {
applicationContext.registerAlias("foo", "bar");
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -31,4 +31,4 @@ class BarConfig {
return "bar";
}
}
\ No newline at end of file
}
/*
* 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.
......@@ -32,4 +32,4 @@ class DevProfileConfig {
public String baz() {
return "dev profile config";
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册