mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Violette Roche-Montane
02.34.2013 062a0efc5af3f00d411ee9032741490a813de51f
opends/src/server/org/opends/server/tools/upgrade/FileManager.java
@@ -40,7 +40,6 @@
import java.io.File;
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.logging.Logger;
@@ -353,7 +352,7 @@
     */
    public void apply() throws IOException
    {
      File objectFile = getObjectFile();
      final File objectFile = getObjectFile();
      if (objectFile.isDirectory())
      {
        if (!destination.exists())
@@ -363,7 +362,6 @@
      }
      else
      {
        // If overwriting and the destination exists then kill it
        if (destination.exists() && overwrite)
        {
@@ -383,7 +381,7 @@
            {
              fis = new FileInputStream(objectFile);
              fos = new FileOutputStream(destination);
              byte[] buf = new byte[1024];
              final byte[] buf = new byte[1024];
              int i;
              while ((i = fis.read(buf)) != -1)
              {
@@ -395,22 +393,21 @@
                // Java 1.6 but until then use the TestUtilities methods
                if (UpgradeUtils.isUnix())
                {
                  FilePermission permissions =
                  final FilePermission permissions =
                      getFileSystemPermissions(objectFile);
                  FilePermission.setPermissions(destination, permissions);
                }
              }
            }
            catch (FileNotFoundException e)
            catch (IOException e)
            {
              throw new IOException(e.getMessage());
              throw e;
            }
            catch (Exception e)
            {
              final Message errMsg = INFO_ERROR_COPYING_FILE.get(
                  objectFile.getAbsolutePath(), destination.getAbsolutePath());
              throw new IOException(errMsg.toString());
              throw new IOException(errMsg.toString(), e);
            }
            finally
            {