View | Details | Raw Unified | Return to bug 290034 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java (-1 / +4 lines)
Lines 347-352 Link Here
347
		"nls", //$NON-NLS-1$
347
		"nls", //$NON-NLS-1$
348
		"null", //$NON-NLS-1$
348
		"null", //$NON-NLS-1$
349
		"restriction", //$NON-NLS-1$
349
		"restriction", //$NON-NLS-1$
350
		"raw", //$NON-NLS-1$
350
		"serial", //$NON-NLS-1$
351
		"serial", //$NON-NLS-1$
351
		"static-access", //$NON-NLS-1$
352
		"static-access", //$NON-NLS-1$
352
		"super", //$NON-NLS-1$
353
		"super", //$NON-NLS-1$
Lines 693-699 Link Here
693
			case MissingDeprecatedAnnotation :
694
			case MissingDeprecatedAnnotation :
694
				return "dep-ann"; //$NON-NLS-1$
695
				return "dep-ann"; //$NON-NLS-1$
695
			case RawTypeReference :
696
			case RawTypeReference :
696
				return "unchecked"; //$NON-NLS-1$
697
				return "raw"; //$NON-NLS-1$
697
			case UnusedLabel :
698
			case UnusedLabel :
698
			case UnusedTypeArguments :
699
			case UnusedTypeArguments :
699
			case RedundantSuperinterface :
700
			case RedundantSuperinterface :
Lines 756-761 Link Here
756
					return IrritantSet.NULL;
757
					return IrritantSet.NULL;
757
				break;
758
				break;
758
			case 'r' :
759
			case 'r' :
760
				if ("raw".equals(warningToken)) //$NON-NLS-1$
761
					return IrritantSet.RAW;
759
				if ("restriction".equals(warningToken)) //$NON-NLS-1$
762
				if ("restriction".equals(warningToken)) //$NON-NLS-1$
760
					return IrritantSet.RESTRICTION;
763
					return IrritantSet.RESTRICTION;
761
				break;
764
				break;
(-)compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java (-9 / +6 lines)
Lines 58-68 Link Here
58
	public static final IrritantSet NLS = new IrritantSet(
58
	public static final IrritantSet NLS = new IrritantSet(
59
			CompilerOptions.NonExternalizedString);
59
			CompilerOptions.NonExternalizedString);
60
	public static final IrritantSet NULL = new IrritantSet(
60
	public static final IrritantSet NULL = new IrritantSet(
61
			CompilerOptions.NullReference); // further scenarii in static
61
			CompilerOptions.NullReference);
62
											// initializer
62
	public static final IrritantSet RAW = new IrritantSet(
63
			CompilerOptions.RawTypeReference);
63
	public static final IrritantSet RESTRICTION = new IrritantSet(
64
	public static final IrritantSet RESTRICTION = new IrritantSet(
64
			CompilerOptions.ForbiddenReference); // further scenarii in static
65
			CompilerOptions.ForbiddenReference);
65
													// initializer
66
	public static final IrritantSet SERIAL = new IrritantSet(
66
	public static final IrritantSet SERIAL = new IrritantSet(
67
			CompilerOptions.MissingSerialVersion);
67
			CompilerOptions.MissingSerialVersion);
68
	public static final IrritantSet STATIC_ACCESS = new IrritantSet(
68
	public static final IrritantSet STATIC_ACCESS = new IrritantSet(
Lines 73-83 Link Here
73
	public static final IrritantSet SUPER = new IrritantSet(
73
	public static final IrritantSet SUPER = new IrritantSet(
74
			CompilerOptions.OverridingMethodWithoutSuperInvocation);
74
			CompilerOptions.OverridingMethodWithoutSuperInvocation);
75
	public static final IrritantSet UNUSED = new IrritantSet(
75
	public static final IrritantSet UNUSED = new IrritantSet(
76
			CompilerOptions.UnusedLocalVariable); // further scenarii in static
76
			CompilerOptions.UnusedLocalVariable);
77
													// initializer
78
	public static final IrritantSet UNCHECKED = new IrritantSet(
77
	public static final IrritantSet UNCHECKED = new IrritantSet(
79
			CompilerOptions.UncheckedTypeOperation); // further scenarii in
78
			CompilerOptions.UncheckedTypeOperation);
80
														// static initializer
81
	public static final IrritantSet UNQUALIFIED_FIELD_ACCESS = new IrritantSet(
79
	public static final IrritantSet UNQUALIFIED_FIELD_ACCESS = new IrritantSet(
82
			CompilerOptions.UnqualifiedFieldAccess);
80
			CompilerOptions.UnqualifiedFieldAccess);
83
81
Lines 139-145 Link Here
139
			.set(CompilerOptions.UnusedImport)
137
			.set(CompilerOptions.UnusedImport)
140
			.set(CompilerOptions.UnusedTypeArguments)
138
			.set(CompilerOptions.UnusedTypeArguments)
141
			.set(CompilerOptions.RedundantSuperinterface);
139
			.set(CompilerOptions.RedundantSuperinterface);
142
		UNCHECKED.set(CompilerOptions.RawTypeReference);
143
	}
140
	}
