Ref: add more PMD rule: bestpractices.xml/OneDeclarationPerLine
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user