Bug 97203 - Strange suppress warning tokens
Summary: Strange suppress warning tokens
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M5   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-30 05:39 EDT by Dirk Baeumer CLA
Modified: 2006-01-09 06:25 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Baeumer CLA 2005-05-30 05:39:28 EDT
RC1:

I had the following source code:

@interface Annotation {
	public String description() default "";
}

class Sub implements Annotation {
}

- quick fix offered me a suppress warning which introduced:

@SuppressWarnings("intfAnnotation") 

First of all the key word "intfAnnotation reads strange since users will try to
read it as int for integer, f and Annotations.

Furthermore I think we should restrict ourselves to the absolutly minimum of
supress warning keywords. Since they aren't standardized yet I think it will be
confusing for the users. Especially if we have key words for our own compiler
warnings.
Comment 1 Philipe Mulet CLA 2005-05-30 05:41:33 EDT
They will likely never get standardized. If we do not support them, who will ?
Comment 2 Martin Aeschlimann CLA 2005-05-30 09:19:47 EDT
"unchecked" is the keyword used to allow accesses to raw types. IMO is
'unchecked' too generic. Longer, more precice keywords are much better for the
readability.

IMO, it would be much more friendlier to use a Eclipse specific prefix, e.g.
'e_' for all keywords introduced by us.

Sun will add more and more keywords for the standard compiler. Users are going
to want support for these 'default' keywords. If one of these words happens to
clash with one of our keywords, things will get messy. 
Comment 3 Philipe Mulet CLA 2006-01-09 06:25:57 EST
We scaled our warning tokens set down to a reasonable portion.
See documentation for actual list.