use Lambda syntax for a simple Runnable

This commit is contained in:
Axel Uhl committed 2015-02-05 16:00:23 +01:00
1 parent 1b048d23e0
commit df332aa4ba
1 file changed
+1 -6
@@ -298,12 +298,7 @@ public class ReplicationReceiver implements Runnable {
}
private synchronized <S, O extends OperationWithResult<S, ?>> void apply(final OperationWithResult<S, ?> operation, Replicable<S, O> replicable) {
Runnable runnable = new Runnable() {
@Override
public void run() {
replicable.applyReceivedReplicated(operation);
}
};
Runnable runnable = () -> replicable.applyReceivedReplicated(operation);
if (operation.requiresSynchronousExecution()) {
runnable.run();
} else {