diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 705b8a9afff..5600cdc6a58 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1178,6 +1178,9 @@ Release 2.1.0-beta - 2013-07-02 HDFS-4951. FsShell commands using secure httpfs throw exceptions due to missing TokenRenewer. (rknater via tucu) + HDFS-4969. WebhdfsFileSystem expects non-standard WEBHDFS Json element. + (rkanter via tucu) + Release 2.0.5-alpha - 06/06/2013 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/JsonUtil.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/JsonUtil.java index 623ac892225..3afc59b1d9b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/JsonUtil.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/web/JsonUtil.java @@ -248,7 +248,9 @@ public static HdfsFileStatus toFileStatus(final Map json, boolean includes final short replication = (short) (long) (Long) m.get("replication"); final long fileId = m.containsKey("fileId") ? (Long) m.get("fileId") : INodeId.GRANDFATHER_INODE_ID; - final int childrenNum = (int) (long) (Long) m.get("childrenNum"); + Long childrenNumLong = (Long) m.get("childrenNum"); + final int childrenNum = (childrenNumLong == null) ? 0 + : childrenNumLong.intValue(); return new HdfsFileStatus(len, type == PathType.DIRECTORY, replication, blockSize, mTime, aTime, permission, owner, group, symlink, DFSUtil.string2Bytes(localName), fileId, childrenNum);