Ref: add more PMD rule: bestpractices.xml/OneDeclarationPerLine

This commit is contained in:
Laurent Clouet
2024-06-06 03:04:34 +02:00
parent fd33b6d666
commit 236a72ec53
4 changed files with 7 additions and 5 deletions
@@ -100,10 +100,9 @@ public class Speedtest {
* @throws Exception
*/
private <T> Pair<Long, T> runTimed(Callable<T> task) throws Exception {
long start, end;
start = System.nanoTime();
long start = System.nanoTime();
T callValue = task.call();
end = System.nanoTime();
long end = System.nanoTime();
return new Pair<>(Duration.ofNanos(end - start).toMillis(), callValue);
}