Permalink
Browse files

bug caused by refactoring fixed

  • Loading branch information...
1 parent 059201e commit c959df8562f15da60c64bb7c05296a151f818c0e Maysam Yabandeh committed May 25, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/main/java/com/yahoo/omid/tso/messages/CommitResponse.java
@@ -104,8 +104,9 @@ public void writeObject(DataOutputStream aOutputStream) throws IOException {
aOutputStream.writeLong(commitTimestamp);
//serialize the rows with ww conflict
//some items in rowsWithWriteWriteConflict might be null, so write as much as exist
- aOutputStream.writeInt(rowsWithWriteWriteConflict.size());
- for (int i = 0; i < rowsWithWriteWriteConflict.size(); i++)
+ int size = rowsWithWriteWriteConflict == null ? 0 : rowsWithWriteWriteConflict.size();
+ aOutputStream.writeInt(size);
+ for (int i = 0; i < size; i++)
rowsWithWriteWriteConflict.get(i).writeObject(aOutputStream);
}
}

0 comments on commit c959df8

Please sign in to comment.