Bug 31538 - serialVersionUID being flagged as an "unused" field
Summary: serialVersionUID being flagged as an "unused" field
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-11 07:52 EST by Mike Bowler CLA
Modified: 2003-02-25 05: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 Mike Bowler CLA 2003-02-11 07:52:51 EST
The latest milestone build has a compiler option to warn about "unused private 
types fields and methods".  This is warning about all the declarations of 
serialVersionUID which is the version id for serialization.  This field *is* 
used even though it isn't directly referenced by any java code.  This is one of 
the quirks of serialization.

The compiler should not be warning about serialVersionUID not being used.  For 
the same reason, it should not be warning about the methods readResolve() and 
writeReplace() that are also used by serialization and are often marked as 
private.
Comment 1 Philipe Mulet CLA 2003-02-14 08:20:05 EST
Special cased all these. May want to open this in the future.
Comment 2 Philipe Mulet CLA 2003-02-14 08:21:21 EST
Fixed in latest
Comment 3 David Audel CLA 2003-02-25 05:22:49 EST
Verified.