jdk/src/share/classes/java/awt/Dialog.java
changeset 15318 607db339afcc
parent 13652 42544e68dc39
child 16100 379f48d34516
--- a/jdk/src/share/classes/java/awt/Dialog.java	Tue Jan 15 21:57:47 2013 +0400
+++ b/jdk/src/share/classes/java/awt/Dialog.java	Wed Jan 16 17:26:41 2013 +0400
@@ -1047,9 +1047,9 @@
                     // if this dialog is toolkit-modal, the filter should be added
                     // to all EDTs (for all AppContexts)
                     if (modalityType == ModalityType.TOOLKIT_MODAL) {
-                        Iterator it = AppContext.getAppContexts().iterator();
+                        Iterator<AppContext> it = AppContext.getAppContexts().iterator();
                         while (it.hasNext()) {
-                            AppContext appContext = (AppContext)it.next();
+                            AppContext appContext = it.next();
                             if (appContext == showAppContext) {
                                 continue;
                             }
@@ -1084,9 +1084,9 @@
                     // if this dialog is toolkit-modal, its filter must be removed
                     // from all EDTs (for all AppContexts)
                     if (modalityType == ModalityType.TOOLKIT_MODAL) {
-                        Iterator it = AppContext.getAppContexts().iterator();
+                        Iterator<AppContext> it = AppContext.getAppContexts().iterator();
                         while (it.hasNext()) {
-                            AppContext appContext = (AppContext)it.next();
+                            AppContext appContext = it.next();
                             if (appContext == showAppContext) {
                                 continue;
                             }
@@ -1396,7 +1396,7 @@
             if (d.shouldBlock(this)) {
                 Window w = d;
                 while ((w != null) && (w != this)) {
-                    w = (Window)(w.getOwner_NoClientCode());
+                    w = w.getOwner_NoClientCode();
                 }
                 if ((w == this) || !shouldBlock(d) || (modalityType.compareTo(d.getModalityType()) < 0)) {
                     blockers.add(d);
@@ -1611,7 +1611,7 @@
             setModal(modal);
         }
 
-        blockedWindows = new IdentityArrayList();
+        blockedWindows = new IdentityArrayList<>();
     }
 
     /*