144
141
145
	// Internal state
142
	// Internal state
(-)src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java (-5 / +7 lines)
Lines 3886-3892 Link Here
3886
                "    void foo(List list) {\n" +
3886
                "    void foo(List list) {\n" +
3887
                "        List<String> ls1 = list;\n" +
3887
                "        List<String> ls1 = list;\n" +
3888
                "    }\n" +
3888
                "    }\n" +
3889
                "    @SuppressWarnings(\"unchecked\")\n" +
3889
                "    @SuppressWarnings({\"unchecked\", \"raw\"})\n" +
3890
                "    void bar(List list) {\n" +
3890
                "    void bar(List list) {\n" +
3891
                "        List<String> ls2 = list;\n" +
3891
                "        List<String> ls2 = list;\n" +
3892
                "    }\n" +
3892
                "    }\n" +
Lines 4064-4069 Link Here
4064
    			"\n" +
4064
    			"\n" +
4065
    			"@SuppressWarnings( { \"deprecation\",//$NON-NLS-1$\n" +
4065
    			"@SuppressWarnings( { \"deprecation\",//$NON-NLS-1$\n" +
4066
    			"		\"finally\",//$NON-NLS-1$\n" +
4066
    			"		\"finally\",//$NON-NLS-1$\n" +
4067
    			"		\"raw\",//$NON-NLS-1$\n" +
4067
    			"		\"serial\",//$NON-NLS-1$\n" +
4068
    			"		\"serial\",//$NON-NLS-1$\n" +
4068
    			"		\"unchecked\"//$NON-NLS-1$\n" +
4069
    			"		\"unchecked\"//$NON-NLS-1$\n" +
4069
    			"})\n" +
4070
    			"})\n" +
Lines 4093-4099 Link Here
4093
    			"}\n"
4094
    			"}\n"
4094
            },
4095
            },
4095
    		"----------\n" +
4096
    		"----------\n" +
4096
    		"1. ERROR in X.java (at line 23)\n" +
4097
    		"1. ERROR in X.java (at line 24)\n" +
4097
    		"	Zork dummy;\n" +
4098
    		"	Zork dummy;\n" +
4098
    		"	^^^^\n" +
4099
    		"	^^^^\n" +
4099
    		"Zork cannot be resolved to a type\n" +
4100
    		"Zork cannot be resolved to a type\n" +
Lines 4111-4116 Link Here
4111
    			"public class X {\n" +
4112
    			"public class X {\n" +
4112
    			"	@SuppressWarnings( { \"deprecation\",//$NON-NLS-1$\n" +
4113
    			"	@SuppressWarnings( { \"deprecation\",//$NON-NLS-1$\n" +
4113
    			"			\"finally\",//$NON-NLS-1$\n" +
4114
    			"			\"finally\",//$NON-NLS-1$\n" +
4115
    			"			\"raw\",//$NON-NLS-1$\n" +
4114
    			"			\"unchecked\"//$NON-NLS-1$\n" +
4116
    			"			\"unchecked\"//$NON-NLS-1$\n" +
4115
    			"	})\n" +
4117
    			"	})\n" +
4116
    			"	public static void main(String[] args) {\n" +
4118
    			"	public static void main(String[] args) {\n" +
Lines 4124-4130 Link Here
4124
    			"		}\n" +
4126
    			"		}\n" +
4125
    			"	}\n" +
4127
    			"	}\n" +
4126
    			"\n" +
4128
    			"\n" +
4127
    			"	@SuppressWarnings(\"unchecked\"//$NON-NLS-1$\n" +
4129
    			"	@SuppressWarnings({\"unchecked\", \"raw\"}//$NON-NLS-1$//$NON-NLS-2$\n" +
4128
    			"	)\n" +
4130
    			"	)\n" +
4129
    			"	List<X> l = new Vector();\n" +
4131
    			"	List<X> l = new Vector();\n" +
