Replace SimpleDateFormat with Joda Time to Improve Performance #30

Merged
merged 1 commit into from Sep 22, 2015

Projects

None yet

3 participants

@asaph
Contributor
asaph commented Sep 18, 2015

The poor performance of java.text.SimpleDateFormat is well documented. Currently, every instantiation of UriTemplate creates an instance of SimpleDateFormat, whether it's needed or not. This pull request replaces the functionality of SimpleDateFormat with analogous functionality from Joda-Time which improves performance.

Note: A couple of methods and one field that exposed DateFormat and SimpleDateFormat, and that were part of this library's public interface, were marked as deprecated. I thought it better that the library shouldn't expose the details of its date formatting implementation. Incidentally, the deprecated methods didn't have test coverage (which this PR also adds). The deprecated items should be kept around until the next major version in order to maintain backwards compatibility with existing clients.

@damnhandy damnhandy added this to the Future milestone Sep 20, 2015
@damnhandy damnhandy merged commit fcead60 into damnhandy:master Sep 22, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@damnhandy damnhandy modified the milestone: 2.1, Future Sep 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment