Add missing @Override annotations

This commit is contained in:
Sam Brannen
2019-08-22 14:48:08 +02:00
parent 0b63db26b7
commit ad6231ad29
108 changed files with 321 additions and 0 deletions

View File

@@ -78,6 +78,7 @@ public class CacheEvictOperation extends CacheOperation {
return sb;
}
@Override
public CacheEvictOperation build() {
return new CacheEvictOperation(this);
}

View File

@@ -70,6 +70,7 @@ public class CachePutOperation extends CacheOperation {
return sb;
}
@Override
public CachePutOperation build() {
return new CachePutOperation(this);
}

View File

@@ -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);

View File

@@ -45,6 +45,7 @@ public class DefaultEventListenerFactory implements EventListenerFactory, Ordere
}
@Override
public boolean supportsMethod(Method method) {
return true;
}

View File

@@ -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)) {

View File

@@ -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);
}

View File

@@ -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();

View File

@@ -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);
}