src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java
Print this page
@@ -1,13 +1,15 @@
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
- * Copyright 2001-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ * 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
*
@@ -38,11 +40,11 @@
import java.net.URLConnection;
import java.net.UnknownServiceException;
import java.util.Enumeration;
import java.util.Properties;
import java.util.StringTokenizer;
-import java.util.Vector;
+import java.util.ArrayList;
import java.lang.reflect.Constructor;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -1082,11 +1084,11 @@
}
}
else if (name.equals(OutputKeys.CDATA_SECTION_ELEMENTS)) {
if (value != null) {
StringTokenizer e = new StringTokenizer(value);
- Vector uriAndLocalNames = null;
+ ArrayList<String> uriAndLocalNames = null;
while (e.hasMoreTokens()) {
final String token = e.nextToken();
// look for the last colon, as the String may be
// something like "http://abc.com:local"
@@ -1102,15 +1104,15 @@
uri = null;
localName = token;
}
if (uriAndLocalNames == null) {
- uriAndLocalNames = new Vector();
+ uriAndLocalNames = new ArrayList<>();
}
// add the uri/localName as a pair, in that order
- uriAndLocalNames.addElement(uri);
- uriAndLocalNames.addElement(localName);
+ uriAndLocalNames.add(uri);
+ uriAndLocalNames.add(localName);
}
handler.setCdataSectionElements(uriAndLocalNames);
}
}
}