Skip to content

Commit e2daa2d

Browse files
authored
Add checkstyle rule on empty-line-separater
* Update checkstyle.xml * Fix checkstyle violations * Fix test class checkstyle * Add field also.
1 parent cb45e56 commit e2daa2d

File tree

75 files changed

+161
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+161
-105
lines changed

spring-kafka-test/src/main/java/org/springframework/kafka/test/EmbeddedKafkaKraftBroker.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ public void afterPropertiesSet() {
204204
}
205205
}
206206

207-
208207
private void start() {
209208
if (this.cluster != null) {
210209
return;

spring-kafka-test/src/main/java/org/springframework/kafka/test/assertj/KafkaConditions.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2016-2019 the original author or authors.
2+
* Copyright 2016-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -90,7 +90,6 @@ public static <K, V> Condition<ConsumerRecord<K, V>> keyValue(K key, V value) {
9090
return new ConsumerRecordPartitionCondition(partition);
9191
}
9292

93-
9493
public static class ConsumerRecordKeyCondition<K> extends Condition<ConsumerRecord<K, ?>> {
9594

9695
private final K key;

spring-kafka-test/src/main/java/org/springframework/kafka/test/condition/EmbeddedKafkaCondition.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019-2023 the original author or authors.
2+
* Copyright 2019-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -211,7 +211,6 @@ private Store getParentStore(ExtensionContext context) {
211211
return parent.getStore(Namespace.create(getClass(), parent));
212212
}
213213

214-
215214
public static EmbeddedKafkaBroker getBroker() {
216215
return BROKERS.get();
217216
}

spring-kafka-test/src/test/java/org/springframework/kafka/test/context/EmbeddedKafkaContextCustomizerTests.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2023 the original author or authors.
2+
* Copyright 2017-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -48,15 +48,13 @@ void beforeEachTest() {
4848
AnnotationUtils.findAnnotation(SecondTestWithEmbeddedKafka.class, EmbeddedKafka.class);
4949
}
5050

51-
5251
@Test
5352
void testHashCode() {
5453
assertThat(new EmbeddedKafkaContextCustomizer(annotationFromFirstClass).hashCode()).isNotEqualTo(0);
5554
assertThat(new EmbeddedKafkaContextCustomizer(annotationFromFirstClass).hashCode())
5655
.isEqualTo(new EmbeddedKafkaContextCustomizer(annotationFromSecondClass).hashCode());
5756
}
5857

59-
6058
@Test
6159
void testEquals() {
6260
assertThat(new EmbeddedKafkaContextCustomizer(annotationFromFirstClass))
@@ -93,7 +91,6 @@ void testMulti() {
9391
.matches("127.0.0.1:[0-9]+,127.0.0.1:[0-9]+");
9492
}
9593

96-
9794
@EmbeddedKafka(kraft = false)
9895
private static final class TestWithEmbeddedKafka {
9996

spring-kafka/src/main/java/org/springframework/kafka/annotation/KafkaListenerAnnotationBeanPostProcessor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,6 @@ private MessageHandlerMethodFactory createDefaultMessageHandlerMethodFactory() {
11901190

11911191
private record BytesToStringConverter(Charset charset) implements Converter<byte[], String> {
11921192

1193-
11941193
@Override
11951194
public String convert(byte[] source) {
11961195
return new String(source, this.charset);

spring-kafka/src/main/java/org/springframework/kafka/annotation/RetryTopicConfigurationProvider.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import org.springframework.kafka.retrytopic.RetryTopicConfiguration;
3838
import org.springframework.lang.Nullable;
3939

40-
4140
/**
4241
*
4342
* Attempts to provide an instance of

spring-kafka/src/main/java/org/springframework/kafka/config/KafkaListenerEndpointRegistry.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ else if (endpoint instanceof MethodKafkaListenerEndpoint<?, ?> mkle) {
361361
return listenerContainer;
362362
}
363363

364-
365364
@Override
366365
public void destroy() {
367366
for (MessageListenerContainer listenerContainer : getListenerContainers()) {
@@ -419,7 +418,6 @@ public boolean isRunning() {
419418
return this.running;
420419
}
421420

422-
423421
@Override
424422
public void onApplicationEvent(ContextRefreshedEvent event) {
425423
if (event.getApplicationContext().equals(this.applicationContext)) {
@@ -439,7 +437,6 @@ private void startIfNecessary(MessageListenerContainer listenerContainer) {
439437
}
440438
}
441439

442-
443440
private static final class AggregatingCallback implements Runnable {
444441

445442
private final AtomicInteger count;

spring-kafka/src/main/java/org/springframework/kafka/config/MultiMethodKafkaListenerEndpoint.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public MultiMethodKafkaListenerEndpoint(List<Method> methods, @Nullable Method d
6161
setBean(bean);
6262
}
6363

64-
6564
/**
6665
* Get a method list.
6766
* @return the method list.

spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaConsumerFactory.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ public void setValueDeserializerSupplier(Supplier<Deserializer<V>> valueDeserial
252252
this.valueDeserializerSupplier = valueDeserializerSupplier(valueDeserializerSupplier);
253253
}
254254

255-
256255
/**
257256
* Set to false (default true) to prevent programmatically provided deserializers (via
258257
* constructor or setters) from being configured using the producer configuration,

spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaProducerFactory.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@
6868
import org.springframework.util.Assert;
6969
import org.springframework.util.StringUtils;
7070

71-
72-
7371
/**
7472
* The {@link ProducerFactory} implementation for a {@code singleton} shared {@link Producer} instance.
7573
* <p>
@@ -567,7 +565,6 @@ public ProducerFactory<K, V> copyWithConfigurationOverride(Map<String, Object> o
567565
return newFactory;
568566
}
569567

570-
571568
/**
572569
* Ensures that the returned properties map contains a transaction id prefix.
573570
* The {@link org.springframework.kafka.core.DefaultKafkaProducerFactory}

0 commit comments

Comments
 (0)