jdk/test/java/io/File/NulFile.java
changeset 18807 7d65f90d7348
parent 18157 ee3bda8e26c6
child 21426 65335399143c
equal deleted inserted replaced
18806:c094f5a236ba 18807:7d65f90d7348
   610             }
   610             }
   611         } else {
   611         } else {
   612             try {
   612             try {
   613                 File.createTempFile(prefix, suffix, directory);
   613                 File.createTempFile(prefix, suffix, directory);
   614             } catch (IOException ex) {
   614             } catch (IOException ex) {
   615                 if (ExceptionMsg.equals(ex.getMessage()))
   615                 String err = "Unable to create temporary file";
       
   616                 if (err.equals(ex.getMessage()))
   616                     exceptionThrown = true;
   617                     exceptionThrown = true;
       
   618                 else {
       
   619                     throw new RuntimeException("Get IOException with message, "
       
   620                             + ex.getMessage() + ", expect message, "+ err);
       
   621                 }
   617             }
   622             }
   618         }
   623         }
   619         if (!exceptionThrown) {
   624         if (!exceptionThrown) {
   620             throw new RuntimeException("createTempFile() should throw"
   625             throw new RuntimeException("createTempFile() should throw"
   621                     + (shortPrefix ? " IllegalArgumentException"
   626                     + (shortPrefix ? " IllegalArgumentException"