8027155: test/java/io/File/NulFile.java failing when test run in othervm mode
authordxu
Thu, 31 Oct 2013 11:52:30 -0700
changeset 21426 65335399143c
parent 21425 2d49fa63ac15
child 21427 e4cc509e47b2
8027155: test/java/io/File/NulFile.java failing when test run in othervm mode Reviewed-by: mchung, alanb
jdk/test/java/io/File/NulFile.java
--- 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, "