Bug 52012 - Special 'serialPersistentFields' marked as 'never used locally'
Summary: Special 'serialPersistentFields' marked as 'never used locally'
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M8   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-13 17:11 EST by Mario Cormier CLA
Modified: 2004-03-24 09:22 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Cormier CLA 2004-02-13 17:11:35 EST
Starting with JDK1.2, it is possible to declare explicitely which fields you 
want to see serialized by defining an array of ObjectStreamField objects 
describing these fields.  The prototype for this special field is:

   private static final ObjectStreamField[] serialPersistentFields = { ... };

If you specify as a Java compiler option that you want to flag unused private 
types as a warning, this field is invariably flagged.  I believe the behavior 
should be similar to the one for the 'serialVersionUID' field, which is not 
flagged even if it is never explicitely read by the code.
Comment 1 Philipe Mulet CLA 2004-02-14 07:20:38 EST
Agreed. We did not know about this special one. We will add it to the list of 
special cases. Thanks for the info.
Comment 2 Philipe Mulet CLA 2004-02-14 07:48:48 EST
Added NegativeTest#test410
Comment 3 Jerome Lanneluc CLA 2004-03-24 09:22:43 EST
Verified in I200403230010.