Back to Intellij Community

InconsistentCommentForJavaParameter

plugins/kotlin/code-insight/descriptions/resources-en/inspectionDescriptions/InconsistentCommentForJavaParameter.html

2025.3-rc-2427 B
Original Source

Reports inconsistent parameter names for Java method calls specified in a comment block.

Examples:

// Java
  public class JavaService {
      public void invoke(String command) {}
  }
// Kotlin
  fun main() {
      JavaService().invoke(/* name = */ "fix")
  }

The quick fix corrects the parameter name in the comment block:

fun main() {
      JavaService().invoke(/* command = */ "fix")
  }