jdk/src/share/classes/java/time/format/DateTimeParseContext.java
changeset 21639 39da287ca867
parent 21296 de1c1faa6f77
child 23573 f42dcef4fb7f
equal deleted inserted replaced
21638:d51c48db93d8 21639:39da287ca867
   367      */
   367      */
   368     void setParsed(Chronology chrono) {
   368     void setParsed(Chronology chrono) {
   369         Objects.requireNonNull(chrono, "chrono");
   369         Objects.requireNonNull(chrono, "chrono");
   370         currentParsed().chrono = chrono;
   370         currentParsed().chrono = chrono;
   371         if (chronoListeners != null && !chronoListeners.isEmpty()) {
   371         if (chronoListeners != null && !chronoListeners.isEmpty()) {
   372             Consumer[] tmp = new Consumer[1];
   372             @SuppressWarnings({"rawtypes", "unchecked"})
       
   373             Consumer<Chronology>[] tmp = new Consumer[1];
   373             Consumer<Chronology>[] listeners = chronoListeners.toArray(tmp);
   374             Consumer<Chronology>[] listeners = chronoListeners.toArray(tmp);
   374             chronoListeners.clear();
   375             chronoListeners.clear();
   375             for (Consumer<Chronology> l : listeners) {
   376             for (Consumer<Chronology> l : listeners) {
   376                 l.accept(chrono);
   377                 l.accept(chrono);
   377             }
   378             }