alhudz opened a new pull request, #1777: URL: https://github.com/apache/commons-lang/pull/1777
`StopWatch.formatSplitTime()` feeds the split `Duration` through `DurationUtils.toMillisInt`, which clamps the millisecond value into `int` range. A split longer than `Integer.MAX_VALUE` ms (about 24.86 days) is capped, so `formatDurationHMS` renders the cap rather than the real elapsed time. Backdating the start by 30 days and calling `split()` gives `formatSplitTime()` = `596:31:23.647` while `getSplitDuration()` is `PT720H` (`720:00:00.008`). `formatDurationHMS` already takes a `long`, and the sibling `formatTime()` hands it `getTime()` with no narrowing, so route the split path through `DurationUtils.toMillisLong` instead. Keeping the value a `long` up to the formatter is what drops the truncation, and normal-length splits are unchanged. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
