Browse Source

Spring cleaning: add missing @⁠Override annotations

pull/32412/head
Sam Brannen 2 years ago
parent
commit
c98bebd6d3
  1. 1
      spring-context/src/main/java/org/springframework/validation/Errors.java
  2. 1
      spring-core/src/test/java/org/springframework/util/ClassUtilsTests.java
  3. 1
      spring-jdbc/src/test/java/org/springframework/jdbc/core/BeanPropertyRowMapperTests.java
  4. 2
      spring-messaging/src/test/java/org/springframework/messaging/rsocket/service/RSocketServiceIntegrationTests.java
  5. 1
      spring-messaging/src/test/java/org/springframework/messaging/simp/annotation/support/SimpAnnotationMethodMessageHandlerTests.java
  6. 2
      spring-web/src/main/java/org/springframework/web/service/invoker/ReactiveHttpRequestValues.java
  7. 1
      spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java
  8. 1
      spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistry.java

1
spring-context/src/main/java/org/springframework/validation/Errors.java

@ -395,6 +395,7 @@ public interface Errors { @@ -395,6 +395,7 @@ public interface Errors {
* e.g. for inclusion in an exception message.
* @see #failOnError(Function)
*/
@Override
String toString();
}

1
spring-core/src/test/java/org/springframework/util/ClassUtilsTests.java

@ -625,6 +625,7 @@ class ClassUtilsTests { @@ -625,6 +625,7 @@ class ClassUtilsTests {
}
@Override
public void packageAccessiblePrint() {
}

1
spring-jdbc/src/test/java/org/springframework/jdbc/core/BeanPropertyRowMapperTests.java

@ -204,6 +204,7 @@ class BeanPropertyRowMapperTests extends AbstractRowMapperTests { @@ -204,6 +204,7 @@ class BeanPropertyRowMapperTests extends AbstractRowMapperTests {
private static class CustomPerson extends Person {
@Override
@MyColumnName("birthdate")
public void setBirth_date(Date date) {
super.setBirth_date(date);

2
spring-messaging/src/test/java/org/springframework/messaging/rsocket/service/RSocketServiceIntegrationTests.java

@ -127,10 +127,12 @@ class RSocketServiceIntegrationTests { @@ -127,10 +127,12 @@ class RSocketServiceIntegrationTests {
@Controller
static class ServerController implements Service {
@Override
public Mono<String> echoAsync(String payload) {
return Mono.delay(Duration.ofMillis(10)).map(aLong -> payload + " async");
}
@Override
public Flux<String> echoStream(String payload) {
return Flux.interval(Duration.ofMillis(10)).map(aLong -> payload + " " + aLong);
}

1
spring-messaging/src/test/java/org/springframework/messaging/simp/annotation/support/SimpAnnotationMethodMessageHandlerTests.java

@ -546,6 +546,7 @@ public class SimpAnnotationMethodMessageHandlerTests { @@ -546,6 +546,7 @@ public class SimpAnnotationMethodMessageHandlerTests {
Map<String, Object> arguments = new LinkedHashMap<>();
@Override
@MessageMapping("/binding/id/{id}")
public void simpleBinding(Long id) {
this.method = "simpleBinding";

2
spring-web/src/main/java/org/springframework/web/service/invoker/ReactiveHttpRequestValues.java

@ -85,6 +85,7 @@ public final class ReactiveHttpRequestValues extends HttpRequestValues { @@ -85,6 +85,7 @@ public final class ReactiveHttpRequestValues extends HttpRequestValues {
* <p>This is mutually exclusive with {@link #getBodyValue()}.
* Only one of the two or neither is set.
*/
@Override
@SuppressWarnings("removal")
@Nullable
public Publisher<?> getBody() {
@ -94,6 +95,7 @@ public final class ReactiveHttpRequestValues extends HttpRequestValues { @@ -94,6 +95,7 @@ public final class ReactiveHttpRequestValues extends HttpRequestValues {
/**
* Return the element type for a {@linkplain #getBodyPublisher() body publisher}.
*/
@Override
@SuppressWarnings("removal")
@Nullable
public ParameterizedTypeReference<?> getBodyElementType() {

1
spring-web/src/main/java/org/springframework/web/util/UriComponentsBuilder.java

@ -500,6 +500,7 @@ public class UriComponentsBuilder implements UriBuilder, Cloneable { @@ -500,6 +500,7 @@ public class UriComponentsBuilder implements UriBuilder, Cloneable {
* @since 4.1
* @see UriComponents#toUriString()
*/
@Override
public String toUriString() {
return (this.uriVariables.isEmpty() ?
build().encode().toUriString() :

1
spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/WebMvcStompEndpointRegistry.java

@ -142,6 +142,7 @@ public class WebMvcStompEndpointRegistry implements StompEndpointRegistry { @@ -142,6 +142,7 @@ public class WebMvcStompEndpointRegistry implements StompEndpointRegistry {
return this;
}
@Override
public WebMvcStompEndpointRegistry setPreserveReceiveOrder(boolean preserveReceiveOrder) {
this.stompHandler.setPreserveReceiveOrder(preserveReceiveOrder);
return this;

Loading…
Cancel
Save