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 34009 Details for
Bug 114456
@SuppressWarnings for access restriction
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Test case (using BatchCompilerTest)
patch.txt (text/plain), 4.94 KB, created by
Maxime Daniel
on 2006-02-02 06:58:43 EST
(
hide
)
Description:
Test case (using BatchCompilerTest)
Filename:
MIME Type:
Creator:
Maxime Daniel
Created:
2006-02-02 06:58:43 EST
Size:
4.94 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java,v >retrieving revision 1.40 >diff -u -r1.40 BatchCompilerTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 1 Feb 2006 14:02:17 -0000 1.40 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 2 Feb 2006 11:42:58 -0000 >@@ -2456,7 +2456,7 @@ > } > > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=124533 >-// turn off discouraged references warnings >+// turn off forbidden references warnings > public void test042(){ > this.runConformTest( > new String[] { >@@ -2506,7 +2506,7 @@ > } > > // https://bugs.eclipse.org/bugs/show_bug.cgi?id=124533 >-// turn off discouraged references warnings >+// turn off discouraged and forbidden references warnings > public void test043(){ > this.runConformTest( > new String[] { >@@ -2598,7 +2598,125 @@ > "", true); > } > >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=114456 >+// turn off discouraged and forbidden references warnings using SuppressWarnings all >+public void test046(){ >+ this.runConformTest( >+ new String[] { >+ "p/X.java", >+ "package p;\n" + >+ "/** */\n" + >+ "public class X {\n" + >+ "}", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "p" + File.separator + "X.java\"" >+ + " -1.5 -g -preserveAllLocals" >+ + " -nowarn" >+ + " -proceedOnError -referenceInfo -d \"" + OUTPUT_DIR + "\"", >+ "", >+ "", >+ true); >+ this.runConformTest( >+ new String[] { >+ "Y.java", >+ "/** */\n" + >+ "@SuppressWarnings(\"all\")\n" + >+ "public class Y {\n" + >+ " p.X x;\n" + >+ "}", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "Y.java\"" >+ + " -1.5 -g -preserveAllLocals" >+ + " -cp \"" + OUTPUT_DIR + "[~p/X" + File.pathSeparator + "-p/*]\"" >+ + " -warn:+discouraged,forbidden,deprecation,syntheticAccess,uselessTypeCheck,unsafe,finalBound,unusedLocal" >+ + " -proceedOnError -referenceInfo -d \"" + OUTPUT_DIR + "\"", >+ "", >+ "", >+ false); >+} >+ >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=114456 >+// turn off discouraged and forbidden references warnings using SuppressWarnings restriction >+public void test047(){ >+ this.runConformTest( >+ new String[] { >+ "p/X.java", >+ "package p;\n" + >+ "/** */\n" + >+ "public class X {\n" + >+ "}", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "p" + File.separator + "X.java\"" >+ + " -1.5 -g -preserveAllLocals" >+ + " -nowarn" >+ + " -proceedOnError -referenceInfo -d \"" + OUTPUT_DIR + "\"", >+ "", >+ "", >+ true); >+ this.runConformTest( >+ new String[] { >+ "Y.java", >+ "/** */\n" + >+ "@SuppressWarnings(\"restriction\")\n" + >+ "public class Y {\n" + >+ " p.X x;\n" + >+ "}", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "Y.java\"" >+ + " -1.5 -g -preserveAllLocals" >+ + " -cp \"" + OUTPUT_DIR + "[~p/X" + File.pathSeparator + "-p/*]\"" >+ + " -warn:+discouraged,forbidden,deprecation,syntheticAccess,uselessTypeCheck,unsafe,finalBound,unusedLocal" >+ + " -proceedOnError -referenceInfo -d \"" + OUTPUT_DIR + "\"", >+ "", >+ "", >+ false); >+} >+ >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=114456 >+// turn off discouraged and forbidden references warnings using SuppressWarnings >+public void test048(){ >+ this.runConformTest( >+ new String[] { >+ "p/X.java", >+ "package p;\n" + >+ "/** */\n" + >+ "public class X {\n" + >+ "}", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "p" + File.separator + "X.java\"" >+ + " -1.5 -g -preserveAllLocals" >+ + " -nowarn" >+ + " -proceedOnError -referenceInfo -d \"" + OUTPUT_DIR + "\"", >+ "", >+ "", >+ true); >+ this.runConformTest( >+ new String[] { >+ "Y.java", >+ "/** */\n" + >+ "@SuppressWarnings(\"deprecation\")\n" + >+ "public class Y {\n" + >+ " p.X x;\n" + >+ "}", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "Y.java\"" >+ + " -1.5 -g -preserveAllLocals" >+ + " -cp \"" + OUTPUT_DIR + "[~p/X" + File.pathSeparator + "-p/*]\"" >+ + " -warn:+discouraged,forbidden,deprecation,syntheticAccess,uselessTypeCheck,unsafe,finalBound,unusedLocal" >+ + " -proceedOnError -referenceInfo -d \"" + OUTPUT_DIR + "\"", >+ "", >+ "----------\n" + >+ "1. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/Y.java\n" + >+ " (at line 4)\n" + >+ " p.X x;\n" + >+ " ^^^\n" + >+ "Discouraged access: The type X is not accessible due to restriction on classpath entry ---OUTPUT_DIR_PLACEHOLDER---\n" + >+ "----------\n" + >+ "1 problem (1 warning)", >+ false); >+} >+ > public static Class testClass() { > return BatchCompilerTest.class; > } >-} >+} >\ No newline at end of file
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 114456
: 34009