Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,13 @@ public void filter_removesEmptyPackagesTypesAndEntries() throws Exception {
public void resourcesLocaleConversions_oldLanguageCodes() {
// This documents that our converter will use old ISO-639 language codes for backward
// compatibility.
// Since Java SE 17, this is no longer the case.

assertThat(ResourcesUtils.convertLocaleToLanguage("he")).isEqualTo("iw");
assertThat(ResourcesUtils.convertLocaleToLanguage("yi")).isEqualTo("ji");
assertThat(ResourcesUtils.convertLocaleToLanguage("id")).isEqualTo("in");
if (System.getProperty("java.version").compareTo("17") < 0) {
assertThat(ResourcesUtils.convertLocaleToLanguage("he")).isEqualTo("iw");
assertThat(ResourcesUtils.convertLocaleToLanguage("yi")).isEqualTo("ji");
assertThat(ResourcesUtils.convertLocaleToLanguage("id")).isEqualTo("in");
}
}

@Test
Expand Down