Bug 38766 - Would like the Compiler to ignore the serialVersionUID
Summary: Would like the Compiler to ignore the serialVersionUID
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.0 M2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-11 09:03 EDT by Ed Roberts CLA
Modified: 2003-06-11 12:38 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Roberts CLA 2003-06-11 09:03:01 EDT
A developer can configure the java compiler settings to notify if any private 
methods/fields are not being used. This is a useful feature as it indicates 
unused code and coupled with all of the other alerts can be used to streamline 
the source file.

There is however (at least) one instance where the developer does not wish to 
be notified and that is when the source contains the private field 
serialVersionUID which is inherent in Serializable Java Sources.
Comment 1 Philipe Mulet CLA 2003-06-11 09:33:40 EDT
It should already do what you suggest. Which build are you using ? Can you 
provide a test case ?
Comment 2 Ed Roberts CLA 2003-06-11 09:45:22 EDT
I am using 

Version: 2.1
Build id: 200302061700
Comment 3 Ed Roberts CLA 2003-06-11 09:55:59 EDT
I have a Java Source with the following declaration in it

	/**
	 * Serialization UID
	 */
	private static final long serialVersionUID = 1000000000000001L;

Whislt checking to make sure I had declared it correctly, I actually saw an 
example in some javadoc where this field is declared public
which clearly would be ignored by the warnings, but as far as I know 
Serialization works irrespective of the access modifier.
Comment 4 Philipe Mulet CLA 2003-06-11 10:24:59 EDT
You are using an intermediate build. Use true 2.1 release or 2.1.1.
Comment 5 Ed Roberts CLA 2003-06-11 12:38:36 EDT
Sorry for the delay. I am currently downloading 2.1 release.
Thanks for your help, much appreciated