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-22894 MF2, ICU4J: implements configuring the error handling behavior #3188

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

mihnita
Copy link
Contributor

@mihnita mihnita commented Sep 19, 2024

Implements the decision at unicode-org/message-format-wg#879

Checklist
  • Required: Issue filed: https://unicode-org.atlassian.net/browse/ICU-22894
  • Required: The PR title must be prefixed with a JIRA Issue number.
  • Required: The PR description must include the link to the Jira Issue, for example by completing the URL in the first checklist item
  • Required: Each commit message must be prefixed with a JIRA Issue number.
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable

echeran
echeran previously approved these changes Sep 19, 2024
Copy link
Contributor

@echeran echeran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


// Needs more tests. Ported from the equivalent test in ICU4C
@Test
public void testFormatterAPI() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit (non-blocking, not intended to be acted upon for ICU 76): Ideally, this test would be broken up into 3-4 tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK.

This is in sync with the C++ test.
Would need to refactor both.

But I really expect to replace it completely with .json files from the WG.

Copy link
Contributor

@catamorphism catamorphism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some minor comments about the documentation!

@@ -319,6 +367,26 @@ public Builder setPattern(String pattern) {
return this;
}

/**
* Sets the {@link ErrorHandlingBehavior} to use when encountering errors at formatting time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you refer back to the comment on ErrorHandlingBehavior so as to avoid duplicating this text?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the duplicated paragraph.

The first paragraph already contains a link to ErrorHandlingBehavior which contains more info.

catamorphism
catamorphism previously approved these changes Sep 19, 2024
Copy link
Contributor

@catamorphism catamorphism left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mihnita
Copy link
Contributor Author

mihnita commented Sep 19, 2024

Implemented all, I didn't squash, for visibility.

Thank you both!
M.

Copy link
Contributor

@echeran echeran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mihnita mihnita force-pushed the mihai_mf2_icu4j_errors branch from 25840d6 to fbbbc73 Compare September 19, 2024 22:17
@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

@mihnita mihnita merged commit b3bf9f8 into unicode-org:main Sep 19, 2024
14 checks passed
@mihnita mihnita deleted the mihai_mf2_icu4j_errors branch September 20, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants