@@ -1511,10 +1511,10 @@ public default TypeVariable typeVariable(Parameterizable p, final CharSequence n
15111511 }
15121512
15131513 /**
1514- * A convenience method that returns the first {@link VariableElement} with a {@linkplain ElementKind#isVariable()
1515- * variable <code>ElementKind</code>} and {@linkplain Element#getSimpleName() bearing} the supplied {@code simpleName}
1516- * that the supplied {@code enclosingElement} {@linkplain Element#getEnclosedElements() encloses}, <strong>or {@code
1517- * null} if there is no such {@link VariableElement}</strong>.
1514+ * A convenience method that returns the first {@link VariableElement} {@linkplain Element#getSimpleName() bearing}
1515+ * the supplied {@code simpleName} that the supplied {@code enclosingElement} {@linkplain
1516+ * Element#getEnclosedElements() encloses}, <strong>or {@code null} if there is no such {@link
1517+ * VariableElement}</strong>.
15181518 *
15191519 * @param enclosingElement an {@link Element}; must not be {@code null}
15201520 *
@@ -1526,8 +1526,6 @@ public default TypeVariable typeVariable(Parameterizable p, final CharSequence n
15261526 *
15271527 * @see Element#getEnclosedElements()
15281528 *
1529- * @see ElementKind#isVariable()
1530- *
15311529 * @see Element#getSimpleName()
15321530 *
15331531 * @see VariableElement
@@ -1539,7 +1537,7 @@ public default VariableElement variableElement(final Element enclosingElement, f
15391537 case null -> throw new NullPointerException ("enclosingElement" );
15401538 case UniversalElement ue -> {
15411539 for (final UniversalElement ee : ue .getEnclosedElements ()) {
1542- if (ee .getKind (). isVariable () && ee . getSimpleName ().contentEquals (simpleName )) {
1540+ if (ee .getSimpleName ().contentEquals (simpleName )) {
15431541 yield ee ;
15441542 }
15451543 }
@@ -1548,7 +1546,7 @@ public default VariableElement variableElement(final Element enclosingElement, f
15481546 default -> {
15491547 try (var lock = lock ()) {
15501548 for (final Element ee : enclosingElement .getEnclosedElements ()) {
1551- if (ee .getKind (). isVariable () && ee . getSimpleName ().contentEquals (simpleName )) {
1549+ if (ee .getSimpleName ().contentEquals (simpleName )) {
15521550 yield (VariableElement )ee ;
15531551 }
15541552 }
0 commit comments