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 123483 Details for
Bug 261323
[1.5][compiler] Static import shown as unused when class field is an annotation value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Test patch for 3.4 maintenance branch
patch.txt (text/plain), 1.99 KB, created by
Srikanth Sankaran
on 2009-01-23 01:28:35 EST
(
hide
)
Description:
Test patch for 3.4 maintenance branch
Filename:
MIME Type:
Creator:
Srikanth Sankaran
Created:
2009-01-23 01:28:35 EST
Size:
1.99 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#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.183.2.2 >diff -u -r1.183.2.2 AnnotationTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 23 Oct 2008 07:14:39 -0000 1.183.2.2 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java 23 Jan 2009 06:25:57 -0000 >@@ -70,6 +70,37 @@ > reportMissingJavadocComments = null; > } > >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=261323. >+ // Test to make sure that the use of a static import as an annotation value counts as a use >+ // (and consequently that there is no unused static import warning) >+ public void test261323() { >+ Map customOptions = getCompilerOptions(); >+ >+ customOptions.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.ERROR); >+ customOptions.put(CompilerOptions.OPTION_SuppressWarnings, CompilerOptions.ENABLED); >+ customOptions.put(CompilerOptions.OPTION_ReportUnusedWarningToken, CompilerOptions.ERROR); >+ >+ runNegativeTest( >+ true, >+ new String[] { >+ "com/SomeTest.java", >+ "package com;\n" + >+ "import static com.SomeTest.UNCHECKED;\n" + >+ "@SuppressWarnings(UNCHECKED)\n" + >+ "public class SomeTest {\n" + >+ " public static final String UNCHECKED = \"unchecked\";\n" + >+ "}\n" >+ }, >+ null, customOptions, >+ "----------\n" + >+ "1. ERROR in com\\SomeTest.java (at line 3)\n" + >+ " @SuppressWarnings(UNCHECKED)\n" + >+ " ^^^^^^^^^\n" + >+ "Unnecessary @SuppressWarnings(\"unchecked\")\n" + >+ "----------\n", >+ JavacTestOptions.Excuse.EclipseWarningConfiguredAsError); >+ } >+ > public void test001() { > this.runConformTest( > new String[] {
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 261323
:
122783
|
123481
| 123483