mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Watchdog: Fix potential IllegalFormatException (#1508)
If an epoch name contains a % symbol, this could've lead to an exception at runtime where the number of arguments mismatches the format string.
This commit is contained in:
@@ -155,7 +155,7 @@ public class Watchdog implements Closeable, Comparable<Watchdog> {
|
||||
if (now - m_lastEpochsPrintTime > kMinPrintPeriod) {
|
||||
m_lastEpochsPrintTime = now;
|
||||
m_epochs.forEach((key, value) -> {
|
||||
System.out.format("\t" + key + ": %.6fs\n", value / 1.0e6);
|
||||
System.out.format("\t%s: %.6fs\n", key, value / 1.0e6);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user