Inspectopedia
 
2024.3

Java methods should be replaced with Kotlin analog

Info
New
Last modified: 03 December 2024

Reports a Java method call that can be replaced with a Kotlin function, for example, System.out.println().

Replacing the code gets rid of the dependency to Java and makes the idiomatic Kotlin code.

The quick-fix replaces the Java method calls on the same Kotlin call.

Example:

After the quick-fix is applied: