src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationListImpl.java
changeset 47359 e1a6c0168741
parent 47216 71c04702a3d5
child 48409 5ab69533994b
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationListImpl.java	Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMImplementationListImpl.java	Wed Oct 18 13:25:49 2017 -0700
@@ -1,6 +1,6 @@
 /*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * @LastModified: Oct 2017
  */
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -21,9 +21,10 @@
 
 package com.sun.org.apache.xerces.internal.dom;
 
-import java.util.Vector;
+import java.util.ArrayList;
+import java.util.List;
+import org.w3c.dom.DOMImplementation;
 import org.w3c.dom.DOMImplementationList;
-import org.w3c.dom.DOMImplementation;
 
 /**
  * <p>This class implements the DOM Level 3 Core interface DOMImplementationList.</p>
@@ -36,19 +37,19 @@
 public class DOMImplementationListImpl implements DOMImplementationList {
 
     //A collection of DOMImplementations
-    private Vector fImplementations;
+    private List<DOMImplementation> fImplementations;
 
     /**
      * Construct an empty list of DOMImplementations
      */
     public DOMImplementationListImpl() {
-        fImplementations = new Vector();
+        fImplementations = new ArrayList<>();
     }
 
     /**
      * Construct an empty list of DOMImplementations
      */
-    public DOMImplementationListImpl(Vector params) {
+    public DOMImplementationListImpl(List<DOMImplementation> params) {
         fImplementations = params;
     }
 
@@ -59,8 +60,8 @@
      */
     public DOMImplementation item(int index) {
         try {
-            return (DOMImplementation) fImplementations.elementAt(index);
-        } catch (ArrayIndexOutOfBoundsException e) {
+            return fImplementations.get(index);
+        } catch (IndexOutOfBoundsException e) {
             return null;
         }
     }