src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/LSInputListImpl.java
changeset 47359 e1a6c0168741
parent 47216 71c04702a3d5
child 48409 5ab69533994b
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/LSInputListImpl.java	Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/util/LSInputListImpl.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,10 +21,9 @@
 
 package com.sun.org.apache.xerces.internal.impl.xs.util;
 
+import com.sun.org.apache.xerces.internal.xs.LSInputList;
 import java.lang.reflect.Array;
 import java.util.AbstractList;
-
-import com.sun.org.apache.xerces.internal.xs.LSInputList;
 import org.w3c.dom.ls.LSInput;
 
 /**
@@ -35,7 +34,8 @@
  * @author Michael Glavassevich, IBM
  *
  */
-public final class LSInputListImpl extends AbstractList implements LSInputList {
+@SuppressWarnings("unchecked") // method <T>toArray(T[])
+public final class LSInputListImpl extends AbstractList<LSInput> implements LSInputList {
 
     /**
      * An immutable empty list.
@@ -86,7 +86,7 @@
      * List methods
      */
 
-    public Object get(int index) {
+    public LSInput get(int index) {
         if (index >= 0 && index < fLength) {
             return fArray[index];
         }
@@ -105,8 +105,8 @@
 
     public Object[] toArray(Object[] a) {
         if (a.length < fLength) {
-            Class arrayClass = a.getClass();
-            Class componentType = arrayClass.getComponentType();
+            Class<?> arrayClass = a.getClass();
+            Class<?> componentType = arrayClass.getComponentType();
             a = (Object[]) Array.newInstance(componentType, fLength);
         }
         toArray0(a);