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

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

View File

@@ -295,6 +295,7 @@ final class DefaultPathContainer implements PathContainer {
return this.value.hashCode();
}
@Override
public String toString() {
return "[value='" + this.value + "']";
}

View File

@@ -83,6 +83,7 @@ public abstract class AbstractServerHttpRequest implements ServerHttpRequest {
}
@Override
public String getId() {
if (this.id == null) {
this.id = initId();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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 (" +

View File

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

View File

@@ -112,6 +112,7 @@ class CaptureTheRestPathElement extends PathElement {
}
@Override
public String toString() {
return "CaptureTheRest(/{*" + this.variableName + "})";
}

View File

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

View File

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

View File

@@ -203,6 +203,7 @@ class RegexPathElement extends PathElement {
}
@Override
public String toString() {
return "Regex(" + String.valueOf(this.regex) + ")";
}

View File

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

View File

@@ -126,6 +126,7 @@ class SingleCharWildcardedPathElement extends PathElement {
}
@Override
public String toString() {
return "SingleCharWildcarded(" + String.valueOf(this.text) + ")";
}

View File

@@ -97,6 +97,7 @@ class WildcardPathElement extends PathElement {
}
@Override
public String toString() {
return "Wildcard(*)";
}

View File

@@ -53,6 +53,7 @@ class WildcardTheRestPathElement extends PathElement {
}
@Override
public String toString() {
return "WildcardTheRest(" + this.separator + "**)";
}