提交 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 @@
*/
/* @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, "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册