use Replicable.writeOperation in ReplicationServiceImpl

This commit is contained in:
Axel Uhl committed 2014-11-14 13:06:08 +01:00
1 parent 8b195d5fed
commit 59803c533c
1 file changed
+1 -3
@@ -342,9 +342,7 @@ public class ReplicationServiceImpl implements ReplicationService {
// need to write the operations one by one, making sure the ObjectOutputStream always writes
// identical objects again if required because they may have changed state in between
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(operation);
oos.close();
replicable.writeOperation(operation, bos, /* close stream */ true);
final byte[] serializedOperation = bos.toByteArray();
synchronized (outboundBufferMonitor) {
final String replicaIdAsString = replicable.getId().toString();