Apply SingleSpaceSeparator Checkstyle module

This commit also fixes its violations.

Closes gh-31469
This commit is contained in:
Johnny Lim
2023-10-22 00:10:45 +09:00
committed by Sam Brannen
parent 8a05661707
commit 64e9fcad53
164 changed files with 229 additions and 226 deletions

View File

@@ -64,7 +64,7 @@ public class DefaultSubscriptionRegistryBenchmark {
@Setup(Level.Trial)
public void doSetup() {
this.findMessage = MessageBuilder.createMessage("", SimpMessageHeaderAccessor.create().getMessageHeaders());
this.findMessage = MessageBuilder.createMessage("", SimpMessageHeaderAccessor.create().getMessageHeaders());
this.uniqueIdGenerator = new AtomicInteger();
this.registry = new DefaultSubscriptionRegistry();

View File

@@ -143,7 +143,7 @@ public class RSocketFrameTypeMessageCondition extends AbstractMessageCondition<R
}
}
}
return null;
return null;
}
@Override

View File

@@ -59,7 +59,7 @@ public final class RSocketRequestValues {
public RSocketRequestValues(
@Nullable String route, @Nullable List<Object> routeVariables, @Nullable MetadataHelper metadataHelper,
@Nullable String route, @Nullable List<Object> routeVariables, @Nullable MetadataHelper metadataHelper,
@Nullable Object payloadValue, @Nullable Publisher<?> payload,
@Nullable ParameterizedTypeReference<?> payloadElementType) {

View File

@@ -492,7 +492,7 @@ public class DefaultStompSession implements ConnectionHandlingStompSession {
TcpConnection<byte[]> con = this.connection;
Assert.state(con != null, "No TcpConnection available");
if (connect[0] > 0 && connected[1] > 0) {
long interval = Math.max(connect[0], connected[1]);
long interval = Math.max(connect[0], connected[1]);
con.onWriteInactivity(new WriteInactivityTask(), interval);
}
if (connect[1] > 0 && connected[0] > 0) {

View File

@@ -43,7 +43,7 @@ import org.springframework.util.Assert;
* @since 4.0
* @see StompDecoder
*/
public class StompEncoder {
public class StompEncoder {
private static final Byte LINE_FEED_BYTE = '\n';

View File

@@ -183,7 +183,7 @@ public class MultiServerUserRegistry implements SimpUserRegistry, SmartApplicati
@Override
public String toString() {
return "local=[" + this.localRegistry + "], remote=" + this.remoteRegistries;
return "local=[" + this.localRegistry + "], remote=" + this.remoteRegistries;
}

View File

@@ -600,7 +600,7 @@ public class MessageHeaderAccessor {
if (messageHeaders instanceof MutableMessageHeaders mutableHeaders) {
MessageHeaderAccessor headerAccessor = mutableHeaders.getAccessor();
if (requiredType == null || requiredType.isInstance(headerAccessor)) {
if (requiredType == null || requiredType.isInstance(headerAccessor)) {
return (T) headerAccessor;
}
}

View File

@@ -310,7 +310,7 @@ public class ReactorNetty2TcpClient<P> implements TcpOperations<P> {
}
});
Sinks.Empty<Void> completionSink = Sinks.empty();
TcpConnection<P> connection = new ReactorNetty2TcpConnection<>(inbound, outbound, codec, completionSink);
TcpConnection<P> connection = new ReactorNetty2TcpConnection<>(inbound, outbound, codec, completionSink);
scheduler.schedule(() -> this.connectionHandler.afterConnected(connection));
inbound.withConnection(conn -> conn.addHandlerFirst(new StompMessageDecoder<>(codec)));

View File

@@ -308,7 +308,7 @@ public class ReactorNettyTcpClient<P> implements TcpOperations<P> {
}
});
Sinks.Empty<Void> completionSink = Sinks.empty();
TcpConnection<P> connection = new ReactorNettyTcpConnection<>(inbound, outbound, codec, completionSink);
TcpConnection<P> connection = new ReactorNettyTcpConnection<>(inbound, outbound, codec, completionSink);
scheduler.schedule(() -> this.connectionHandler.afterConnected(connection));
inbound.withConnection(conn -> conn.addHandlerFirst(new StompMessageDecoder<>(codec)));

View File

@@ -134,7 +134,7 @@ public class AnnotationExceptionHandlerMethodResolverTests {
static class InheritedController extends ExceptionController {
@Override
public void handleIOException() {
public void handleIOException() {
}
}

View File

@@ -480,7 +480,7 @@ public abstract class AbstractStompBrokerRelayIntegrationTests {
@Override
public String toString() {
return "command=" + this.command + ", session=\"" + this.sessionId + "\"";
return "command=" + this.command + ", session=\"" + this.sessionId + "\"";
}
}

View File

@@ -522,7 +522,7 @@ public class DefaultStompSessionTests {
Subscription subscription = this.session.subscribe(subscribeHeaders, frameHandler);
StompHeaders unsubscribeHeaders = new StompHeaders();
unsubscribeHeaders.set(headerName, subscription.getSubscriptionHeaders().getFirst(headerName));
unsubscribeHeaders.set(headerName, subscription.getSubscriptionHeaders().getFirst(headerName));
subscription.unsubscribe(unsubscribeHeaders);
Message<byte[]> message = this.messageCaptor.getValue();

View File

@@ -57,7 +57,7 @@ public class StompEncoderTests {
@Test
public void encodeFrameWithHeadersThatShouldBeEscaped() {
StompHeaderAccessor headers = StompHeaderAccessor.create(StompCommand.DISCONNECT);
headers.addNativeHeader("a:\r\n\\b", "alpha:bravo\r\n\\");
headers.addNativeHeader("a:\r\n\\b", "alpha:bravo\r\n\\");
Message<byte[]> frame = MessageBuilder.createMessage(new byte[0], headers.getMessageHeaders());
assertThat(new String(encoder.encode(frame))).isEqualTo("DISCONNECT\na\\c\\r\\n\\\\b:alpha\\cbravo\\r\\n\\\\\n\n\0");

View File

@@ -97,7 +97,7 @@ public class ExecutorSubscribableChannelTests {
}
@Test
public void subscribeTwice() {
public void subscribeTwice() {
assertThat(this.channel.subscribe(this.handler)).isTrue();
assertThat(this.channel.subscribe(this.handler)).isFalse();
this.channel.send(this.message);
@@ -105,7 +105,7 @@ public class ExecutorSubscribableChannelTests {
}
@Test
public void unsubscribeTwice() {
public void unsubscribeTwice() {
this.channel.subscribe(this.handler);
assertThat(this.channel.unsubscribe(this.handler)).isTrue();
assertThat(this.channel.unsubscribe(this.handler)).isFalse();
@@ -114,7 +114,7 @@ public class ExecutorSubscribableChannelTests {
}
@Test
public void failurePropagates() {
public void failurePropagates() {
RuntimeException ex = new RuntimeException();
willThrow(ex).given(this.handler).handleMessage(this.message);
MessageHandler secondHandler = mock();
@@ -130,7 +130,7 @@ public class ExecutorSubscribableChannelTests {
}
@Test
public void concurrentModification() {
public void concurrentModification() {
this.channel.subscribe(message1 -> channel.unsubscribe(handler));
this.channel.subscribe(this.handler);
this.channel.send(this.message);