< prev index next >

test/jdk/java/nio/file/Files/CopyAndMove.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2008, 2017, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2008, 2018, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 20,30 **** * or visit www.oracle.com if you need additional information or have any * questions. */ /* @test ! * @bug 4313887 6838333 6917021 7006126 6950237 8006645 * @summary Unit test for java.nio.file.Files copy and move methods (use -Dseed=X to set PRNG seed) * @library .. /test/lib * @build jdk.test.lib.RandomFactory * CopyAndMove PassThroughFileSystem * @run main/othervm CopyAndMove --- 20,30 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ /* @test ! * @bug 4313887 6838333 6917021 7006126 6950237 8006645 8201407 * @summary Unit test for java.nio.file.Files copy and move methods (use -Dseed=X to set PRNG seed) * @library .. /test/lib * @build jdk.test.lib.RandomFactory * CopyAndMove PassThroughFileSystem * @run main/othervm CopyAndMove
*** 446,455 **** --- 446,459 ---- target = getTargetFile(dir2); try { moveAndVerify(source, target); throw new RuntimeException("IOException expected"); } catch (IOException x) { + if (!(x instanceof DirectoryNotEmptyException)) { + throw new RuntimeException + ("DirectoryNotEmptyException expected", x); + } } delete(source.resolve("foo")); delete(source); }
< prev index next >