larshelge opened a new pull request, #1612: URL: https://github.com/apache/commons-lang/pull/1612
This PR introduces fluent pattern for `StopWatch`. The goal is to improve readability and maintainability of code using `StopWatch` by creating a sentence-like flow of operations. When using `StopWatch` the code a little verbose with operations on short, separate lines: ``` StopWatch watch = StopWatch.createStarted(); // Do work watch.split(); log.info(watch.toString()); watch.stop(); log.info(watch.toString()); ``` A more fluent, readable and compact format could be: ``` StopWatch watch = StopWatch.createStarted(); // Do work log.info(watch.split().toString()); log.info(watch.stop().toString()); ``` -- 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]
