optional string foo = 1;
* @return Whether the foo field is set.
*/
- public boolean hasFoo() {
+ @Override
+ public boolean hasFoo() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string foo = 1;
* @return The foo.
*/
- public java.lang.String getFoo() {
+ @Override
+ public java.lang.String getFoo() {
java.lang.Object ref = foo_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
@@ -494,7 +496,8 @@ public java.lang.String getFoo() {
* optional string foo = 1;
* @return The bytes for foo.
*/
- public com.google.protobuf.ByteString
+ @Override
+ public com.google.protobuf.ByteString
getFooBytes() {
java.lang.Object ref = foo_;
if (ref instanceof String) {
@@ -551,14 +554,16 @@ public Builder setFooBytes(
* optional .SecondMsg blah = 2;
* @return Whether the blah field is set.
*/
- public boolean hasBlah() {
+ @Override
+ public boolean hasBlah() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional .SecondMsg blah = 2;
* @return The blah.
*/
- public org.springframework.messaging.protobuf.SecondMsg getBlah() {
+ @Override
+ public org.springframework.messaging.protobuf.SecondMsg getBlah() {
if (blahBuilder_ == null) {
return blah_ == null ? org.springframework.messaging.protobuf.SecondMsg.getDefaultInstance() : blah_;
} else {
@@ -640,7 +645,8 @@ public org.springframework.messaging.protobuf.SecondMsg.Builder getBlahBuilder()
/**
* optional .SecondMsg blah = 2;
*/
- public org.springframework.messaging.protobuf.SecondMsgOrBuilder getBlahOrBuilder() {
+ @Override
+ public org.springframework.messaging.protobuf.SecondMsgOrBuilder getBlahOrBuilder() {
if (blahBuilder_ != null) {
return blahBuilder_.getMessageOrBuilder();
} else {
diff --git a/spring-orm/src/main/java/org/springframework/orm/hibernate5/LocalSessionFactoryBuilder.java b/spring-orm/src/main/java/org/springframework/orm/hibernate5/LocalSessionFactoryBuilder.java
index e134589b6cb6..03b7cfdda84e 100644
--- a/spring-orm/src/main/java/org/springframework/orm/hibernate5/LocalSessionFactoryBuilder.java
+++ b/spring-orm/src/main/java/org/springframework/orm/hibernate5/LocalSessionFactoryBuilder.java
@@ -289,6 +289,7 @@ public LocalSessionFactoryBuilder setEntityTypeFilters(TypeFilter... entityTypeF
* @see #addPackage
* @see #scanPackages
*/
+ @Override
public LocalSessionFactoryBuilder addPackages(String... annotatedPackages) {
for (String annotatedPackage : annotatedPackages) {
addPackage(annotatedPackage);
diff --git a/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java b/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java
index 95bc2551b8e1..5f5102772384 100644
--- a/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java
+++ b/spring-test/src/main/java/org/springframework/mock/web/MockHttpServletResponse.java
@@ -643,6 +643,7 @@ public void sendRedirect(String url) throws IOException {
}
// @Override - on Servlet 6.1
+ @Override
public void sendRedirect(String url, int sc, boolean clearBuffer) throws IOException {
Assert.state(!isCommitted(), "Cannot send redirect - response is already committed");
Assert.notNull(url, "Redirect URL must not be null");
diff --git a/spring-web/src/main/java/org/springframework/http/client/reactive/JdkResponseCookieParser.java b/spring-web/src/main/java/org/springframework/http/client/reactive/JdkResponseCookieParser.java
index dca1b0528c55..dd8d3d219dc7 100644
--- a/spring-web/src/main/java/org/springframework/http/client/reactive/JdkResponseCookieParser.java
+++ b/spring-web/src/main/java/org/springframework/http/client/reactive/JdkResponseCookieParser.java
@@ -39,6 +39,7 @@ final class JdkResponseCookieParser implements ResponseCookie.Parser {
/**
* Parse the given headers.
*/
+ @Override
public ListBy default, the version is formatted with {@link Object#toString()}.
* @param versionFormatter the formatter to use
*/
+ @Override
public ApiVersionInserter.Builder withVersionFormatter(ApiVersionFormatter versionFormatter) {
this.versionFormatter = versionFormatter;
return this;
@@ -86,6 +90,7 @@ public ApiVersionInserter.Builder withVersionFormatter(ApiVersionFormatter versi
/**
* Build the inserter.
*/
+ @Override
public ApiVersionInserter build() {
return new DefaultApiVersionInserter(
this.header, this.queryParam, this.pathSegmentIndex, this.versionFormatter);
diff --git a/spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java b/spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java
index a8e731dbb2fb..245c0751f7d2 100644
--- a/spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java
+++ b/spring-web/src/main/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequest.java
@@ -389,6 +389,7 @@ public void write(int b) throws IOException {
}
}
+ @Override
public void write(byte[] buf, int offset, int len) throws IOException {
int level = this.response.obtainLockOrRaiseException();
try {
diff --git a/spring-web/src/test/java/org/springframework/protobuf/Msg.java b/spring-web/src/test/java/org/springframework/protobuf/Msg.java
index e47b4738e7e7..dd729ce3f186 100644
--- a/spring-web/src/test/java/org/springframework/protobuf/Msg.java
+++ b/spring-web/src/test/java/org/springframework/protobuf/Msg.java
@@ -469,14 +469,16 @@ public Builder mergeFrom(
* optional string foo = 1;
* @return Whether the foo field is set.
*/
- public boolean hasFoo() {
+ @Override
+ public boolean hasFoo() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string foo = 1;
* @return The foo.
*/
- public java.lang.String getFoo() {
+ @Override
+ public java.lang.String getFoo() {
java.lang.Object ref = foo_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
@@ -494,7 +496,8 @@ public java.lang.String getFoo() {
* optional string foo = 1;
* @return The bytes for foo.
*/
- public com.google.protobuf.ByteString
+ @Override
+ public com.google.protobuf.ByteString
getFooBytes() {
java.lang.Object ref = foo_;
if (ref instanceof String) {
@@ -551,14 +554,16 @@ public Builder setFooBytes(
* optional .SecondMsg blah = 2;
* @return Whether the blah field is set.
*/
- public boolean hasBlah() {
+ @Override
+ public boolean hasBlah() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional .SecondMsg blah = 2;
* @return The blah.
*/
- public org.springframework.protobuf.SecondMsg getBlah() {
+ @Override
+ public org.springframework.protobuf.SecondMsg getBlah() {
if (blahBuilder_ == null) {
return blah_ == null ? org.springframework.protobuf.SecondMsg.getDefaultInstance() : blah_;
} else {
@@ -640,7 +645,8 @@ public org.springframework.protobuf.SecondMsg.Builder getBlahBuilder() {
/**
* optional .SecondMsg blah = 2;
*/
- public org.springframework.protobuf.SecondMsgOrBuilder getBlahOrBuilder() {
+ @Override
+ public org.springframework.protobuf.SecondMsgOrBuilder getBlahOrBuilder() {
if (blahBuilder_ != null) {
return blahBuilder_.getMessageOrBuilder();
} else {
diff --git a/spring-web/src/test/java/org/springframework/web/client/support/RestClientProxyRegistryIntegrationTests.java b/spring-web/src/test/java/org/springframework/web/client/support/RestClientProxyRegistryIntegrationTests.java
index e867fe902c92..3621c32f678c 100644
--- a/spring-web/src/test/java/org/springframework/web/client/support/RestClientProxyRegistryIntegrationTests.java
+++ b/spring-web/src/test/java/org/springframework/web/client/support/RestClientProxyRegistryIntegrationTests.java
@@ -119,6 +119,7 @@ void basic(Class> configClass) throws InterruptedException {
void beansAreCreatedUsingBeanClassLoader() {
ClassLoader beanClassLoader = new OverridingClassLoader(getClass().getClassLoader()) {
+ @Override
protected boolean isEligibleForOverriding(String className) {
return className.contains("EchoA");
};
diff --git a/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletResponse.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletResponse.java
index 9519dafc9d36..1a1d91e45979 100644
--- a/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletResponse.java
+++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletResponse.java
@@ -643,6 +643,7 @@ public void sendRedirect(String url) throws IOException {
}
// @Override - on Servlet 6.1
+ @Override
public void sendRedirect(String url, int sc, boolean clearBuffer) throws IOException {
Assert.state(!isCommitted(), "Cannot send redirect - response is already committed");
Assert.notNull(url, "Redirect URL must not be null");
diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/accept/DefaultApiVersionStrategy.java b/spring-webflux/src/main/java/org/springframework/web/reactive/accept/DefaultApiVersionStrategy.java
index 91ce69855cbe..ab42ec234c58 100644
--- a/spring-webflux/src/main/java/org/springframework/web/reactive/accept/DefaultApiVersionStrategy.java
+++ b/spring-webflux/src/main/java/org/springframework/web/reactive/accept/DefaultApiVersionStrategy.java
@@ -135,6 +135,7 @@ public Comparable> parseVersion(String version) {
return this.versionParser.parseVersion(version);
}
+ @Override
public void validateVersion(@Nullable Comparable> requestVersion, ServerWebExchange exchange)
throws MissingApiVersionException, InvalidApiVersionException {
diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/protobuf/Msg.java b/spring-webflux/src/test/java/org/springframework/web/reactive/protobuf/Msg.java
index 5c0b1b9d1d41..f3dea92df11c 100644
--- a/spring-webflux/src/test/java/org/springframework/web/reactive/protobuf/Msg.java
+++ b/spring-webflux/src/test/java/org/springframework/web/reactive/protobuf/Msg.java
@@ -469,14 +469,16 @@ public Builder mergeFrom(
* optional string foo = 1;
* @return Whether the foo field is set.
*/
- public boolean hasFoo() {
+ @Override
+ public boolean hasFoo() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string foo = 1;
* @return The foo.
*/
- public java.lang.String getFoo() {
+ @Override
+ public java.lang.String getFoo() {
java.lang.Object ref = foo_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
@@ -494,7 +496,8 @@ public java.lang.String getFoo() {
* optional string foo = 1;
* @return The bytes for foo.
*/
- public com.google.protobuf.ByteString
+ @Override
+ public com.google.protobuf.ByteString
getFooBytes() {
java.lang.Object ref = foo_;
if (ref instanceof String) {
@@ -551,14 +554,16 @@ public Builder setFooBytes(
* optional .SecondMsg blah = 2;
* @return Whether the blah field is set.
*/
- public boolean hasBlah() {
+ @Override
+ public boolean hasBlah() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional .SecondMsg blah = 2;
* @return The blah.
*/
- public org.springframework.web.reactive.protobuf.SecondMsg getBlah() {
+ @Override
+ public org.springframework.web.reactive.protobuf.SecondMsg getBlah() {
if (blahBuilder_ == null) {
return blah_ == null ? org.springframework.web.reactive.protobuf.SecondMsg.getDefaultInstance() : blah_;
} else {
@@ -640,7 +645,8 @@ public org.springframework.web.reactive.protobuf.SecondMsg.Builder getBlahBuilde
/**
* optional .SecondMsg blah = 2;
*/
- public org.springframework.web.reactive.protobuf.SecondMsgOrBuilder getBlahOrBuilder() {
+ @Override
+ public org.springframework.web.reactive.protobuf.SecondMsgOrBuilder getBlahOrBuilder() {
if (blahBuilder_ != null) {
return blahBuilder_.getMessageOrBuilder();
} else {
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultServerRequest.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultServerRequest.java
index 96017c00bc0d..7c42479f8226 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultServerRequest.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultServerRequest.java
@@ -678,6 +678,7 @@ public void sendRedirect(String location) throws IOException {
}
// @Override - on Servlet 6.1
+ @Override
public void sendRedirect(String location, int sc, boolean clearBuffer) throws IOException {
throw new UnsupportedOperationException();
}
diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMappingIntrospector.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMappingIntrospector.java
index 25eeec851aa4..aab6da66889d 100644
--- a/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMappingIntrospector.java
+++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMappingIntrospector.java
@@ -222,6 +222,7 @@ public boolean allHandlerMappingsUsePathPatternParser() {
* @throws NoHandlerFoundException if no handler matches the request
* @since 6.2
*/
+ @Override
public void handlePreFlight(HttpServletRequest request, HttpServletResponse response) throws Exception {
Assert.state(this.handlerMappings != null, "Not yet initialized via afterPropertiesSet.");
Assert.state(CorsUtils.isPreFlightRequest(request), "Not a pre-flight request.");