diff --git a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/AbstractRSocketConnector.java b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/AbstractRSocketConnector.java index 83d44b5ec46..feecf540375 100644 --- a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/AbstractRSocketConnector.java +++ b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/AbstractRSocketConnector.java @@ -16,6 +16,8 @@ package org.springframework.integration.rsocket; +import org.jspecify.annotations.Nullable; + import org.springframework.beans.BeansException; import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; @@ -23,7 +25,6 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.context.SmartLifecycle; -import org.springframework.lang.Nullable; import org.springframework.messaging.rsocket.RSocketStrategies; import org.springframework.util.Assert; import org.springframework.util.MimeType; @@ -64,8 +65,7 @@ public void setDataMimeType(@Nullable MimeType dataMimeType) { this.rSocketMessageHandler.setDefaultDataMimeType(dataMimeType); } - @Nullable - protected MimeType getDataMimeType() { + protected @Nullable MimeType getDataMimeType() { return this.rSocketMessageHandler.getDefaultDataMimeType(); } diff --git a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/ClientRSocketConnector.java b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/ClientRSocketConnector.java index 89c754660c1..a18d6b03ce1 100644 --- a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/ClientRSocketConnector.java +++ b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/ClientRSocketConnector.java @@ -49,14 +49,17 @@ public class ClientRSocketConnector extends AbstractRSocketConnector { private RSocketConnectorConfigurer connectorConfigurer = (connector) -> { }; + @SuppressWarnings("NullAway.Init") private Object setupData; + @SuppressWarnings("NullAway.Init") private String setupRoute; private Object[] setupRouteVars = new Object[0]; private boolean autoConnect; + @SuppressWarnings("NullAway.Init") private RSocketRequester rsocketRequester; /** diff --git a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/IntegrationRSocketMessageHandler.java b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/IntegrationRSocketMessageHandler.java index aedd27469ec..7d45427ca6e 100644 --- a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/IntegrationRSocketMessageHandler.java +++ b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/IntegrationRSocketMessageHandler.java @@ -26,6 +26,7 @@ import io.rsocket.Payload; import io.rsocket.frame.FrameType; +import org.jspecify.annotations.Nullable; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -33,7 +34,6 @@ import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.core.codec.Encoder; -import org.springframework.lang.Nullable; import org.springframework.messaging.Message; import org.springframework.messaging.ReactiveMessageHandler; import org.springframework.messaging.handler.CompositeMessageCondition; @@ -60,6 +60,7 @@ */ class IntegrationRSocketMessageHandler extends RSocketMessageHandler { + @SuppressWarnings("NullAway") // Reflection private static final Method HANDLE_MESSAGE_METHOD = ReflectionUtils.findMethod(ReactiveMessageHandler.class, "handleMessage", Message.class); @@ -105,7 +106,7 @@ public void addEndpoint(IntegrationRSocketEndpoint endpoint) { registerHandlerMethod(endpoint, HANDLE_MESSAGE_METHOD, new CompositeMessageCondition( frameTypeMessageCondition, - new DestinationPatternsMessageCondition(endpoint.getPath(), getRouteMatcher()))); // NOSONAR + new DestinationPatternsMessageCondition(endpoint.getPath(), obtainRouteMatcher()))); // NOSONAR } @Override @@ -173,9 +174,8 @@ public Mono handleReturnValue(@Nullable Object returnValue, MethodParamete } } - @Nullable @SuppressWarnings("unchecked") - private static AtomicReference> getResponseReference(Message message) { + private static @Nullable AtomicReference> getResponseReference(Message message) { Object headerValue = message.getHeaders().get(RESPONSE_HEADER); Assert.state(headerValue == null || headerValue instanceof AtomicReference, "Expected AtomicReference"); return (AtomicReference>) headerValue; diff --git a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/ServerRSocketConnector.java b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/ServerRSocketConnector.java index f3ff97299d2..8fd8872b8c4 100644 --- a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/ServerRSocketConnector.java +++ b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/ServerRSocketConnector.java @@ -25,6 +25,7 @@ import io.rsocket.transport.netty.server.CloseableChannel; import io.rsocket.transport.netty.server.TcpServerTransport; import io.rsocket.transport.netty.server.WebsocketServerTransport; +import org.jspecify.annotations.Nullable; import reactor.core.Disposable; import reactor.core.publisher.Mono; import reactor.netty.http.server.HttpServer; @@ -34,7 +35,6 @@ import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisherAware; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.lang.Nullable; import org.springframework.messaging.rsocket.RSocketRequester; import org.springframework.messaging.rsocket.RSocketStrategies; import org.springframework.util.Assert; @@ -51,11 +51,12 @@ */ public class ServerRSocketConnector extends AbstractRSocketConnector implements ApplicationEventPublisherAware { - private final ServerTransport serverTransport; + private final @Nullable ServerTransport serverTransport; private Consumer serverConfigurer = (rsocketServer) -> { }; + @SuppressWarnings("NullAway.Init") private Mono serverMono; /** @@ -191,8 +192,7 @@ public Map getClientRSocketRequesters() { * @return the {@link RSocketRequester} or null. * @see ServerRSocketMessageHandler#getClientRSocketRequester(Object) */ - @Nullable - public RSocketRequester getClientRSocketRequester(Object key) { + public @Nullable RSocketRequester getClientRSocketRequester(Object key) { return serverRSocketMessageHandler().getClientRSocketRequester(key); } diff --git a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/ServerRSocketMessageHandler.java b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/ServerRSocketMessageHandler.java index 89bc6f6ee90..0c5edcf1aa1 100644 --- a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/ServerRSocketMessageHandler.java +++ b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/ServerRSocketMessageHandler.java @@ -23,11 +23,12 @@ import java.util.Map; import java.util.function.BiFunction; +import org.jspecify.annotations.Nullable; + import org.springframework.aot.hint.annotation.Reflective; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.ApplicationEventPublisherAware; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.lang.Nullable; import org.springframework.messaging.Message; import org.springframework.messaging.MessageHeaders; import org.springframework.messaging.handler.CompositeMessageCondition; @@ -60,6 +61,7 @@ public class ServerRSocketMessageHandler extends IntegrationRSocketMessageHandler implements ApplicationEventPublisherAware { + @SuppressWarnings("NullAway") // Reflection private static final Method HANDLE_CONNECTION_SETUP_METHOD = ReflectionUtils.findMethod(ServerRSocketMessageHandler.class, "handleConnectionSetup", Message.class); @@ -68,7 +70,7 @@ public class ServerRSocketMessageHandler extends IntegrationRSocketMessageHandle private BiFunction, DataBuffer, Object> clientRSocketKeyStrategy = (headers, data) -> data.toString(StandardCharsets.UTF_8); - private ApplicationEventPublisher applicationEventPublisher; + private @Nullable ApplicationEventPublisher applicationEventPublisher; /** * Create an service side RSocket message handler instance for delegating @@ -120,8 +122,7 @@ public Map getClientRSocketRequesters() { * @param key the key for mapped {@link RSocketRequester} if any. * @return the mapped {@link RSocketRequester} or null. */ - @Nullable - public RSocketRequester getClientRSocketRequester(Object key) { + public @Nullable RSocketRequester getClientRSocketRequester(Object key) { return this.clientRSocketRequesters.get(key); } @@ -146,6 +147,7 @@ private void handleConnectionSetup(Message connectMessage) { RSocketRequester rsocketRequester = messageHeaders.get(RSocketRequesterMethodArgumentResolver.RSOCKET_REQUESTER_HEADER, RSocketRequester.class); + Assert.notNull(rsocketRequester, "'rsocketRequester' can not be null"); this.clientRSocketRequesters.put(rsocketRequesterKey, rsocketRequester); RSocketConnectedEvent rSocketConnectedEvent = new RSocketConnectedEvent(this, messageHeaders, dataBuffer, rsocketRequester); // NOSONAR diff --git a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/config/package-info.java b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/config/package-info.java index a598aa16c20..bd5fc50bc15 100644 --- a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/config/package-info.java +++ b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/config/package-info.java @@ -1,5 +1,5 @@ /** * Provides classes for RSocket XML namespace parsing and configuration support. */ -@org.springframework.lang.NonNullApi +@org.jspecify.annotations.NullMarked package org.springframework.integration.rsocket.config; diff --git a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/dsl/package-info.java b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/dsl/package-info.java index a2cfe7f3625..de45227c390 100644 --- a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/dsl/package-info.java +++ b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/dsl/package-info.java @@ -1,6 +1,5 @@ /** * Provides RSocket Components support for Spring Integration Java DSL. */ -@org.springframework.lang.NonNullApi -@org.springframework.lang.NonNullFields +@org.jspecify.annotations.NullMarked package org.springframework.integration.rsocket.dsl; diff --git a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/inbound/RSocketInboundGateway.java b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/inbound/RSocketInboundGateway.java index 1a499b136d3..1da485bf518 100644 --- a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/inbound/RSocketInboundGateway.java +++ b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/inbound/RSocketInboundGateway.java @@ -19,6 +19,7 @@ import java.util.Arrays; import java.util.concurrent.atomic.AtomicReference; +import org.jspecify.annotations.Nullable; import org.reactivestreams.Publisher; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -37,7 +38,6 @@ import org.springframework.integration.rsocket.IntegrationRSocketEndpoint; import org.springframework.integration.rsocket.RSocketInteractionModel; import org.springframework.integration.support.MessageBuilder; -import org.springframework.lang.Nullable; import org.springframework.messaging.Message; import org.springframework.messaging.MessageDeliveryException; import org.springframework.messaging.MessageHeaders; @@ -78,11 +78,9 @@ public class RSocketInboundGateway extends MessagingGatewaySupport implements In private RSocketStrategies rsocketStrategies = RSocketStrategies.create(); - @Nullable - private AbstractRSocketConnector rsocketConnector; + private @Nullable AbstractRSocketConnector rsocketConnector; - @Nullable - private ResolvableType requestElementType; + private @Nullable ResolvableType requestElementType; private boolean decodeFluxAsUnit; @@ -188,8 +186,8 @@ protected void onInit() { @Override protected void doStart() { super.doStart(); - if (this.rsocketConnector instanceof ClientRSocketConnector) { - ((ClientRSocketConnector) this.rsocketConnector).connect(); + if (this.rsocketConnector instanceof ClientRSocketConnector clientRSocketConnector) { + clientRSocketConnector.connect(); } } @@ -265,8 +263,8 @@ private Object decodePayload(Message requestMessage) { // The MessagingRSocket logic ensures that we can have only a single DataBuffer payload or Flux. Decoder decoder = this.rsocketStrategies.decoder(elementType, mimeType); - if (payload instanceof DataBuffer) { - return decoder.decode((DataBuffer) payload, elementType, mimeType, null); + if (payload instanceof DataBuffer dataBuffer) { + return decoder.decode(dataBuffer, elementType, mimeType, null); } else if (this.decodeFluxAsUnit) { return decoder.decode((Publisher) payload, elementType, mimeType, null); diff --git a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/inbound/package-info.java b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/inbound/package-info.java index e2d1a45fbb2..a656a45fab4 100644 --- a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/inbound/package-info.java +++ b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/inbound/package-info.java @@ -1,5 +1,5 @@ /** * Provides classes representing inbound RSocket components. */ -@org.springframework.lang.NonNullApi +@org.jspecify.annotations.NullMarked package org.springframework.integration.rsocket.inbound; diff --git a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/outbound/RSocketOutboundGateway.java b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/outbound/RSocketOutboundGateway.java index b2f238ae401..fe1378275c9 100644 --- a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/outbound/RSocketOutboundGateway.java +++ b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/outbound/RSocketOutboundGateway.java @@ -19,6 +19,7 @@ import java.util.Arrays; import java.util.Map; +import org.jspecify.annotations.Nullable; import org.reactivestreams.Publisher; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -32,7 +33,6 @@ import org.springframework.integration.handler.AbstractReplyProducingMessageHandler; import org.springframework.integration.rsocket.ClientRSocketConnector; import org.springframework.integration.rsocket.RSocketInteractionModel; -import org.springframework.lang.Nullable; import org.springframework.messaging.Message; import org.springframework.messaging.rsocket.RSocketRequester; import org.springframework.messaging.rsocket.annotation.support.RSocketRequesterMethodArgumentResolver; @@ -74,23 +74,22 @@ public class RSocketOutboundGateway extends AbstractReplyProducingMessageHandler private final Expression routeExpression; - private Object[] routeVars; + private final Object[] routeVars; - @Nullable - private ClientRSocketConnector clientRSocketConnector; + private @Nullable ClientRSocketConnector clientRSocketConnector; private Expression interactionModelExpression = new ValueExpression<>(RSocketInteractionModel.requestResponse); - private Expression publisherElementTypeExpression; + private @Nullable Expression publisherElementTypeExpression; private Expression expectedResponseTypeExpression = new ValueExpression<>(String.class); - private Expression metadataExpression; + private @Nullable Expression metadataExpression; + @SuppressWarnings("NullAway.Init") private EvaluationContext evaluationContext; - @Nullable - private RSocketRequester rsocketRequester; + private @Nullable RSocketRequester rsocketRequester; /** * Instantiate based on the provided RSocket endpoint {@code route} @@ -98,11 +97,8 @@ public class RSocketOutboundGateway extends AbstractReplyProducingMessageHandler * @param route the RSocket endpoint route to use. * @param routeVariables the variables to expand route template. */ - public RSocketOutboundGateway(String route, @Nullable Object... routeVariables) { - this(new ValueExpression<>(route)); - if (routeVariables != null) { - this.routeVars = Arrays.copyOf(routeVariables, routeVariables.length); - } + public RSocketOutboundGateway(String route, Object @Nullable ... routeVariables) { + this(new ValueExpression<>(route), routeVariables); } /** @@ -112,10 +108,25 @@ public RSocketOutboundGateway(String route, @Nullable Object... routeVariables) * in this expression evaluation, for example using some bean with an appropriate logic. * @param routeExpression the SpEL expression to use. */ - @SuppressWarnings("this-escape") public RSocketOutboundGateway(Expression routeExpression) { + this(routeExpression, null); + } + + /** + * Instantiate based on the provided SpEL expression to evaluate an RSocket endpoint {@code route} + * at runtime against a request message. + * If route is a template and variables expansion is required, it is recommended to do that + * in this expression evaluation, for example using some bean with an appropriate logic. + * @param routeExpression the SpEL expression to use. + * @param routeVariables the variables to expand route template. + */ + @SuppressWarnings("this-escape") + private RSocketOutboundGateway(Expression routeExpression, Object @Nullable [] routeVariables) { Assert.notNull(routeExpression, "'routeExpression' must not be null"); this.routeExpression = routeExpression; + this.routeVars = routeVariables != null + ? Arrays.copyOf(routeVariables, routeVariables.length) + : new Object[0]; setAsync(true); setPrimaryExpression(this.routeExpression); } @@ -254,10 +265,10 @@ private RSocketRequester.RetrieveSpec prepareRetrieveSpec(RSocketRequester.Reque Message requestMessage) { Object payload = requestMessage.getPayload(); - if (payload instanceof Publisher && this.publisherElementTypeExpression != null) { + if (payload instanceof Publisher publisher && this.publisherElementTypeExpression != null) { Object publisherElementType = evaluateExpressionForType(requestMessage, this.publisherElementTypeExpression, "publisherElementType"); - return prepareRequestSpecForPublisher(requestSpec, (Publisher) payload, publisherElementType); + return prepareRequestSpecForPublisher(requestSpec, publisher, publisherElementType); } else { return requestSpec.data(payload); @@ -267,8 +278,8 @@ private RSocketRequester.RetrieveSpec prepareRetrieveSpec(RSocketRequester.Reque private RSocketRequester.RetrieveSpec prepareRequestSpecForPublisher(RSocketRequester.RequestSpec requestSpec, Publisher payload, Object publisherElementType) { - if (publisherElementType instanceof Class) { - return requestSpec.data(payload, (Class) publisherElementType); + if (publisherElementType instanceof Class cls) { + return requestSpec.data(payload, cls); } else { return requestSpec.data(payload, (ParameterizedTypeReference) publisherElementType); @@ -281,18 +292,17 @@ private Mono performRetrieve(RSocketRequester.RetrieveSpec retrieveSpec, Mess () -> "The 'interactionModelExpression' [" + this.interactionModelExpression + "] must not evaluate to null"); - Object expectedResponseType = null; - if (!RSocketInteractionModel.fireAndForget.equals(interactionModel)) { - expectedResponseType = evaluateExpressionForType(requestMessage, this.expectedResponseTypeExpression, - "expectedResponseType"); + if (RSocketInteractionModel.fireAndForget.equals(interactionModel)) { + return retrieveSpec.send(); } + Object expectedResponseType = evaluateExpressionForType(requestMessage, this.expectedResponseTypeExpression, + "expectedResponseType"); + switch (interactionModel) { - case fireAndForget: - return retrieveSpec.send(); case requestResponse: - if (expectedResponseType instanceof Class) { - return retrieveSpec.retrieveMono((Class) expectedResponseType); + if (expectedResponseType instanceof Class cls) { + return retrieveSpec.retrieveMono(cls); } else { return retrieveSpec.retrieveMono((ParameterizedTypeReference) expectedResponseType); @@ -301,9 +311,9 @@ private Mono performRetrieve(RSocketRequester.RetrieveSpec retrieveSpec, Mess case requestChannel: Flux result; ResolvableType expectedType; - if (expectedResponseType instanceof Class) { - expectedType = ResolvableType.forClass((Class) expectedResponseType); - result = retrieveSpec.retrieveFlux((Class) expectedResponseType); + if (expectedResponseType instanceof Class cls) { + expectedType = ResolvableType.forClass(cls); + result = retrieveSpec.retrieveFlux(cls); } else { expectedType = ResolvableType.forType((ParameterizedTypeReference) expectedResponseType); @@ -317,11 +327,11 @@ private Mono performRetrieve(RSocketRequester.RetrieveSpec retrieveSpec, Mess private RSocketInteractionModel evaluateInteractionModel(Message requestMessage) { Object value = this.interactionModelExpression.getValue(this.evaluationContext, requestMessage); - if (value instanceof RSocketInteractionModel) { - return (RSocketInteractionModel) value; + if (value instanceof RSocketInteractionModel rSocketInteractionModel) { + return rSocketInteractionModel; } - else if (value instanceof String) { - return RSocketInteractionModel.valueOf((String) value); + else if (value instanceof String string) { + return RSocketInteractionModel.valueOf(string); } else { throw new IllegalStateException("The 'interactionModelExpression' [" + @@ -339,9 +349,9 @@ private Object evaluateExpressionForType(Message requestMessage, Expression e "] must evaluate to 'String' (class FQN), 'Class' " + "or 'ParameterizedTypeReference', not to: " + type); - if (type instanceof String) { + if (type instanceof String string) { try { - return ClassUtils.forName((String) type, getBeanClassLoader()); + return ClassUtils.forName(string, getBeanClassLoader()); } catch (ClassNotFoundException e) { throw new IllegalStateException(e); diff --git a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/outbound/package-info.java b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/outbound/package-info.java index 10b1e5b7397..c28c564510e 100644 --- a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/outbound/package-info.java +++ b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/outbound/package-info.java @@ -1,5 +1,5 @@ /** * Provides classes representing outbound RSocket components. */ -@org.springframework.lang.NonNullApi +@org.jspecify.annotations.NullMarked package org.springframework.integration.rsocket.outbound; diff --git a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/package-info.java b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/package-info.java index 6294cd076e6..9d34c97f21c 100644 --- a/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/package-info.java +++ b/spring-integration-rsocket/src/main/java/org/springframework/integration/rsocket/package-info.java @@ -1,5 +1,5 @@ /** * Provides common classes for RSocket components. */ -@org.springframework.lang.NonNullApi +@org.jspecify.annotations.NullMarked package org.springframework.integration.rsocket; diff --git a/spring-integration-rsocket/src/test/java/org/springframework/integration/rsocket/outbound/RSocketOutboundGatewayIntegrationTests.java b/spring-integration-rsocket/src/test/java/org/springframework/integration/rsocket/outbound/RSocketOutboundGatewayIntegrationTests.java index 2c19d3b75df..fa8172eb59c 100644 --- a/spring-integration-rsocket/src/test/java/org/springframework/integration/rsocket/outbound/RSocketOutboundGatewayIntegrationTests.java +++ b/spring-integration-rsocket/src/test/java/org/springframework/integration/rsocket/outbound/RSocketOutboundGatewayIntegrationTests.java @@ -23,6 +23,7 @@ import io.rsocket.frame.decoder.PayloadDecoder; import io.rsocket.transport.netty.server.CloseableChannel; import io.rsocket.transport.netty.server.TcpServerTransport; +import org.jspecify.annotations.Nullable; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; @@ -48,7 +49,6 @@ import org.springframework.integration.rsocket.RSocketInteractionModel; import org.springframework.integration.rsocket.ServerRSocketMessageHandler; import org.springframework.integration.support.MessageBuilder; -import org.springframework.lang.Nullable; import org.springframework.messaging.Message; import org.springframework.messaging.MessageChannel; import org.springframework.messaging.MessageHandlingException;