|
1 | 1 | /*
|
2 |
| - * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * This code is free software; you can redistribute it and/or modify it
|
|
93 | 93 | import java.time.temporal.TemporalAdjusters;
|
94 | 94 | import java.time.temporal.TemporalField;
|
95 | 95 | import java.time.temporal.ValueRange;
|
96 |
| -import java.util.Comparator; |
97 | 96 | import java.util.HashSet;
|
98 | 97 | import java.util.List;
|
99 | 98 | import java.util.Locale;
|
@@ -193,8 +192,7 @@ private static boolean initCache() {
|
193 | 192 | registerChrono(ThaiBuddhistChronology.INSTANCE);
|
194 | 193 |
|
195 | 194 | // Register Chronologies from the ServiceLoader
|
196 |
| - @SuppressWarnings("rawtypes") |
197 |
| - ServiceLoader<AbstractChronology> loader = ServiceLoader.load(AbstractChronology.class, null); |
| 195 | + ServiceLoader<AbstractChronology> loader = ServiceLoader.load(AbstractChronology.class, null); |
198 | 196 | for (AbstractChronology chrono : loader) {
|
199 | 197 | String id = chrono.getId();
|
200 | 198 | if (id.equals("ISO") || registerChrono(chrono) != null) {
|
@@ -238,7 +236,6 @@ static Chronology ofLocale(Locale locale) {
|
238 | 236 |
|
239 | 237 | // Look for a Chronology using ServiceLoader of the Thread's ContextClassLoader
|
240 | 238 | // Application provided Chronologies must not be cached
|
241 |
| - @SuppressWarnings("rawtypes") |
242 | 239 | ServiceLoader<Chronology> loader = ServiceLoader.load(Chronology.class);
|
243 | 240 | for (Chronology chrono : loader) {
|
244 | 241 | if (type.equals(chrono.getCalendarType())) {
|
@@ -271,7 +268,6 @@ static Chronology of(String id) {
|
271 | 268 |
|
272 | 269 | // Look for a Chronology using ServiceLoader of the Thread's ContextClassLoader
|
273 | 270 | // Application provided Chronologies must not be cached
|
274 |
| - @SuppressWarnings("rawtypes") |
275 | 271 | ServiceLoader<Chronology> loader = ServiceLoader.load(Chronology.class);
|
276 | 272 | for (Chronology chrono : loader) {
|
277 | 273 | if (id.equals(chrono.getId()) || id.equals(chrono.getCalendarType())) {
|
@@ -311,7 +307,6 @@ static Set<Chronology> getAvailableChronologies() {
|
311 | 307 | HashSet<Chronology> chronos = new HashSet<>(CHRONOS_BY_ID.values());
|
312 | 308 |
|
313 | 309 | /// Add in Chronologies from the ServiceLoader configuration
|
314 |
| - @SuppressWarnings("rawtypes") |
315 | 310 | ServiceLoader<Chronology> loader = ServiceLoader.load(Chronology.class);
|
316 | 311 | for (Chronology chrono : loader) {
|
317 | 312 | chronos.add(chrono);
|
|
0 commit comments