Anonymous structs have strange issues with scala and intellij in ea+44

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Wed Feb 20 01:14:48 UTC 2019


The signature attributes look in order - actually there are some 
attributes which are not even needed, as in this case:

public abstract wlroots.backend$anon$backend_h$444 events$get();
     descriptor: ()Lwlroots/backend$anon$backend_h$444;
     flags: (0x0401) ACC_PUBLIC, ACC_ABSTRACT
     Signature: #36                          // 
()Lwlroots/backend$anon$backend_h$444;


It seems like the code generator always emits a signature...

What I suspect is that the tools are confused by the '$' sign, and they 
are tricked into thinking that "444" is an inner class of "backend_h".

I will do some more experiments of this though.

Thanks
Maurizio


On 20/02/2019 00:28, Mark Hammons wrote:
> Sure,
>
> I'd like to note one thing quickly. Before I was extracting the jar 
> with an archive extracter and calling javap on the raw classfiles. 
> Just now I tried "javap -p -v -cp wlroots.jar 
> wlroots.backend.anon$backend_h$444" and it couldn't find the class, 
> but "javap -p -v -cp wlroots.jar wlroots.backend.anon.backend_h.444" 
> had it able to find the class in question. Ditto for  "javap -p -v -cp 
> wlroots.jar wlroots.backend_headers.session.anon.session_h.751". I'm 
> attaching my wlroots.jar along with the javap of wlr_backend.class.
>
> This seems to be a recurring issue with the anonymous structs 
> generated by jextract.
>
> Mark
>
> On 2/20/19 1:04 AM, Maurizio Cimadamore wrote:
>> Thanks,
>> can you please also post the dump of the 'wlr_backend' struct?
>>
>> Maurizio
>>
>> On 19/02/2019 23:56, Mark Hammons wrote:
>>> Here's the javap dump. Tell me if there's anything else I can get you.
>>>
>>> Mark
>>>
>>>
>>> On 2/20/19 12:44 AM, Maurizio Cimadamore wrote:
>>>>
>>>> On 19/02/2019 23:29, Jorn Vernee wrote:
>>>>> I tried to reproduce the problem without using jextract as well, 
>>>>> but was not able to, so the bug seems to be up to a particularity 
>>>>> of the classes generated by jextract. I'm not sure if the bug 
>>>>> should be attributed to jextract or IntelliJ though. 
>>>>
>>>> I wonder if this could be due to some missing (or, most likely, 
>>>> just bad) Signature attributes in the resulting classfile?
>>>>
>>>> Would you be able to post a 'javap -v -p' dump of the classfile, so 
>>>> that we can take a look at it and look for anomalies?
>>>>
>>>> Maurizio
>>>>


More information about the panama-dev mailing list