diff --git a/java/com.sap.sse.operationaltransformation.test/src/com/sap/sse/operationaltransformation/test/OperationalTransformationTest.java b/java/com.sap.sse.operationaltransformation.test/src/com/sap/sse/operationaltransformation/test/OperationalTransformationTest.java index b6da96b44bd..797eaaa953a 100755 --- a/java/com.sap.sse.operationaltransformation.test/src/com/sap/sse/operationaltransformation/test/OperationalTransformationTest.java +++ b/java/com.sap.sse.operationaltransformation.test/src/com/sap/sse/operationaltransformation/test/OperationalTransformationTest.java @@ -53,9 +53,9 @@ public class OperationalTransformationTest { } } - public static class StringInsertTransformer implements Transformer { + public static class StringInsertTransformer implements Transformer { @Override - public ClientServerOperationPair transform(StringInsertOperation clientOp, StringInsertOperation serverOp) { + public ClientServerOperationPair transform(StringInsertOperation clientOp, StringInsertOperation serverOp) { final StringInsertOperation resultClientOp; final StringInsertOperation resultServerOp; if (clientOp == null || serverOp == null) { @@ -68,7 +68,7 @@ public class OperationalTransformationTest { resultClientOp = clientOp; resultServerOp = new StringInsertOperation(serverOp.getPos()+clientOp.getS().length(), serverOp.getS()); } - return new ClientServerOperationPair(resultClientOp, resultServerOp); + return new ClientServerOperationPair(resultClientOp, resultServerOp); } } diff --git a/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/ClientServerOperationPair.java b/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/ClientServerOperationPair.java index e3cb158947a..fa9182835ac 100755 --- a/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/ClientServerOperationPair.java +++ b/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/ClientServerOperationPair.java @@ -1,6 +1,6 @@ package com.sap.sse.operationaltransformation; -public class ClientServerOperationPair> { +public class ClientServerOperationPair> { private O clientOp; private O serverOp; diff --git a/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/OperationalTransformer.java b/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/OperationalTransformer.java index 74099633359..8544c96b594 100755 --- a/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/OperationalTransformer.java +++ b/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/OperationalTransformer.java @@ -9,10 +9,10 @@ package com.sap.sse.operationaltransformation; * @param * @param */ -public class OperationalTransformer> implements Transformer { +public class OperationalTransformer> implements Transformer { @Override - public ClientServerOperationPair transform(O clientOp, O serverOp) { - ClientServerOperationPair result = new ClientServerOperationPair( + public ClientServerOperationPair transform(O clientOp, O serverOp) { + ClientServerOperationPair result = new ClientServerOperationPair( clientOp == null ? null : clientOp.transformClientOp(serverOp), serverOp == null ? null : serverOp.transformServerOp(clientOp)); return result; diff --git a/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/PeerImpl.java b/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/PeerImpl.java index 715dcc0a432..d5211d5ff27 100755 --- a/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/PeerImpl.java +++ b/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/PeerImpl.java @@ -53,21 +53,21 @@ public class PeerImpl, S> implements Peer { */ private final Map, Integer> numberOfMergedOperations = new HashMap, Integer>(); - private final Transformer transformer; + private final Transformer transformer; /** * The background task handler which sends out the asynchronous updates to the peers. */ private final ExecutorService merger; - public PeerImpl(Transformer transformer, S initialState, Role role) { + public PeerImpl(Transformer transformer, S initialState, Role role) { this.transformer = transformer; currentState = initialState; this.role = role; this.merger = Executors.newSingleThreadExecutor(); } - public PeerImpl(String name, Transformer transformer, S initialState, Role role) { + public PeerImpl(String name, Transformer transformer, S initialState, Role role) { this(transformer, initialState, role); this.name = name; } @@ -77,7 +77,7 @@ public class PeerImpl, S> implements Peer { * the two-way link between client and server peers. The initial state is taken from * the server. */ - public PeerImpl(Transformer transformer, Peer server) { + public PeerImpl(Transformer transformer, Peer server) { this.transformer = transformer; S initialState = server.addPeer(this); currentState = initialState; @@ -91,7 +91,7 @@ public class PeerImpl, S> implements Peer { * server peer, establishing the two-way link between client and * server peers. The initial state is taken from the server. */ - public PeerImpl(String name, Transformer transformer, Peer server) { + public PeerImpl(String name, Transformer transformer, Peer server) { this(transformer, server); this.name = name; } @@ -101,7 +101,7 @@ public class PeerImpl, S> implements Peer { merger.shutdown(); } - private Transformer getTransformer() { + private Transformer getTransformer() { return transformer; } @@ -154,7 +154,7 @@ public class PeerImpl, S> implements Peer { for (O unconfirmedOperation : unmergedOperationsForSource .getUnmergedOperations(numberOfOperationsSourceHasMergedFromThis)) { if (role == Role.SERVER) { - final ClientServerOperationPair pair; + final ClientServerOperationPair pair; if (transformedOp == null || unconfirmedOperation == null) { pair = new ClientServerOperationPair<>(transformedOp, unconfirmedOperation); } else { @@ -163,7 +163,7 @@ public class PeerImpl, S> implements Peer { transformedOp = pair.getClientOp(); unmergedOperationsForSource.updateWithTransformed(localOpNumber, pair.getServerOp()); } else { - final ClientServerOperationPair pair; + final ClientServerOperationPair pair; if (transformedOp == null || unconfirmedOperation == null) { pair = new ClientServerOperationPair<>(unconfirmedOperation, transformedOp); } else { diff --git a/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/Transformer.java b/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/Transformer.java index 764345898ec..331de2502b8 100755 --- a/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/Transformer.java +++ b/java/com.sap.sse.operationaltransformation/src/com/sap/sse/operationaltransformation/Transformer.java @@ -1,6 +1,6 @@ package com.sap.sse.operationaltransformation; -public interface Transformer> { +public interface Transformer> { /** * Takes an operation from the client and an operation from the server, both based on the same state. The * complementary pair of operations is computed such that if the client applies the server operation returned, and @@ -15,5 +15,5 @@ public interface Transformer> { * @param serverOp * operation that was executed on the SERVER; never called with null */ - ClientServerOperationPair transform(O clientOp, O serverOp); + ClientServerOperationPair transform(O clientOp, O serverOp); }