Skip to content

Commit

Permalink
More Checkstyle and compiler warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
artembilan committed Dec 1, 2023
1 parent 771aa46 commit f30d301
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion spring-kafka-docs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -39,12 +39,12 @@ import org.springframework.kafka.listener.MessageListener
class Application {
@Bean
fun runner(factory: ConcurrentKafkaListenerContainerFactory<String, String>): 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"))
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit f30d301

Please sign in to comment.