File xml-commons-resolver-build-jdk5.patch of Package xml-commons-resolver-bootstrap
--- src/org/apache/xml/resolver/Catalog.java
+++ src/org/apache/xml/resolver/Catalog.java
@@ -486,9 +486,9 @@
mapArr.add(null);
}
- Enumeration enum = readerMap.keys();
- while (enum.hasMoreElements()) {
- String mimeType = (String) enum.nextElement();
+ Enumeration enum2 = readerMap.keys();
+ while (enum2.hasMoreElements()) {
+ String mimeType = (String) enum2.nextElement();
Integer pos = (Integer) readerMap.get(mimeType);
mapArr.set(pos.intValue(), mimeType);
}
@@ -1152,9 +1152,9 @@
}
// Parse all the DELEGATE catalogs
- Enumeration enum = catalogEntries.elements();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ Enumeration enum2 = catalogEntries.elements();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == DELEGATE_PUBLIC
|| e.getEntryType() == DELEGATE_SYSTEM
|| e.getEntryType() == DELEGATE_URI) {
@@ -1228,9 +1228,9 @@
// If there's a DOCTYPE entry in this catalog, use it
boolean over = default_override;
- Enumeration enum = catalogEntries.elements();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ Enumeration enum2 = catalogEntries.elements();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == OVERRIDE) {
over = e.getEntryArg(0).equalsIgnoreCase("YES");
continue;
@@ -1266,9 +1266,9 @@
catalogManager.debug.message(3, "resolveDocument");
- Enumeration enum = catalogEntries.elements();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ Enumeration enum2 = catalogEntries.elements();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == DOCUMENT) {
return e.getEntryArg(1); //FIXME check this
}
@@ -1341,9 +1341,9 @@
// If there's a ENTITY entry in this catalog, use it
boolean over = default_override;
- Enumeration enum = catalogEntries.elements();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ Enumeration enum2 = catalogEntries.elements();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == OVERRIDE) {
over = e.getEntryArg(0).equalsIgnoreCase("YES");
continue;
@@ -1427,9 +1427,9 @@
// If there's a NOTATION entry in this catalog, use it
boolean over = default_override;
- Enumeration enum = catalogEntries.elements();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ Enumeration enum2 = catalogEntries.elements();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == OVERRIDE) {
over = e.getEntryArg(0).equalsIgnoreCase("YES");
continue;
@@ -1586,9 +1586,9 @@
// If there's a PUBLIC entry in this catalog, use it
boolean over = default_override;
- Enumeration enum = catalogEntries.elements();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ Enumeration enum2 = catalogEntries.elements();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == OVERRIDE) {
over = e.getEntryArg(0).equalsIgnoreCase("YES");
continue;
@@ -1604,10 +1604,10 @@
// If there's a DELEGATE_PUBLIC entry in this catalog, use it
over = default_override;
- enum = catalogEntries.elements();
+ enum2 = catalogEntries.elements();
Vector delCats = new Vector();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == OVERRIDE) {
over = e.getEntryArg(0).equalsIgnoreCase("YES");
continue;
@@ -1712,9 +1712,9 @@
String osname = System.getProperty("os.name");
boolean windows = (osname.indexOf("Windows") >= 0);
- Enumeration enum = catalogEntries.elements();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ Enumeration enum2 = catalogEntries.elements();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == SYSTEM
&& (e.getEntryArg(0).equals(systemId)
|| (windows
@@ -1724,11 +1724,11 @@
}
// If there's a REWRITE_SYSTEM entry in this catalog, use it
- enum = catalogEntries.elements();
+ enum2 = catalogEntries.elements();
String startString = null;
String prefix = null;
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == REWRITE_SYSTEM) {
String p = (String) e.getEntryArg(0);
@@ -1750,10 +1750,10 @@
}
// If there's a DELEGATE_SYSTEM entry in this catalog, use it
- enum = catalogEntries.elements();
+ enum2 = catalogEntries.elements();
Vector delCats = new Vector();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == DELEGATE_SYSTEM) {
String p = (String) e.getEntryArg(0);
@@ -1846,9 +1846,9 @@
*/
protected String resolveLocalURI(String uri)
throws MalformedURLException, IOException {
- Enumeration enum = catalogEntries.elements();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ Enumeration enum2 = catalogEntries.elements();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == URI
&& (e.getEntryArg(0).equals(uri))) {
return e.getEntryArg(1);
@@ -1856,11 +1856,11 @@
}
// If there's a REWRITE_URI entry in this catalog, use it
- enum = catalogEntries.elements();
+ enum2 = catalogEntries.elements();
String startString = null;
String prefix = null;
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == REWRITE_URI) {
String p = (String) e.getEntryArg(0);
@@ -1882,10 +1882,10 @@
}
// If there's a DELEGATE_URI entry in this catalog, use it
- enum = catalogEntries.elements();
+ enum2 = catalogEntries.elements();
Vector delCats = new Vector();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == DELEGATE_URI) {
String p = (String) e.getEntryArg(0);
--- src/org/apache/xml/resolver/Resolver.java
+++ src/org/apache/xml/resolver/Resolver.java
@@ -197,9 +197,9 @@
return resolved;
}
- Enumeration enum = catalogEntries.elements();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ Enumeration enum2 = catalogEntries.elements();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == RESOLVER) {
resolved = resolveExternalSystem(uri, e.getEntryArg(0));
if (resolved != null) {
@@ -254,9 +254,9 @@
return resolved;
}
- Enumeration enum = catalogEntries.elements();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ Enumeration enum2 = catalogEntries.elements();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == RESOLVER) {
resolved = resolveExternalSystem(systemId, e.getEntryArg(0));
if (resolved != null) {
@@ -316,9 +316,9 @@
return resolved;
}
- Enumeration enum = catalogEntries.elements();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ Enumeration enum2 = catalogEntries.elements();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == RESOLVER) {
if (systemId != null) {
resolved = resolveExternalSystem(systemId,
@@ -557,9 +557,9 @@
Vector map = new Vector();
String osname = System.getProperty("os.name");
boolean windows = (osname.indexOf("Windows") >= 0);
- Enumeration enum = catalogEntries.elements();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ Enumeration enum2 = catalogEntries.elements();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == SYSTEM
&& (e.getEntryArg(0).equals(systemId)
|| (windows
@@ -585,9 +585,9 @@
Vector map = new Vector();
String osname = System.getProperty("os.name");
boolean windows = (osname.indexOf("Windows") >= 0);
- Enumeration enum = catalogEntries.elements();
- while (enum.hasMoreElements()) {
- CatalogEntry e = (CatalogEntry) enum.nextElement();
+ Enumeration enum2 = catalogEntries.elements();
+ while (enum2.hasMoreElements()) {
+ CatalogEntry e = (CatalogEntry) enum2.nextElement();
if (e.getEntryType() == SYSTEM
&& (e.getEntryArg(1).equals(systemId)
|| (windows