Bug 220352

Summary: [1.5][compiler] SuppressWarnings for 'Parameter Assignment' compiler warning
Product: [Eclipse Project] JDT Reporter: Prashant Deva <prashant.deva>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: Olivier_Thomann, philippe_mulet, satyam.kandula
Version: 3.4   
Target Milestone: 3.7 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Prashant Deva CLA 2008-02-26 05:58:41 EST
Hi,
 It seems as of v3.3 Eclipse has no param for SuppressWarnings annotation, to suppress warnings when a parameter has been assigned.
It would be nice to have this in v3.4 and probably requires just 15 mins of work.

Prashant
Comment 1 Philipe Mulet CLA 2008-02-27 07:37:07 EST
Generally we avoid introducing arbitrary warning tokens for every single possible warning. The reasoning is that in quite numerous cases, it is often simpler to just fix the code (ie. why would you want to suppress it?).

Now, please explain the motivation behind. Are you saying assigning to params is a bad idea, but I still want to do it ? (why not simply turning off the warning then ?).

Re: "probably requires just 15 mins of work."
Sure, why don't you provide a patch for it then ? <g>
Comment 2 Prashant Deva CLA 2008-02-27 07:43:36 EST
(In reply to comment #1)
> Generally we avoid introducing arbitrary warning tokens for every single
> possible warning. The reasoning is that in quite numerous cases, it is often
> simpler to just fix the code (ie. why would you want to suppress it?).
> Now, please explain the motivation behind. Are you saying assigning to params
> is a bad idea, but I still want to do it ? (why not simply turning off the
> warning then ?).

Well as is the intention of SuppressWarnings annotation, I do want the warning to be enabled in general, but there are specific cases where I do find it easier and cleaner to just assign to the param. In such cases I would like to be able to Suppress the warning for that particular method.


 
>> Re: "probably requires just 15 mins of work."
> Sure, why don't you provide a patch for it then ? <g>

Because I am not familiar or work with the code base. 
But someone who has been working on the code shouldnt take much time.


Comment 3 Olivier Thomann CLA 2011-02-11 10:21:01 EST
Closing as WONTFIX. Cases where it is easier just to fix it don't deserve addition of an extra token.
Comment 4 Satyam Kandula CLA 2011-03-08 08:42:22 EST
Verified for 3.7M6
Comment 5 Satyam Kandula CLA 2011-03-08 09:33:43 EST
.