Skip to content

Commit f30d301

Browse files
committed
More Checkstyle and compiler warning fixes
1 parent 771aa46 commit f30d301

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

spring-kafka-docs/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ apply from: "${rootDir}/gradle/docs.gradle"
77
apply plugin: 'java'
88
apply plugin: 'eclipse'
99
apply plugin: 'idea'
10-
apply plugin: 'checkstyle'
1110
apply plugin: 'kotlin'
1211
apply plugin: 'kotlin-spring'
1312

spring-kafka-docs/src/main/kotlin/org/springframework/kafka/kdocs/dynamic/Application.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 the original author or authors.
2+
* Copyright 2022-2023 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.
@@ -39,12 +39,12 @@ import org.springframework.kafka.listener.MessageListener
3939
class Application {
4040
@Bean
4141
fun runner(factory: ConcurrentKafkaListenerContainerFactory<String, String>): ApplicationRunner {
42-
return ApplicationRunner { args: ApplicationArguments? -> createContainer(factory, "topic1", "group1") }
42+
return ApplicationRunner { _ : ApplicationArguments? -> createContainer(factory, "topic1", "group1") }
4343
}
4444

4545
@Bean
4646
fun runner(applicationContext: ApplicationContext): ApplicationRunner {
47-
return ApplicationRunner { args: ApplicationArguments? ->
47+
return ApplicationRunner { _: ApplicationArguments? ->
4848
// tag::getBeans[]
4949

5050
applicationContext.getBean(MyPojo::class.java, "one", arrayOf("topic2"))

spring-kafka-docs/src/main/kotlin/org/springframework/kafka/kdocs/requestreply/Application.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021 the original author or authors.
2+
* Copyright 2021-2023 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.
@@ -112,7 +112,7 @@ class Application {
112112
}
113113
return if (`in` == "\"getThings\"") {
114114
"[{\"thingProp\":\"someValue1\"},{\"thingProp\":\"someValue2\"}]".toByteArray()
115-
} else `in`.toUpperCase().toByteArray()
115+
} else `in`.uppercase().toByteArray()
116116
}
117117

118118
class Thing {

spring-kafka/src/test/java/org/springframework/kafka/support/transaction/ResourcelessTransactionManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2020 the original author or authors.
2+
* Copyright 2017-2023 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.
@@ -85,7 +85,7 @@ protected void doCleanupAfterCompletion(Object transaction) {
8585
((ResourcelessTransaction) transaction).clear();
8686
}
8787

88-
private static class ResourcelessTransaction {
88+
private static final class ResourcelessTransaction {
8989

9090
private boolean active = false;
9191

0 commit comments

Comments
 (0)