hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject svn commit: r1079130 - in /hadoop/common/branches/yahoo-merge: CHANGES.txt src/java/org/apache/hadoop/fs/FileStatus.java
Date Tue, 08 Mar 2011 04:38:03 GMT
Author: omalley
Date: Tue Mar  8 04:38:02 2011
New Revision: 1079130

URL: http://svn.apache.org/viewvc?rev=1079130&view=rev
Log:
commit d6e31875ab8888814e3776038943c0cade74b912
Author: Eli Collins <eli@apache.org>
Date:   Mon Nov 15 05:05:42 2010 +0000

    HADOOP-7032. Assert type constraints in the FileStatus constructor. Contributed by Eli
Collins
    
    
    git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1035147 13f79535-47bb-0310-9956-ffa450edef68

Modified:
    hadoop/common/branches/yahoo-merge/CHANGES.txt
    hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FileStatus.java

Modified: hadoop/common/branches/yahoo-merge/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/CHANGES.txt?rev=1079130&r1=1079129&r2=1079130&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/CHANGES.txt (original)
+++ hadoop/common/branches/yahoo-merge/CHANGES.txt Tue Mar  8 04:38:02 2011
@@ -180,6 +180,8 @@ Trunk (unreleased changes)
 
     HADOOP-7034. Add TestPath tests to cover dot, dot dot, and slash normalization. (eli)
 
+    HADOOP-7032. Assert type constraints in the FileStatus constructor. (eli)
+
   OPTIMIZATIONS
 
     HADOOP-6884. Add LOG.isDebugEnabled() guard for each LOG.debug(..).

Modified: hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FileStatus.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FileStatus.java?rev=1079130&r1=1079129&r2=1079130&view=diff
==============================================================================
--- hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FileStatus.java (original)
+++ hadoop/common/branches/yahoo-merge/src/java/org/apache/hadoop/fs/FileStatus.java Tue Mar
 8 04:38:02 2011
@@ -85,6 +85,11 @@ public class FileStatus implements Writa
     this.group = (group == null) ? "" : group;
     this.symlink = symlink;
     this.path = path;
+    // The variables isdir and symlink indicate the type:
+    // 1. isdir implies directory, in which case symlink must be null.
+    // 2. !isdir implies a file or symlink, symlink != null implies a
+    //    symlink, otherwise it's a file.
+    assert (isdir && symlink == null) || !isdir;
   }
 
   /**



Mime
View raw message