mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-20 11:10:00 +00:00
use Replicable.writeOperation in ReplicationServiceImpl
This commit is contained in:
1 parent
8b195d5fed
commit
59803c533c
1 file changed
+1
-3
+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();
|
||||
|
||||
Reference in new issue
Block a user