RFR: JDK-8028430 JDI: ReferenceType.visibleMethods() return wrong visible methods

Mandy Chung mandy.chung at oracle.com
Tue Nov 19 11:06:43 PST 2013

On 11/15/2013 6:18 AM, Staffan Larsen wrote:
> All,
> ReferenceType.visibleMethods() has some problems with diamond shaped interface hierarchies. There is more information on the problem in the bug report.
> The solution here is to maintain a list of interfaces that we have visited so that we do not visit interfaces (above the top of the diamond) more than once.
> This change is targeted for jdk9 so I will hold on to it until the repos open up.
> webrev: http://cr.openjdk.java.net/~sla/8028430/webrev.00/
> bug: https://bugs.openjdk.java.net/browse/JDK-8028430

This fix looks okay.

I think these two lines in the tests meant to test different m methods:

  115                 verifyContains(visible, 1, "Two.m(java.lang.String)");
  116                 verifyContains(visible, 1, "Two.m(java.lang.String)");

Nits: the test has some inconsistent indentations.


More information about the serviceability-dev mailing list