Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICU-20558 Fix regression in DateTimePatternGenerator (Backport for 63) #635

Merged

Conversation

jefgen
Copy link
Member

@jefgen jefgen commented Apr 25, 2019

Backporting to ICU 63.

This is manually cherry-picked from commit: 693adf3
See pull-request #632.

This fixes a regression introduced by commit
b12a927 for issue ICU-13778.

The above commit improved the error checking in the
DateTimePatternGenerator class, adding checks for errors/failures
where there previously was none at all. This was done in order to
catch catastrophic errors like out-of-memory (OOM), and properly
report them to the caller, rather than ignoring/hiding these errors.

However, in doing so it exposed a case where the code was depending
on ignoring errors in order to fall-back to the Gregorian calendar
when the default ICU locale is set to root.

This restores the previous behavior, by allowing the error of
U_MISSING_RESOURCE_ERROR to fall-though and continue without
reporting back an error to the caller.

Note: This regression was technically introduced in ICU 63, and
also effects ICU 64 as well.

Checklist

@jefgen jefgen changed the title ICU-20558 Fix regression in DateTimePatternGenerator ICU-20558 Fix regression in DateTimePatternGenerator (Backport for ICU 63) Apr 25, 2019
@jefgen jefgen force-pushed the jefgen/backport-ICU-20558-to-63 branch from 76cd313 to 1deac39 Compare April 25, 2019 18:40
@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@jefgen jefgen changed the title ICU-20558 Fix regression in DateTimePatternGenerator (Backport for ICU 63) ICU-20558 Fix regression in DateTimePatternGenerator (Backport for 63) Apr 25, 2019
Backporting to ICU 63. This is manually cherry-picked from
commit: 693adf3

This fixes a regression introduced by commit
b12a927 for issue ICU-13778.

The above commit improved the error checking in the
DateTimePatternGenerator class, adding checks for errors/failures
where there previously was none at all. This was done in order to
catch catastrophic errors like out-of-memory (OOM), and properly
report them to the caller, rather than ignoring/hiding these errors.

However, in doing so it exposed a case where the code was depending
on ignoring errors in order to fall-back to the Gregorian calendar
when the default ICU locale is set to root.

This restores the previous behavior, by allowing the error of
U_MISSING_RESOURCE_ERROR to fall-though and continue without
reporting back an error to the caller.

Note: This regression was technically introduced in ICU 63, and
also effects ICU 64 as well.
@jefgen jefgen force-pushed the jefgen/backport-ICU-20558-to-63 branch from 1deac39 to 3b42cd4 Compare April 25, 2019 20:55
@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • icu4c/source/test/intltest/dtptngts.cpp is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@srl295 srl295 added the cherry-pick This PR is a cherry-pick of an already-approved-and-merged PR to another branch. label Apr 25, 2019
@jefgen jefgen merged commit 5df4d7d into unicode-org:maint/maint-63 Apr 25, 2019
@jefgen jefgen deleted the jefgen/backport-ICU-20558-to-63 branch April 25, 2019 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick This PR is a cherry-pick of an already-approved-and-merged PR to another branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants