src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOM.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOM.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/opti/SchemaDOM.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,14 +21,14 @@
package com.sun.org.apache.xerces.internal.impl.xs.opti;
-import java.util.ArrayList;
-import java.util.Enumeration;
-
import com.sun.org.apache.xerces.internal.util.XMLSymbols;
import com.sun.org.apache.xerces.internal.xni.NamespaceContext;
import com.sun.org.apache.xerces.internal.xni.QName;
import com.sun.org.apache.xerces.internal.xni.XMLAttributes;
import com.sun.org.apache.xerces.internal.xni.XMLString;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
import org.w3c.dom.Attr;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Element;
@@ -366,7 +366,7 @@
// for other namespaces so that we can also include them.
// optimized for simplicity and the case that not many
// namespaces are declared on this annotation...
- ArrayList namespaces = new ArrayList();
+ List<String> namespaces = new ArrayList<>();
for (int i = 0; i < attributes.getLength(); ++i) {
String aValue = attributes.getValue(i);
String aPrefix = attributes.getPrefix(i);
@@ -380,9 +380,9 @@
}
// now we have to look through currently in-scope namespaces to see what
// wasn't declared here
- Enumeration currPrefixes = namespaceContext.getAllPrefixes();
+ Enumeration<String> currPrefixes = namespaceContext.getAllPrefixes();
while(currPrefixes.hasMoreElements()) {
- String prefix = (String)currPrefixes.nextElement();
+ String prefix = currPrefixes.nextElement();
String uri = namespaceContext.getURI(prefix);
if (uri == null) {
uri = XMLSymbols.EMPTY_STRING;