We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efe0b17 commit 7be3682Copy full SHA for 7be3682
wpilibNewCommands/src/main/java/edu/wpi/first/wpilibj2/command/Command.java
@@ -418,7 +418,7 @@ public ParallelRaceGroup repeatedly(int repetitions) {
418
// use an array so that it stays in the heap instead of stack.
419
// We use an array with a size of 1 instead of `AtomicInteger` because of the performance
420
// overhead
421
- int[] counter = new int[1];
+ int[] counter = {0};
422
return this.finallyDo(() -> counter[0]++).repeatedly().until(() -> counter[0] >= repetitions);
423
}
424
0 commit comments