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 176430 Details for
Bug 321115
Compiler is not case sensitive with package names
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Same patch with several regression tests
patch.txt (text/plain), 14.39 KB, created by
Srikanth Sankaran
on 2010-08-11 23:07:59 EDT
(
hide
)
Description:
Same patch with several regression tests
Filename:
MIME Type:
Creator:
Srikanth Sankaran
Created:
2010-08-11 23:07:59 EDT
Size:
14.39 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java,v >retrieving revision 1.56 >diff -u -r1.56 ClasspathDirectory.java >--- batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java 7 Jan 2010 20:18:49 -0000 1.56 >+++ batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java 12 Aug 2010 03:03:19 -0000 >@@ -115,6 +115,13 @@ > if (binaryExists) { > try { > ClassFileReader reader = ClassFileReader.read(this.path + qualifiedBinaryFileName); >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=321115, package names are to be treated case sensitive. >+ String typeSearched = qualifiedPackageName.length() > 0 ? >+ qualifiedPackageName.replace(File.separatorChar, '/') + "/" + fileName //$NON-NLS-1$ >+ : fileName; >+ if (!CharOperation.equals(reader.getName(), typeSearched.toCharArray())) { >+ reader = null; >+ } > if (reader != null) > return new NameEnvironmentAnswer( > reader, >#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.208 >diff -u -r1.208 BatchCompilerTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 1 Jun 2010 15:23:24 -0000 1.208 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 12 Aug 2010 03:05:46 -0000 >@@ -3109,6 +3109,7 @@ > this.runConformTest( > new String[] { > "p/Y.java", >+ "package p;\n" + > "public class Y { public static final String S = \"\"; }", > }, > "\"" + OUTPUT_DIR + File.separator + "p" + File.separator + "Y.java\"" >@@ -11410,4 +11411,358 @@ > "", > true); > } >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=321115 >+public void test0307(){ >+ final String javaClassspath = System.getProperty("java.class.path"); >+ final String javaUserDir = System.getProperty("user.dir"); >+ try { >+ System.setProperty("user.dir", OUTPUT_DIR); >+ this.runConformTest( >+ new String[] { >+ "p/Y.java", >+ "package p;\n" + >+ "public class Y { public class I {}; }", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "p" + File.separator + "Y.java\"" >+ + " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", >+ "", >+ "", >+ true); >+ System.setProperty("java.class.path", ""); >+ this.runConformTest( >+ new String[] { >+ "X.java", >+ "import p.Y.I;\n" + >+ "public class X {\n" + >+ " I i;\n" + >+ " public static void main(String[] args) {\n" + >+ " System.out.print(\"\");\n" + >+ " }\n" + >+ "}", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "X.java\"" >+ + " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", >+ "",// this is not the runtime output >+ "no classpath defined, using default directory instead\n", >+ false); >+ final String userDir = System.getProperty("user.dir"); >+ File f = new File(userDir, "X.java"); >+ if (!Util.delete(f)) { >+ System.out.println("Could not delete X"); >+ } >+ f = new File(userDir, "p" + File.separator + "Y.java"); >+ if (!Util.delete(f)) { >+ System.out.println("Could not delete Y"); >+ } >+ >+ } finally { >+ System.setProperty("java.class.path", javaClassspath); >+ System.setProperty("user.dir", javaUserDir); >+ } >+} >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=321115 >+public void test0307a(){ >+ final String javaClassspath = System.getProperty("java.class.path"); >+ final String javaUserDir = System.getProperty("user.dir"); >+ try { >+ System.setProperty("user.dir", OUTPUT_DIR); >+ this.runConformTest( >+ new String[] { >+ "P/Y.java", >+ "package P;\n" + >+ "public class Y { public class I {}; }", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "P" + File.separator + "Y.java\"" >+ + " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", >+ "", >+ "", >+ true); >+ System.setProperty("java.class.path", ""); >+ this.runNegativeTest( >+ new String[] { >+ "X.java", >+ "import p.Y.I;\n" + >+ "public class X {\n" + >+ " I i;\n" + >+ " public static void main(String[] args) {\n" + >+ " System.out.print(\"\");\n" + >+ " }\n" + >+ "}", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "X.java\"" >+ + " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", >+ "",// this is not the runtime output >+ "no classpath defined, using default directory instead\n" + >+ "----------\n" + >+ "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 1)\n" + >+ " import p.Y.I;\n" + >+ " ^^^\n" + >+ "The import p.Y cannot be resolved\n" + >+ "----------\n" + >+ "2. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 3)\n" + >+ " I i;\n" + >+ " ^\n" + >+ "I cannot be resolved to a type\n" + >+ "----------\n" + >+ "2 problems (2 errors)", >+ false); >+ final String userDir = System.getProperty("user.dir"); >+ File f = new File(userDir, "X.java"); >+ if (!Util.delete(f)) { >+ System.out.println("Could not delete X"); >+ } >+ f = new File(userDir, "p" + File.separator + "Y.java"); >+ if (!Util.delete(f)) { >+ System.out.println("Could not delete Y"); >+ } >+ >+ } finally { >+ System.setProperty("java.class.path", javaClassspath); >+ System.setProperty("user.dir", javaUserDir); >+ } >+} >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=321115 >+public void test0307b(){ >+ final String javaClassspath = System.getProperty("java.class.path"); >+ final String javaUserDir = System.getProperty("user.dir"); >+ try { >+ System.setProperty("user.dir", OUTPUT_DIR); >+ this.runConformTest( >+ new String[] { >+ "p/y.java", >+ "package p;\n" + >+ "public class y { public class I {}; }", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "p" + File.separator + "y.java\"" >+ + " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", >+ "", >+ "", >+ true); >+ System.setProperty("java.class.path", ""); >+ this.runNegativeTest( >+ new String[] { >+ "X.java", >+ "import p.Y.I;\n" + >+ "public class X {\n" + >+ " I i;\n" + >+ " public static void main(String[] args) {\n" + >+ " System.out.print(\"\");\n" + >+ " }\n" + >+ "}", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "X.java\"" >+ + " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", >+ "",// this is not the runtime output >+ "no classpath defined, using default directory instead\n" + >+ "----------\n" + >+ "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 1)\n" + >+ " import p.Y.I;\n" + >+ " ^^^\n" + >+ "The import p.Y cannot be resolved\n" + >+ "----------\n" + >+ "2. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 3)\n" + >+ " I i;\n" + >+ " ^\n" + >+ "I cannot be resolved to a type\n" + >+ "----------\n" + >+ "2 problems (2 errors)", >+ false); >+ final String userDir = System.getProperty("user.dir"); >+ File f = new File(userDir, "X.java"); >+ if (!Util.delete(f)) { >+ System.out.println("Could not delete X"); >+ } >+ f = new File(userDir, "p" + File.separator + "Y.java"); >+ if (!Util.delete(f)) { >+ System.out.println("Could not delete Y"); >+ } >+ >+ } finally { >+ System.setProperty("java.class.path", javaClassspath); >+ System.setProperty("user.dir", javaUserDir); >+ } >+} >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=321115 >+public void test0307c(){ >+ final String javaClassspath = System.getProperty("java.class.path"); >+ final String javaUserDir = System.getProperty("user.dir"); >+ try { >+ System.setProperty("user.dir", OUTPUT_DIR); >+ this.runConformTest( >+ new String[] { >+ "p/Y.java", >+ "package p;\n" + >+ "public class Y { public class i {}; }", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "p" + File.separator + "Y.java\"" >+ + " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", >+ "", >+ "", >+ true); >+ System.setProperty("java.class.path", ""); >+ this.runNegativeTest( >+ new String[] { >+ "X.java", >+ "import p.Y.I;\n" + >+ "public class X {\n" + >+ " I i;\n" + >+ " public static void main(String[] args) {\n" + >+ " System.out.print(\"\");\n" + >+ " }\n" + >+ "}", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "X.java\"" >+ + " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", >+ "",// this is not the runtime output >+ "no classpath defined, using default directory instead\n" + >+ "----------\n" + >+ "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 1)\n" + >+ " import p.Y.I;\n" + >+ " ^^^^^\n" + >+ "The import p.Y.I cannot be resolved\n" + >+ "----------\n" + >+ "2. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 3)\n" + >+ " I i;\n" + >+ " ^\n" + >+ "I cannot be resolved to a type\n" + >+ "----------\n" + >+ "2 problems (2 errors)", >+ false); >+ final String userDir = System.getProperty("user.dir"); >+ File f = new File(userDir, "X.java"); >+ if (!Util.delete(f)) { >+ System.out.println("Could not delete X"); >+ } >+ f = new File(userDir, "p" + File.separator + "Y.java"); >+ if (!Util.delete(f)) { >+ System.out.println("Could not delete Y"); >+ } >+ >+ } finally { >+ System.setProperty("java.class.path", javaClassspath); >+ System.setProperty("user.dir", javaUserDir); >+ } >+} >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=321115 >+public void test0307d(){ >+ final String javaClassspath = System.getProperty("java.class.path"); >+ final String javaUserDir = System.getProperty("user.dir"); >+ try { >+ System.setProperty("user.dir", OUTPUT_DIR); >+ this.runConformTest( >+ new String[] { >+ "p/Y.java", >+ "package P;\n" + >+ "public class Y { public class I {}; }", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "p" + File.separator + "Y.java\"" >+ + " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", >+ "", >+ "", >+ true); >+ System.setProperty("java.class.path", ""); >+ this.runNegativeTest( >+ new String[] { >+ "X.java", >+ "import p.Y.I;\n" + >+ "public class X {\n" + >+ " I i;\n" + >+ " public static void main(String[] args) {\n" + >+ " System.out.print(\"\");\n" + >+ " }\n" + >+ "}", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "X.java\"" >+ + " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", >+ "",// this is not the runtime output >+ "no classpath defined, using default directory instead\n" + >+ "----------\n" + >+ "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 1)\n" + >+ " import p.Y.I;\n" + >+ " ^^^\n" + >+ "The import p.Y cannot be resolved\n" + >+ "----------\n" + >+ "2. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 3)\n" + >+ " I i;\n" + >+ " ^\n" + >+ "I cannot be resolved to a type\n" + >+ "----------\n" + >+ "2 problems (2 errors)", >+ false); >+ final String userDir = System.getProperty("user.dir"); >+ File f = new File(userDir, "X.java"); >+ if (!Util.delete(f)) { >+ System.out.println("Could not delete X"); >+ } >+ f = new File(userDir, "p" + File.separator + "Y.java"); >+ if (!Util.delete(f)) { >+ System.out.println("Could not delete Y"); >+ } >+ >+ } finally { >+ System.setProperty("java.class.path", javaClassspath); >+ System.setProperty("user.dir", javaUserDir); >+ } >+} >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=321115 >+public void test0307e(){ >+ final String javaClassspath = System.getProperty("java.class.path"); >+ final String javaUserDir = System.getProperty("user.dir"); >+ try { >+ System.setProperty("user.dir", OUTPUT_DIR); >+ this.runConformTest( >+ new String[] { >+ "p/Y.java", >+ "package P;\n" + >+ "public class Y { public class I {}; }", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "P" + File.separator + "Y.java\"" >+ + " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", >+ "", >+ "", >+ true); >+ System.setProperty("java.class.path", ""); >+ this.runNegativeTest( >+ new String[] { >+ "X.java", >+ "import p.Y.I;\n" + >+ "public class X {\n" + >+ " I i;\n" + >+ " public static void main(String[] args) {\n" + >+ " System.out.print(\"\");\n" + >+ " }\n" + >+ "}", >+ }, >+ "\"" + OUTPUT_DIR + File.separator + "X.java\"" >+ + " -1.5 -g -preserveAllLocals -proceedOnError -referenceInfo ", >+ "",// this is not the runtime output >+ "no classpath defined, using default directory instead\n" + >+ "----------\n" + >+ "1. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 1)\n" + >+ " import p.Y.I;\n" + >+ " ^^^\n" + >+ "The import p.Y cannot be resolved\n" + >+ "----------\n" + >+ "2. ERROR in ---OUTPUT_DIR_PLACEHOLDER---/X.java (at line 3)\n" + >+ " I i;\n" + >+ " ^\n" + >+ "I cannot be resolved to a type\n" + >+ "----------\n" + >+ "2 problems (2 errors)", >+ false); >+ final String userDir = System.getProperty("user.dir"); >+ File f = new File(userDir, "X.java"); >+ if (!Util.delete(f)) { >+ System.out.println("Could not delete X"); >+ } >+ f = new File(userDir, "p" + File.separator + "Y.java"); >+ if (!Util.delete(f)) { >+ System.out.println("Could not delete Y"); >+ } >+ >+ } finally { >+ System.setProperty("java.class.path", javaClassspath); >+ System.setProperty("user.dir", javaUserDir); >+ } >+} > }
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 321115
:
175395
|
175400
|
176214
|
176298
|
176382
| 176430