commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <>
Subject [jira] Commented: (LANG-383) [PATCH] Adding functionality to DateUtils to allow direct setting of various fields.
Date Mon, 24 Dec 2007 17:35:44 GMT


Gary Gregory commented on LANG-383:

This kind of code seems useful from a high level, kind of like a macro but the impl of the
low-level method makes me think about multi-threaded issues because of the misnamed, IMO,
"Calendar.getInstance()" method. I would at least add in an in-line comment that states that
Calendar c = Calendar.getInstance(); returns a new object, and therefore the method is thread

> [PATCH] Adding functionality to DateUtils to allow direct setting of various fields.
> ------------------------------------------------------------------------------------
>                 Key: LANG-383
>                 URL:
>             Project: Commons Lang
>          Issue Type: Improvement
>    Affects Versions: 2.3
>         Environment: Apple OSX 10.4.11 java 1.5.0_07
>            Reporter: Travis Meisenheimer
>            Priority: Minor
>         Attachments:,
> I'm submitting a patch for commons-lang's DateUtils to add a few methods that make setting
various fields in a Date object a bit cleaner than "normal ways" I've seen it done.  The methods
behave exactly like the add* methods do, except the calendar that is used is set to non-lenient.
> The patch doesn't contain much, just a few trivial methods I always carried around as
an enhancement to commons-lang's DateUtils.  Perhaps someone else will find these useful,
or not.  A patch to the DateUtilsTest is included as well along with output from running the
test and the corresponding test suite.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message