6990379: two examples fail under CheckExamples on Windows

Thu, 07 Oct 2010 15:26:32 -0700

author
jjg
date
Thu, 07 Oct 2010 15:26:32 -0700
changeset 708
c8b4a1e76089
parent 707
33603a5fa84d
child 709
5b5d965900b8

6990379: two examples fail under CheckExamples on Windows
Reviewed-by: darcy

test/tools/javac/diags/CheckExamples.java file | annotate | diff | comparison | revisions
test/tools/javac/diags/FileManager.java file | annotate | diff | comparison | revisions
     1.1 --- a/test/tools/javac/diags/CheckExamples.java	Tue Oct 05 17:37:31 2010 -0700
     1.2 +++ b/test/tools/javac/diags/CheckExamples.java	Thu Oct 07 15:26:32 2010 -0700
     1.3 @@ -40,7 +40,7 @@
     1.4   *      compiler.properties bundle. A list of exceptions may be given in the
     1.5   *      not-yet.txt file. Entries on the not-yet.txt list should not be
     1.6   *      covered by examples.
     1.7 - * When new keys are added to the resource buncle, it is strongly recommended
     1.8 + * When new keys are added to the resource bundle, it is strongly recommended
     1.9   * that corresponding new examples be added here, if at all practical, instead
    1.10   * of simply and lazily being added to the not-yet.txt list.
    1.11   */
     2.1 --- a/test/tools/javac/diags/FileManager.java	Tue Oct 05 17:37:31 2010 -0700
     2.2 +++ b/test/tools/javac/diags/FileManager.java	Thu Oct 07 15:26:32 2010 -0700
     2.3 @@ -177,12 +177,14 @@
     2.4          }
     2.5  
     2.6          void checkRead() throws IOException {
     2.7 -            if (cantRead != null && cantRead.matcher(getName()).matches())
     2.8 +            String canonName = getName().replace(File.separatorChar, '/');
     2.9 +            if (cantRead != null && cantRead.matcher(canonName).matches())
    2.10                  throw new IOException("FileManager: Can't read");
    2.11          }
    2.12  
    2.13          void checkWrite() throws IOException {
    2.14 -            if (cantWrite != null && cantWrite.matcher(getName()).matches())
    2.15 +            String canonName = getName().replace(File.separatorChar, '/');
    2.16 +            if (cantWrite != null && cantWrite.matcher(canonName).matches())
    2.17                  throw new IOException("FileManager: Can't write");
    2.18          }
    2.19  

mercurial