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

CLDR-17313 st: only build supplemental factory once #3454

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

srl295
Copy link
Member

@srl295 srl295 commented Jan 17, 2024

the supplemental disk factory should be a singleton. also. use the Suppliers.memoize() idiom in more places.

Because it's a singleton, getSupplementalDiskFactory() is now cheap to call.

Note: ✅ Sanity tested locally.

CLDR-17313

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

the supplemental disk factory should be a singleton. also. use the Suppliers.memoize() idiom in more places.
@srl295 srl295 self-assigned this Jan 17, 2024
@srl295 srl295 marked this pull request as ready for review January 17, 2024 20:39
@srl295 srl295 requested review from btangmu and macchiati January 17, 2024 20:39
@srl295 srl295 merged commit 09e7333 into unicode-org:main Jan 18, 2024
10 checks passed
@srl295 srl295 deleted the cldr-17313/per-locale-disk-cache branch January 18, 2024 00:57
() -> {
final File[] list = getFileBases();
CLDRConfig config = CLDRConfig.getInstance();
// may fail at server startup time- should do this through setup mode
Copy link
Member

Choose a reason for hiding this comment

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

"may fail at server startup time" -- if so, what will happen?

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'll actually explain to the user that the survey tool isn't configured yet and invite hem to Edit cldr.properties.

Copy link
Member

Choose a reason for hiding this comment

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

so it would only be expected to fail if cldr.properties isn't properly configured yet? if so, the comment could be less alarming if it spelled that out...

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