question related to bug: 8024694
Vicente-Arturo Romero-Zaldivar
vicente.romero at oracle.com
Wed Sep 18 02:32:29 PDT 2013
On 17/09/13 23:28, Alex Buckley wrote:
> Ah yes, I was distracted by the genericity of the enum type itself.
>
> I've updated my comment to address Signature for the ctor. Basically,
> javac should not expect one in this case.
Hi Alex,
Thanks for the clarification.
Vicente
>
> Alex
>
> On 9/17/2013 2:43 PM, Jonathan Gibbons wrote:
>> Alex,
>>
>> Your comments seem to refer to the class signature, but the issue is
>> about the signature on the constructor for the enum, i.e. the method
>> signature on <init>.
>>
>> -- Jon
>>
>>
>> On 09/17/2013 02:13 PM, Alex Buckley wrote:
>>> I added a comment to the bug. This one is a bit subtle but in my view
>>> it's acceptable for javac to give an implementation-driven error for
>>> the missing Signature attribute.
>>>
>>> Alex
>>>
>>> On 9/17/2013 8:23 AM, Vicente-Arturo Romero-Zaldivar wrote:
>>>> On 17/09/13 14:13, Remi Forax wrote:
>>>>> On 09/17/2013 02:55 PM, Vicente-Arturo Romero-Zaldivar wrote:
>>>>>> Hi Alex,
>>>>>>
>>>>>> I have a doubt related to bug entry [1]. The bug has been created by
>>>>>> someone in the Eclipse community, I assume. As the bug description
>>>>>> states there is a mismatch between javac and Eclipse compiler
>>>>>> related
>>>>>> to the generation of a signature for enum constructors. Javac
>>>>>> generates it always, Eclipse (I was trying with ecj-3.7.1) don't
>>>>>> generate it, at least I didn't found a case where it gets generated
>>>>>> by Eclipse. So there is an issue when a class generated with Eclipse
>>>>>> is loaded with javac.
>>>>>>
>>>>>> Also in the bug entry there is a link to Eclipse's bug db, [2],
>>>>>> where
>>>>>> there are some considerations from Eclipse developers about this
>>>>>> being a javac bug or no.
>>>>>>
>>>>>> Could you please clarify if in this case javac is OK according to
>>>>>> the
>>>>>> spec and this is not a bug?
>>>>>>
>>>>>> Thanks,
>>>>>> Vicente
>>>>>>
>>>>>> [1] https://bugs.openjdk.java.net/browse/JDK-8024694
>>>>>> [2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=388314
>>>>>
>>>>> In my opinion, there is a bug in javac.
>>>>> javac requires that the constructor of an enum must a Signature
>>>>> attribute but the spec only requires a Signature attribute
>>>>> if the method is generics or use a type variable defined on the
>>>>> class.
>>>>> So eclipse can generate an enum constructor without a Signature
>>>>> attribute and javac should work without
>>>>> requiring this specific attribute.
>>>>>
>>>>> so there are 2 bugs to fix, one is that javac should not generate a
>>>>> Signature attribute and
>>>>> the second one is that javac should work even if the Signature
>>>>> attribute is not defined.
>>>>>
>>>>> Rémi
>>>>>
>>>> Thanks Rémi,
>>>>
>>>> As a side comment I was trying to make eclipse generate the signature,
>>>> and even including type variables in the constructor declaration,
>>>> eclipse didn't generate the signature. So seems like it's not
>>>> generating
>>>> the signature even in cases where it should. Probably this has been
>>>> fixed in last versions.
>>>>
>>>> Vicente
>>
More information about the compiler-dev
mailing list