Reports places where a Kotlin Spring extension can be used instead of a call with a ::class.java argument.

Spring provides a number of Kotlin extensions for generic Java methods with type token parameters. The inspection reports Spring API usages where Java-style calls can be replaced by Kotlin extension calls without changing the semantics.

Example:


import org.springframework.core.env.PropertyResolver

fun example(resolver: PropertyResolver): String? =
    resolver.getProperty("test.property", String::class.java)

After the fix is applied:


import org.springframework.core.env.PropertyResolver
import org.springframework.core.env.getProperty

fun example(resolver: PropertyResolver): String? =
    resolver.getProperty<String>("test.property")