Stopwatch.stop() returns self, take advantage of that to shorted
the code to compute the formatting string. Also drop toString()
call, as it is implied by string concat.
Change-Id: I4fa645e42fc38b5f9f0775d986fd17aa693725b1
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
endCurrentLogRecoveryBatch();
}
endCurrentLogRecoveryBatch();
}
- String recoveryTime = "";
+ final String recoveryTime;
if (recoveryTimer != null) {
if (recoveryTimer != null) {
- recoveryTimer.stop();
- recoveryTime = " in " + recoveryTimer.toString();
+ recoveryTime = " in " + recoveryTimer.stop();
+ } else {
+ recoveryTime = "";
}
log.info("{}: Recovery completed {} - Switching actor to Follower - last log index = {}, last log term = {}, "
}
log.info("{}: Recovery completed {} - Switching actor to Follower - last log index = {}, last log term = {}, "