Bug 35651

Summary: "Unused private types, methods or fields" should recognize serialVersionUID.
Product: [Eclipse Project] JDT Reporter: Kohsuke Kawaguchi <kk>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: enhancement    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 RC4   
Hardware: All   
OS: All   
Whiteboard:

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.