LocaleDisplayNames not tested well


Some of the tests are in class TestLocaleNamePackaging which is in project icu4j-packaging-tests which appears to not be run normally. I don't see a readme that says why not.

Move the code testing LocaleDisplayNames into the icu4j-core-tests project. (Probably rename it to TestLocaleDisplayNames.)

LastResortLocaleDisplayNames is not tested at all. It is a private class nested in LocaleDisplayNames. Probably easiest to make it a separate public class in the impl package. Then write simple coverage tests. If we wanted to also reach the call sites of its constructors, we would have to do something like check for a special bogus locale ID; in that case, the LastResort... class could stay where it is.


Fredrik Roubert
September 6, 2019, 10:12 AM

The primary concern of this ticket, that TestLocaleNamePackaging was failing, has been addressed. The updated test expectations will be included in the ICU4J 65.1 release and all existing locale display names tests now pass.

The secondary concern, that locale display names currently are poorly tested and ought to be better tested, has been superseded by the realization (ICU TC meetings 2019/01/30, 2019/04/03 and 2019/04/24) that our primary problem with locale display names at the moment is that they are inconsistent, both between ICU4C and ICU4J and between different APIs within ICU4C and ICU4J respectively.

has been assigned to make resource bundle fallback consistent. Until that has been resolved, there is limited value in adding more testing of locale display names. Closing this ticket for the ICU4J 65.1 release.

Steven R. Loomis
April 17, 2019, 5:48 PM

could add the command to run this from the ant build by editing here

Victor Chang
April 9, 2019, 11:30 AM

Fredrik, as in ICU-20501, sounds like you are continuing your work in this bug

Victor Chang
February 11, 2019, 1:26 PM

I can take a look since it's related to Android

June 30, 2018, 11:39 PM
Trac Comment 5 by —2017-11-22T11:19:25.437Z

This didn't make it into 60.1, did it?

Your pinned fields
Click on the next to a field label to start pinning.


Fredrik Roubert


Markus Scherer




Victor Chang



Time Needed


Fix versions