From 32fc82cdcf4b947592dbad660a0cab2e76f742b6 Mon Sep 17 00:00:00 2001 From: dxu Date: Thu, 31 Oct 2013 11:52:30 -0700 Subject: [PATCH] 8027155: test/java/io/File/NulFile.java failing when test run in othervm mode Reviewed-by: mchung, alanb --- test/java/io/File/NulFile.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/java/io/File/NulFile.java b/test/java/io/File/NulFile.java index 4b83d6479..b61b1d875 100644 --- a/test/java/io/File/NulFile.java +++ b/test/java/io/File/NulFile.java @@ -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 @@ public class NulFile { 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, " -- GitLab