Bug 220352 - [1.5][compiler] SuppressWarnings for 'Parameter Assignment' compiler warning
Summary: [1.5][compiler] SuppressWarnings for 'Parameter Assignment' compiler warning
Status: VERIFIED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-26 05:58 EST by Prashant Deva CLA
Modified: 2011-03-08 09:33 EST (History)
3 users (show)

See Also:


Attachments

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