Cleanup kotlin sources

1. remove unused imports
2. remove redundant semicolon
3. remove empty class body
4. remove redundant 'constructor' keyword
5. remove redundant 'Unit' return type
6. use non-null type if possible

See gh-38708
This commit is contained in:
Yanming Zhou
2023-12-08 09:49:33 +08:00
committed by Moritz Halbritter
parent 4ad9f1174f
commit ebfbc0ef05
20 changed files with 32 additions and 56 deletions

View File

@@ -4,8 +4,7 @@ import org.springframework.boot.SpringBootConfiguration
import org.springframework.boot.runApplication
@SpringBootConfiguration(proxyBeanMethods = false)
open class KotlinApplicationWithMainThrowingException {
}
open class KotlinApplicationWithMainThrowingException
fun main(args: Array<String>) {
runApplication<KotlinApplicationWithMainThrowingException>(*args)

View File

@@ -18,9 +18,7 @@ package org.springframework.boot.test.context
import org.assertj.core.api.Assertions.assertThatIllegalStateException
import org.junit.jupiter.api.Test
import org.springframework.boot.SpringBootConfiguration
import org.springframework.boot.test.context.SpringBootTest.UseMainMethod
import org.springframework.context.annotation.Configuration
import org.springframework.test.context.TestContext
import org.springframework.test.context.TestContextManager