You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@twill.apache.org by ch...@apache.org on 2016/01/05 20:21:14 UTC

incubator-twill git commit: (TWILL-160) Don’t create parent directory when getting InputStream from a LocalLocation

Repository: incubator-twill
Updated Branches:
  refs/heads/master 65c730b82 -> b80f9b803


(TWILL-160) Don’t create parent directory when getting InputStream from a LocalLocation

This closes #75 on Github

Signed-off-by: Terence Yim <ch...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-twill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-twill/commit/b80f9b80
Tree: http://git-wip-us.apache.org/repos/asf/incubator-twill/tree/b80f9b80
Diff: http://git-wip-us.apache.org/repos/asf/incubator-twill/diff/b80f9b80

Branch: refs/heads/master
Commit: b80f9b8036b59603f227ba1ae43aa099d5329135
Parents: 65c730b
Author: Terence Yim <ch...@apache.org>
Authored: Mon Jan 4 12:57:18 2016 -0800
Committer: Terence Yim <ch...@apache.org>
Committed: Tue Jan 5 11:21:05 2016 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/twill/filesystem/LocalLocation.java | 4 ----
 1 file changed, 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-twill/blob/b80f9b80/twill-common/src/main/java/org/apache/twill/filesystem/LocalLocation.java
----------------------------------------------------------------------
diff --git a/twill-common/src/main/java/org/apache/twill/filesystem/LocalLocation.java b/twill-common/src/main/java/org/apache/twill/filesystem/LocalLocation.java
index a873545..037f4f9 100644
--- a/twill-common/src/main/java/org/apache/twill/filesystem/LocalLocation.java
+++ b/twill-common/src/main/java/org/apache/twill/filesystem/LocalLocation.java
@@ -70,10 +70,6 @@ final class LocalLocation implements Location {
    */
   @Override
   public InputStream getInputStream() throws IOException {
-    File parent = file.getParentFile();
-    if (!parent.exists()) {
-      parent.mkdirs();
-    }
     return new FileInputStream(file);
   }