mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-19 04:13:07 +00:00
8320645: DocLint should use javax.lang.model to detect default constructors
Reviewed-by: jlahoda, jjg
This commit is contained in:
parent
beaa79c28b
commit
06f040ba3a
@ -1248,14 +1248,8 @@ public class Checker extends DocTreePathScanner<Void, Void> {
|
||||
}
|
||||
|
||||
private boolean isDefaultConstructor() {
|
||||
if (env.currElement.getKind() == ElementKind.CONSTRUCTOR) {
|
||||
// A synthetic default constructor has the same pos as the
|
||||
// enclosing class
|
||||
TreePath p = env.currPath;
|
||||
return env.getPos(p) == env.getPos(p.getParentPath());
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return env.currElement.getKind() == ElementKind.CONSTRUCTOR
|
||||
&& env.elements.getOrigin(env.currElement) == Elements.Origin.MANDATED;
|
||||
}
|
||||
|
||||
private boolean isDeclaredType() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user