Skip to content

Commit b9a5019

Browse files
committed
Revert r919684 - not binary compatible
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@919995 13f79535-47bb-0310-9956-ffa450edef68
1 parent ef821e8 commit b9a5019

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/java/org/apache/commons/io/FileUtils.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -560,15 +560,14 @@ public static URL[] toURLs(File[] files) throws IOException {
560560
*
561561
* @param srcFile an existing file to copy, must not be <code>null</code>
562562
* @param destDir the directory to place the copy in, must not be <code>null</code>
563-
* @return the new file
564563
*
565564
* @throws NullPointerException if source or destination is null
566565
* @throws IOException if source or destination is invalid
567566
* @throws IOException if an IO error occurs during copying
568567
* @see #copyFile(File, File, boolean)
569568
*/
570-
public static File copyFileToDirectory(File srcFile, File destDir) throws IOException {
571-
return copyFileToDirectory(srcFile, destDir, true);
569+
public static void copyFileToDirectory(File srcFile, File destDir) throws IOException {
570+
copyFileToDirectory(srcFile, destDir, true);
572571
}
573572

574573
/**
@@ -583,15 +582,14 @@ public static File copyFileToDirectory(File srcFile, File destDir) throws IOExce
583582
* @param destDir the directory to place the copy in, must not be <code>null</code>
584583
* @param preserveFileDate true if the file date of the copy
585584
* should be the same as the original
586-
* @return the new file
587585
*
588586
* @throws NullPointerException if source or destination is <code>null</code>
589587
* @throws IOException if source or destination is invalid
590588
* @throws IOException if an IO error occurs during copying
591589
* @see #copyFile(File, File, boolean)
592590
* @since Commons IO 1.3
593591
*/
594-
public static File copyFileToDirectory(File srcFile, File destDir, boolean preserveFileDate) throws IOException {
592+
public static void copyFileToDirectory(File srcFile, File destDir, boolean preserveFileDate) throws IOException {
595593
if (destDir == null) {
596594
throw new NullPointerException("Destination must not be null");
597595
}
@@ -600,7 +598,6 @@ public static File copyFileToDirectory(File srcFile, File destDir, boolean prese
600598
}
601599
File destFile = new File(destDir, srcFile.getName());
602600
copyFile(srcFile, destFile, preserveFileDate);
603-
return destFile;
604601
}
605602

606603
/**

0 commit comments

Comments
 (0)