What's the precise definition of an "Internal Name"

Sagar Tewari <[email protected]> Tue, 22 May 2018 12:35:51 +0530
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <CAJ8WsYMwaUOOwR6ow85b3Vwu=2QS39ND5sE=+NsvZeoBRbe-DQ@mail.gmail.com>
Hi,

This
<https://gitlab.ow2.org/asm/asm/blob/master/asm/src/test/java/org/objectweb/asm/TypeTest.java#L297>
test
compares the output of 'Type.getInternalName(Object[].class)' to the
string "[Ljava/lang/Object;", which *is not an internal name *as specified
by the jvm specs
<https://docs.oracle.com/javase/specs/jvms/se10/html/jvms-4.html#jvms-4.2.1>.
The correct internal name of 'Object[]' should be 'java/lang/Object[]', as
it's binary name is 'java.lang.Object[]'(
https://docs.oracle.com/javase/specs/jls/se10/html/jls-13.html#jls-13.1),
and the internal name equals binary name with '.'s replaced with '/'s. The
implementation of this method just replaces '.'s with '/'s in the output of
'Class.getName'.

I suspect the reason to be difference in terminology used. Would appreciate
if anyone could clarify the situation. Also, the method isn't used anywhere
outside of tests.

-- 
Best Regards
Sagar Tewari


-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws