Hi,

Please review:

  
http://cr.openjdk.java.net/~psandoz/jdk10/JDK-8186961-iface-static-fields-get/webrev/
 
<http://cr.openjdk.java.net/~psandoz/jdk10/JDK-8186961-iface-static-fields-get/webrev/>

There is a bug lurking, perhaps for a while, where diamond patterns for 
interface hierarchies can result in the incorrect reporting of fields when 
using reflection, see the test case.

Since reflection data is cached i don’t see an advantage to retaining a set of 
of traversed interfaces, which is the root cause of the issue.

The code is optimized for common cases and will for less common cases collect 
fields of interfaces into a temporary linked hash set (to preserve the order, 
perhaps not strictly necessary but i did not want to change that behaviour).

Thanks,
Paul.

Reply via email to