Skip to content

Commit

Permalink
Fixed a concurrency bug in LazyBinaryUtils due to a static field.
Browse files Browse the repository at this point in the history
  • Loading branch information
rxin committed Oct 10, 2012
1 parent 3e7606b commit 17e1c3d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,10 @@ public static int writeVLongToByteArray(byte[] bytes, int offset, long l) {
return 1 + len;
}

private static byte[] vLongBytes = new byte[9];
//private static byte[] vLongBytes = new byte[9];

public static void writeVLong(Output byteStream, long l) {
byte[] vLongBytes = new byte[9];
int len = LazyBinaryUtils.writeVLongToByteArray(vLongBytes, l);
byteStream.write(vLongBytes, 0, len);
}
Expand Down

0 comments on commit 17e1c3d

Please sign in to comment.