Add EmptyLineSeparator Checkstyle rule
* Support "blank lines around" via `spring-framework.xml` IDEA config * Fix all the Checkstyle violations
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -58,14 +58,12 @@ public class AttributePollingMessageSourceTests {
|
||||
factoryBean.destroy();
|
||||
}
|
||||
|
||||
|
||||
public interface TestCounterMBean {
|
||||
|
||||
int getCount();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static class TestCounter implements TestCounterMBean {
|
||||
|
||||
private final AtomicInteger counter = new AtomicInteger();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -59,7 +59,6 @@ public class NotificationListeningMessageProducerTests {
|
||||
|
||||
private ObjectName objectName;
|
||||
|
||||
|
||||
@BeforeClass
|
||||
public static void setupClass() {
|
||||
serverFactoryBean = new MBeanServerFactoryBean();
|
||||
@@ -154,7 +153,6 @@ public class NotificationListeningMessageProducerTests {
|
||||
assertThat(notification.getMessage()).isEqualTo("okay");
|
||||
}
|
||||
|
||||
|
||||
public static class NumberHolder implements NotificationPublisherAware {
|
||||
|
||||
private final AtomicInteger number = new AtomicInteger();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -78,7 +78,6 @@ public class NotificationPublishingMessageHandlerTests {
|
||||
context.close();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void simplePublish() {
|
||||
MessageHandler handler = context.getBean("testPublisher", MessageHandler.class);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -83,7 +83,6 @@ public class OperationInvokingMessageHandlerTests {
|
||||
server.unregisterMBean(ObjectNameManager.getInstance(this.objectName));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void invocationWithMapPayload() {
|
||||
QueueChannel outputChannel = new QueueChannel();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -69,7 +69,6 @@ public class DynamicRouterTests {
|
||||
@Autowired
|
||||
private NullChannel nullChannel;
|
||||
|
||||
|
||||
@Test
|
||||
@DirtiesContext
|
||||
public void testRouteChange() throws Exception {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -33,9 +33,11 @@ public class MBeanExporterNameTests {
|
||||
}
|
||||
|
||||
public static class Source {
|
||||
|
||||
public String get() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2022 the original author or authors.
|
||||
* Copyright 2013-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.
|
||||
@@ -65,9 +65,11 @@ public class MBeanRegistrationCustomNamingTests {
|
||||
}
|
||||
|
||||
public static class Source {
|
||||
|
||||
public String get() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class Namer implements ObjectNamingStrategy {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -89,9 +89,11 @@ public class MBeanRegistrationTests {
|
||||
}
|
||||
|
||||
public static class Source {
|
||||
|
||||
public String get() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class MyMessagingGateway extends MessagingGatewaySupport {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2022 the original author or authors.
|
||||
* Copyright 2013-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.
|
||||
@@ -216,7 +216,6 @@ public class MBeanTreePollingChannelAdapterParserTests {
|
||||
.extracting(Message::getPayload)
|
||||
.isInstanceOf(HashMap.class);
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, Object> beans = (Map<String, Object>) result.getPayload();
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -84,7 +84,6 @@ public class OperationInvokingChannelAdapterParserTests {
|
||||
testBean.messages.clear();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void adapterWithDefaults() {
|
||||
assertThat(testBean.messages.size()).isEqualTo(0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -44,7 +44,6 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
|
||||
/**
|
||||
* @author Oleg Zhurakousky
|
||||
* @author Artem Bilan
|
||||
@@ -78,7 +77,6 @@ public class OperationInvokingOutboundGatewayTests {
|
||||
@Qualifier("operationInvokingWithinChain.handler")
|
||||
private MessageHandler operationInvokingWithinChain;
|
||||
|
||||
|
||||
private static volatile int adviceCalled;
|
||||
|
||||
@After
|
||||
@@ -168,4 +166,5 @@ public class OperationInvokingOutboundGatewayTests {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -52,9 +52,11 @@ public class PollingAdapterMBeanTests {
|
||||
}
|
||||
|
||||
public static class Source {
|
||||
|
||||
public String get() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -65,9 +65,11 @@ public class PriorityChannelTests {
|
||||
}
|
||||
|
||||
public static class Source {
|
||||
|
||||
public String get() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -99,7 +99,9 @@ public class RouterMBeanTests {
|
||||
}
|
||||
|
||||
public interface Service {
|
||||
|
||||
void send(String input);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -53,9 +53,11 @@ public class RouterMBeanVanillaTests {
|
||||
}
|
||||
|
||||
public static class Source {
|
||||
|
||||
public String get() {
|
||||
return "foo";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -34,6 +34,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
@ManagedResource
|
||||
public class SimpleDynamicRouter {
|
||||
|
||||
private final Map<String, String> channelMappings = new HashMap<String, String>();
|
||||
|
||||
/**
|
||||
@@ -80,4 +81,5 @@ public class SimpleDynamicRouter {
|
||||
String className = key.getClass().getName();
|
||||
return this.channelMappings.get(className);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -48,13 +48,18 @@ public class ChainWithMessageProducingHandlersTests {
|
||||
}
|
||||
|
||||
public static class SampleProducer {
|
||||
|
||||
public String echo(String value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static class SampleService {
|
||||
|
||||
public void echo(String value) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -95,6 +95,7 @@ public class RemoteMBeanServerTests {
|
||||
String getFoo();
|
||||
|
||||
String fooBar(String foo);
|
||||
|
||||
}
|
||||
|
||||
public static class Tester implements TesterMBean {
|
||||
@@ -110,4 +111,5 @@ public class RemoteMBeanServerTests {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2022 the original author or authors.
|
||||
* Copyright 2014-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.
|
||||
@@ -112,7 +112,6 @@ public class ScatterGatherHandlerIntegrationTests {
|
||||
assertThat((Double) payload).isLessThan(10D);
|
||||
}
|
||||
|
||||
|
||||
@Configuration
|
||||
@EnableIntegration
|
||||
@EnableIntegrationMBeanExport(server = "mBeanServer")
|
||||
@@ -237,7 +236,6 @@ public class ScatterGatherHandlerIntegrationTests {
|
||||
new MessageCountReleaseStrategy(3));
|
||||
}
|
||||
|
||||
|
||||
@Bean
|
||||
@ServiceActivator(inputChannel = "inputAuctionWithGatherChannel")
|
||||
public ScatterGatherHandler scatterGatherAuctionWithGatherChannel() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -31,4 +31,5 @@ public class INT_2626Tests {
|
||||
public void testInt2626() {
|
||||
new ClassPathXmlApplicationContext("INT-2626-config.xml", this.getClass()).close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user