Remove unneeded @NonNull annotations

See gh-28797
This commit is contained in:
Sébastien Deleuze
2024-12-18 18:22:54 +01:00
parent bc5d771a06
commit 0e85d950b3
16 changed files with 18 additions and 38 deletions
@@ -21,7 +21,6 @@ import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
import org.jspecify.annotations.NonNull;
import org.jspecify.annotations.Nullable;
import org.reactivestreams.Publisher;
@@ -379,7 +378,7 @@ public final class MultipartBodyBuilder {
* Return the element type for the {@code Publisher} body.
*/
@Override
public @NonNull ResolvableType getResolvableType() {
public ResolvableType getResolvableType() {
return this.resolvableType;
}
}
@@ -37,7 +37,6 @@ import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlSeeAlso;
import jakarta.xml.bind.annotation.XmlType;
import org.jspecify.annotations.NonNull;
import org.jspecify.annotations.Nullable;
import org.reactivestreams.Publisher;
import reactor.core.Exceptions;
@@ -172,7 +171,7 @@ public class Jaxb2XmlDecoder extends AbstractDecoder<Object> {
}
@Override
public @NonNull Object decode(DataBuffer dataBuffer, ResolvableType targetType,
public Object decode(DataBuffer dataBuffer, ResolvableType targetType,
@Nullable MimeType mimeType, @Nullable Map<String, Object> hints) throws DecodingException {
try {
@@ -35,7 +35,6 @@ import jakarta.servlet.ServletInputStream;
import jakarta.servlet.http.Cookie;
import jakarta.servlet.http.HttpServletRequest;
import org.apache.commons.logging.Log;
import org.jspecify.annotations.NonNull;
import org.jspecify.annotations.Nullable;
import reactor.core.publisher.Flux;
@@ -214,12 +213,12 @@ class ServletServerHttpRequest extends AbstractServerHttpRequest {
}
@Override
public @NonNull InetSocketAddress getLocalAddress() {
public InetSocketAddress getLocalAddress() {
return new InetSocketAddress(this.request.getLocalAddr(), this.request.getLocalPort());
}
@Override
public @NonNull InetSocketAddress getRemoteAddress() {
public InetSocketAddress getRemoteAddress() {
return new InetSocketAddress(this.request.getRemoteHost(), this.request.getRemotePort());
}
@@ -29,7 +29,6 @@ import java.util.StringJoiner;
import java.util.function.BiFunction;
import java.util.function.UnaryOperator;
import org.jspecify.annotations.NonNull;
import org.jspecify.annotations.Nullable;
import org.springframework.util.Assert;
@@ -196,7 +195,7 @@ final class HierarchicalUriComponents extends UriComponents {
}
@Override
public @NonNull String getPath() {
public String getPath() {
return this.path.getPath();
}