提交 32fc82cd 编写于 作者: D dxu

8027155: test/java/io/File/NulFile.java failing when test run in othervm mode

Reviewed-by: mchung, alanb
上级 319aa601
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
*/ */
/* @test /* @test
* @bug 8003992 * @bug 8003992 8027155
* @summary Test a file whose path name is embedded with NUL character, and * @summary Test a file whose path name is embedded with NUL character, and
* ensure it is handled correctly. * ensure it is handled correctly.
* @author Dan Xu * @author Dan Xu
...@@ -613,7 +613,7 @@ public class NulFile { ...@@ -613,7 +613,7 @@ public class NulFile {
File.createTempFile(prefix, suffix, directory); File.createTempFile(prefix, suffix, directory);
} catch (IOException ex) { } catch (IOException ex) {
String err = "Unable to create temporary file"; String err = "Unable to create temporary file";
if (err.equals(ex.getMessage())) if (ex.getMessage() != null && ex.getMessage().startsWith(err))
exceptionThrown = true; exceptionThrown = true;
else { else {
throw new RuntimeException("Get IOException with message, " throw new RuntimeException("Get IOException with message, "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册