Author: claudio
Date: Fri Nov 25 12:20:52 2011
New Revision: 1206137

URL: http://svn.apache.org/viewvc?rev=1206137&view=rev
Log:
GIRAPH-98: LongDoubleFloatDoubleVertex has possibily the iterator() 
implementation broken

Modified:
    incubator/giraph/trunk/CHANGELOG
    
incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/LongDoubleFloatDoubleVertex.java

Modified: incubator/giraph/trunk/CHANGELOG
URL: 
http://svn.apache.org/viewvc/incubator/giraph/trunk/CHANGELOG?rev=1206137&r1=1206136&r2=1206137&view=diff
==============================================================================
--- incubator/giraph/trunk/CHANGELOG (original)
+++ incubator/giraph/trunk/CHANGELOG Fri Nov 25 12:20:52 2011
@@ -2,6 +2,9 @@ Giraph Change Log
 
 Release 0.70.0 - unreleased
 
+  GIRAPH-90: LongDoubleFloatDoubleVertex has possibily the iterator() 
+  implementation broken (claudio)
+
   GIRAPH-99: Make AdjacencyListVertexReader and its constructor public.
   (Kohei Ozaki via jghoman)
 

Modified: 
incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/LongDoubleFloatDoubleVertex.java
URL: 
http://svn.apache.org/viewvc/incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/LongDoubleFloatDoubleVertex.java?rev=1206137&r1=1206136&r2=1206137&view=diff
==============================================================================
--- 
incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/LongDoubleFloatDoubleVertex.java
 (original)
+++ 
incubator/giraph/trunk/src/main/java/org/apache/giraph/graph/LongDoubleFloatDoubleVertex.java
 Fri Nov 25 12:20:52 2011
@@ -145,7 +145,6 @@ public abstract class LongDoubleFloatDou
     @Override
     public Iterator<LongWritable> iterator() {
         final long[] destVertices = verticesWithEdgeValues.keys().elements();
-        final LongWritable lw = new LongWritable();
         return new Iterator<LongWritable>() {
             int offset = 0;
             @Override public boolean hasNext() {
@@ -153,8 +152,7 @@ public abstract class LongDoubleFloatDou
             }
 
             @Override public LongWritable next() {
-                lw.set(destVertices[offset++]);
-                return lw;
+                return new LongWritable(destVertices[offset++]);
             }
 
             @Override public void remove() {
@@ -246,11 +244,9 @@ public abstract class LongDoubleFloatDou
 
     @Override
     public List<DoubleWritable> getMsgList() {
-        final DoubleWritable message = new DoubleWritable();
         return new AbstractList<DoubleWritable>() {
             @Override public DoubleWritable get(int i) {
-                message.set(messageList.get(i));
-                return message;
+                return new DoubleWritable(messageList.get(i));
             }
             @Override public int size() {
                 return messageList.size();


Reply via email to