Re: [ASM 5.1] Error when reading nested type of type variable bound in method signature
Michael Gumowski <[email protected]> Wed, 07 Sep 2016 14:32:49 +0000
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <CABGmqnmPALdSb_0Mv6sB_KFusBZPOHa4EUuD2iEGMLMQiVsO3Q@mail.gmail.com> |
Hello all, Just to let you know, as a followup I created last week the following bug report in Eclipse's bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=500473 No reaction so far, Regards, On Mon, 29 Aug 2016 at 18:00 Michael Gumowski < [email protected]> wrote: > Hello, > > Sorry for the delay answering you (holidays...). > > Thanks for the hint about the compiler. It's seems to be the root cause of > my problem. > I'm indeed not able to reproduce the issue using solely javac (1.8.0_91), > as I'm getting the signature you shows. The signature is correctly > generated (and parsed). However, I was observing the issue when dealing > with the example I provided in my eclipse IDE, or when building a project > with a similar structure using "ant" to build it and "ecj" as compiler. > > I tried to compare the decompiled code I'm getting when using: > > - jdk1.8.0_91+javac > - ecj-4.6 (eclipse standalone batch java compiler) > > When looking only to the method, I'm getting the following differences: > > jdk1.8.0_91: > > // access flags 0x0 >> > // signature >> (Lorg/foo/bytecode/TypeWithNestedGenericClass$Nested<Ljava/lang/String;>;)V >> // declaration: void >> method(org.foo.bytecode.TypeWithNestedGenericClass$Nested<java.lang.String>) >> method(Lorg/foo/bytecode/TypeWithNestedGenericClass$Nested;)V >> L0 >> LINENUMBER 5 L0 >> RETURN >> L1 >> LOCALVARIABLE this >> Lorg/foo/bytecode/GenericTypeUsingNestedTypeFromBound; L0 L1 0 >> // signature >> Lorg/foo/bytecode/GenericTypeUsingNestedTypeFromBound<TU;>; >> // declaration: >> org.foo.bytecode.GenericTypeUsingNestedTypeFromBound<U> >> LOCALVARIABLE nested >> Lorg/foo/bytecode/TypeWithNestedGenericClass$Nested; L0 L1 1 >> // signature >> Lorg/foo/bytecode/TypeWithNestedGenericClass$Nested<Ljava/lang/String;>; >> // declaration: >> org.foo.bytecode.TypeWithNestedGenericClass$Nested<java.lang.String> >> MAXSTACK = 0 >> MAXLOCALS = 2 >> > > eclipse compiler ecj-4.6: > > // access flags 0x0 >> > // signature (TU.Nested<Ljava/lang/String;>;)V >> // declaration: void method(U.Nested<Ljava/lang/String, ) >> method(Lorg/foo/bytecode/TypeWithNestedGenericClass$Nested;)V >> L0 >> LINENUMBER 5 L0 >> RETURN >> L1 >> LOCALVARIABLE this >> Lorg/foo/bytecode/GenericTypeUsingNestedTypeFromBound; L0 L1 0 >> // signature >> Lorg/foo/bytecode/GenericTypeUsingNestedTypeFromBound<TU;>; >> // declaration: >> org.foo.bytecode.GenericTypeUsingNestedTypeFromBound<U> >> LOCALVARIABLE nested >> Lorg/foo/bytecode/TypeWithNestedGenericClass$Nested; L0 L1 1 >> // signature TU.Nested<Ljava/lang/String;>; >> // declaration: U.Nested<Ljava/lang/String >> MAXSTACK = 0 >> MAXLOCALS = 2 >> > > > From that point, it seems to me that the issue is therefore on Eclipse > side, as they apparently does not follow the JLS when dealing with such > cases. > I'm probably going to open an ticket on eclipse side. > > Thanks for your help, > > *Michael GUMOWSKI* | *SonarSource* > *Software Developer @ Language Team* > http://sonarsource.com > > On 15 August 2016 at 19:54, Eric Bruneton <[email protected]> wrote: > >> This type signature seems incorrect to me (see the signature grammar >> specification: >> https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.3.4 >> : T >> can only be followed by an identifier itself followed by ';') >> >> If I compile your example with javac (1.8.0_91) I get the following >> signature >> for this method: >> (LTypeWithNestedGenericClass$Nested<Ljava/lang/String;>;)V >> >> How did you get "(TU.Nested<Ljava/lang/String;>;)V"? >> > > -- 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