hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r420772 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/fs/Path.java src/test/org/apache/hadoop/fs/TestPath.java
Date Tue, 11 Jul 2006 09:25:41 GMT
Author: cutting
Date: Tue Jul 11 02:25:40 2006
New Revision: 420772

URL: http://svn.apache.org/viewvc?rev=420772&view=rev
Log:
HADOOP-358.  Fix a NPE in Path.equals().  Contributed by Frédéric Bertin.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/Path.java
    lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestPath.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=420772&r1=420771&r2=420772&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Tue Jul 11 02:25:40 2006
@@ -18,6 +18,9 @@
     API fixes, making reduce optional, and adding an input type for
     StreamSequenceRecordReader.  (Michel Tourn via cutting)
 
+ 5. HADOOP-358.  Fix a NPE bug in Path.equals().
+    (Frédéric Bertin via cutting)
+
 
 Release 0.4.0 - 2006-06-28
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/Path.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/Path.java?rev=420772&r1=420771&r2=420772&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/Path.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/fs/Path.java Tue Jul 11 02:25:40 2006
@@ -156,7 +156,7 @@
     return
       this.isAbsolute == that.isAbsolute &&
       Arrays.equals(this.elements, that.elements) &&
-      this.drive == null ? true : this.drive.equals(that.drive);
+      (this.drive == null ? true : this.drive.equals(that.drive));
   }
 
   public int hashCode() {

Modified: lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestPath.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestPath.java?rev=420772&r1=420771&r2=420772&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestPath.java (original)
+++ lucene/hadoop/trunk/src/test/org/apache/hadoop/fs/TestPath.java Tue Jul 11 02:25:40 2006
@@ -93,5 +93,9 @@
       assertEquals(new Path("c:/foo"), new Path("d:/bar", "c:/foo"));
     }
   }
+  
+  public void testEquals() {
+    assertFalse(new Path("/").equals(new Path("/foo")));
+  }
 
 }



Mime
View raw message