4130
    			"\n" +
4132
    			"\n" +
Lines 4144-4150 Link Here
4144
    			"}\n"
4146
    			"}\n"
4145
            },
4147
            },
4146
    		"----------\n" +
4148
    		"----------\n" +
4147
    		"1. ERROR in X.java (at line 28)\n" +
4149
    		"1. ERROR in X.java (at line 29)\n" +
4148
    		"	Zork dummy;\n" +
4150
    		"	Zork dummy;\n" +
4149
    		"	^^^^\n" +
4151
    		"	^^^^\n" +
4150
    		"Zork cannot be resolved to a type\n" +
4152
    		"Zork cannot be resolved to a type\n" +
Lines 5054-5060 Link Here
5054
        this.runNegativeTest(
5056
        this.runNegativeTest(
5055
            new String[] {
5057
            new String[] {
5056
                "X.java",
5058
                "X.java",
5057
                "@SuppressWarnings(\"unchecked\")\n" +
5059
                "@SuppressWarnings({\"unchecked\", \"raw\"})\n" +
5058
				"public class X<T> {\n" +
5060
				"public class X<T> {\n" +
5059
				"    \n" +
5061
				"    \n" +
5060
				"    public static void main(String[] args) {\n" +
5062
				"    public static void main(String[] args) {\n" +
(-)src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java (-4 / +4 lines)
Lines 7225-7231 Link Here
7225
				"import java.util.HashMap;\n" +
7225
				"import java.util.HashMap;\n" +
7226
				"import java.util.Map;\n" +
7226
				"import java.util.Map;\n" +
7227
				"public class X {\n" +
7227
				"public class X {\n" +
7228
				"    @SuppressWarnings(\"unchecked\")\n" +
7228
				"    @SuppressWarnings(\"raw\")\n" +
7229
				"    private static final Map<String, Class> classes = new HashMap<String, Class>();\n" +
7229
				"    private static final Map<String, Class> classes = new HashMap<String, Class>();\n" +
7230
				"    public static void main(String[] args) throws Exception {\n" +
7230
				"    public static void main(String[] args) throws Exception {\n" +
7231
				"    	classes.put(\"test\", X.class);\n" +
7231
				"    	classes.put(\"test\", X.class);\n" +
Lines 34056-34062 Link Here
34056
			"ComparableComparator.java",
34056
			"ComparableComparator.java",
34057
			"import java.util.Comparator;\n" +
34057
			"import java.util.Comparator;\n" +
34058
			"\n" +
34058
			"\n" +
34059
			"@SuppressWarnings(\"unchecked\")\n" +
34059
			"@SuppressWarnings({\"unchecked\", \"raw\"})\n" +
34060
			"class ComparableComparator<T extends Comparable<? super T>> implements Comparator<T> {\n" +
34060
			"class ComparableComparator<T extends Comparable<? super T>> implements Comparator<T> {\n" +
34061
			"\n" +
34061
			"\n" +
34062
			"	static ComparableComparator instance = new ComparableComparator();\n" +
34062
			"	static ComparableComparator instance = new ComparableComparator();\n" +
Lines 34075-34081 Link Here
34075
			"}\n" +
34075
			"}\n" +
34076
			"}\n" +
34076
			"}\n" +
34077
			"\n" +
34077
			"\n" +
34078
			"@SuppressWarnings(\"unchecked\")\n" +
34078
			"@SuppressWarnings({\"unchecked\", \"raw\"})\n" +
34079
			"class ComparatorUtils {\n" +
34079
			"class ComparatorUtils {\n" +
34080
			"\n" +
34080
			"\n" +
34081
			"	static Comparator BAR = ComparableComparator.bar();//0\n" +
34081
			"	static Comparator BAR = ComparableComparator.bar();//0\n" +
Lines 42751-42757 Link Here
42751
				"X.java",
42751
				"X.java",
42752
				"public class X {\n" +
42752
				"public class X {\n" +
42753
				"	Zork z;\n" +
42753
				"	Zork z;\n" +
42754
				"	@SuppressWarnings(\"unchecked\")\n" +
42754
				"	@SuppressWarnings({\"unchecked\", \"raw\"})\n" +
42755
				"	public B getB() {\n" +
42755
				"	public B getB() {\n" +
42756
				"		return new B<Object>();\n" +
42756
				"		return new B<Object>();\n" +
42757
				"	}\n" +
42757
				"	}\n" +
(-)ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java (-6 / +6 lines)
Lines 6415-6421 Link Here
6415
		buf.append("package pack;\n");
6415
		buf.append("package pack;\n");
6416
		buf.append("import java.util.List;\n");
6416
		buf.append("import java.util.List;\n");
6417
		buf.append("public class E {\n");
6417
		buf.append("public class E {\n");
6418
		buf.append("    @SuppressWarnings(\"unchecked\")\n");
6418
		buf.append("    @SuppressWarnings(\"raw\")\n");
6419
		buf.append("    public void test() {\n");
6419
		buf.append("    public void test() {\n");
6420
		buf.append("        List l;\n");
6420
		buf.append("        List l;\n");
6421
		buf.append("    }\n");
6421
		buf.append("    }\n");
Lines 6463-6469 Link Here
6463
		buf.append("package pack;\n");
6463
		buf.append("package pack;\n");
6464
		buf.append("public class E {\n");
6464
		buf.append("public class E {\n");
6465
		buf.append("    private class E1<P1, P2> {}\n");
6465
		buf.append("    private class E1<P1, P2> {}\n");
6466
		buf.append("    @SuppressWarnings(\"unchecked\")\n");
6466
		buf.append("    @SuppressWarnings(\"raw\")\n");
6467
		buf.append("    public void test() {\n");
6467
		buf.append("    public void test() {\n");
6468
		buf.append("        E1 e1;\n");
6468
		buf.append("        E1 e1;\n");
6469
		buf.append("    }\n");
6469
		buf.append("    }\n");
Lines 6668-6674 Link Here
6668
		buf.append("import java.util.ArrayList;\n");
6668
		buf.append("import java.util.ArrayList;\n");
6669
		buf.append("import java.util.List;\n");
6669
		buf.append("import java.util.List;\n");
6670
		buf.append("public class E {\n");
6670
		buf.append("public class E {\n");
6671
		buf.append("    @SuppressWarnings(\"unchecked\")\n");
6671
		buf.append("    @SuppressWarnings(\"raw\")\n");
6672
		buf.append("    private List l= new ArrayList<String>();\n");
6672
		buf.append("    private List l= new ArrayList<String>();\n");
6673
		buf.append("}\n");
6673
		buf.append("}\n");
6674
		expected[0]= buf.toString();
6674
		expected[0]= buf.toString();
Lines 6714-6720 Link Here
6714
		buf.append("package pack;\n");
6714
		buf.append("package pack;\n");
6715
		buf.append("import java.util.List;\n");
6715
		buf.append("import java.util.List;\n");
6716
		buf.append("public class E {\n");
6716
		buf.append("public class E {\n");
6717
		buf.append("    @SuppressWarnings(\"unchecked\")\n");
6717
		buf.append("    @SuppressWarnings(\"raw\")\n");
6718
		buf.append("    private List l;\n");
6718
		buf.append("    private List l;\n");
6719
		buf.append("    private void foo() {\n");
6719
		buf.append("    private void foo() {\n");
6720
		buf.append("        l.add(\"String\");\n");
6720
		buf.append("        l.add(\"String\");\n");
Lines 6821-6827 Link Here
6821
		buf= new StringBuffer();
6821
		buf= new StringBuffer();
6822
		buf.append("package test1;\n");
6822
		buf.append("package test1;\n");
6823
		buf.append("public class E1 {\n");
6823
		buf.append("public class E1 {\n");
6824
		buf.append("    @SuppressWarnings(\"unchecked\")\n");
6824
		buf.append("    @SuppressWarnings(\"raw\")\n");
6825
		buf.append("    public Class[] get() {\n");
6825
		buf.append("    public Class[] get() {\n");
6826
		buf.append("        return null;\n");
6826
		buf.append("        return null;\n");
6827
		buf.append("    }\n");
6827
		buf.append("    }\n");
Lines 6860-6866 Link Here
6860
		buf.append("import java.util.List;\n");
6860
		buf.append("import java.util.List;\n");
6861
		buf.append("\n");
6861
		buf.append("\n");
6862
		buf.append("public class E1 {\n");
6862
		buf.append("public class E1 {\n");
6863
		buf.append("    @SuppressWarnings(\"unchecked\")\n");
6863
		buf.append("    @SuppressWarnings(\"raw\")\n");
6864
		buf.append("    public void foo(List<List> list) {\n");
6864
		buf.append("    public void foo(List<List> list) {\n");
6865
		buf.append("    }\n");
6865
		buf.append("    }\n");
6866
		buf.append("}\n");
6866
		buf.append("}\n");

Return to bug 290034