Add missing @Override annotations
This commit is contained in:
@@ -1003,22 +1003,27 @@ class TestScope implements Scope {
|
||||
|
||||
int instanceCount
|
||||
|
||||
@Override
|
||||
public Object remove(String name) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerDestructionCallback(String name, Runnable callback) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getConversationId() {
|
||||
return "mock"
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object get(String name, ObjectFactory<?> objectFactory) {
|
||||
instanceCount++
|
||||
objectFactory.getObject()
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object resolveContextualObject(String s) {
|
||||
return null; // noop
|
||||
}
|
||||
|
||||
@@ -183,6 +183,7 @@ public class CacheErrorHandlerTests {
|
||||
return new SimpleService();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Bean
|
||||
public CacheManager cacheManager() {
|
||||
SimpleCacheManager cacheManager = new SimpleCacheManager();
|
||||
|
||||
@@ -1281,6 +1281,7 @@ public class ConfigurationClassPostProcessorTests {
|
||||
|
||||
public interface RepositoryInterface<T> {
|
||||
|
||||
@Override
|
||||
String toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -167,6 +167,7 @@ public class LazyAutowiredAnnotationBeanPostProcessorTests {
|
||||
@Autowired @Lazy
|
||||
private List<TestBean> testBeans;
|
||||
|
||||
@Override
|
||||
public TestBean getTestBean() {
|
||||
return this.testBean;
|
||||
}
|
||||
@@ -185,6 +186,7 @@ public class LazyAutowiredAnnotationBeanPostProcessorTests {
|
||||
@Autowired(required = false) @Lazy
|
||||
private List<TestBean> testBeans;
|
||||
|
||||
@Override
|
||||
public TestBean getTestBean() {
|
||||
return this.testBean;
|
||||
}
|
||||
@@ -200,6 +202,7 @@ public class LazyAutowiredAnnotationBeanPostProcessorTests {
|
||||
@LazyInject
|
||||
private TestBean testBean;
|
||||
|
||||
@Override
|
||||
public TestBean getTestBean() {
|
||||
return this.testBean;
|
||||
}
|
||||
@@ -218,6 +221,7 @@ public class LazyAutowiredAnnotationBeanPostProcessorTests {
|
||||
this.testBean = testBean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TestBean getTestBean() {
|
||||
return this.testBean;
|
||||
}
|
||||
@@ -236,6 +240,7 @@ public class LazyAutowiredAnnotationBeanPostProcessorTests {
|
||||
this.testBean = testBean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TestBean getTestBean() {
|
||||
return this.testBean;
|
||||
}
|
||||
@@ -254,6 +259,7 @@ public class LazyAutowiredAnnotationBeanPostProcessorTests {
|
||||
this.testBean = testBean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TestBean getTestBean() {
|
||||
return this.testBean;
|
||||
}
|
||||
@@ -269,6 +275,7 @@ public class LazyAutowiredAnnotationBeanPostProcessorTests {
|
||||
this.testBean = testBean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TestBean getTestBean() {
|
||||
return this.testBean;
|
||||
}
|
||||
@@ -284,6 +291,7 @@ public class LazyAutowiredAnnotationBeanPostProcessorTests {
|
||||
this.testBean = testBean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TestBean getTestBean() {
|
||||
return this.testBean;
|
||||
}
|
||||
@@ -299,6 +307,7 @@ public class LazyAutowiredAnnotationBeanPostProcessorTests {
|
||||
this.testBean = testBean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TestBean getTestBean() {
|
||||
return this.testBean;
|
||||
}
|
||||
|
||||
@@ -361,6 +361,7 @@ public class ConfigurationClassProcessingTests {
|
||||
|
||||
static TestBean testBean = new TestBean(ConfigWithBeanWithProviderImplementation.class.getSimpleName());
|
||||
|
||||
@Override
|
||||
@Bean(name = "customName")
|
||||
public TestBean get() {
|
||||
return testBean;
|
||||
@@ -373,6 +374,7 @@ public class ConfigurationClassProcessingTests {
|
||||
|
||||
static Set<String> set = Collections.singleton("value");
|
||||
|
||||
@Override
|
||||
@Bean(name = "customName")
|
||||
public Set<String> get() {
|
||||
return set;
|
||||
|
||||
@@ -42,6 +42,7 @@ public class ScannedComponent {
|
||||
@Scope(proxyMode = ScopedProxyMode.INTERFACES, value = "prototype")
|
||||
public static class StateImpl implements State {
|
||||
|
||||
@Override
|
||||
public String anyMethod() {
|
||||
return "anyMethod called";
|
||||
}
|
||||
|
||||
@@ -840,6 +840,7 @@ public class AnnotationDrivenEventListenerTests {
|
||||
this.eventCollector.addEvent(this, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
@EventListener
|
||||
@Async
|
||||
public void handleAsync(AnotherTestEvent event) {
|
||||
@@ -866,6 +867,7 @@ public class AnnotationDrivenEventListenerTests {
|
||||
this.eventCollector.addEvent(this, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
@EventListener
|
||||
@Async
|
||||
public void handleAsync(AnotherTestEvent event) {
|
||||
@@ -988,11 +990,13 @@ public class AnnotationDrivenEventListenerTests {
|
||||
super.handleString(payload);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ConditionalEvent("#root.event.timestamp > #p0")
|
||||
public void handleTimestamp(Long timestamp) {
|
||||
collectEvent(timestamp);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ConditionalEvent("@conditionEvaluator.valid(#p0)")
|
||||
public void handleRatio(Double ratio) {
|
||||
collectEvent(ratio);
|
||||
|
||||
@@ -633,6 +633,7 @@ public class ApplicationContextEventTests extends AbstractApplicationEventListen
|
||||
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) {
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
@@ -77,14 +77,17 @@ public class FactoryBeanAccessTests {
|
||||
|
||||
static class CarFactoryBean implements FactoryBean<Car> {
|
||||
|
||||
@Override
|
||||
public Car getObject() {
|
||||
return new Car();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<Car> getObjectType() {
|
||||
return Car.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSingleton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -565,11 +565,13 @@ public class AsyncExecutionTests {
|
||||
@Async
|
||||
public static class AsyncClassBeanWithInterface implements RegularInterface {
|
||||
|
||||
@Override
|
||||
public void doSomething(int i) {
|
||||
boolean condition = !Thread.currentThread().getName().equals(originalThreadName);
|
||||
assertThat(condition).isTrue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Future<String> returnSomething(int i) {
|
||||
boolean condition = !Thread.currentThread().getName().equals(originalThreadName);
|
||||
assertThat(condition).isTrue();
|
||||
|
||||
@@ -322,12 +322,14 @@ public class SpringValidatorAdapterTests {
|
||||
|
||||
private String message;
|
||||
|
||||
@Override
|
||||
public void initialize(Same constraintAnnotation) {
|
||||
field = constraintAnnotation.field();
|
||||
comparingField = constraintAnnotation.comparingField();
|
||||
message = constraintAnnotation.message();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(Object value, ConstraintValidatorContext context) {
|
||||
BeanWrapper beanWrapper = new BeanWrapperImpl(value);
|
||||
Object fieldValue = beanWrapper.getPropertyValue(field);
|
||||
|
||||
@@ -4,6 +4,7 @@ import org.springframework.scripting.Calculator
|
||||
|
||||
class GroovyCalculator implements Calculator {
|
||||
|
||||
@Override
|
||||
int add(int x, int y) {
|
||||
return x + y;
|
||||
}
|
||||
|
||||
@@ -10,10 +10,12 @@ class GroovyCallCounter implements CallCounter {
|
||||
count = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
void before() {
|
||||
count++;
|
||||
}
|
||||
|
||||
@Override
|
||||
int getCalls() {
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ class DelegatingCalculator implements Calculator {
|
||||
|
||||
def Calculator delegate;
|
||||
|
||||
@Override
|
||||
int add(int x, int y) {
|
||||
//println "hello"
|
||||
//println this.metaClass.getClass()
|
||||
|
||||
@@ -9,10 +9,12 @@ class GroovyScriptBean implements ContextScriptBean, ApplicationContextAware {
|
||||
|
||||
private int age
|
||||
|
||||
@Override
|
||||
int getAge() {
|
||||
return this.age
|
||||
}
|
||||
|
||||
@Override
|
||||
void setAge(int age) {
|
||||
this.age = age
|
||||
}
|
||||
|
||||
@@ -4,14 +4,17 @@ import org.springframework.beans.factory.FactoryBean
|
||||
|
||||
class TestFactoryBean implements FactoryBean {
|
||||
|
||||
@Override
|
||||
public boolean isSingleton() {
|
||||
true
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getObjectType() {
|
||||
String.class
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getObject() {
|
||||
"test"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user