Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 147814 Details for
Bug 290034
Effects of @SuppressWarnings("unchecked") are broader in Eclipse than in javac
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix + updated regression tests
patch_290034.txt (text/plain), 5.50 KB, created by
Olivier Thomann
on 2009-09-22 14:03:26 EDT
(
hide
)
Description:
Proposed fix + updated regression tests
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2009-09-22 14:03:26 EDT
Size:
5.50 KB
patch
obsolete
>### 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 18:05:55 -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 18:05:55 -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/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 18:05:59 -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<String, Class> classes = new HashMap<String, Class>();\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<T extends Comparable<? super T>> implements Comparator<T> {\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<Object>();\n" + > " }\n" +
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 290034
:
147814
|
147827
|
147902