Bug 31917

Summary: Unused private method warning doesn't know about read/writeObject
Product: [Eclipse Project] JDT Reporter: Wilhelm Fitzpatricck <rafial>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 RC1   
Hardware: All   
OS: All   
Whiteboard:

Description Wilhelm Fitzpatricck CLA 2003-02-14 16:20:40 EST
If you turn on the new compiler warning that detects unused private fields and
methods, and you have Serializable classes that use the magic methods

    private void writeObject(java.io.ObjectOutputStream out)
Comment 1 Wilhelm Fitzpatricck CLA 2003-02-14 16:24:23 EST
Somehow the description got mangled.  Repeating:

If you turn on the new compiler warning that detects unused private fields and
methods, and you have Serializable classes that use the magic methods

    private void writeObject(java.io.ObjectOutputStream out)
or
    private void readObject(java.io.ObjectInputStream in)

A warning will be generated that these methods are not used.  The warning code
should recognize such "magic" methods (as I recall there are a few other special
private methods as part of serialization) and not issue the warning.

This behavior is observed with the I20030213 integration build.

Comment 2 Philipe Mulet CLA 2003-02-14 18:38:50 EST
Support got added in latest (not yet integrated).
Comment 3 Philipe Mulet CLA 2003-02-15 05:17:48 EST

*** This bug has been marked as a duplicate of 31495 ***