Author: edwardyoon
Date: Wed May 23 09:38:12 2012
New Revision: 1341808
URL: http://svn.apache.org/viewvc?rev=1341808&view=rev
Log:
Fix ClassCastException bug in compareTo() method.
Modified:
incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexWritable.java
Modified:
incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexWritable.java
URL:
http://svn.apache.org/viewvc/incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexWritable.java?rev=1341808&r1=1341807&r2=1341808&view=diff
==============================================================================
---
incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexWritable.java
(original)
+++
incubator/hama/trunk/graph/src/main/java/org/apache/hama/graph/VertexWritable.java
Wed May 23 09:38:12 2012
@@ -144,8 +144,8 @@ public class VertexWritable<VERTEX_ID, V
@Override
public int compareTo(VertexWritable<VERTEX_ID, VERTEX_VALUE> o) {
VertexWritable<VERTEX_ID, VERTEX_VALUE> that = o;
- return ((Comparable<VertexWritable<VERTEX_ID, VERTEX_VALUE>>)
this.vertexId)
- .compareTo((VertexWritable<VERTEX_ID, VERTEX_VALUE>) that.vertexId);
+ return ((Comparable<VERTEX_ID>) this.vertexId)
+ .compareTo((VERTEX_ID) that.vertexId);
}
@Override