Bug 31495 - Should writeObject/readObject be a compiler warning?
Summary: Should writeObject/readObject be a compiler warning?
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 minor (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 31917 32164 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-02-10 17:03 EST by Christian Ullenboom CLA
Modified: 2003-03-10 12:25 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ullenboom CLA 2003-02-10 17:03:17 EST
If the compiler should warn about "Unused private types, methodes of fields" in 
the compiler dialog it is also warning, if there is a private readObject() or 
writeObject().
Comment 1 Philipe Mulet CLA 2003-02-10 18:09:58 EST
What do you mean exactly ? 
Comment 2 Christian Ullenboom CLA 2003-02-11 04:05:23 EST
If you set "Preferences > Compiler > Unused private types, methodes of fields"
from  Ignore to Warning it will complain about "unused private..." as said. But
if you are working with serialization you will often write private methods
readObject(), writeObject(), and this is completely ok and should IMHO not
declarate as a waring.

But I think this is a view of perception, thus this is a question, not an error.
Comment 3 Philipe Mulet CLA 2003-02-11 05:00:02 EST
I see. Indeed, we should not flag these, as they are reserved methods.
Along this line, we don't report unused private 0-args constructors, as it is a 
known pattern for blocking instantiation.
Comment 4 Philipe Mulet CLA 2003-02-14 08:22:28 EST
Special cased these, may want to open this in the future.
Fixed in latest
Comment 5 Philipe Mulet CLA 2003-02-15 05:17:50 EST
*** Bug 31917 has been marked as a duplicate of this bug. ***
Comment 6 Philipe Mulet CLA 2003-02-19 06:26:13 EST
*** Bug 32164 has been marked as a duplicate of this bug. ***
Comment 7 David Audel CLA 2003-03-10 12:25:04 EST
Verified.