-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Consider https://app.semanticdiff.com/gh/jenkinsci/jenkins/pull/9688/changes#cli/src/main/java/hudson/cli/CLI.java?ignore_comments=true as an example. (jenkinsci/jenkins#9688) In two places (as of this writing) there are entries in the diff which are highlighted with boxes
@Overrideand called out as Moved without changes. This is silly because the annotation was clearly not “moved”, it is associated directly with the method declaration on the following line, and was written independently.
(In Java, this annotation serves a special purpose more akin to a modifier, which is how it is treated in C#. So it would logically belong on the same line as the rest of the method declaration. Yet typical Java formatting tools insist on placing every annotation on a separate line.)
It would be nice if the SemanticDiff module for Java syntax understood that an @Override annotation is not unique content that might have come from elsewhere, any more than a void keyword in a method return type was “copied” from some unrelated method in the original code.