diff --git a/test/ProblemList.txt b/test/ProblemList.txt index ab2eac5ecbd0bcf8d83cbfd24117927ddec6d6cf..1f594fe3d3bc9b22de881407fc5b754140af441a 100644 --- a/test/ProblemList.txt +++ b/test/ProblemList.txt @@ -208,7 +208,7 @@ sun/net/www/http/HttpClient/ProxyTest.java generic-all # jdk_io # 7160013 -java/io/File/MaxPathLength.java windows-all +#java/io/File/MaxPathLength.java windows-all ############################################################################ diff --git a/test/java/io/File/MaxPathLength.java b/test/java/io/File/MaxPathLength.java index 4111550bbd2be39d62e87c0ef8f7ca143ede7176..7ec379cf1d1917eca4d9af184e77bb06ddc8e26d 100644 --- a/test/java/io/File/MaxPathLength.java +++ b/test/java/io/File/MaxPathLength.java @@ -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 @@ public class MaxPathLength { 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());