From c6f22b416072a9be5436f45e2f595ceea228f3bd Mon Sep 17 00:00:00 2001 From: Joe Darcy Date: Tue, 13 Dec 2022 20:48:13 +0000 Subject: [PATCH] 8297305: Clarify that javax.lang.model.util.Elements.overrides is irreflexive Reviewed-by: jjg --- .../share/classes/javax/lang/model/util/Elements.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/java.compiler/share/classes/javax/lang/model/util/Elements.java b/src/java.compiler/share/classes/javax/lang/model/util/Elements.java index f567c7f3b1b..c8849d6f612 100644 --- a/src/java.compiler/share/classes/javax/lang/model/util/Elements.java +++ b/src/java.compiler/share/classes/javax/lang/model/util/Elements.java @@ -622,6 +622,8 @@ public interface Elements { * overrides another method. * When a non-abstract method overrides an abstract one, the * former is also said to implement the latter. + * As implied by JLS {@jls 8.4.8.1}, a method does not + * override itself. The overrides relation is irreflexive. * *

In the simplest and most typical usage, the value of the * {@code type} parameter will simply be the class or interface