changeset 9710:8a7d9cc2f41c

8023430: Replace File.mkdirs with Files.createDirectories to get MaxPathLength.java failure details Reviewed-by: alanb
author dxu
date Thu, 22 Aug 2013 11:43:18 -0700
parents b7c4094be729
children 2281a7f79738
files test/ProblemList.txt test/java/io/File/MaxPathLength.java
diffstat 2 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/test/ProblemList.txt	Thu Aug 22 09:40:36 2013 -0700
+++ b/test/ProblemList.txt	Thu Aug 22 11:43:18 2013 -0700
@@ -208,7 +208,7 @@
 # jdk_io
 
 # 7160013
-java/io/File/MaxPathLength.java                                 windows-all
+#java/io/File/MaxPathLength.java                                 windows-all
 
 ############################################################################
 
--- a/test/java/io/File/MaxPathLength.java	Thu Aug 22 09:40:36 2013 -0700
+++ b/test/java/io/File/MaxPathLength.java	Thu Aug 22 11:43:18 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
  */
 
 import java.io.*;
+import java.nio.file.Files;
 
 public class MaxPathLength {
     private static String sep = File.separator;
@@ -87,10 +88,8 @@
             System.err.println("Warning: Test directory structure exists already!");
             return;
         }
-        boolean couldMakeTestDirectory = dirFile.mkdirs();
-        if (!couldMakeTestDirectory) {
-            throw new RuntimeException ("Could not create test directory structure");
-        }
+        Files.createDirectories(dirFile.toPath());
+
         try {
             if (tryAbsolute)
                 dirFile = new File(dirFile.getCanonicalPath());