src/share/classes/com/sun/tools/example/debug/bdi/EventRequestSpecList.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -138,50 +138,49 @@
         }
     }
 
     // --------  notify routines --------------------
 
-    @SuppressWarnings("unchecked")
-    private Vector<SpecListener> specListeners() {
-        return (Vector<SpecListener>)runtime.specListeners.clone();
+    private ArrayList<SpecListener> specListeners() {
+        return runtime.specListeners.clone();
     }
 
     void notifySet(EventRequestSpec spec) {
-        Vector<SpecListener> l = specListeners();
+        List<SpecListener> l = specListeners();
         SpecEvent evt = new SpecEvent(spec);
         for (int i = 0; i < l.size(); i++) {
-            spec.notifySet(l.elementAt(i), evt);
+            spec.notifySet(l.get(i), evt);
         }
     }
 
     void notifyDeferred(EventRequestSpec spec) {
-        Vector<SpecListener> l = specListeners();
+        List<SpecListener> l = specListeners();
         SpecEvent evt = new SpecEvent(spec);
         for (int i = 0; i < l.size(); i++) {
-            spec.notifyDeferred(l.elementAt(i), evt);
+            spec.notifyDeferred(l.get(i), evt);
         }
     }
 
     void notifyDeleted(EventRequestSpec spec) {
-        Vector<SpecListener> l = specListeners();
+        List<SpecListener> l = specListeners();
         SpecEvent evt = new SpecEvent(spec);
         for (int i = 0; i < l.size(); i++) {
-            spec.notifyDeleted(l.elementAt(i), evt);
+            spec.notifyDeleted(l.get(i), evt);
         }
     }
 
     void notifyResolved(EventRequestSpec spec) {
-        Vector<SpecListener> l = specListeners();
+        List<SpecListener> l = specListeners();
         SpecEvent evt = new SpecEvent(spec);
         for (int i = 0; i < l.size(); i++) {
-            spec.notifyResolved(l.elementAt(i), evt);
+            spec.notifyResolved(l.get(i), evt);
         }
     }
 
     void notifyError(EventRequestSpec spec, Exception exc) {
-        Vector<SpecListener> l = specListeners();
+        List<SpecListener> l = specListeners();
         SpecErrorEvent evt = new SpecErrorEvent(spec, exc);
         for (int i = 0; i < l.size(); i++) {
-            spec.notifyError(l.elementAt(i), evt);
+            spec.notifyError(l.get(i), evt);
         }
     }
 }