mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8263202: Update Hebrew/Indonesian/Yiddish ISO 639 language codes to current
Reviewed-by: joehw
This commit is contained in:
parent
9c346a1ec7
commit
a4c46e1e4f
35 changed files with 345 additions and 146 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -27,6 +27,7 @@ package java.util.spi;
|
|||
|
||||
import jdk.internal.access.JavaUtilResourceBundleAccess;
|
||||
import jdk.internal.access.SharedSecrets;
|
||||
import sun.util.resources.Bundles;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -187,6 +188,17 @@ public abstract class AbstractResourceBundleProvider implements ResourceBundlePr
|
|||
public ResourceBundle getBundle(String baseName, Locale locale) {
|
||||
Module module = this.getClass().getModule();
|
||||
String bundleName = toBundleName(baseName, locale);
|
||||
var bundle = getBundle0(module, bundleName);
|
||||
if (bundle == null) {
|
||||
var otherBundleName = Bundles.toOtherBundleName(baseName, bundleName, locale);
|
||||
if (!bundleName.equals(otherBundleName)) {
|
||||
bundle = getBundle0(module, Bundles.toOtherBundleName(baseName, bundleName, locale));
|
||||
}
|
||||
}
|
||||
return bundle;
|
||||
}
|
||||
|
||||
private ResourceBundle getBundle0(Module module, String bundleName) {
|
||||
ResourceBundle bundle = null;
|
||||
|
||||
for (String format : formats) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue