changeset 6926:f0beafc94c59

6990379: two examples fail under CheckExamples on Windows Reviewed-by: darcy
author jjg
date Thu, 07 Oct 2010 15:26:32 -0700
parents 2196feb18c96
children 5bc46d9ca5b9
files langtools/test/tools/javac/diags/CheckExamples.java langtools/test/tools/javac/diags/FileManager.java
diffstat 2 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/langtools/test/tools/javac/diags/CheckExamples.java	Tue Oct 05 17:37:31 2010 -0700
+++ b/langtools/test/tools/javac/diags/CheckExamples.java	Thu Oct 07 15:26:32 2010 -0700
@@ -40,7 +40,7 @@
  *      compiler.properties bundle. A list of exceptions may be given in the
  *      not-yet.txt file. Entries on the not-yet.txt list should not be
  *      covered by examples.
- * When new keys are added to the resource buncle, it is strongly recommended
+ * When new keys are added to the resource bundle, it is strongly recommended
  * that corresponding new examples be added here, if at all practical, instead
  * of simply and lazily being added to the not-yet.txt list.
  */
--- a/langtools/test/tools/javac/diags/FileManager.java	Tue Oct 05 17:37:31 2010 -0700
+++ b/langtools/test/tools/javac/diags/FileManager.java	Thu Oct 07 15:26:32 2010 -0700
@@ -177,12 +177,14 @@
         }
 
         void checkRead() throws IOException {
-            if (cantRead != null && cantRead.matcher(getName()).matches())
+            String canonName = getName().replace(File.separatorChar, '/');
+            if (cantRead != null && cantRead.matcher(canonName).matches())
                 throw new IOException("FileManager: Can't read");
         }
 
         void checkWrite() throws IOException {
-            if (cantWrite != null && cantWrite.matcher(getName()).matches())
+            String canonName = getName().replace(File.separatorChar, '/');
+            if (cantWrite != null && cantWrite.matcher(canonName).matches())
                 throw new IOException("FileManager: Can't write");
         }