### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java,v retrieving revision 1.217 diff -u -r1.217 CompilerOptions.java --- compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 22 Sep 2009 14:56:46 -0000 1.217 +++ compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 22 Sep 2009 19:17:51 -0000 @@ -347,6 +347,7 @@ "nls", //$NON-NLS-1$ "null", //$NON-NLS-1$ "restriction", //$NON-NLS-1$ + "raw", //$NON-NLS-1$ "serial", //$NON-NLS-1$ "static-access", //$NON-NLS-1$ "super", //$NON-NLS-1$ @@ -693,7 +694,7 @@ case MissingDeprecatedAnnotation : return "dep-ann"; //$NON-NLS-1$ case RawTypeReference : - return "unchecked"; //$NON-NLS-1$ + return "raw"; //$NON-NLS-1$ case UnusedLabel : case UnusedTypeArguments : case RedundantSuperinterface : @@ -756,6 +757,8 @@ return IrritantSet.NULL; break; case 'r' : + if ("raw".equals(warningToken)) //$NON-NLS-1$ + return IrritantSet.RAW; if ("restriction".equals(warningToken)) //$NON-NLS-1$ return IrritantSet.RESTRICTION; break; Index: compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java,v retrieving revision 1.3 diff -u -r1.3 IrritantSet.java --- compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java 29 Nov 2008 22:35:36 -0000 1.3 +++ compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java 22 Sep 2009 19:17:51 -0000 @@ -58,11 +58,11 @@ public static final IrritantSet NLS = new IrritantSet( CompilerOptions.NonExternalizedString); public static final IrritantSet NULL = new IrritantSet( - CompilerOptions.NullReference); // further scenarii in static - // initializer + CompilerOptions.NullReference); + public static final IrritantSet RAW = new IrritantSet( + CompilerOptions.RawTypeReference); public static final IrritantSet RESTRICTION = new IrritantSet( - CompilerOptions.ForbiddenReference); // further scenarii in static - // initializer + CompilerOptions.ForbiddenReference); public static final IrritantSet SERIAL = new IrritantSet( CompilerOptions.MissingSerialVersion); public static final IrritantSet STATIC_ACCESS = new IrritantSet( @@ -73,11 +73,9 @@ public static final IrritantSet SUPER = new IrritantSet( CompilerOptions.OverridingMethodWithoutSuperInvocation); public static final IrritantSet UNUSED = new IrritantSet( - CompilerOptions.UnusedLocalVariable); // further scenarii in static - // initializer + CompilerOptions.UnusedLocalVariable); public static final IrritantSet UNCHECKED = new IrritantSet( - CompilerOptions.UncheckedTypeOperation); // further scenarii in - // static initializer + CompilerOptions.UncheckedTypeOperation); public static final IrritantSet UNQUALIFIED_FIELD_ACCESS = new IrritantSet( CompilerOptions.UnqualifiedFieldAccess); @@ -139,7 +137,6 @@ .set(CompilerOptions.UnusedImport) .set(CompilerOptions.UnusedTypeArguments) .set(CompilerOptions.RedundantSuperinterface); - UNCHECKED.set(CompilerOptions.RawTypeReference); } // Internal state #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java,v retrieving revision 1.204 diff -u -r1.204 AnnotationTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 22 Sep 2009 14:56:48 -0000 1.204 +++ src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 22 Sep 2009 19:17:52 -0000 @@ -3886,7 +3886,7 @@ " void foo(List list) {\n" + " List ls1 = list;\n" + " }\n" + - " @SuppressWarnings(\"unchecked\")\n" + + " @SuppressWarnings({\"unchecked\", \"raw\"})\n" + " void bar(List list) {\n" + " List ls2 = list;\n" + " }\n" + @@ -4064,6 +4064,7 @@ "\n" + "@SuppressWarnings( { \"deprecation\",//$NON-NLS-1$\n" + " \"finally\",//$NON-NLS-1$\n" + + " \"raw\",//$NON-NLS-1$\n" + " \"serial\",//$NON-NLS-1$\n" + " \"unchecked\"//$NON-NLS-1$\n" + "})\n" + @@ -4093,7 +4094,7 @@ "}\n" }, "----------\n" + - "1. ERROR in X.java (at line 23)\n" + + "1. ERROR in X.java (at line 24)\n" + " Zork dummy;\n" + " ^^^^\n" + "Zork cannot be resolved to a type\n" + @@ -4111,6 +4112,7 @@ "public class X {\n" + " @SuppressWarnings( { \"deprecation\",//$NON-NLS-1$\n" + " \"finally\",//$NON-NLS-1$\n" + + " \"raw\",//$NON-NLS-1$\n" + " \"unchecked\"//$NON-NLS-1$\n" + " })\n" + " public static void main(String[] args) {\n" + @@ -4124,7 +4126,7 @@ " }\n" + " }\n" + "\n" + - " @SuppressWarnings(\"unchecked\"//$NON-NLS-1$\n" + + " @SuppressWarnings({\"unchecked\", \"raw\"}//$NON-NLS-1$//$NON-NLS-2$\n" + " )\n" + " List l = new Vector();\n" + "\n" + @@ -4144,7 +4146,7 @@ "}\n" }, "----------\n" + - "1. ERROR in X.java (at line 28)\n" + + "1. ERROR in X.java (at line 29)\n" + " Zork dummy;\n" + " ^^^^\n" + "Zork cannot be resolved to a type\n" + @@ -5054,7 +5056,7 @@ this.runNegativeTest( new String[] { "X.java", - "@SuppressWarnings(\"unchecked\")\n" + + "@SuppressWarnings({\"unchecked\", \"raw\"})\n" + "public class X {\n" + " \n" + " public static void main(String[] args) {\n" + Index: src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java,v retrieving revision 1.801 diff -u -r1.801 GenericTypeTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 17 Sep 2009 17:42:14 -0000 1.801 +++ src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 22 Sep 2009 19:17:55 -0000 @@ -7225,7 +7225,7 @@ "import java.util.HashMap;\n" + "import java.util.Map;\n" + "public class X {\n" + - " @SuppressWarnings(\"unchecked\")\n" + + " @SuppressWarnings(\"raw\")\n" + " private static final Map classes = new HashMap();\n" + " public static void main(String[] args) throws Exception {\n" + " classes.put(\"test\", X.class);\n" + @@ -34056,7 +34056,7 @@ "ComparableComparator.java", "import java.util.Comparator;\n" + "\n" + - "@SuppressWarnings(\"unchecked\")\n" + + "@SuppressWarnings({\"unchecked\", \"raw\"})\n" + "class ComparableComparator> implements Comparator {\n" + "\n" + " static ComparableComparator instance = new ComparableComparator();\n" + @@ -34075,7 +34075,7 @@ "}\n" + "}\n" + "\n" + - "@SuppressWarnings(\"unchecked\")\n" + + "@SuppressWarnings({\"unchecked\", \"raw\"})\n" + "class ComparatorUtils {\n" + "\n" + " static Comparator BAR = ComparableComparator.bar();//0\n" + @@ -42751,7 +42751,7 @@ "X.java", "public class X {\n" + " Zork z;\n" + - " @SuppressWarnings(\"unchecked\")\n" + + " @SuppressWarnings({\"unchecked\", \"raw\"})\n" + " public B getB() {\n" + " return new B();\n" + " }\n" + #P org.eclipse.jdt.ui.tests Index: ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java,v retrieving revision 1.155 diff -u -r1.155 LocalCorrectionsQuickFixTest.java --- ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java 15 Jun 2009 15:05:22 -0000 1.155 +++ ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java 22 Sep 2009 19:17:57 -0000 @@ -6415,7 +6415,7 @@ buf.append("package pack;\n"); buf.append("import java.util.List;\n"); buf.append("public class E {\n"); - buf.append(" @SuppressWarnings(\"unchecked\")\n"); + buf.append(" @SuppressWarnings(\"raw\")\n"); buf.append(" public void test() {\n"); buf.append(" List l;\n"); buf.append(" }\n"); @@ -6463,7 +6463,7 @@ buf.append("package pack;\n"); buf.append("public class E {\n"); buf.append(" private class E1 {}\n"); - buf.append(" @SuppressWarnings(\"unchecked\")\n"); + buf.append(" @SuppressWarnings(\"raw\")\n"); buf.append(" public void test() {\n"); buf.append(" E1 e1;\n"); buf.append(" }\n"); @@ -6668,7 +6668,7 @@ buf.append("import java.util.ArrayList;\n"); buf.append("import java.util.List;\n"); buf.append("public class E {\n"); - buf.append(" @SuppressWarnings(\"unchecked\")\n"); + buf.append(" @SuppressWarnings(\"raw\")\n"); buf.append(" private List l= new ArrayList();\n"); buf.append("}\n"); expected[0]= buf.toString(); @@ -6714,7 +6714,7 @@ buf.append("package pack;\n"); buf.append("import java.util.List;\n"); buf.append("public class E {\n"); - buf.append(" @SuppressWarnings(\"unchecked\")\n"); + buf.append(" @SuppressWarnings(\"raw\")\n"); buf.append(" private List l;\n"); buf.append(" private void foo() {\n"); buf.append(" l.add(\"String\");\n"); @@ -6821,7 +6821,7 @@ buf= new StringBuffer(); buf.append("package test1;\n"); buf.append("public class E1 {\n"); - buf.append(" @SuppressWarnings(\"unchecked\")\n"); + buf.append(" @SuppressWarnings(\"raw\")\n"); buf.append(" public Class[] get() {\n"); buf.append(" return null;\n"); buf.append(" }\n"); @@ -6860,7 +6860,7 @@ buf.append("import java.util.List;\n"); buf.append("\n"); buf.append("public class E1 {\n"); - buf.append(" @SuppressWarnings(\"unchecked\")\n"); + buf.append(" @SuppressWarnings(\"raw\")\n"); buf.append(" public void foo(List list) {\n"); buf.append(" }\n"); buf.append("}\n");