aboutsummaryrefslogtreecommitdiff
path: root/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java')
-rw-r--r--src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java b/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java
index bd14b28..6f44953 100644
--- a/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java
+++ b/src/com/sun/org/apache/xml/internal/resolver/readers/DOMCatalogReader.java
@@ -1,18 +1,15 @@
/*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
*/
-// DOMCatalogReader.java - Read XML Catalog files
-
/*
- * Copyright 2001-2004 The Apache Software Foundation or its licensors,
- * as applicable.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,6 +17,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+// DOMCatalogReader.java - Read XML Catalog files
package com.sun.org.apache.xml.internal.resolver.readers;
@@ -31,11 +29,14 @@ import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
-import java.util.Hashtable;
+import java.util.HashMap;
+import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-import org.w3c.dom.*;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
import org.xml.sax.SAXException;
import sun.reflect.misc.ReflectUtil;
@@ -76,7 +77,7 @@ public class DOMCatalogReader implements CatalogReader {
* or "{namespaceuri}elementname". The former is used if the
* namespace URI is null.</p>
*/
- protected Hashtable namespaceMap = new Hashtable();
+ protected Map<String, String> namespaceMap = new HashMap<>();
/**
* Add a new parser to the reader.
@@ -112,9 +113,9 @@ public class DOMCatalogReader implements CatalogReader {
public String getCatalogParser(String namespaceURI,
String rootElement) {
if (namespaceURI == null) {
- return (String) namespaceMap.get(rootElement);
+ return namespaceMap.get(rootElement);
} else {
- return (String) namespaceMap.get("{"+namespaceURI+"}"+rootElement);
+ return namespaceMap.get("{"+namespaceURI+"}"+rootElement);
}
}