Bug 479928

Summary: Better Compiler Errors/Warnings Defaults
Product: [Eclipse Project] JDT Reporter: Simon harrer <simon.harrer>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: albertofanjul, arend, daniel_megert, gautier.desaintmartinlacaze, jarthana, stephan.herrmann
Version: 4.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:
Attachments:
Description Flags
affordance for "Configure Problem Severity" none

Description Simon harrer CLA 2015-10-16 04:30:31 EDT
The compiler check for "Serializable class without serialVersionUID" is set to Warning by default. This check can be found in the preferences under Java/Compiler/"Error/Warnings" in the group "Potential programming problems"

I propose to change this to Ignore.

Whys?
- the Java serialization API is used less and less in favor of REST etc. and because of this each of these statements only generates noise in the Java code
- as this is on by default, every person now to Java who writes his own Exception class will stumble over this warning not knowing what the meaning of this is. 
- if you want to disable this warning as someone new to eclipse you cannot do so right from the quick fix menu but have to find the option the settings manually. 
- Side note: this Warning is not shown in IntelliJ IDEA by default. I have not checked for additional IDEs.
Comment 1 Jay Arthanareeswaran CLA 2015-10-16 04:51:09 EDT
Quoting this from Javadoc of Serializable:

"However, it is <em>strongly
 * recommended</em> that all serializable classes explicitly declare
 * serialVersionUID values, since the default serialVersionUID computation is
 * highly sensitive to class details that may vary depending on compiler
 * implementations, and can thus result in unexpected
 * <code>InvalidClassException</code>s during deserialization."

Considering this and your points, I think warning is the right balance we can think of.
Comment 2 Stephan Herrmann CLA 2015-10-16 11:15:52 EDT
Created attachment 257313 [details]
affordance for "Configure Problem Severity"

(In reply to Simon harrer from comment #0)
> - if you want to disable this warning as someone new to eclipse you cannot
> do so right from the quick fix menu but have to find the option the settings
> manually. 

I know this feature is well hidden, but it exists, as the screenshot shows: configuring the appropriate preference is just one click away...
Comment 3 Dani Megert CLA 2018-05-28 11:37:24 EDT
*** Bug 535173 has been marked as a duplicate of this bug. ***
Comment 4 Dani Megert CLA 2018-05-28 11:38:09 EDT
(In reply to Dani Megert from comment #3)
> *** Bug 535173 has been marked as a duplicate of this bug. ***

We just got another bug report about this. How about marking it as 'Info'?