Bug 31917 - Unused private method warning doesn't know about read/writeObject
Summary: Unused private method warning doesn't know about read/writeObject
Status: RESOLVED DUPLICATE of bug 31495
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-14 16:20 EST by Wilhelm Fitzpatricck CLA
Modified: 2003-02-15 05:17 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 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 ***