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

@@ -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.
@@ -119,13 +119,11 @@ public class HttpInboundEndpointParser extends AbstractSingleBeanDefinitionParse
IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "message-converters");
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "merge-with-default-converters");
parseHeaderMapper(element, parserContext, builder);
BeanDefinition requestMappingDef = createRequestMapping(element);
builder.addPropertyValue("requestMapping", requestMappingDef);
parseCrossOrigin(element, builder);
IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element,

View File

@@ -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.
@@ -54,7 +54,6 @@ public class MultipartAwareFormHttpMessageConverter implements HttpMessageConver
private MultipartFileReader<?> multipartFileReader = new DefaultMultipartFileReader();
/**
* Set the character set used for writing form data.
* @param charset The charset.

View File

@@ -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.
@@ -43,13 +43,11 @@ public class SerializingHttpMessageConverter extends AbstractHttpMessageConverte
private static final MediaType APPLICATION_JAVA_SERIALIZED_OBJECT =
new MediaType("application", "x-java-serialized-object");
/** Creates a new instance of the {@code SerializingHttpMessageConverter}. */
public SerializingHttpMessageConverter() {
super(APPLICATION_JAVA_SERIALIZED_OBJECT);
}
@Override
public boolean supports(Class<?> clazz) {
return Serializable.class.isAssignableFrom(clazz);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2017-2023 the original author or authors.
* Copyright 2017-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.
@@ -178,7 +178,6 @@ public abstract class BaseHttpMessageHandlerSpec<S extends BaseHttpMessageHandle
return expectedResponseTypeExpression(new FunctionExpression<>(expectedResponseTypeFunction));
}
/**
* Set the {@link HeaderMapper} to use when mapping between HTTP headers and {@code MessageHeaders}.
* @param headerMapper The header mapper.

View File

@@ -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.
@@ -190,7 +190,6 @@ public abstract class HttpRequestHandlingEndpointSupport extends BaseHttpInbound
return this.messageConverters;
}
/**
* Flag which determines if the default converters should be available after
* custom converters.
@@ -200,7 +199,6 @@ public abstract class HttpRequestHandlingEndpointSupport extends BaseHttpInbound
this.mergeWithDefaultConverters = mergeWithDefaultConverters;
}
/**
* Specify the {@link MultipartResolver} to use when checking requests. If no resolver is provided, the
* "multipartResolver" bean in the context will be used as a fallback. If that is not available either, this

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 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.
@@ -71,7 +71,6 @@ public class HttpRequestHandlingMessagingGateway extends HttpRequestHandlingEndp
private volatile boolean convertExceptions;
public HttpRequestHandlingMessagingGateway() {
this(true);
}
@@ -80,7 +79,6 @@ public class HttpRequestHandlingMessagingGateway extends HttpRequestHandlingEndp
super(expectReply);
}
/**
* Flag to determine if conversion and writing out of message handling exceptions should be attempted (default
* false, in which case they will simply be re-thrown). If the flag is true and no message converter can convert the

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 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.
@@ -38,14 +38,12 @@ public class FileCopyingMultipartFileReader implements MultipartFileReader<Multi
private static final Log LOGGER = LogFactory.getLog(FileCopyingMultipartFileReader.class);
private final File directory;
private String prefix = "si_";
private String suffix = ".tmp";
/**
* Create a {@link FileCopyingMultipartFileReader} that creates temporary
* Files in the default temporary directory.
@@ -63,7 +61,6 @@ public class FileCopyingMultipartFileReader implements MultipartFileReader<Multi
this.directory = directory;
}
/**
* Specify the prefix to use for temporary files.
* @param prefix The prefix.

View File

@@ -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.
@@ -38,13 +38,11 @@ public class MultipartHttpInputMessage extends ServletServerHttpRequest implemen
private final MultipartHttpServletRequest multipartServletRequest;
public MultipartHttpInputMessage(MultipartHttpServletRequest multipartServletRequest) {
super(multipartServletRequest);
this.multipartServletRequest = multipartServletRequest;
}
public MultipartFile getFile(String name) {
return this.multipartServletRequest.getFile(name);
}

View File

@@ -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.
@@ -36,7 +36,6 @@ public class SimpleMultipartFileReader implements MultipartFileReader<Object> {
private volatile Charset defaultCharset = Charset.forName(WebUtils.DEFAULT_CHARACTER_ENCODING);
/**
* Specify the default charset name to use when converting multipart file
* content into Strings if the multipart itself does not provide a charset.

View File

@@ -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.
@@ -49,7 +49,6 @@ public class UploadedMultipartFile implements MultipartFile {
private final String originalFilename;
public UploadedMultipartFile(File file, long size, String contentType, String formParameterName,
String originalFilename) {
Assert.notNull(file, "file must not be null");
@@ -78,7 +77,6 @@ public class UploadedMultipartFile implements MultipartFile {
this.originalFilename = originalFilename;
}
@Override
public String getName() {
return this.formParameterName;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2019 the original author or authors.
* Copyright 2019-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.
@@ -47,7 +47,6 @@ public class IntegrationWebExchangeBindException extends WebExchangeBindExceptio
this.failedPayload = failedPayload;
}
@Override
public String getMessage() {
BindingResult bindingResult = getBindingResult();