-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
26
In examples like the following, it would be helpful to include the method name in 'method does not override or implement a method from a supertype' diagnostics.
class T {
@Override
void f() {}
}
Actual:
T.java:2: error: method does not override or implement a method from a supertype
@Override
^
1 error
Suggested:
method f does not override or implement a method from a supertype
It is usually easy enough to just read the following context lines in the file to understand which method the diagnostic is referring to, but this could be especially helpful in situations where that isn't trivial, such if the diagnostic is copied/pasted without the original source context as part of a bug or support request, or if the build log shows up in a context where it isn't trivial to view the original source (CI logs).
Including the method name would be occasionally helpful, and doesn't seem like it would hurt the diagnostic in the common case.
class T {
@Override
void f() {}
}
Actual:
T.java:2: error: method does not override or implement a method from a supertype
@Override
^
1 error
Suggested:
method f does not override or implement a method from a supertype
It is usually easy enough to just read the following context lines in the file to understand which method the diagnostic is referring to, but this could be especially helpful in situations where that isn't trivial, such if the diagnostic is copied/pasted without the original source context as part of a bug or support request, or if the build log shows up in a context where it isn't trivial to view the original source (CI logs).
Including the method name would be occasionally helpful, and doesn't seem like it would hurt the diagnostic in the common case.
- links to
-
Review(master) openjdk/jdk/27692