RFR: JDK-8186688 javax.lang.model.util.Elements.hides does not work correctly with interfaces
maurizio.cimadamore at oracle.com
Fri Feb 23 00:59:20 UTC 2018
If I'm correct this fix doesn't really change anything in terms of the
implementation - the main goal is to give Symbol.isInheritedIn a 'fresh'
name so that the overridden version in MethodSymbol is never called?
Seems a tad subtle :-)
I suggest making the new method 'final' to avoid possibilities of
similar issues in the future (e.g. if an override of 'isAccessibleIn' is
added, things will be broken again).
Also, minor nit, the javadoc of the two sibling methods are slighty off
sync ("of the given class" vs. "of given class"); copyright headers in
tests could also use a refresh.
On 23/02/18 00:37, Jonathan Gibbons wrote:
> Please review a simple fix to Symbol, to provide the ability to see if
> an element is accessible in a subtype, as distinct from being
> inherited. This is needed by JavacElements.hides.
> The test was provided by Kumar, in the original bug report.
> JBS: https://bugs.openjdk.java.net/browse/JDK-8186688
> Webrev: http://cr.openjdk.java.net/~jjg/8186688/webrev.00/
> -- Jon
More information about the compiler-dev