File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
main/java/org/springframework/util
test/java/org/springframework/util Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 2727 * @author Rob Harrop
2828 * @author Juergen Hoeller
2929 * @since 2.5.3
30+ * @deprecated as of Spring Framework 5.0, in favor of native NIO API usage
3031 */
32+ @ Deprecated
3133public abstract class FileSystemUtils {
3234
3335 /**
@@ -60,7 +62,8 @@ public static boolean deleteRecursively(@Nullable File root) {
6062 * @throws IOException in the case of I/O errors
6163 */
6264 public static void copyRecursively (@ Nullable File src , File dest ) throws IOException {
63- Assert .isTrue (src != null && (src .isDirectory () || src .isFile ()), "Source File must denote a directory or file" );
65+ Assert .isTrue (src != null && (src .isDirectory () || src .isFile ()),
66+ "Source File must denote a directory or file" );
6467 Assert .notNull (dest , "Destination File must not be null" );
6568 doCopyRecursively (src , dest );
6669 }
@@ -88,9 +91,7 @@ else if (src.isFile()) {
8891 dest .createNewFile ();
8992 }
9093 catch (IOException ex ) {
91- IOException ioex = new IOException ("Failed to create file: " + dest );
92- ioex .initCause (ex );
93- throw ioex ;
94+ throw new IOException ("Failed to create file: " + dest , ex );
9495 }
9596 FileCopyUtils .copy (src , dest );
9697 }
Original file line number Diff line number Diff line change 11/*
2- * Copyright 2002-2015 the original author or authors.
2+ * Copyright 2002-2017 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
2626/**
2727 * @author Rob Harrop
2828 */
29+ @ Deprecated
2930public class FileSystemUtilsTests {
3031
3132 @ Test
You can’t perform that action at this time.
0 commit comments