VisibleMemberMap.java possible performance improvements

Jonathan Gibbons jonathan.gibbons at oracle.com
Wed Sep 25 16:20:11 PDT 2013


On 09/23/2013 05:36 AM, Michael Simacek wrote:
> Thank you for your help, Jon.
>
> I've rewritten it a bit (also had to change the Util.executableMembersEqual method to fix some issues),
> so now all the tests should pass and I have fixed some other bugs.
> Now the order of classes is the same and order of interfaces is mostly the same.
> I tried to get as close to the original as possible, but although it seems I'm
> traversing the inheritance tree the same way as original implementation, I'm unable to retain
> the exact original order. But in most cases it is the same. What are the reasons for the
> order to stay the same?
>
> I tried to do the diff on java.lang and java.util and there are some differences, but I'm not
> sure which version is correct:
> 1. In java.lang.StringBuilder there is a section 'Methods inherited from interface CharSequence'.
>     In the original version it contains charAt, chars, codePoints, length, subSequence and in mine
>     contains just chars, codePoints. But the methods charAt, length and subSequence are overriden
>     by the StringBuilder class, so I don't think they should be there. What do you think?
>     The same thing appears in other classes, for example ArrayList.
>
> 2. AbstractQueue (and other Collections) - similar case as the above, but the methods are overriden in
>     one of the parent classes.
>
> 3. In HashMap (and any other implementations of Map) there is no MapEntry inner interface in the
>     original version, whereas in mine there is. It is public inner interface and it is not hidden
>     by anything, so I cannot see a reason why it shouldn't be there.
>
> Michael
>
>
>

For anyone else wishing to see Michael's patch as a webre, it is 
available at
     http://cr.openjdk.java.net/~jjg/8025091/webrev.01

-- Jon


More information about the javadoc-dev mailing list