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

Staffan Larsen staffan.larsen at oracle.com
Tue Nov 19 11:28:09 PST 2013


On 19 nov 2013, at 20:06, Mandy Chung <mandy.chung at oracle.com> wrote:

> 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)”);

Cut and paste error I think. One test of this method is enough. I’ve removed one of these lines.

> Nits: the test has some inconsistent indentations.

Lots of tabs had escaped into the file. Sorry about that.

I’ve fixed both of the above an will push with those changes.

Thanks for the review,
/Staffan

> 
> Mandy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20131119/3520d464/attachment.html 


More information about the serviceability-dev mailing list