Browse Source

HADOOP-1354. Fix a potential NullPointerException in FsShell. Contributed by Hairong.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@538316 13f79535-47bb-0310-9956-ffa450edef68
Doug Cutting 18 years ago
parent
commit
3687a3dddc
2 changed files with 4 additions and 1 deletions
  1. 3 0
      CHANGES.txt
  2. 1 1
      src/java/org/apache/hadoop/fs/FsShell.java

+ 3 - 0
CHANGES.txt

@@ -398,6 +398,9 @@ Branch 0.13 (unreleased changes)
 114. HADOOP-1353.  Fix a potential NullPointerException in namenode.
      (Dhruba Borthakur via cutting)
 
+115. HADOOP-1354.  Fix a potential NullPointerException in FsShell.
+     (Hairong Kuang via cutting)
+
 
 Release 0.12.3 - 2007-04-06
 

+ 1 - 1
src/java/org/apache/hadoop/fs/FsShell.java

@@ -369,7 +369,7 @@ public class FsShell extends ToolBase {
    */
   public void dus(String src) throws IOException {
     Path paths[] = fs.globPaths(new Path(src));
-    if (paths==null && paths.length==0) {
+    if (paths==null || paths.length==0) {
       throw new IOException("dus: No match: " + src);
     }
     for(int i=0; i<paths.length; i++) {