ICU-21568 Pre-initialize CLDRConfig and SupplementalDataInfo

- avoid static init problem from CLDR-14636
This commit is contained in:
Steven R. Loomis 2021-04-01 12:55:54 -05:00 committed by Peter Edberg
parent 33ba23402d
commit 2dce62892b

View file

@ -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, "<localeIds> must be specified");
CldrDataSupplier src = CldrDataSupplier