diff --git a/spring-kafka-docs/build.gradle b/spring-kafka-docs/build.gradle index 4dc44df36f..103805238a 100644 --- a/spring-kafka-docs/build.gradle +++ b/spring-kafka-docs/build.gradle @@ -7,7 +7,6 @@ apply from: "${rootDir}/gradle/docs.gradle" apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'idea' -apply plugin: 'checkstyle' apply plugin: 'kotlin' apply plugin: 'kotlin-spring' diff --git a/spring-kafka-docs/src/main/kotlin/org/springframework/kafka/kdocs/dynamic/Application.kt b/spring-kafka-docs/src/main/kotlin/org/springframework/kafka/kdocs/dynamic/Application.kt index 6350987ee0..fba0d96111 100644 --- a/spring-kafka-docs/src/main/kotlin/org/springframework/kafka/kdocs/dynamic/Application.kt +++ b/spring-kafka-docs/src/main/kotlin/org/springframework/kafka/kdocs/dynamic/Application.kt @@ -1,5 +1,5 @@ /* - * Copyright 2022 the original author or authors. + * Copyright 2022-2023 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,12 +39,12 @@ import org.springframework.kafka.listener.MessageListener class Application { @Bean fun runner(factory: ConcurrentKafkaListenerContainerFactory): ApplicationRunner { - return ApplicationRunner { args: ApplicationArguments? -> createContainer(factory, "topic1", "group1") } + return ApplicationRunner { _ : ApplicationArguments? -> createContainer(factory, "topic1", "group1") } } @Bean fun runner(applicationContext: ApplicationContext): ApplicationRunner { - return ApplicationRunner { args: ApplicationArguments? -> + return ApplicationRunner { _: ApplicationArguments? -> // tag::getBeans[] applicationContext.getBean(MyPojo::class.java, "one", arrayOf("topic2")) diff --git a/spring-kafka-docs/src/main/kotlin/org/springframework/kafka/kdocs/requestreply/Application.kt b/spring-kafka-docs/src/main/kotlin/org/springframework/kafka/kdocs/requestreply/Application.kt index 486abd9165..b7781dd58b 100644 --- a/spring-kafka-docs/src/main/kotlin/org/springframework/kafka/kdocs/requestreply/Application.kt +++ b/spring-kafka-docs/src/main/kotlin/org/springframework/kafka/kdocs/requestreply/Application.kt @@ -1,5 +1,5 @@ /* - * Copyright 2021 the original author or authors. + * Copyright 2021-2023 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. @@ -112,7 +112,7 @@ class Application { } return if (`in` == "\"getThings\"") { "[{\"thingProp\":\"someValue1\"},{\"thingProp\":\"someValue2\"}]".toByteArray() - } else `in`.toUpperCase().toByteArray() + } else `in`.uppercase().toByteArray() } class Thing { diff --git a/spring-kafka/src/test/java/org/springframework/kafka/support/transaction/ResourcelessTransactionManager.java b/spring-kafka/src/test/java/org/springframework/kafka/support/transaction/ResourcelessTransactionManager.java index c89996f9fa..f411387744 100644 --- a/spring-kafka/src/test/java/org/springframework/kafka/support/transaction/ResourcelessTransactionManager.java +++ b/spring-kafka/src/test/java/org/springframework/kafka/support/transaction/ResourcelessTransactionManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2020 the original author or authors. + * Copyright 2017-2023 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. @@ -85,7 +85,7 @@ protected void doCleanupAfterCompletion(Object transaction) { ((ResourcelessTransaction) transaction).clear(); } - private static class ResourcelessTransaction { + private static final class ResourcelessTransaction { private boolean active = false;