--- old/src/share/classes/javax/lang/model/util/ElementScanner6.java 2011-01-27 01:05:29.000000000 -0800 +++ new/src/share/classes/javax/lang/model/util/ElementScanner6.java 2011-01-27 01:05:29.000000000 -0800 @@ -152,8 +152,8 @@ /** * {@inheritDoc} This implementation scans the enclosed elements. * - * @param e the element to visit - * @param p a visitor-specified parameter + * @param e {@inheritDoc} + * @param p {@inheritDoc} * @return the result of scanning */ public R visitPackage(PackageElement e, P p) { @@ -163,8 +163,8 @@ /** * {@inheritDoc} This implementation scans the enclosed elements. * - * @param e the element to visit - * @param p a visitor-specified parameter + * @param e {@inheritDoc} + * @param p {@inheritDoc} * @return the result of scanning */ public R visitType(TypeElement e, P p) { @@ -172,21 +172,28 @@ } /** - * {@inheritDoc} This implementation scans the enclosed elements. + * {@inheritDoc} + * + * This implementation scans the enclosed elements, unless the + * element is a {@code RESOURCE_VARIABLE} in which case {@code + * visitUnknown} is called. * - * @param e the element to visit - * @param p a visitor-specified parameter + * @param e {@inheritDoc} + * @param p {@inheritDoc} * @return the result of scanning */ public R visitVariable(VariableElement e, P p) { - return scan(e.getEnclosedElements(), p); + if (e.getKind() != ElementKind.RESOURCE_VARIABLE) + return scan(e.getEnclosedElements(), p); + else + return visitUnknown(e, p); } /** * {@inheritDoc} This implementation scans the parameters. * - * @param e the element to visit - * @param p a visitor-specified parameter + * @param e {@inheritDoc} + * @param p {@inheritDoc} * @return the result of scanning */ public R visitExecutable(ExecutableElement e, P p) { @@ -196,8 +203,8 @@ /** * {@inheritDoc} This implementation scans the enclosed elements. * - * @param e the element to visit - * @param p a visitor-specified parameter + * @param e {@inheritDoc} + * @param p {@inheritDoc} * @return the result of scanning */ public R visitTypeParameter(TypeParameterElement e, P p) {