Skip to content

Miscellaneous character.jsp cleanups #1063

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

Merged
merged 4 commits into from
Mar 15, 2025

Conversation

eggrobin
Copy link
Member

@eggrobin eggrobin requested review from macchiati and markusicu March 14, 2025 22:03
macchiati
macchiati previously approved these changes Mar 14, 2025
Copy link
Member

@macchiati macchiati 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, thanks!

markusicu
markusicu previously approved these changes Mar 14, 2025
: Collections.singleton(getValue(codepoint));
String value = getValue(codepoint);
return isMultivalued && value != null
? delimiterSplitter.split(value)
Copy link
Member

Choose a reason for hiding this comment

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

optional: does this return a Collection? if so, upgrade the return type?

Copy link
Member Author

Choose a reason for hiding this comment

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

It returns an Iterable. This is a Google thing. Its documentation says Java 8 users may prefer {@link #splitToStream} instead.. Do we prefer that?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think I am at least as confused by the Iterable/Collection/Stream situation as you are by C++ iterators…

Copy link
Member

Choose a reason for hiding this comment

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

I think I am at least as confused by the Iterable/Collection/Stream situation as you are by C++ iterators…

I bet I am still more confused ;-)

Copy link
Member

Choose a reason for hiding this comment

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

It returns an Iterable. This is a Google thing. Its documentation says Java 8 users may prefer {@link #splitToStream} instead.. Do we prefer that?

Maybe. For the singleton case, we could then presumably use Stream.of(value)

Copy link
Member

Choose a reason for hiding this comment

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

we could then call this valueStream()

Copy link
Member

Choose a reason for hiding this comment

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

Streams are the preferred form where you normally just want to deal with the contents one at a time. You can always create a iterator from a stream.

Copy link
Member Author

Choose a reason for hiding this comment

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

I’ll do that in a later PR, since it is going to affect other callers.

@eggrobin eggrobin dismissed stale reviews from markusicu and macchiati via c6a737b March 15, 2025 00:31
@eggrobin eggrobin requested a review from markusicu March 15, 2025 01:01
Copy link
Member

@markusicu markusicu left a comment

Choose a reason for hiding this comment

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

teaching each other programming ;-)

@eggrobin eggrobin merged commit 4fced4d into unicode-org:main Mar 15, 2025
15 of 16 checks passed
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