Ver Fonte

HADOOP-8949. Remove FileUtil.CygPathCommand dead code. Contributed by Chris Nauroth.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-trunk-win@1404872 13f79535-47bb-0310-9956-ffa450edef68
Suresh Srinivas há 12 anos atrás
pai
commit
7f02122300

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.branch-trunk-win.txt

@@ -28,3 +28,6 @@ branch-trunk-win changes - unreleased
 
   HADOOP-8961. GenericOptionsParser URI parsing failure on Windows.
   (Ivan Mitic via suresh)
+
+  HADOOP-8949. Remove FileUtil.CygPathCommand dead code. (Chris Nauroth via 
+  suresh)

+ 0 - 28
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileUtil.java

@@ -412,34 +412,6 @@ public class FileUtil {
     return dst;
   }
 
-  /**
-   * This class is only used on windows to invoke the cygpath command.
-   */
-  private static class CygPathCommand extends Shell {
-    String[] command;
-    String result;
-    CygPathCommand(String path) throws IOException {
-      command = new String[]{"cygpath", "-u", path};
-      run();
-    }
-    String getResult() throws IOException {
-      return result;
-    }
-    @Override
-    protected String[] getExecString() {
-      return command;
-    }
-    @Override
-    protected void parseExecResult(BufferedReader lines) throws IOException {
-      String line = lines.readLine();
-      if (line == null) {
-        throw new IOException("Can't convert '" + command[2] + 
-                              " to a cygwin path");
-      }
-      result = line;
-    }
-  }
-
   /**
    * Convert a os-native filename to a path that works for the shell.
    * @param filename The filename to convert