syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [41/53] [abbrv] syncope git commit: [SYNCOPE-625] Replaced java.nio for Java 6
Date Mon, 05 Jan 2015 13:34:46 GMT
[SYNCOPE-625] Replaced java.nio for Java 6


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/069b56f9
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/069b56f9
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/069b56f9

Branch: refs/heads/2_0_X
Commit: 069b56f92aee2cfc79c326993ac8bf894bb07b04
Parents: fde8f4d
Author: Marco Di Sabatino Di Diodoro <mdisabatino@apache.org>
Authored: Mon Jan 5 11:07:36 2015 +0100
Committer: Marco Di Sabatino Di Diodoro <mdisabatino@apache.org>
Committed: Mon Jan 5 11:07:36 2015 +0100

----------------------------------------------------------------------
 .../syncope/installer/utilities/FileSystemUtils.java      | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/069b56f9/installer/src/main/java/org/apache/syncope/installer/utilities/FileSystemUtils.java
----------------------------------------------------------------------
diff --git a/installer/src/main/java/org/apache/syncope/installer/utilities/FileSystemUtils.java
b/installer/src/main/java/org/apache/syncope/installer/utilities/FileSystemUtils.java
index 4381c1e..7e9f7b8 100644
--- a/installer/src/main/java/org/apache/syncope/installer/utilities/FileSystemUtils.java
+++ b/installer/src/main/java/org/apache/syncope/installer/utilities/FileSystemUtils.java
@@ -30,10 +30,6 @@ import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.net.URL;
-import java.nio.file.CopyOption;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.nio.file.StandardCopyOption;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Transformer;
 import javax.xml.transform.TransformerException;
@@ -61,11 +57,7 @@ public class FileSystemUtils {
 
     public void copyFile(final String sourceFilePath, final String targetFilePath) {
         try {
-            final CopyOption[] options = new CopyOption[] {
-                StandardCopyOption.REPLACE_EXISTING,
-                StandardCopyOption.COPY_ATTRIBUTES
-            };
-            Files.copy(Paths.get(sourceFilePath), Paths.get(targetFilePath), options);
+            FileUtils.copyFile(new File(sourceFilePath), new File(targetFilePath));
         } catch (final IOException ex) {
             final String errorMessage =
                     "Error copy file " + sourceFilePath + " to " + targetFilePath;


Mime
View raw message