From: Steven R. Loomis Date: Thu, 1 Apr 2021 17:55:54 +0000 (-0500) Subject: ICU-21568 Pre-initialize CLDRConfig and SupplementalDataInfo X-Git-Tag: cldr/2021-06-15~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2dce62892b6b00df02195a35ca09ebd8e082e80f;p=icu ICU-21568 Pre-initialize CLDRConfig and SupplementalDataInfo - avoid static init problem from CLDR-14636 --- diff --git a/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/ant/ConvertIcuDataTask.java b/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/ant/ConvertIcuDataTask.java index d3e9f74db92..046b188fa7c 100644 --- a/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/ant/ConvertIcuDataTask.java +++ b/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/ant/ConvertIcuDataTask.java @@ -30,6 +30,7 @@ import org.apache.tools.ant.Task; import org.unicode.cldr.api.CldrDataSupplier; import org.unicode.cldr.api.CldrDraftStatus; import org.unicode.cldr.api.CldrPath; +import org.unicode.cldr.util.CLDRConfig; import org.unicode.icu.tool.cldrtoicu.AlternateLocaleData; import org.unicode.icu.tool.cldrtoicu.IcuConverterConfig; import org.unicode.icu.tool.cldrtoicu.LdmlConverter; @@ -305,6 +306,10 @@ public final class ConvertIcuDataTask extends Task { @SuppressWarnings("unused") public void execute() throws BuildException { + // Spin up CLDRConfig outside of other inner loops, to + // avoid static init problems seen in CLDR-14636 + CLDRConfig.getInstance().getSupplementalDataInfo(); + checkBuild(localeIds != null, " must be specified"); CldrDataSupplier src = CldrDataSupplier