Bug 333956 - CompilerOptions#warningOptionNames(): OPTION_ReportRawTypeReference missing
Summary: CompilerOptions#warningOptionNames(): OPTION_ReportRawTypeReference missing
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 trivial (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Ayushman Jain CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-11 05:03 EST by Karsten Thoms CLA
Modified: 2011-01-25 10:31 EST (History)
3 users (show)

See Also:
amj87.iitr: review+


Attachments
Proposed fix (5.81 KB, patch)
2011-01-11 09:18 EST, Olivier Thomann CLA
no flags Details | Diff
Proposed fix (4.03 KB, patch)
2011-01-11 09:26 EST, Olivier Thomann CLA
no flags Details | Diff
proposed fix with few more options (7.01 KB, patch)
2011-01-12 03:54 EST, Ayushman Jain CLA
no flags Details | Diff
final patch (7.69 KB, patch)
2011-01-13 13:14 EST, Ayushman Jain CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Thoms CLA 2011-01-11 05:03:01 EST
The option OPTION_ReportRawTypeReference is missing in the array CompilerOptions#warningOptionNames().
Comment 1 Ayushman Jain CLA 2011-01-11 08:46:09 EST
Srikanth, is this related to the changes around the raw type warning?
Comment 2 Ayushman Jain CLA 2011-01-11 08:56:51 EST
Oops, just noticed that the list of warnings in warningOptionNames() has not been updated. Not just this, but even other warnings are missing.

Karsten, one question, why do you need the string with all warning names? You can simply use the getMap() method to obtain all the warnings, no?
Comment 3 Olivier Thomann CLA 2011-01-11 09:18:24 EST
Created attachment 186496 [details]
Proposed fix
Comment 4 Olivier Thomann CLA 2011-01-11 09:18:50 EST
Ayushman, please review and release if ok. Thanks.
Comment 5 Olivier Thomann CLA 2011-01-11 09:20:26 EST
Sorry I have too many entries now. Will attach a new patch shortly.
Comment 6 Olivier Thomann CLA 2011-01-11 09:26:18 EST
Created attachment 186497 [details]
Proposed fix

Many options were missing.
Hopefully this is the complete list.
Comment 7 Ayushman Jain CLA 2011-01-12 03:54:09 EST
Created attachment 186601 [details]
proposed fix with few more options

This patch has 3 more options which I think were missing in the previous one. 

I used the following code to find all field names using reflection and then just removed the non-problem options.

public static void main(String[] args) {
		
	Class thisclass = CompilerOptions.class;
	Field[] fields = thisclass.getFields();
            System.out.println();
            for (int i = 0; i < fields.length; i++)
            {
                System.out.println(
                    fields[i].toString() + ",");
            }
		
}
Comment 8 Ayushman Jain CLA 2011-01-12 03:57:39 EST
(In reply to comment #7)
> Created attachment 186601 [details] [diff]
> proposed fix with few more options

The option names here are not sorted though. Number of options in this patch are 87 vs. 84 in the previous one
Comment 9 Olivier Thomann CLA 2011-01-12 09:17:40 EST
The three option that have been added are:
OPTION_ReportInvalidAnnotation,
OPTION_ReportMissingAnnotation,
OPTION_ReportMissingJavadoc

and none of them are actually used anymore inside the JavaCore options. So I think it is not necessary to report them in the option names list.

I wonder if we should not actually completely removed them since they are not used.
Comment 10 Ayushman Jain CLA 2011-01-12 09:27:03 EST
(In reply to comment #9)
> The three option that have been added are:
> OPTION_ReportInvalidAnnotation,
> OPTION_ReportMissingAnnotation,
> OPTION_ReportMissingJavadoc
> 
> and none of them are actually used anymore inside the JavaCore options. So I
> think it is not necessary to report them in the option names list.
> 
> I wonder if we should not actually completely removed them since they are not
> used.

Right, i didn't check that. So we can go with your patch in that case. And we can also remove these 3 options and places where they are referenced in the jdt.core tests.
Comment 11 Olivier Thomann CLA 2011-01-12 09:35:12 EST
I would say so. Please prepare a patch that cleans up the code using the previous patch.
Thanks, Ayushman.
Comment 12 Ayushman Jain CLA 2011-01-13 13:14:30 EST
Created attachment 186766 [details]
final patch

Here's the patch with added option names, and removed 3 unused options.
Comment 13 Ayushman Jain CLA 2011-01-13 13:16:40 EST
Released in HEAD for 3.7M5.
Verification to be done via code inspection
Comment 14 Srikanth Sankaran CLA 2011-01-25 10:31:01 EST
Verified for 3.7 M5 by code inspection.