dropwizard/dropwizard — pull request #569 by arteam (2014-05-10 21:35:59+00:00)
Title: Refactor Duration and Size a bit

Hi. I don't know if refactoring pull-requests are considering for merging, but I'm making a try. If they are not, then it could be a good point for starting a discussion or review.

It's a little refactoring of Duration and Size util classes. Just adding simplicity and reducing overhead.
Changes:
* Initialize suffixes at one shot
* Delegate whitespace handling to the regex
* Remove redundant checking on unit type from the regex
* Derive count and unit from the regex matching result
* Add tests to wrong data units