rajucomp commented on code in PR #1801:
URL: https://github.com/apache/commons-lang/pull/1801#discussion_r4111539739
##########
src/main/java/org/apache/commons/lang3/time/DateUtils.java:
##########
@@ -221,9 +224,23 @@ private enum ModifyType {
* @throws NullPointerException Thrown if the date is null.
*/
private static Date add(final Date date, final int calendarField, final
int amount) {
- validateDateNotNull(date);
- final Calendar c = Calendar.getInstance();
- c.setTime(date);
+ return add(date, calendarField, amount, null);
Review Comment:
Well, then I would suggest replacing `null` with the default time zone in
that case rather than relying on the `TimeZones` API.
--
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]