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-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.
|
||||
@@ -37,7 +37,6 @@ public class StubMultipartFile implements MultipartFile {
|
||||
|
||||
private final String text;
|
||||
|
||||
|
||||
public StubMultipartFile(String parameterName, String filename, String text) {
|
||||
this.parameterName = parameterName;
|
||||
this.filename = filename;
|
||||
|
||||
@@ -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.
|
||||
@@ -32,7 +32,6 @@ import org.springframework.core.io.InputStreamResource;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.fail;
|
||||
|
||||
|
||||
/**
|
||||
* @author Gunnar Hillert
|
||||
* @author Artem Bilan
|
||||
|
||||
@@ -46,7 +46,6 @@ public class DefaultConfigurationTests {
|
||||
@Autowired
|
||||
private ApplicationContext context;
|
||||
|
||||
|
||||
@Test
|
||||
public void verifyErrorChannel() {
|
||||
Object errorChannel = context.getBean("errorChannel");
|
||||
|
||||
@@ -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.
|
||||
@@ -57,7 +57,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.BDDMockito.willReturn;
|
||||
|
||||
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
* @author Oleg Zhurakousky
|
||||
@@ -248,7 +247,6 @@ public class HttpInboundChannelAdapterParserTests extends AbstractHttpInboundTes
|
||||
assertThat(((TestObject) message.getPayload()).text).isEqualTo("testObject");
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void putOrDeleteMethodsSupported() {
|
||||
HttpMethod[] supportedMethods =
|
||||
|
||||
@@ -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.
|
||||
@@ -100,7 +100,6 @@ public class HttpInboundGatewayParserTests {
|
||||
@Autowired
|
||||
private PollableChannel responses;
|
||||
|
||||
|
||||
@Test
|
||||
public void checkConfig() {
|
||||
assertThat(this.gateway).isNotNull();
|
||||
|
||||
@@ -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.
|
||||
@@ -214,7 +214,6 @@ public class HttpOutboundGatewayParserTests {
|
||||
assertThat(this.withPoller1).isInstanceOf(PollingConsumer.class);
|
||||
}
|
||||
|
||||
|
||||
public static class StubErrorHandler implements ResponseErrorHandler {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -121,7 +121,6 @@ public class HttpDslTests {
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testHttpProxyFlow() throws Exception {
|
||||
ClientHttpRequestFactory mockRequestFactory = new MockMvcClientHttpRequestFactory(this.mockMvc);
|
||||
|
||||
@@ -281,6 +281,7 @@ public class HttpRequestHandlingMessagingGatewayTests extends AbstractHttpInboun
|
||||
gateway.setBeanFactory(mock(BeanFactory.class));
|
||||
ParameterizedTypeReference<List<TestBean>> parameterizedTypeReference =
|
||||
new ParameterizedTypeReference<>() {
|
||||
|
||||
};
|
||||
gateway.setRequestPayloadType(ResolvableType.forType(parameterizedTypeReference));
|
||||
gateway.setRequestChannel(channel);
|
||||
@@ -313,7 +314,6 @@ public class HttpRequestHandlingMessagingGatewayTests extends AbstractHttpInboun
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void INT2680DuplicateContentTypeHeader() throws Exception {
|
||||
DirectChannel requestChannel = new DirectChannel();
|
||||
@@ -451,7 +451,6 @@ public class HttpRequestHandlingMessagingGatewayTests extends AbstractHttpInboun
|
||||
assertThat(response.getContentAsString()).contains("from error channel");
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testMultipart() throws Exception {
|
||||
HttpRequestHandlingMessagingGateway gateway = new HttpRequestHandlingMessagingGateway(false);
|
||||
@@ -500,7 +499,6 @@ public class HttpRequestHandlingMessagingGatewayTests extends AbstractHttpInboun
|
||||
assertThat(twoValues).containsExactly("2");
|
||||
}
|
||||
|
||||
|
||||
private static class ContentTypeCheckingMockHttpServletResponse extends MockHttpServletResponse {
|
||||
|
||||
private final List<String> contentTypeList = new ArrayList<>();
|
||||
@@ -547,7 +545,6 @@ public class HttpRequestHandlingMessagingGatewayTests extends AbstractHttpInboun
|
||||
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public static class TestBean implements Serializable {
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -49,7 +49,6 @@ public class HttpRequestHandlingMessagingGatewayWithPathMappingTests extends Abs
|
||||
|
||||
private static final ExpressionParser PARSER = new SpelExpressionParser();
|
||||
|
||||
|
||||
@Test
|
||||
public void withoutExpression() {
|
||||
DirectChannel echoChannel = new DirectChannel();
|
||||
|
||||
@@ -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.
|
||||
@@ -86,7 +86,6 @@ public class Int2312RequestMappingIntegrationTests extends AbstractHttpInboundTe
|
||||
assertThat(response.getContentAsString()).isEqualTo(TEST_STRING_MULTIPLE_PATHS);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
//INT-1362
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 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.
|
||||
@@ -70,7 +70,6 @@ public class CookieTests {
|
||||
ch1.send(new GenericMessage<>("Hello, world!"));
|
||||
assertThat(ch6.receive()).isNotNull();
|
||||
|
||||
|
||||
bos.close();
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(bos.toByteArray())));
|
||||
String line = br.readLine();
|
||||
|
||||
@@ -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.
|
||||
@@ -635,7 +635,6 @@ public class HttpRequestExecutingMessageHandlerTests {
|
||||
|
||||
assertThat(template.lastRequestEntity.get().getHeaders().getContentType()).isNull();
|
||||
|
||||
|
||||
//DELETE
|
||||
handler.setHttpMethod(HttpMethod.DELETE);
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -497,7 +497,6 @@ public class DefaultHttpHeaderMapperFromMessageInboundTests {
|
||||
assertThat(headers.get("X-customHeaderB")).isNull();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void validateCustomHeadersWithNonStringValuesAndDefaultConverterOnly() {
|
||||
DefaultHttpHeaderMapper mapper = new DefaultHttpHeaderMapper();
|
||||
@@ -588,7 +587,6 @@ public class DefaultHttpHeaderMapperFromMessageInboundTests {
|
||||
assertThat(result.get(MessageHeaders.CONTENT_TYPE)).isEqualTo(MediaType.valueOf("text/plain"));
|
||||
}
|
||||
|
||||
|
||||
public static class TestClass {
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user