[cp-patches] Fix for Class.getSimpleName()
tromey at redhat.com
Sat Apr 19 23:09:26 UTC 2008
>>>>> "Sebastian" == Sebastian Mancke <s.mancke at tarent.de> writes:
Sebastian> Now, the method getSimpleName() is merged with the one of
Sebastian> glibgcj. (Not changing behaviour, but avoiding recursion)
I noticed it is still different.
My recollection (I haven't looked at this in a while) is that the gcj
implementation is correct. And, it relies only on the published Class
API. So, why not just use it directly in Classpath's Class?
Sebastian> + String fullName = getName(klass);
Sebastian> + int pos = fullName.lastIndexOf("$");
I think relying on the name mangling is not valid.
That is why gcj's implementation uses isAnonymousClass and the like.
More information about the Classpath-patches