Bug 35651 - "Unused private types, methods or fields" should recognize serialVersionUID.
Summary: "Unused private types, methods or fields" should recognize serialVersionUID.
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.1 RC4   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-25 12:06 EST by Kohsuke Kawaguchi CLA
Modified: 2003-03-27 06:50 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 Kohsuke Kawaguchi CLA 2003-03-25 12:06:05 EST
It is a standard practice to declare the serialVersionUID field as
"private static final".

The current compiler option of "Unused private types, methods or fields" 
flags this an an warning/error, which is bit annoying.

It's nice if the compiler recognizes this case. Or even better, if I can
tell the compiler that certain private fields/methods are intentionally
there (through custom javadoc tag or etc.) such as:

/**
 *
 * @eclipse:used
 */
private static void myMethod() {
   ...
}

(I couldn't think of a good tag name, sorry)
Comment 1 Philipe Mulet CLA 2003-03-25 12:29:22 EST
Serialization artifacts are already handled in recent integration build. Which 
build are you using ?

As for using special tags to mark unused private members, this is questionable 
and already reported in bug 30952.

Can you confirm that serialVersionUID fields are properly handled in recent 
integration build ?

Comment 2 Philipe Mulet CLA 2003-03-27 06:50:35 EST
Closing. Checked that serialVersionUID is not complained against.