Permalink
Browse files

Simplify equals implementation, rely on List.equals to compare the ve…

…rsions instead of doing it manually.
  • Loading branch information...
1 parent 50af077 commit 302ec1469f670c23766587d06d0f47992c02cbea @ijuma ijuma committed Apr 5, 2009
Showing with 1 addition and 6 deletions.
  1. +1 −6 src/java/voldemort/versioning/VectorClock.java
@@ -206,12 +206,7 @@ public boolean equals(Object object) {
if(!object.getClass().equals(VectorClock.class))
return false;
VectorClock clock = (VectorClock) object;
- if(clock.versions.size() != versions.size())
- return false;
- for(int i = 0; i < versions.size(); i++)
- if(!versions.get(i).equals(clock.versions.get(i)))
- return false;
- return true;
+ return versions.equals(clock.versions);
}
@Override

0 comments on commit 302ec14

Please sign in to comment.