src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationState.java
--- a/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationState.java Tue Sep 05 13:40:14 2017 +0200
+++ b/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/validation/ValidationState.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
@@ -27,6 +27,7 @@
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import java.util.Locale;
/**
@@ -53,7 +54,7 @@
private Locale fLocale = null;
private HashSet<String> fIds;
- private ArrayList<String> fIdRefList;
+ private List<String> fIdRefList;
//
// public methods
@@ -91,15 +92,15 @@
* otherwise return an iterator for all the IDREF values without
* a matching ID value.
*/
- public Iterator checkIDRefID () {
- HashSet missingIDs = null;
+ public Iterator<String> checkIDRefID () {
+ HashSet<String> missingIDs = null;
if (fIdRefList != null) {
String key;
for (int i = 0; i < fIdRefList.size(); i++) {
key = fIdRefList.get(i);
if (fIds == null || !fIds.contains(key)) {
if (missingIDs == null) {
- missingIDs = new HashSet();
+ missingIDs = new HashSet<>();
}
missingIDs.add(key);
}
@@ -177,7 +178,7 @@
// idref
public void addIdRef(String name) {
- if (fIdRefList == null) fIdRefList = new ArrayList();
+ if (fIdRefList == null) fIdRefList = new ArrayList<>();
fIdRefList.add(name);
}
// get symbols