Bug 31495

Summary: Should writeObject/readObject be a compiler warning?
Product: [Eclipse Project] JDT Reporter: Christian Ullenboom <C.Ullenboom>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: jverhaeg, rafial
Version: 2.1   
Target Milestone: 2.1 RC1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

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.