Bug 479928 - Better Compiler Errors/Warnings Defaults
Summary: Better Compiler Errors/Warnings Defaults
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.6   Edit
Hardware: PC Windows 10
: P3 enhancement with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 535173 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-10-16 04:30 EDT by Simon harrer CLA
Modified: 2018-05-28 11:38 EDT (History)
6 users (show)

See Also:


Attachments
affordance for "Configure Problem Severity" (21.19 KB, image/png)
2015-10-16 11:15 EDT, Stephan Herrmann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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'?