-
Bug
-
Resolution: Fixed
-
P4
-
6
-
b69
-
generic
-
generic
Doug Lea writes:
Neal Gafter wrote to me saying
>> I found this silly code in TimeUnit:
>>
>> /**
>> * The index of this unit. This value is no longer used in this
>> * version of this class, but is retained for serialization
>> * compatibility with previous version.
>> */
>> private final int index;
>>
>> Enums have special serialization machinery. The fields of an enum play no part in
> serialization or deserialization. I believe this field can simply be removed.
(1) Howcome I didn't know that?
(2) Just to double-check, I wrote a test program, and it is true.
(3) Martin: Can you file a bug? I'll check in the changes.
(4) Neal: Thanks!
Neal Gafter wrote to me saying
>> I found this silly code in TimeUnit:
>>
>> /**
>> * The index of this unit. This value is no longer used in this
>> * version of this class, but is retained for serialization
>> * compatibility with previous version.
>> */
>> private final int index;
>>
>> Enums have special serialization machinery. The fields of an enum play no part in
> serialization or deserialization. I believe this field can simply be removed.
(1) Howcome I didn't know that?
(2) Just to double-check, I wrote a test program, and it is true.
(3) Martin: Can you file a bug? I'll check in the changes.
(4) Neal: Thanks!