jdk/test/java/io/File/NulFile.java
changeset 21426 65335399143c
parent 18807 7d65f90d7348
child 25223 4d33af5975a5
--- a/jdk/test/java/io/File/NulFile.java	Tue Oct 29 12:45:18 2013 -0400
+++ b/jdk/test/java/io/File/NulFile.java	Thu Oct 31 11:52:30 2013 -0700
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 8003992
+ * @bug 8003992 8027155
  * @summary Test a file whose path name is embedded with NUL character, and
  *          ensure it is handled correctly.
  * @author Dan Xu
@@ -613,7 +613,7 @@
                 File.createTempFile(prefix, suffix, directory);
             } catch (IOException ex) {
                 String err = "Unable to create temporary file";
-                if (err.equals(ex.getMessage()))
+                if (ex.getMessage() != null && ex.getMessage().startsWith(err))
                     exceptionThrown = true;
                 else {
                     throw new RuntimeException("Get IOException with message, "