aboutsummaryrefslogtreecommitdiff
path: root/src/com/sun/org/apache/xalan/internal/xsltc/dom/DOMWSFilter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/sun/org/apache/xalan/internal/xsltc/dom/DOMWSFilter.java')
-rw-r--r--src/com/sun/org/apache/xalan/internal/xsltc/dom/DOMWSFilter.java25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/com/sun/org/apache/xalan/internal/xsltc/dom/DOMWSFilter.java b/src/com/sun/org/apache/xalan/internal/xsltc/dom/DOMWSFilter.java
index 92117bf..54fe841 100644
--- a/src/com/sun/org/apache/xalan/internal/xsltc/dom/DOMWSFilter.java
+++ b/src/com/sun/org/apache/xalan/internal/xsltc/dom/DOMWSFilter.java
@@ -1,13 +1,13 @@
/*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
*/
/*
- * Copyright 2002-2004 The Apache Software Foundation.
- *
- * 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
+ * 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@@ -26,9 +26,10 @@ import com.sun.org.apache.xalan.internal.xsltc.DOM;
import com.sun.org.apache.xalan.internal.xsltc.DOMEnhancedForDTM;
import com.sun.org.apache.xalan.internal.xsltc.StripFilter;
import com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet;
-import com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable;
import com.sun.org.apache.xml.internal.dtm.DTM;
import com.sun.org.apache.xml.internal.dtm.DTMWSFilter;
+import java.util.HashMap;
+import java.util.Map;
/**
* A wrapper class that adapts the
@@ -40,8 +41,8 @@ public class DOMWSFilter implements DTMWSFilter {
private AbstractTranslet m_translet;
private StripFilter m_filter;
- // The Hashtable for DTM to mapping array
- private Hashtable m_mappings;
+ // The Map for DTM to mapping array
+ private Map<DTM, short[]> m_mappings;
// Cache the DTM and mapping that are used last time
private DTM m_currentDTM;
@@ -59,7 +60,7 @@ public class DOMWSFilter implements DTMWSFilter {
*/
public DOMWSFilter(AbstractTranslet translet) {
m_translet = translet;
- m_mappings = new Hashtable();
+ m_mappings = new HashMap<>();
if (translet instanceof StripFilter) {
m_filter = (StripFilter) translet;
@@ -91,7 +92,7 @@ public class DOMWSFilter implements DTMWSFilter {
mapping = m_currentMapping;
}
else {
- mapping = (short[])m_mappings.get(dtm);
+ mapping = m_mappings.get(dtm);
if (mapping == null) {
mapping = mappableDOM.getMapping(
m_translet.getNamesArray(),