42
42
43
43
import java .security .AccessController ;
44
44
import java .security .PrivilegedAction ;
45
- import java .util .Arrays ;
46
45
import java .util .Iterator ;
47
46
import java .util .List ;
48
47
import java .util .Locale ;
@@ -205,7 +204,7 @@ public OpenListResourceBundle run() {
205
204
});
206
205
}
207
206
208
- private static abstract class LocaleDataResourceBundleProvider
207
+ private abstract static class LocaleDataResourceBundleProvider
209
208
implements ResourceBundleProvider {
210
209
/**
211
210
* Changes baseName to its module dependent package name and
@@ -231,30 +230,30 @@ protected String toOtherBundleName(String baseName, String bundleName, Locale lo
231
230
* A ResourceBundleProvider implementation for loading locale data
232
231
* resource bundles except for the java.time supplementary data.
233
232
*/
234
- public static abstract class CommonResourceBundleProvider extends LocaleDataResourceBundleProvider {
233
+ public abstract static class CommonResourceBundleProvider extends LocaleDataResourceBundleProvider {
235
234
}
236
235
237
236
/**
238
237
* A ResourceBundleProvider implementation for loading supplementary
239
238
* resource bundles for java.time.
240
239
*/
241
- public static abstract class SupplementaryResourceBundleProvider extends LocaleDataResourceBundleProvider {
240
+ public abstract static class SupplementaryResourceBundleProvider extends LocaleDataResourceBundleProvider {
242
241
}
243
242
244
243
// Bundles.Strategy implementations
245
244
246
245
private static class LocaleDataStrategy implements Bundles .Strategy {
247
246
private static final LocaleDataStrategy INSTANCE = new LocaleDataStrategy ();
248
247
// TODO: avoid hard-coded Locales
249
- private static Set <Locale > JAVA_BASE_LOCALES
248
+ private static final Set <Locale > JAVA_BASE_LOCALES
250
249
= Set .of (Locale .ROOT , Locale .ENGLISH , Locale .US , new Locale ("en" , "US" , "POSIX" ));
251
250
252
251
private LocaleDataStrategy () {
253
252
}
254
253
255
254
/*
256
255
* This method overrides the default implementation to search
257
- * from a prebaked locale string list to determin the candidate
256
+ * from a prebaked locale string list to determine the candidate
258
257
* locale list.
259
258
*
260
259
* @param baseName the resource bundle base name.
@@ -325,16 +324,16 @@ private static class SupplementaryStrategy extends LocaleDataStrategy {
325
324
private static final SupplementaryStrategy INSTANCE
326
325
= new SupplementaryStrategy ();
327
326
// TODO: avoid hard-coded Locales
328
- private static Set <Locale > JAVA_BASE_LOCALES
327
+ private static final Set <Locale > JAVA_BASE_LOCALES
329
328
= Set .of (Locale .ROOT , Locale .ENGLISH , Locale .US );
330
329
331
330
private SupplementaryStrategy () {
332
331
}
333
332
334
333
@ Override
335
334
public List <Locale > getCandidateLocales (String baseName , Locale locale ) {
336
- // Specifiy only the given locale
337
- return Arrays . asList (locale );
335
+ // Specify only the given locale
336
+ return List . of (locale );
338
337
}
339
338
340
339
@ Override
0 commit comments