[
https://issues.apache.org/jira/browse/LANG-1637?focusedWorklogId=530415&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-530415
]
ASF GitHub Bot logged work on LANG-1637:
----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Jan/21 14:10
Start Date: 03/Jan/21 14:10
Worklog Time Spent: 10m
Work Description: michael-o commented on a change in pull request #688:
URL: https://github.com/apache/commons-lang/pull/688#discussion_r551010819
##########
File path: src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
##########
@@ -1118,7 +1118,7 @@ public void appendTo(final Appendable buffer, final
Calendar calendar) throws IO
*/
@Override
public final void appendTo(final Appendable buffer, final int value)
throws IOException {
- appendDigits(buffer, value);
+ appendDigits(buffer, value % 100);
Review comment:
I think here:
https://issues.apache.org/jira/browse/LANG-1637?focusedCommentId=17257625&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17257625
and this method must throw IAE `if (value >= 100)`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 530415)
Time Spent: 4h 20m (was: 4h 10m)
> FastDatePrinter formatting using YY pattern yields junk digits
> --------------------------------------------------------------
>
> Key: LANG-1637
> URL: https://issues.apache.org/jira/browse/LANG-1637
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 3.11
> Reporter: Uri Gonen
> Priority: Minor
> Time Spent: 4h 20m
> Remaining Estimate: 0h
>
> {code:java}
> final GregorianCalendar cal = new GregorianCalendar(2020, 12, 31, 0, 0, 0);
> final DatePrinter printer2Digits = getInstance("YY");
> assertEquals("21", printer2Digits.format(cal));
> {code}
> the above test fails
--
This message was sent by Atlassian Jira
(v8.3.4#803005)