Add EmptyLineSeparator Checkstyle rule

* Support "blank lines around" via `spring-framework.xml` IDEA config
* Fix all the Checkstyle violations
This commit is contained in:
Artem Bilan
2024-03-27 16:54:25 -04:00
parent f71a2234d8
commit c155d5d418
932 changed files with 1341 additions and 2485 deletions

View File

@@ -209,7 +209,6 @@ public class StompServerIntegrationTests {
}
while (!(eventMessage.getPayload() instanceof StompConnectionFailedEvent) && n++ < 100);
assertThatExceptionOfType(MessageDeliveryException.class)
.isThrownBy(() -> stompOutputChannel1.send(new GenericMessage<>("foo".getBytes())))
.withMessageContaining("could not deliver message");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2023 the original author or authors.
* Copyright 2015-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -107,7 +107,6 @@ public class StompInboundChannelAdapterWebSocketIntegrationTests {
@Autowired
private StompInboundChannelAdapter stompInboundChannelAdapter;
@Test
public void testWebSocketStompClient() throws Exception {
Message<?> eventMessage = this.stompEvents.receive(10000);
@@ -220,7 +219,6 @@ public class StompInboundChannelAdapterWebSocketIntegrationTests {
.isTrue();
}
private boolean containsDestination(String destination, SubscriptionRegistry subscriptionRegistry) {
StompHeaderAccessor stompHeaderAccessor = StompHeaderAccessor.create(StompCommand.MESSAGE);
stompHeaderAccessor.setDestination(destination);
@@ -229,7 +227,6 @@ public class StompInboundChannelAdapterWebSocketIntegrationTests {
return !subscriptions.isEmpty();
}
// STOMP Client
@Configuration
@@ -248,7 +245,7 @@ public class StompInboundChannelAdapterWebSocketIntegrationTests {
@Bean
public WebSocketStompClient stompClient(
@Qualifier("taskScheduler") TaskScheduler taskScheduler) {
@Qualifier("taskScheduler") TaskScheduler taskScheduler) {
WebSocketStompClient webSocketStompClient = new WebSocketStompClient(webSocketClient());
webSocketStompClient.setMessageConverter(new MappingJackson2MessageConverter());
webSocketStompClient.setTaskScheduler(taskScheduler);
@@ -348,8 +345,7 @@ public class StompInboundChannelAdapterWebSocketIntegrationTests {
//SimpleBrokerMessageHandler doesn't support RECEIPT frame, hence we emulate it this way
@Bean
public ApplicationListener<SessionSubscribeEvent> webSocketEventListener(
@Qualifier("clientOutboundChannel")
final AbstractSubscribableChannel clientOutboundChannel) {
@Qualifier("clientOutboundChannel") final AbstractSubscribableChannel clientOutboundChannel) {
return event -> {
Message<byte[]> message = event.getMessage();
StompHeaderAccessor stompHeaderAccessor = StompHeaderAccessor.wrap(message);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2022 the original author or authors.
* Copyright 2015-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -260,7 +260,6 @@ public class StompMessageHandlerWebSocketIntegrationTests {
configurer.enableSimpleBroker("/topic", "/queue");
}
@Override
public void configureClientInboundChannel(ChannelRegistration registration) {
registration.interceptors(new ChannelInterceptor() {