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-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.
@@ -39,4 +39,5 @@ public class RedisNamespaceHandler extends AbstractIntegrationNamespaceHandler {
registerBeanDefinitionParser("queue-inbound-gateway", new RedisQueueInboundGatewayParser());
registerBeanDefinitionParser("queue-outbound-gateway", new RedisQueueOutboundGatewayParser());
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2007-2022 the original author or authors.
* Copyright 2007-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.
@@ -145,7 +145,6 @@ public class RedisInboundChannelAdapter extends MessageProducerSupport {
this.container.start();
}
@Override
protected void doStop() {
this.container.stop();
@@ -160,7 +159,6 @@ public class RedisInboundChannelAdapter extends MessageProducerSupport {
return this.messageConverter.toMessage(object, messageHeaders);
}
private class MessageListenerDelegate {
MessageListenerDelegate() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2020 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.
@@ -362,7 +362,6 @@ public class RedisQueueInboundGateway extends MessagingGatewaySupport
this.boundListOperations.getOperations().delete(this.boundListOperations.getKey());
}
private class ListenerTask implements SchedulingAwareRunnable {
ListenerTask() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2013-2020 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.
@@ -325,7 +325,6 @@ public class RedisQueueMessageDrivenEndpoint extends MessageProducerSupport
this.boundListOperations.getOperations().delete(this.boundListOperations.getKey());
}
private class ListenerTask implements SchedulingAwareRunnable {
ListenerTask() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2007-2021 the original author or authors.
* Copyright 2007-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.
@@ -103,7 +103,6 @@ public class RedisStoreWritingMessageHandler extends AbstractMessageHandler {
private volatile boolean initialized;
/**
* Constructs an instance using the provided {@link RedisTemplate}.
* The RedisTemplate must be fully initialized.
@@ -131,7 +130,6 @@ public class RedisStoreWritingMessageHandler extends AbstractMessageHandler {
this.connectionFactory = connectionFactory;
}
/**
* Specifies the key for the Redis store. If an expression is needed, then call
* {@link #setKeyExpression(Expression)} instead of this method (they are mutually exclusive).

View File

@@ -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.
@@ -87,7 +87,6 @@ public class RedisChannelPriorityMessageStore extends RedisChannelMessageStore
return getMessageGroupFactory().create(allMessages, groupId);
}
@Override
public MessageGroup addMessageToGroup(Object groupId, Message<?> message) {
Assert.isInstanceOf(String.class, groupId);
@@ -133,7 +132,6 @@ public class RedisChannelPriorityMessageStore extends RedisChannelMessageStore
return narrowedKeys.size();
}
private Set<Object> narrowedKeys() {
Set<Object> keys = this.getRedisTemplate().keys(this.getBeanName() + ":*");
Set<Object> narrowedKeys = new HashSet<>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2007-2020 the original author or authors.
* Copyright 2007-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.
@@ -97,7 +97,6 @@ public class RedisMessageStore extends AbstractKeyValueMessageStore implements B
return ops.get();
}
@Override
protected void doStore(Object id, Object objectToStore) {
Assert.notNull(id, ID_MUST_NOT_BE_NULL);

View File

@@ -209,7 +209,6 @@ public final class RedisLockRegistry implements ExpirableLockRegistry, Disposabl
this.cacheCapacity = cacheCapacity;
}
/**
* Set {@link RedisLockType} mode to work in.
* By default, the {@link RedisLockType#SPIN_LOCK} is used - works in all the environment.
@@ -707,7 +706,6 @@ public final class RedisLockRegistry implements ExpirableLockRegistry, Disposabl
}
private final class RedisSpinLock extends RedisLock {
private static final String UNLINK_UNLOCK_SCRIPT = """