Add missing @Override annotations
This commit is contained in:
parent
0b63db26b7
commit
ad6231ad29
|
@ -182,10 +182,12 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setMetaClass(MetaClass metaClass) {
|
||||
this.metaClass = metaClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MetaClass getMetaClass() {
|
||||
return this.metaClass;
|
||||
}
|
||||
|
@ -216,6 +218,7 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
|
|||
* @return the number of bean definitions found
|
||||
* @throws BeanDefinitionStoreException in case of loading or parsing errors
|
||||
*/
|
||||
@Override
|
||||
public int loadBeanDefinitions(Resource resource) throws BeanDefinitionStoreException {
|
||||
return loadBeanDefinitions(new EncodedResource(resource));
|
||||
}
|
||||
|
@ -376,6 +379,7 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
|
|||
* This method overrides method invocation to create beans for each method name that
|
||||
* takes a class argument.
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("rawtypes")
|
||||
public Object invokeMethod(String name, Object arg) {
|
||||
Object[] args = (Object[])arg;
|
||||
|
@ -609,6 +613,7 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
|
|||
* This method overrides property setting in the scope of the {@code GroovyBeanDefinitionReader}
|
||||
* to set properties on the current bean definition.
|
||||
*/
|
||||
@Override
|
||||
public void setProperty(String name, Object value) {
|
||||
if (this.currentBeanDefinition != null) {
|
||||
applyPropertyToBeanDefinition(name, value);
|
||||
|
@ -656,6 +661,7 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
|
|||
* properties from the {@code GroovyBeanDefinitionReader} itself
|
||||
* </ul>
|
||||
*/
|
||||
@Override
|
||||
public Object getProperty(String name) {
|
||||
Binding binding = getBinding();
|
||||
if (binding != null && binding.hasVariable(name)) {
|
||||
|
@ -758,10 +764,12 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
|
|||
this.metaClass = InvokerHelper.getMetaClass(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MetaClass getMetaClass() {
|
||||
return this.metaClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getProperty(String property) {
|
||||
if (property.equals("beanName")) {
|
||||
return getBeanName();
|
||||
|
@ -778,14 +786,17 @@ public class GroovyBeanDefinitionReader extends AbstractBeanDefinitionReader imp
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object invokeMethod(String name, Object args) {
|
||||
return this.metaClass.invokeMethod(this, name, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMetaClass(MetaClass metaClass) {
|
||||
this.metaClass = metaClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProperty(String property, Object newValue) {
|
||||
if (!addDeferredProperty(property, newValue)) {
|
||||
this.beanDefinition.getBeanDefinition().getPropertyValues().add(property, newValue);
|
||||
|
|
|
@ -612,6 +612,7 @@ public class DefaultSingletonBeanRegistry extends SimpleAliasRegistry implements
|
|||
* should <i>not</i> have their own mutexes involved in singleton creation,
|
||||
* to avoid the potential for deadlocks in lazy-init situations.
|
||||
*/
|
||||
@Override
|
||||
public final Object getSingletonMutex() {
|
||||
return this.singletonObjects;
|
||||
}
|
||||
|
|
|
@ -138,6 +138,7 @@ public class BeanWrapperTests extends AbstractPropertyAccessorTests {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Test // Can't be shared: no type mismatch with a field
|
||||
public void setPropertyTypeMismatch() {
|
||||
PropertyTypeMismatch target = new PropertyTypeMismatch();
|
||||
|
@ -235,10 +236,12 @@ public class BeanWrapperTests extends AbstractPropertyAccessorTests {
|
|||
|
||||
private String name;
|
||||
|
||||
@Override
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
if (this.name == null) {
|
||||
throw new RuntimeException("name property must be set");
|
||||
|
|
|
@ -88,6 +88,7 @@ public class JCacheAspectSupport extends AbstractCacheInvoker implements Initial
|
|||
return this.cacheOperationSource;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
getCacheOperationSource();
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@ public class LocalDataSourceJobStore extends JobStoreCMT {
|
|||
// Do nothing - a Spring-managed DataSource has its own lifecycle.
|
||||
}
|
||||
/* Quartz 2.2 initialize method */
|
||||
@Override
|
||||
public void initialize() {
|
||||
// Do nothing - a Spring-managed DataSource has its own lifecycle.
|
||||
}
|
||||
|
@ -138,6 +139,7 @@ public class LocalDataSourceJobStore extends JobStoreCMT {
|
|||
// Do nothing - a Spring-managed DataSource has its own lifecycle.
|
||||
}
|
||||
/* Quartz 2.2 initialize method */
|
||||
@Override
|
||||
public void initialize() {
|
||||
// Do nothing - a Spring-managed DataSource has its own lifecycle.
|
||||
}
|
||||
|
|
|
@ -81,6 +81,7 @@ public class ResourceLoaderClassLoadHelper implements ClassLoadHelper {
|
|||
return ClassUtils.forName(name, this.resourceLoader.getClassLoader());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> Class<? extends T> loadClass(String name, Class<T> clazz) throws ClassNotFoundException {
|
||||
return (Class<? extends T>) loadClass(name);
|
||||
|
|
|
@ -367,12 +367,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);
|
||||
|
|
|
@ -78,6 +78,7 @@ public class CacheEvictOperation extends CacheOperation {
|
|||
return sb;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CacheEvictOperation build() {
|
||||
return new CacheEvictOperation(this);
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ public class CachePutOperation extends CacheOperation {
|
|||
return sb;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CachePutOperation build() {
|
||||
return new CachePutOperation(this);
|
||||
}
|
||||
|
|
|
@ -152,6 +152,7 @@ public class AnnotationConfigApplicationContext extends GenericApplicationContex
|
|||
* @see #scan(String...)
|
||||
* @see #refresh()
|
||||
*/
|
||||
@Override
|
||||
public void register(Class<?>... annotatedClasses) {
|
||||
Assert.notEmpty(annotatedClasses, "At least one annotated class must be specified");
|
||||
this.reader.register(annotatedClasses);
|
||||
|
@ -165,6 +166,7 @@ public class AnnotationConfigApplicationContext extends GenericApplicationContex
|
|||
* @see #register(Class...)
|
||||
* @see #refresh()
|
||||
*/
|
||||
@Override
|
||||
public void scan(String... basePackages) {
|
||||
Assert.notEmpty(basePackages, "At least one base package must be specified");
|
||||
this.scanner.scan(basePackages);
|
||||
|
|
|
@ -45,6 +45,7 @@ public class DefaultEventListenerFactory implements EventListenerFactory, Ordere
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean supportsMethod(Method method) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -225,18 +225,22 @@ public class GenericGroovyApplicationContext extends GenericApplicationContext i
|
|||
|
||||
// Implementation of the GroovyObject interface
|
||||
|
||||
@Override
|
||||
public void setMetaClass(MetaClass metaClass) {
|
||||
this.metaClass = metaClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MetaClass getMetaClass() {
|
||||
return this.metaClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object invokeMethod(String name, Object args) {
|
||||
return this.metaClass.invokeMethod(this, name, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProperty(String property, Object newValue) {
|
||||
if (newValue instanceof BeanDefinition) {
|
||||
registerBeanDefinition(property, (BeanDefinition) newValue);
|
||||
|
@ -246,6 +250,7 @@ public class GenericGroovyApplicationContext extends GenericApplicationContext i
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Object getProperty(String property) {
|
||||
if (containsBean(property)) {
|
||||
|
|
|
@ -88,6 +88,7 @@ public class ConcurrentModel extends ConcurrentHashMap<String, Object> implement
|
|||
* @param attributeValue the model attribute value (ignored if {@code null},
|
||||
* just removing an existing entry if any)
|
||||
*/
|
||||
@Override
|
||||
public ConcurrentModel addAttribute(String attributeName, @Nullable Object attributeValue) {
|
||||
Assert.notNull(attributeName, "Model attribute name must not be null");
|
||||
put(attributeName, attributeValue);
|
||||
|
@ -103,6 +104,7 @@ public class ConcurrentModel extends ConcurrentHashMap<String, Object> implement
|
|||
* than for empty collections as is already done by JSTL tags.</i>
|
||||
* @param attributeValue the model attribute value (never {@code null})
|
||||
*/
|
||||
@Override
|
||||
public ConcurrentModel addAttribute(Object attributeValue) {
|
||||
Assert.notNull(attributeValue, "Model attribute value must not be null");
|
||||
if (attributeValue instanceof Collection && ((Collection<?>) attributeValue).isEmpty()) {
|
||||
|
@ -116,6 +118,7 @@ public class ConcurrentModel extends ConcurrentHashMap<String, Object> implement
|
|||
* {@code Map}, using attribute name generation for each element.
|
||||
* @see #addAttribute(Object)
|
||||
*/
|
||||
@Override
|
||||
public ConcurrentModel addAllAttributes(@Nullable Collection<?> attributeValues) {
|
||||
if (attributeValues != null) {
|
||||
for (Object attributeValue : attributeValues) {
|
||||
|
@ -129,6 +132,7 @@ public class ConcurrentModel extends ConcurrentHashMap<String, Object> implement
|
|||
* Copy all attributes in the supplied {@code Map} into this {@code Map}.
|
||||
* @see #addAttribute(String, Object)
|
||||
*/
|
||||
@Override
|
||||
public ConcurrentModel addAllAttributes(@Nullable Map<String, ?> attributes) {
|
||||
if (attributes != null) {
|
||||
putAll(attributes);
|
||||
|
@ -141,6 +145,7 @@ public class ConcurrentModel extends ConcurrentHashMap<String, Object> implement
|
|||
* with existing objects of the same name taking precedence (i.e. not getting
|
||||
* replaced).
|
||||
*/
|
||||
@Override
|
||||
public ConcurrentModel mergeAttributes(@Nullable Map<String, ?> attributes) {
|
||||
if (attributes != null) {
|
||||
attributes.forEach((key, value) -> {
|
||||
|
@ -157,6 +162,7 @@ public class ConcurrentModel extends ConcurrentHashMap<String, Object> implement
|
|||
* @param attributeName the name of the model attribute (never {@code null})
|
||||
* @return whether this model contains a corresponding attribute
|
||||
*/
|
||||
@Override
|
||||
public boolean containsAttribute(String attributeName) {
|
||||
return containsKey(attributeName);
|
||||
}
|
||||
|
|
|
@ -414,6 +414,7 @@ public class LocalValidatorFactoryBean extends SpringValidatorAdapter
|
|||
throw new ValidationException("Cannot unwrap to " + type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
if (this.validatorFactory != null) {
|
||||
this.validatorFactory.close();
|
||||
|
|
|
@ -57,6 +57,7 @@ public class SpringConstraintValidatorFactory implements ConstraintValidatorFact
|
|||
}
|
||||
|
||||
// Bean Validation 1.1 releaseInstance method
|
||||
@Override
|
||||
public void releaseInstance(ConstraintValidator<?, ?> instance) {
|
||||
this.beanFactory.destroyBean(instance);
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -54,91 +54,113 @@ abstract class AbstractMergedAnnotation<A extends Annotation> implements MergedA
|
|||
return !hasDefaultValue(attributeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getByte(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, Byte.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getByteArray(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, byte[].class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBoolean(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, Boolean.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean[] getBooleanArray(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, boolean[].class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public char getChar(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, Character.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public char[] getCharArray(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, char[].class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public short getShort(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, Short.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public short[] getShortArray(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, short[].class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInt(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, Integer.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIntArray(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, int[].class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getLong(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, Long.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long[] getLongArray(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, long[].class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDouble(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, Double.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double[] getDoubleArray(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, double[].class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getFloat(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, Float.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float[] getFloatArray(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, float[].class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getString(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, String.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] getStringArray(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, String[].class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<?> getClass(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, Class.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<?>[] getClassArray(String attributeName) {
|
||||
return getRequiredAttributeValue(attributeName, Class[].class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <E extends Enum<E>> E getEnum(String attributeName, Class<E> type) {
|
||||
Assert.notNull(type, "Type must not be null");
|
||||
return getRequiredAttributeValue(attributeName, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public <E extends Enum<E>> E[] getEnumArray(String attributeName, Class<E> type) {
|
||||
Assert.notNull(type, "Type must not be null");
|
||||
|
|
|
@ -87,6 +87,7 @@ final class MissingMergedAnnotation<A extends Annotation> extends AbstractMerged
|
|||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasNonDefaultValue(String attributeName) {
|
||||
throw new NoSuchElementException(
|
||||
"Unable to check non-default value for missing annotation");
|
||||
|
@ -160,6 +161,7 @@ final class MissingMergedAnnotation<A extends Annotation> extends AbstractMerged
|
|||
"Unable to get attribute value for missing annotation");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected A createSynthesized() {
|
||||
throw new NoSuchElementException("Unable to synthesize missing annotation");
|
||||
}
|
||||
|
|
|
@ -377,6 +377,7 @@ final class TypeMappedAnnotation<A extends Annotation> extends AbstractMergedAnn
|
|||
return String.valueOf(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
protected <T> T getAttributeValue(String attributeName, Class<T> type) {
|
||||
int attributeIndex = getAttributeIndex(attributeName, false);
|
||||
|
|
|
@ -562,6 +562,7 @@ final class TypeMappedAnnotations implements MergedAnnotations {
|
|||
this.aggregateCursor = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean tryAdvance(Consumer<? super MergedAnnotation<A>> action) {
|
||||
while (this.aggregateCursor < this.aggregates.size()) {
|
||||
Aggregate aggregate = this.aggregates.get(this.aggregateCursor);
|
||||
|
|
|
@ -118,15 +118,18 @@ public class OperatorMatches extends Operator {
|
|||
this.access = access;
|
||||
}
|
||||
|
||||
@Override
|
||||
public char charAt(int index) {
|
||||
this.access.check();
|
||||
return this.value.charAt(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence subSequence(int start, int end) {
|
||||
return new MatcherInput(this.value.subSequence(start, end), this.access);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int length() {
|
||||
return this.value.length();
|
||||
}
|
||||
|
|
|
@ -5188,6 +5188,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
|
|||
|
||||
public static class MyMessage implements Message<String> {
|
||||
|
||||
@Override
|
||||
public MessageHeaders getHeaders() {
|
||||
MessageHeaders mh = new MessageHeaders();
|
||||
mh.put("command", "wibble");
|
||||
|
@ -5195,8 +5196,10 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
|
|||
return mh;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getIa() { return new int[] {5,3}; }
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
public List getList() {
|
||||
List l = new ArrayList();
|
||||
|
@ -5253,24 +5256,29 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
|
|||
|
||||
private Method method;
|
||||
|
||||
@Override
|
||||
public Class<?>[] getSpecificTargetClasses() {
|
||||
return new Class<?>[] {Payload2.class};
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canRead(EvaluationContext context, Object target, String name) throws AccessException {
|
||||
// target is a Payload2 instance
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TypedValue read(EvaluationContext context, Object target, String name) throws AccessException {
|
||||
Payload2 payload2 = (Payload2)target;
|
||||
return new TypedValue(payload2.getField(name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canWrite(EvaluationContext context, Object target, String name) throws AccessException {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(EvaluationContext context, Object target, String name, Object newValue) throws AccessException {
|
||||
}
|
||||
|
||||
|
@ -5496,6 +5504,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
|
|||
public Three getThree() {
|
||||
return three;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "instanceof Two";
|
||||
}
|
||||
|
@ -6108,6 +6117,7 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
|
|||
return "pb";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "sh";
|
||||
}
|
||||
|
|
|
@ -2261,6 +2261,7 @@ public class SpelReproTests extends AbstractExpressionTests {
|
|||
this.string = string;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
return (this == other || (other instanceof TestClass2 &&
|
||||
this.string.equals(((TestClass2) other).string)));
|
||||
|
|
|
@ -280,92 +280,110 @@ final class LogAdapter {
|
|||
this.logger = logger;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFatalEnabled() {
|
||||
return isErrorEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isErrorEnabled() {
|
||||
return this.logger.isErrorEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWarnEnabled() {
|
||||
return this.logger.isWarnEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInfoEnabled() {
|
||||
return this.logger.isInfoEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDebugEnabled() {
|
||||
return this.logger.isDebugEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTraceEnabled() {
|
||||
return this.logger.isTraceEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fatal(Object message) {
|
||||
error(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fatal(Object message, Throwable exception) {
|
||||
error(message, exception);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(Object message) {
|
||||
if (message instanceof String || this.logger.isErrorEnabled()) {
|
||||
this.logger.error(String.valueOf(message));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(Object message, Throwable exception) {
|
||||
if (message instanceof String || this.logger.isErrorEnabled()) {
|
||||
this.logger.error(String.valueOf(message), exception);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void warn(Object message) {
|
||||
if (message instanceof String || this.logger.isWarnEnabled()) {
|
||||
this.logger.warn(String.valueOf(message));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void warn(Object message, Throwable exception) {
|
||||
if (message instanceof String || this.logger.isWarnEnabled()) {
|
||||
this.logger.warn(String.valueOf(message), exception);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void info(Object message) {
|
||||
if (message instanceof String || this.logger.isInfoEnabled()) {
|
||||
this.logger.info(String.valueOf(message));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void info(Object message, Throwable exception) {
|
||||
if (message instanceof String || this.logger.isInfoEnabled()) {
|
||||
this.logger.info(String.valueOf(message), exception);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void debug(Object message) {
|
||||
if (message instanceof String || this.logger.isDebugEnabled()) {
|
||||
this.logger.debug(String.valueOf(message));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void debug(Object message, Throwable exception) {
|
||||
if (message instanceof String || this.logger.isDebugEnabled()) {
|
||||
this.logger.debug(String.valueOf(message), exception);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void trace(Object message) {
|
||||
if (message instanceof String || this.logger.isTraceEnabled()) {
|
||||
this.logger.trace(String.valueOf(message));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void trace(Object message, Throwable exception) {
|
||||
if (message instanceof String || this.logger.isTraceEnabled()) {
|
||||
this.logger.trace(String.valueOf(message), exception);
|
||||
|
@ -486,74 +504,92 @@ final class LogAdapter {
|
|||
this.logger = java.util.logging.Logger.getLogger(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFatalEnabled() {
|
||||
return isErrorEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isErrorEnabled() {
|
||||
return this.logger.isLoggable(java.util.logging.Level.SEVERE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWarnEnabled() {
|
||||
return this.logger.isLoggable(java.util.logging.Level.WARNING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInfoEnabled() {
|
||||
return this.logger.isLoggable(java.util.logging.Level.INFO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDebugEnabled() {
|
||||
return this.logger.isLoggable(java.util.logging.Level.FINE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTraceEnabled() {
|
||||
return this.logger.isLoggable(java.util.logging.Level.FINEST);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fatal(Object message) {
|
||||
error(message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fatal(Object message, Throwable exception) {
|
||||
error(message, exception);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(Object message) {
|
||||
log(java.util.logging.Level.SEVERE, message, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void error(Object message, Throwable exception) {
|
||||
log(java.util.logging.Level.SEVERE, message, exception);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void warn(Object message) {
|
||||
log(java.util.logging.Level.WARNING, message, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void warn(Object message, Throwable exception) {
|
||||
log(java.util.logging.Level.WARNING, message, exception);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void info(Object message) {
|
||||
log(java.util.logging.Level.INFO, message, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void info(Object message, Throwable exception) {
|
||||
log(java.util.logging.Level.INFO, message, exception);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void debug(Object message) {
|
||||
log(java.util.logging.Level.FINE, message, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void debug(Object message, Throwable exception) {
|
||||
log(java.util.logging.Level.FINE, message, exception);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void trace(Object message) {
|
||||
log(java.util.logging.Level.FINEST, message, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void trace(Object message, Throwable exception) {
|
||||
log(java.util.logging.Level.FINEST, message, exception);
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
|
|||
*/
|
||||
public class HsqlDatabasePopulatorTests extends AbstractDatabasePopulatorTests {
|
||||
|
||||
@Override
|
||||
protected EmbeddedDatabaseType getEmbeddedDatabaseType() {
|
||||
return EmbeddedDatabaseType.HSQL;
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ import static org.springframework.jdbc.datasource.init.ScriptUtils.executeSqlScr
|
|||
*/
|
||||
public class ScriptUtilsIntegrationTests extends AbstractDatabaseInitializationTests {
|
||||
|
||||
@Override
|
||||
protected EmbeddedDatabaseType getEmbeddedDatabaseType() {
|
||||
return EmbeddedDatabaseType.HSQL;
|
||||
}
|
||||
|
|
|
@ -89,6 +89,7 @@ class CachedMessageProducer implements MessageProducer, QueueSender, TopicPublis
|
|||
return this.target.getDisableMessageTimestamp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDeliveryDelay(long deliveryDelay) throws JMSException {
|
||||
if (this.originalDeliveryDelay == null) {
|
||||
this.originalDeliveryDelay = this.target.getDeliveryDelay();
|
||||
|
@ -96,6 +97,7 @@ class CachedMessageProducer implements MessageProducer, QueueSender, TopicPublis
|
|||
this.target.setDeliveryDelay(deliveryDelay);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getDeliveryDelay() throws JMSException {
|
||||
return this.target.getDeliveryDelay();
|
||||
}
|
||||
|
|
|
@ -65,91 +65,112 @@ public class StubTextMessage implements TextMessage {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getText() throws JMSException {
|
||||
return this.text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setText(String text) throws JMSException {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void acknowledge() throws JMSException {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearBody() throws JMSException {
|
||||
this.text = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearProperties() throws JMSException {
|
||||
this.properties.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBooleanProperty(String name) throws JMSException {
|
||||
Object value = this.properties.get(name);
|
||||
return (value instanceof Boolean) ? ((Boolean) value).booleanValue() : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getByteProperty(String name) throws JMSException {
|
||||
Object value = this.properties.get(name);
|
||||
return (value instanceof Byte) ? ((Byte) value).byteValue() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getDoubleProperty(String name) throws JMSException {
|
||||
Object value = this.properties.get(name);
|
||||
return (value instanceof Double) ? ((Double) value).doubleValue() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getFloatProperty(String name) throws JMSException {
|
||||
Object value = this.properties.get(name);
|
||||
return (value instanceof Float) ? ((Float) value).floatValue() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIntProperty(String name) throws JMSException {
|
||||
Object value = this.properties.get(name);
|
||||
return (value instanceof Integer) ? ((Integer) value).intValue() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getJMSCorrelationID() throws JMSException {
|
||||
return this.correlationId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getJMSCorrelationIDAsBytes() throws JMSException {
|
||||
return this.correlationId.getBytes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getJMSDeliveryMode() throws JMSException {
|
||||
return this.deliveryMode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Destination getJMSDestination() throws JMSException {
|
||||
return this.destination;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getJMSExpiration() throws JMSException {
|
||||
return this.expiration;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getJMSMessageID() throws JMSException {
|
||||
return this.messageId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getJMSPriority() throws JMSException {
|
||||
return this.priority;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getJMSRedelivered() throws JMSException {
|
||||
return this.redelivered;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Destination getJMSReplyTo() throws JMSException {
|
||||
return this.replyTo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getJMSTimestamp() throws JMSException {
|
||||
return this.timestamp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getJMSType() throws JMSException {
|
||||
return this.type;
|
||||
}
|
||||
|
@ -159,93 +180,115 @@ public class StubTextMessage implements TextMessage {
|
|||
return this.deliveryTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getLongProperty(String name) throws JMSException {
|
||||
Object value = this.properties.get(name);
|
||||
return (value instanceof Long) ? ((Long) value).longValue() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getObjectProperty(String name) throws JMSException {
|
||||
return this.properties.get(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Enumeration<?> getPropertyNames() throws JMSException {
|
||||
return this.properties.keys();
|
||||
}
|
||||
|
||||
@Override
|
||||
public short getShortProperty(String name) throws JMSException {
|
||||
Object value = this.properties.get(name);
|
||||
return (value instanceof Short) ? ((Short) value).shortValue() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStringProperty(String name) throws JMSException {
|
||||
Object value = this.properties.get(name);
|
||||
return (value instanceof String) ? (String) value : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean propertyExists(String name) throws JMSException {
|
||||
return this.properties.containsKey(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBooleanProperty(String name, boolean value) throws JMSException {
|
||||
this.properties.put(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setByteProperty(String name, byte value) throws JMSException {
|
||||
this.properties.put(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDoubleProperty(String name, double value) throws JMSException {
|
||||
this.properties.put(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFloatProperty(String name, float value) throws JMSException {
|
||||
this.properties.put(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIntProperty(String name, int value) throws JMSException {
|
||||
this.properties.put(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJMSCorrelationID(String correlationId) throws JMSException {
|
||||
this.correlationId = correlationId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJMSCorrelationIDAsBytes(byte[] correlationID) throws JMSException {
|
||||
this.correlationId = new String(correlationID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJMSDeliveryMode(int deliveryMode) throws JMSException {
|
||||
this.deliveryMode = deliveryMode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJMSDestination(Destination destination) throws JMSException {
|
||||
this.destination = destination;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJMSExpiration(long expiration) throws JMSException {
|
||||
this.expiration = expiration;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJMSMessageID(String id) throws JMSException {
|
||||
this.messageId = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJMSPriority(int priority) throws JMSException {
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJMSRedelivered(boolean redelivered) throws JMSException {
|
||||
this.redelivered = redelivered;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJMSReplyTo(Destination replyTo) throws JMSException {
|
||||
this.replyTo = replyTo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJMSTimestamp(long timestamp) throws JMSException {
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setJMSType(String type) throws JMSException {
|
||||
this.type = type;
|
||||
}
|
||||
|
@ -255,18 +298,22 @@ public class StubTextMessage implements TextMessage {
|
|||
this.deliveryTime = deliveryTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLongProperty(String name, long value) throws JMSException {
|
||||
this.properties.put(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setObjectProperty(String name, Object value) throws JMSException {
|
||||
this.properties.put(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setShortProperty(String name, short value) throws JMSException {
|
||||
this.properties.put(name, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStringProperty(String name, String value) throws JMSException {
|
||||
this.properties.put(name, value);
|
||||
}
|
||||
|
|
|
@ -166,6 +166,7 @@ public class JmsListenerContainerFactoryIntegrationTests {
|
|||
|
||||
private final Map<String, Boolean> invocations = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void handleIt(@Payload String msg, @Header("my-header") String myHeader) {
|
||||
invocations.put("handleIt", true);
|
||||
assertThat(msg).as("Unexpected payload message").isEqualTo("FOO-BAR");
|
||||
|
|
|
@ -220,35 +220,43 @@ public class MessageHeaders implements Map<String, Object>, Serializable {
|
|||
|
||||
// Delegating Map implementation
|
||||
|
||||
@Override
|
||||
public boolean containsKey(Object key) {
|
||||
return this.headers.containsKey(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean containsValue(Object value) {
|
||||
return this.headers.containsValue(value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Map.Entry<String, Object>> entrySet() {
|
||||
return Collections.unmodifiableMap(this.headers).entrySet();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Object get(Object key) {
|
||||
return this.headers.get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return this.headers.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> keySet() {
|
||||
return Collections.unmodifiableSet(this.headers.keySet());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return this.headers.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<Object> values() {
|
||||
return Collections.unmodifiableCollection(this.headers.values());
|
||||
}
|
||||
|
@ -260,6 +268,7 @@ public class MessageHeaders implements Map<String, Object>, Serializable {
|
|||
* Since MessageHeaders are immutable, the call to this method
|
||||
* will result in {@link UnsupportedOperationException}.
|
||||
*/
|
||||
@Override
|
||||
public Object put(String key, Object value) {
|
||||
throw new UnsupportedOperationException("MessageHeaders is immutable");
|
||||
}
|
||||
|
@ -268,6 +277,7 @@ public class MessageHeaders implements Map<String, Object>, Serializable {
|
|||
* Since MessageHeaders are immutable, the call to this method
|
||||
* will result in {@link UnsupportedOperationException}.
|
||||
*/
|
||||
@Override
|
||||
public void putAll(Map<? extends String, ? extends Object> map) {
|
||||
throw new UnsupportedOperationException("MessageHeaders is immutable");
|
||||
}
|
||||
|
@ -276,6 +286,7 @@ public class MessageHeaders implements Map<String, Object>, Serializable {
|
|||
* Since MessageHeaders are immutable, the call to this method
|
||||
* will result in {@link UnsupportedOperationException}.
|
||||
*/
|
||||
@Override
|
||||
public Object remove(Object key) {
|
||||
throw new UnsupportedOperationException("MessageHeaders is immutable");
|
||||
}
|
||||
|
@ -284,6 +295,7 @@ public class MessageHeaders implements Map<String, Object>, Serializable {
|
|||
* Since MessageHeaders are immutable, the call to this method
|
||||
* will result in {@link UnsupportedOperationException}.
|
||||
*/
|
||||
@Override
|
||||
public void clear() {
|
||||
throw new UnsupportedOperationException("MessageHeaders is immutable");
|
||||
}
|
||||
|
|
|
@ -303,6 +303,7 @@ public class SimpAnnotationMethodMessageHandler extends AbstractMethodMessageHan
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected List<HandlerMethodArgumentResolver> initArgumentResolvers() {
|
||||
ApplicationContext context = getApplicationContext();
|
||||
ConfigurableBeanFactory beanFactory = (context instanceof ConfigurableApplicationContext ?
|
||||
|
|
|
@ -59,6 +59,7 @@ class OrderedMessageSender implements MessageChannel {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean send(Message<?> message) {
|
||||
return send(message, -1);
|
||||
}
|
||||
|
|
|
@ -231,6 +231,7 @@ public class StompBrokerRelayRegistration extends AbstractBrokerRegistration {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected StompBrokerRelayMessageHandler getMessageHandler(SubscribableChannel brokerChannel) {
|
||||
|
||||
StompBrokerRelayMessageHandler handler = new StompBrokerRelayMessageHandler(
|
||||
|
|
|
@ -689,8 +689,10 @@ public class DefaultStompSession implements ConnectionHandlingStompSession {
|
|||
if (conn != null) {
|
||||
conn.send(HEARTBEAT).addCallback(
|
||||
new ListenableFutureCallback<Void>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable Void result) {
|
||||
}
|
||||
@Override
|
||||
public void onFailure(Throwable ex) {
|
||||
handleFailure(ex);
|
||||
}
|
||||
|
|
|
@ -1086,6 +1086,7 @@ public class StompBrokerRelayMessageHandler extends AbstractBrokerMessageHandler
|
|||
return this.disconnect.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return (connectionHandlers.size() + " sessions, " + getTcpClientInfo() +
|
||||
(isBrokerAvailable() ? " (available)" : " (not available)") +
|
||||
|
|
|
@ -53,6 +53,7 @@ public class StompReactorNettyCodec extends AbstractNioBufferReactorNettyCodec<b
|
|||
return this.decoder.decode(nioBuffer);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ByteBuffer encodeInternal(Message<byte[]> message) {
|
||||
return ByteBuffer.wrap(this.encoder.encode(message));
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ public abstract class ChannelInterceptorAdapter implements ChannelInterceptor {
|
|||
public void afterSendCompletion(Message<?> message, MessageChannel channel, boolean sent, @Nullable Exception ex) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean preReceive(MessageChannel channel) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -77,15 +77,18 @@ public class GenericMessage<T> implements Message<T>, Serializable {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public T getPayload() {
|
||||
return this.payload;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MessageHeaders getHeaders() {
|
||||
return this.headers;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
|
@ -98,11 +101,13 @@ public class GenericMessage<T> implements Message<T>, Serializable {
|
|||
return (ObjectUtils.nullSafeEquals(this.payload, otherMsg.payload) && this.headers.equals(otherMsg.headers));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
// Using nullSafeHashCode for proper array hashCode handling
|
||||
return (ObjectUtils.nullSafeHashCode(this.payload) * 23 + this.headers.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder(getClass().getSimpleName());
|
||||
sb.append(" [payload=");
|
||||
|
|
|
@ -190,6 +190,7 @@ public class MethodMessageHandlerTests {
|
|||
super.detectHandlerMethods(handler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerHandlerMethod(Object handler, Method method, String mapping) {
|
||||
super.registerHandlerMethod(handler, method, mapping);
|
||||
}
|
||||
|
|
|
@ -316,11 +316,13 @@ public class LocalContainerEntityManagerFactoryBeanTests extends AbstractEntityM
|
|||
}
|
||||
|
||||
// JPA 2.1 method
|
||||
@Override
|
||||
public void generateSchema(PersistenceUnitInfo persistenceUnitInfo, Map map) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
// JPA 2.1 method
|
||||
@Override
|
||||
public boolean generateSchema(String persistenceUnitName, Map map) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
|
|
@ -102,11 +102,13 @@ public class LocalEntityManagerFactoryBeanTests extends AbstractEntityManagerFac
|
|||
}
|
||||
|
||||
// JPA 2.1 method
|
||||
@Override
|
||||
public void generateSchema(PersistenceUnitInfo persistenceUnitInfo, Map map) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
// JPA 2.1 method
|
||||
@Override
|
||||
public boolean generateSchema(String persistenceUnitName, Map map) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
|
|
@ -46,6 +46,7 @@ public class HibernateMultiEntityManagerFactoryIntegrationTests extends Abstract
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Test
|
||||
public void testEntityManagerFactoryImplementsEntityManagerFactoryInfo() {
|
||||
boolean condition = this.entityManagerFactory instanceof EntityManagerFactoryInfo;
|
||||
|
|
|
@ -53,6 +53,7 @@ public class HibernateNativeEntityManagerFactoryIntegrationTests extends Abstrac
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Test
|
||||
public void testEntityManagerFactoryImplementsEntityManagerFactoryInfo() {
|
||||
boolean condition = entityManagerFactory instanceof EntityManagerFactoryInfo;
|
||||
|
|
|
@ -118,6 +118,7 @@ public class DefaultTestContext implements TestContext {
|
|||
* loader delegate is not <em>active</em> (i.e., has been closed)
|
||||
* @see CacheAwareContextLoaderDelegate#loadContext
|
||||
*/
|
||||
@Override
|
||||
public ApplicationContext getApplicationContext() {
|
||||
ApplicationContext context = this.cacheAwareContextLoaderDelegate.loadContext(this.mergedContextConfiguration);
|
||||
if (context instanceof ConfigurableApplicationContext) {
|
||||
|
@ -142,20 +143,24 @@ public class DefaultTestContext implements TestContext {
|
|||
* that was supplied when this {@code TestContext} was constructed.
|
||||
* @see CacheAwareContextLoaderDelegate#closeContext
|
||||
*/
|
||||
@Override
|
||||
public void markApplicationContextDirty(@Nullable HierarchyMode hierarchyMode) {
|
||||
this.cacheAwareContextLoaderDelegate.closeContext(this.mergedContextConfiguration, hierarchyMode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Class<?> getTestClass() {
|
||||
return this.testClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Object getTestInstance() {
|
||||
Object testInstance = this.testInstance;
|
||||
Assert.state(testInstance != null, "No test instance");
|
||||
return testInstance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Method getTestMethod() {
|
||||
Method testMethod = this.testMethod;
|
||||
Assert.state(testMethod != null, "No test method");
|
||||
|
@ -168,6 +173,7 @@ public class DefaultTestContext implements TestContext {
|
|||
return this.testException;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateState(@Nullable Object testInstance, @Nullable Method testMethod, @Nullable Throwable testException) {
|
||||
this.testInstance = testInstance;
|
||||
this.testMethod = testMethod;
|
||||
|
|
|
@ -106,6 +106,7 @@ final class HtmlUnitRequestBuilder implements RequestBuilder, Mergeable {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public MockHttpServletRequest buildRequest(ServletContext servletContext) {
|
||||
Charset charset = getCharset();
|
||||
String httpMethod = this.webRequest.getHttpMethod().name();
|
||||
|
|
|
@ -125,6 +125,7 @@ public final class MockMvcWebConnection implements WebConnection {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public WebResponse getResponse(WebRequest webRequest) throws IOException {
|
||||
long startTime = System.currentTimeMillis();
|
||||
HtmlUnitRequestBuilder requestBuilder = new HtmlUnitRequestBuilder(this.sessions, this.webClient, webRequest);
|
||||
|
|
|
@ -67,6 +67,7 @@ public abstract class AbstractMockMvcBuilder<B extends AbstractMockMvcBuilder<B>
|
|||
private final List<MockMvcConfigurer> configurers = new ArrayList<>(4);
|
||||
|
||||
|
||||
@Override
|
||||
public final <T extends B> T addFilters(Filter... filters) {
|
||||
Assert.notNull(filters, "filters cannot be null");
|
||||
for (Filter f : filters) {
|
||||
|
@ -76,6 +77,7 @@ public abstract class AbstractMockMvcBuilder<B extends AbstractMockMvcBuilder<B>
|
|||
return self();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <T extends B> T addFilter(Filter filter, String... urlPatterns) {
|
||||
Assert.notNull(filter, "filter cannot be null");
|
||||
Assert.notNull(urlPatterns, "urlPatterns cannot be null");
|
||||
|
@ -86,16 +88,19 @@ public abstract class AbstractMockMvcBuilder<B extends AbstractMockMvcBuilder<B>
|
|||
return self();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <T extends B> T defaultRequest(RequestBuilder requestBuilder) {
|
||||
this.defaultRequestBuilder = requestBuilder;
|
||||
return self();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <T extends B> T alwaysExpect(ResultMatcher resultMatcher) {
|
||||
this.globalResultMatchers.add(resultMatcher);
|
||||
return self();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <T extends B> T alwaysDo(ResultHandler resultHandler) {
|
||||
this.globalResultHandlers.add(resultHandler);
|
||||
return self();
|
||||
|
@ -106,11 +111,13 @@ public abstract class AbstractMockMvcBuilder<B extends AbstractMockMvcBuilder<B>
|
|||
return self();
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <T extends B> T dispatchOptions(boolean dispatchOptions) {
|
||||
return addDispatcherServletCustomizer(
|
||||
dispatcherServlet -> dispatcherServlet.setDispatchOptionsRequest(dispatchOptions));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final <T extends B> T apply(MockMvcConfigurer configurer) {
|
||||
configurer.afterConfigurerAdded(this);
|
||||
this.configurers.add(configurer);
|
||||
|
|
|
@ -46,6 +46,7 @@ public class RollbackOverrideDefaultRollbackFalseRollbackAnnotationTransactional
|
|||
private static JdbcTemplate jdbcTemplate;
|
||||
|
||||
|
||||
@Override
|
||||
@Autowired
|
||||
public void setDataSource(DataSource dataSource) {
|
||||
jdbcTemplate = new JdbcTemplate(dataSource);
|
||||
|
|
|
@ -44,6 +44,7 @@ public class RollbackOverrideDefaultRollbackTrueTransactionalTests
|
|||
private static JdbcTemplate jdbcTemplate;
|
||||
|
||||
|
||||
@Override
|
||||
@Autowired
|
||||
public void setDataSource(DataSource dataSource) {
|
||||
jdbcTemplate = new JdbcTemplate(dataSource);
|
||||
|
|
|
@ -38,6 +38,7 @@ public class PersonEntity extends PersistentEntity implements Person {
|
|||
private Number favoriteNumber;
|
||||
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
@ -47,6 +48,7 @@ public class PersonEntity extends PersistentEntity implements Person {
|
|||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAge() {
|
||||
return this.age;
|
||||
}
|
||||
|
@ -55,6 +57,7 @@ public class PersonEntity extends PersistentEntity implements Person {
|
|||
this.age = age;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEyeColor() {
|
||||
return this.eyeColor;
|
||||
}
|
||||
|
@ -63,6 +66,7 @@ public class PersonEntity extends PersistentEntity implements Person {
|
|||
this.eyeColor = eyeColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean likesPets() {
|
||||
return this.likesPets;
|
||||
}
|
||||
|
@ -71,6 +75,7 @@ public class PersonEntity extends PersistentEntity implements Person {
|
|||
this.likesPets = likesPets;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Number getFavoriteNumber() {
|
||||
return this.favoriteNumber;
|
||||
}
|
||||
|
|
|
@ -538,6 +538,7 @@ public class MockHttpServletRequestBuilderTests {
|
|||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MockHttpServletRequest postProcessRequest(MockHttpServletRequest request) {
|
||||
request.setAttribute(attr, value);
|
||||
return request;
|
||||
|
|
|
@ -115,6 +115,7 @@ public class EncodedUriTests {
|
|||
@Component
|
||||
private static class HandlerMappingConfigurer implements BeanPostProcessor, PriorityOrdered {
|
||||
|
||||
@Override
|
||||
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
|
||||
if (bean instanceof RequestMappingHandlerMapping) {
|
||||
RequestMappingHandlerMapping requestMappingHandlerMapping = (RequestMappingHandlerMapping) bean;
|
||||
|
@ -125,10 +126,12 @@ public class EncodedUriTests {
|
|||
return bean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
||||
return bean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOrder() {
|
||||
return PriorityOrdered.HIGHEST_PRECEDENCE;
|
||||
}
|
||||
|
|
|
@ -249,6 +249,7 @@ public class AsyncTests {
|
|||
public DeferredResult<Person> getDeferredResultWithDelayedError() {
|
||||
final DeferredResult<Person> deferredResult = new DeferredResult<>();
|
||||
new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
|
|
|
@ -80,6 +80,7 @@ public abstract class AbstractGenericHttpMessageConverter<T> extends AbstractHtt
|
|||
* This implementation sets the default headers by calling {@link #addDefaultHeaders},
|
||||
* and then calls {@link #writeInternal}.
|
||||
*/
|
||||
@Override
|
||||
public final void write(final T t, @Nullable final Type type, @Nullable MediaType contentType,
|
||||
HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException {
|
||||
|
||||
|
|
|
@ -295,6 +295,7 @@ final class DefaultPathContainer implements PathContainer {
|
|||
return this.value.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "[value='" + this.value + "']";
|
||||
}
|
||||
|
|
|
@ -83,6 +83,7 @@ public abstract class AbstractServerHttpRequest implements ServerHttpRequest {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
if (this.id == null) {
|
||||
this.id = initId();
|
||||
|
|
|
@ -177,6 +177,7 @@ class ServletServerHttpRequest extends AbstractServerHttpRequest {
|
|||
return new InetSocketAddress(this.request.getRemoteHost(), this.request.getRemotePort());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
protected SslInfo initSslInfo() {
|
||||
X509Certificate[] certificates = getX509Certificates();
|
||||
|
|
|
@ -45,6 +45,7 @@ public class SpringWebConstraintValidatorFactory implements ConstraintValidatorF
|
|||
}
|
||||
|
||||
// Bean Validation 1.1 releaseInstance method
|
||||
@Override
|
||||
public void releaseInstance(ConstraintValidator<?, ?> instance) {
|
||||
getWebApplicationContext().getAutowireCapableBeanFactory().destroyBean(instance);
|
||||
}
|
||||
|
|
|
@ -118,6 +118,7 @@ public class WebAsyncTask<V> implements BeanFactoryAware {
|
|||
* <p>This factory reference will automatically be set when
|
||||
* {@code WebAsyncTask} is used within a Spring MVC controller.
|
||||
*/
|
||||
@Override
|
||||
public void setBeanFactory(BeanFactory beanFactory) {
|
||||
this.beanFactory = beanFactory;
|
||||
}
|
||||
|
|
|
@ -147,6 +147,7 @@ public class AnnotationConfigWebApplicationContext extends AbstractRefreshableWe
|
|||
* @see #setConfigLocation(String)
|
||||
* @see #refresh()
|
||||
*/
|
||||
@Override
|
||||
public void register(Class<?>... annotatedClasses) {
|
||||
Assert.notEmpty(annotatedClasses, "At least one annotated class must be specified");
|
||||
Collections.addAll(this.annotatedClasses, annotatedClasses);
|
||||
|
@ -162,6 +163,7 @@ public class AnnotationConfigWebApplicationContext extends AbstractRefreshableWe
|
|||
* @see #setConfigLocation(String)
|
||||
* @see #refresh()
|
||||
*/
|
||||
@Override
|
||||
public void scan(String... basePackages) {
|
||||
Assert.notEmpty(basePackages, "At least one base package must be specified");
|
||||
Collections.addAll(this.basePackages, basePackages);
|
||||
|
|
|
@ -154,22 +154,27 @@ public class GroovyWebApplicationContext extends AbstractRefreshableWebApplicati
|
|||
|
||||
// Implementation of the GroovyObject interface
|
||||
|
||||
@Override
|
||||
public void setMetaClass(MetaClass metaClass) {
|
||||
this.metaClass = metaClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MetaClass getMetaClass() {
|
||||
return this.metaClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object invokeMethod(String name, Object args) {
|
||||
return this.metaClass.invokeMethod(this, name, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setProperty(String property, Object newValue) {
|
||||
this.metaClass.setProperty(this, property, newValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Object getProperty(String property) {
|
||||
if (containsBean(property)) {
|
||||
|
|
|
@ -140,6 +140,7 @@ public class InMemoryWebSessionStore implements WebSessionStore {
|
|||
return Mono.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<WebSession> updateLastAccessTime(WebSession session) {
|
||||
return Mono.fromSupplier(() -> {
|
||||
Assert.isInstanceOf(InMemoryWebSession.class, session);
|
||||
|
|
|
@ -127,6 +127,7 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
|
|||
}
|
||||
|
||||
// Overrides Servlet 3.1 setContentLengthLong(long) at runtime
|
||||
@Override
|
||||
public void setContentLengthLong(long len) {
|
||||
if (len > Integer.MAX_VALUE) {
|
||||
throw new IllegalArgumentException("Content-Length exceeds ContentCachingResponseWrapper's maximum (" +
|
||||
|
|
|
@ -195,16 +195,19 @@ public class DefaultUriBuilderFactory implements UriBuilderFactory {
|
|||
|
||||
// UriTemplateHandler
|
||||
|
||||
@Override
|
||||
public URI expand(String uriTemplate, Map<String, ?> uriVars) {
|
||||
return uriString(uriTemplate).build(uriVars);
|
||||
}
|
||||
|
||||
@Override
|
||||
public URI expand(String uriTemplate, Object... uriVars) {
|
||||
return uriString(uriTemplate).build(uriVars);
|
||||
}
|
||||
|
||||
// UriBuilderFactory
|
||||
|
||||
@Override
|
||||
public UriBuilder uriString(String uriTemplate) {
|
||||
return new DefaultUriBuilder(uriTemplate);
|
||||
}
|
||||
|
|
|
@ -112,6 +112,7 @@ class CaptureTheRestPathElement extends PathElement {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CaptureTheRest(/{*" + this.variableName + "})";
|
||||
}
|
||||
|
|
|
@ -150,11 +150,13 @@ class CaptureVariablePathElement extends PathElement {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CaptureVariable({" + this.variableName +
|
||||
(this.constraintPattern != null ? ":" + this.constraintPattern.pattern() : "") + "})";
|
||||
}
|
||||
|
||||
@Override
|
||||
public char[] getChars() {
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append("{");
|
||||
|
|
|
@ -113,11 +113,13 @@ class LiteralPathElement extends PathElement {
|
|||
return this.len;
|
||||
}
|
||||
|
||||
@Override
|
||||
public char[] getChars() {
|
||||
return this.text;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Literal(" + String.valueOf(this.text) + ")";
|
||||
}
|
||||
|
|
|
@ -203,6 +203,7 @@ class RegexPathElement extends PathElement {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Regex(" + String.valueOf(this.regex) + ")";
|
||||
}
|
||||
|
|
|
@ -62,10 +62,12 @@ class SeparatorPathElement extends PathElement {
|
|||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Separator(" + this.separator + ")";
|
||||
}
|
||||
|
||||
@Override
|
||||
public char[] getChars() {
|
||||
return new char[] {this.separator};
|
||||
}
|
||||
|
|
|
@ -126,6 +126,7 @@ class SingleCharWildcardedPathElement extends PathElement {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SingleCharWildcarded(" + String.valueOf(this.text) + ")";
|
||||
}
|
||||
|
|
|
@ -97,6 +97,7 @@ class WildcardPathElement extends PathElement {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Wildcard(*)";
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ class WildcardTheRestPathElement extends PathElement {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WildcardTheRest(" + this.separator + "**)";
|
||||
}
|
||||
|
|
|
@ -455,10 +455,12 @@ public class MappingJackson2HttpMessageConverterTests {
|
|||
|
||||
private String string;
|
||||
|
||||
@Override
|
||||
public String getString() {
|
||||
return string;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setString(String string) {
|
||||
this.string = string;
|
||||
}
|
||||
|
|
|
@ -228,6 +228,7 @@ public class SpringHandlerInstantiatorTests {
|
|||
}
|
||||
|
||||
// New in Jackson 2.7
|
||||
@Override
|
||||
public String getDescForKnownTypeIds() {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -132,6 +132,7 @@ public final class ConsumesRequestCondition extends AbstractRequestCondition<Con
|
|||
/**
|
||||
* Whether the condition has any media type expressions.
|
||||
*/
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return this.expressions.isEmpty();
|
||||
}
|
||||
|
|
|
@ -69,6 +69,7 @@ public class ViewResolversBeanDefinitionParser implements BeanDefinitionParser {
|
|||
public static final String VIEW_RESOLVER_BEAN_NAME = "mvcViewResolver";
|
||||
|
||||
|
||||
@Override
|
||||
public BeanDefinition parse(Element element, ParserContext context) {
|
||||
Object source = context.extractSource(element);
|
||||
context.pushContainingComponent(new CompositeComponentDefinition(element.getTagName(), source));
|
||||
|
|
|
@ -78,6 +78,7 @@ class DefaultResourceTransformerChain implements ResourceTransformerChain {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ResourceResolverChain getResolverChain() {
|
||||
return this.resolverChain;
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ public class GroovyMarkupConfigurer extends TemplateConfiguration
|
|||
this.templateEngine = templateEngine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MarkupTemplateEngine getTemplateEngine() {
|
||||
Assert.state(this.templateEngine != null, "No MarkupTemplateEngine set");
|
||||
return this.templateEngine;
|
||||
|
|
|
@ -578,6 +578,7 @@ public class MvcUriComponentsBuilderTests {
|
|||
|
||||
static class PersonCrudController extends AbstractCrudController<Person, Long> {
|
||||
|
||||
@Override
|
||||
@RequestMapping(path = "/{id}", method = RequestMethod.GET)
|
||||
public Person get(@PathVariable Long id) {
|
||||
return new Person();
|
||||
|
|
|
@ -3230,11 +3230,13 @@ public class ServletAnnotationControllerHandlerMethodTests extends AbstractServl
|
|||
@RequestMapping(path = ApiConstants.ARTICLES_PATH)
|
||||
public static class ArticleController implements ApiConstants, ResourceEndpoint<Article, ArticlePredicate> {
|
||||
|
||||
@Override
|
||||
@GetMapping(params = "page")
|
||||
public Collection<Article> find(String pageable, ArticlePredicate predicate) {
|
||||
throw new UnsupportedOperationException("not implemented");
|
||||
}
|
||||
|
||||
@Override
|
||||
@GetMapping
|
||||
public List<Article> find(boolean sort, ArticlePredicate predicate) {
|
||||
throw new UnsupportedOperationException("not implemented");
|
||||
|
|
|
@ -60,6 +60,7 @@ public abstract class AbstractWebSocketMessage<T> implements WebSocketMessage<T>
|
|||
/**
|
||||
* Return the message payload (never {@code null}).
|
||||
*/
|
||||
@Override
|
||||
public T getPayload() {
|
||||
return this.payload;
|
||||
}
|
||||
|
@ -67,6 +68,7 @@ public abstract class AbstractWebSocketMessage<T> implements WebSocketMessage<T>
|
|||
/**
|
||||
* Whether this is the last part of a message sent as a series of partial messages.
|
||||
*/
|
||||
@Override
|
||||
public boolean isLast() {
|
||||
return this.last;
|
||||
}
|
||||
|
|
|
@ -139,6 +139,7 @@ public class StandardWebSocketSession extends AbstractWebSocketSession<Session>
|
|||
return this.extensions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Principal getPrincipal() {
|
||||
return this.user;
|
||||
}
|
||||
|
|
|
@ -209,6 +209,7 @@ public class WebSocketMessageBrokerStats {
|
|||
return str.substring(str.indexOf("pool"), str.length() - 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WebSocketSession[" + getWebSocketSessionStatsInfo() + "]" +
|
||||
", stompSubProtocol[" + getStompSubProtocolStatsInfo() + "]" +
|
||||
|
|
|
@ -169,6 +169,7 @@ public class DefaultSimpUserRegistry implements SimpUserRegistry, SmartApplicati
|
|||
return this.users.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<SimpSubscription> findSubscriptions(SimpSubscriptionMatcher matcher) {
|
||||
Set<SimpSubscription> result = new HashSet<>();
|
||||
for (LocalSimpSession session : this.sessions.values()) {
|
||||
|
|
|
@ -221,6 +221,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
|
|||
/**
|
||||
* Handle incoming WebSocket messages from clients.
|
||||
*/
|
||||
@Override
|
||||
public void handleMessageFromClient(WebSocketSession session,
|
||||
WebSocketMessage<?> webSocketMessage, MessageChannel outputChannel) {
|
||||
|
||||
|
@ -716,6 +717,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
|
|||
return this.disconnect.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "processed CONNECT(" + this.connect.get() + ")-CONNECTED(" +
|
||||
this.connected.get() + ")-DISCONNECT(" + this.disconnect.get() + ")";
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue