AmarGhugare opened a new pull request, #1888: URL: https://github.com/apache/commons-lang/pull/1888
`StopWatch.start()` is documented as starting a new timing session and clearing any previous values, but it kept the stop `Instant` and nanos from the previous session. After `start(); stop(); reset(); start();`, `getStopInstant()` returned the old stop time while the watch was running, and the deprecated `getStopTime()` returned its epoch milliseconds. A new running watch returns `null` and `0`. `start()` now clears both fields, next to the existing `splits.clear()`. `split()`, `suspend()`, and `stop()` set them as before. Two regression tests cover restarting after `stop()` and after `suspend()` then `stop()`, with a new running watch as the control. They fail on current master (the restarted watch returns the previous stop time) and pass with this change. Validation: the default `mvn` build passed with 118,211 tests, 0 failures, and 29 skipped. That build includes RAT, Javadoc, JaCoCo, Checkstyle, japicmp, SpotBugs, and PMD. -- 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]
