enum ==> en (for JDK1.5)

git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226175 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dims 2004-12-06 16:49:40 +00:00
parent 8baa1a7fa6
commit 44efc72e44
2 changed files with 75 additions and 75 deletions

View File

@ -486,9 +486,9 @@ public class Catalog {
mapArr.add(null); mapArr.add(null);
} }
Enumeration enum = readerMap.keys(); Enumeration en = readerMap.keys();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
String mimeType = (String) enum.nextElement(); String mimeType = (String) en.nextElement();
Integer pos = (Integer) readerMap.get(mimeType); Integer pos = (Integer) readerMap.get(mimeType);
mapArr.set(pos.intValue(), mimeType); mapArr.set(pos.intValue(), mimeType);
} }
@ -1152,9 +1152,9 @@ public class Catalog {
} }
// Parse all the DELEGATE catalogs // Parse all the DELEGATE catalogs
Enumeration enum = catalogEntries.elements(); Enumeration en = catalogEntries.elements();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == DELEGATE_PUBLIC if (e.getEntryType() == DELEGATE_PUBLIC
|| e.getEntryType() == DELEGATE_SYSTEM || e.getEntryType() == DELEGATE_SYSTEM
|| e.getEntryType() == DELEGATE_URI) { || e.getEntryType() == DELEGATE_URI) {
@ -1228,9 +1228,9 @@ public class Catalog {
// If there's a DOCTYPE entry in this catalog, use it // If there's a DOCTYPE entry in this catalog, use it
boolean over = default_override; boolean over = default_override;
Enumeration enum = catalogEntries.elements(); Enumeration en = catalogEntries.elements();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == OVERRIDE) { if (e.getEntryType() == OVERRIDE) {
over = e.getEntryArg(0).equalsIgnoreCase("YES"); over = e.getEntryArg(0).equalsIgnoreCase("YES");
continue; continue;
@ -1266,9 +1266,9 @@ public class Catalog {
catalogManager.debug.message(3, "resolveDocument"); catalogManager.debug.message(3, "resolveDocument");
Enumeration enum = catalogEntries.elements(); Enumeration en = catalogEntries.elements();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == DOCUMENT) { if (e.getEntryType() == DOCUMENT) {
return e.getEntryArg(1); //FIXME check this return e.getEntryArg(1); //FIXME check this
} }
@ -1341,9 +1341,9 @@ public class Catalog {
// If there's a ENTITY entry in this catalog, use it // If there's a ENTITY entry in this catalog, use it
boolean over = default_override; boolean over = default_override;
Enumeration enum = catalogEntries.elements(); Enumeration en = catalogEntries.elements();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == OVERRIDE) { if (e.getEntryType() == OVERRIDE) {
over = e.getEntryArg(0).equalsIgnoreCase("YES"); over = e.getEntryArg(0).equalsIgnoreCase("YES");
continue; continue;
@ -1427,9 +1427,9 @@ public class Catalog {
// If there's a NOTATION entry in this catalog, use it // If there's a NOTATION entry in this catalog, use it
boolean over = default_override; boolean over = default_override;
Enumeration enum = catalogEntries.elements(); Enumeration en = catalogEntries.elements();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == OVERRIDE) { if (e.getEntryType() == OVERRIDE) {
over = e.getEntryArg(0).equalsIgnoreCase("YES"); over = e.getEntryArg(0).equalsIgnoreCase("YES");
continue; continue;
@ -1586,9 +1586,9 @@ public class Catalog {
// If there's a PUBLIC entry in this catalog, use it // If there's a PUBLIC entry in this catalog, use it
boolean over = default_override; boolean over = default_override;
Enumeration enum = catalogEntries.elements(); Enumeration en = catalogEntries.elements();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == OVERRIDE) { if (e.getEntryType() == OVERRIDE) {
over = e.getEntryArg(0).equalsIgnoreCase("YES"); over = e.getEntryArg(0).equalsIgnoreCase("YES");
continue; continue;
@ -1604,10 +1604,10 @@ public class Catalog {
// If there's a DELEGATE_PUBLIC entry in this catalog, use it // If there's a DELEGATE_PUBLIC entry in this catalog, use it
over = default_override; over = default_override;
enum = catalogEntries.elements(); en = catalogEntries.elements();
Vector delCats = new Vector(); Vector delCats = new Vector();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == OVERRIDE) { if (e.getEntryType() == OVERRIDE) {
over = e.getEntryArg(0).equalsIgnoreCase("YES"); over = e.getEntryArg(0).equalsIgnoreCase("YES");
continue; continue;
@ -1626,21 +1626,21 @@ public class Catalog {
} }
if (delCats.size() > 0) { if (delCats.size() > 0) {
Enumeration enumCats = delCats.elements(); Enumeration enCats = delCats.elements();
if (catalogManager.debug.getDebug() > 1) { if (catalogManager.debug.getDebug() > 1) {
catalogManager.debug.message(2, "Switching to delegated catalog(s):"); catalogManager.debug.message(2, "Switching to delegated catalog(s):");
while (enumCats.hasMoreElements()) { while (enCats.hasMoreElements()) {
String delegatedCatalog = (String) enumCats.nextElement(); String delegatedCatalog = (String) enCats.nextElement();
catalogManager.debug.message(2, "\t" + delegatedCatalog); catalogManager.debug.message(2, "\t" + delegatedCatalog);
} }
} }
Catalog dcat = newCatalog(); Catalog dcat = newCatalog();
enumCats = delCats.elements(); enCats = delCats.elements();
while (enumCats.hasMoreElements()) { while (enCats.hasMoreElements()) {
String delegatedCatalog = (String) enumCats.nextElement(); String delegatedCatalog = (String) enCats.nextElement();
dcat.parseCatalog(delegatedCatalog); dcat.parseCatalog(delegatedCatalog);
} }
@ -1712,9 +1712,9 @@ public class Catalog {
String osname = System.getProperty("os.name"); String osname = System.getProperty("os.name");
boolean windows = (osname.indexOf("Windows") >= 0); boolean windows = (osname.indexOf("Windows") >= 0);
Enumeration enum = catalogEntries.elements(); Enumeration en = catalogEntries.elements();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == SYSTEM if (e.getEntryType() == SYSTEM
&& (e.getEntryArg(0).equals(systemId) && (e.getEntryArg(0).equals(systemId)
|| (windows || (windows
@ -1724,11 +1724,11 @@ public class Catalog {
} }
// If there's a REWRITE_SYSTEM entry in this catalog, use it // If there's a REWRITE_SYSTEM entry in this catalog, use it
enum = catalogEntries.elements(); en = catalogEntries.elements();
String startString = null; String startString = null;
String prefix = null; String prefix = null;
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == REWRITE_SYSTEM) { if (e.getEntryType() == REWRITE_SYSTEM) {
String p = (String) e.getEntryArg(0); String p = (String) e.getEntryArg(0);
@ -1750,10 +1750,10 @@ public class Catalog {
} }
// If there's a DELEGATE_SYSTEM entry in this catalog, use it // If there's a DELEGATE_SYSTEM entry in this catalog, use it
enum = catalogEntries.elements(); en = catalogEntries.elements();
Vector delCats = new Vector(); Vector delCats = new Vector();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == DELEGATE_SYSTEM) { if (e.getEntryType() == DELEGATE_SYSTEM) {
String p = (String) e.getEntryArg(0); String p = (String) e.getEntryArg(0);
@ -1767,21 +1767,21 @@ public class Catalog {
} }
if (delCats.size() > 0) { if (delCats.size() > 0) {
Enumeration enumCats = delCats.elements(); Enumeration enCats = delCats.elements();
if (catalogManager.debug.getDebug() > 1) { if (catalogManager.debug.getDebug() > 1) {
catalogManager.debug.message(2, "Switching to delegated catalog(s):"); catalogManager.debug.message(2, "Switching to delegated catalog(s):");
while (enumCats.hasMoreElements()) { while (enCats.hasMoreElements()) {
String delegatedCatalog = (String) enumCats.nextElement(); String delegatedCatalog = (String) enCats.nextElement();
catalogManager.debug.message(2, "\t" + delegatedCatalog); catalogManager.debug.message(2, "\t" + delegatedCatalog);
} }
} }
Catalog dcat = newCatalog(); Catalog dcat = newCatalog();
enumCats = delCats.elements(); enCats = delCats.elements();
while (enumCats.hasMoreElements()) { while (enCats.hasMoreElements()) {
String delegatedCatalog = (String) enumCats.nextElement(); String delegatedCatalog = (String) enCats.nextElement();
dcat.parseCatalog(delegatedCatalog); dcat.parseCatalog(delegatedCatalog);
} }
@ -1846,9 +1846,9 @@ public class Catalog {
*/ */
protected String resolveLocalURI(String uri) protected String resolveLocalURI(String uri)
throws MalformedURLException, IOException { throws MalformedURLException, IOException {
Enumeration enum = catalogEntries.elements(); Enumeration en = catalogEntries.elements();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == URI if (e.getEntryType() == URI
&& (e.getEntryArg(0).equals(uri))) { && (e.getEntryArg(0).equals(uri))) {
return e.getEntryArg(1); return e.getEntryArg(1);
@ -1856,11 +1856,11 @@ public class Catalog {
} }
// If there's a REWRITE_URI entry in this catalog, use it // If there's a REWRITE_URI entry in this catalog, use it
enum = catalogEntries.elements(); en = catalogEntries.elements();
String startString = null; String startString = null;
String prefix = null; String prefix = null;
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == REWRITE_URI) { if (e.getEntryType() == REWRITE_URI) {
String p = (String) e.getEntryArg(0); String p = (String) e.getEntryArg(0);
@ -1882,10 +1882,10 @@ public class Catalog {
} }
// If there's a DELEGATE_URI entry in this catalog, use it // If there's a DELEGATE_URI entry in this catalog, use it
enum = catalogEntries.elements(); en = catalogEntries.elements();
Vector delCats = new Vector(); Vector delCats = new Vector();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == DELEGATE_URI) { if (e.getEntryType() == DELEGATE_URI) {
String p = (String) e.getEntryArg(0); String p = (String) e.getEntryArg(0);
@ -1899,21 +1899,21 @@ public class Catalog {
} }
if (delCats.size() > 0) { if (delCats.size() > 0) {
Enumeration enumCats = delCats.elements(); Enumeration enCats = delCats.elements();
if (catalogManager.debug.getDebug() > 1) { if (catalogManager.debug.getDebug() > 1) {
catalogManager.debug.message(2, "Switching to delegated catalog(s):"); catalogManager.debug.message(2, "Switching to delegated catalog(s):");
while (enumCats.hasMoreElements()) { while (enCats.hasMoreElements()) {
String delegatedCatalog = (String) enumCats.nextElement(); String delegatedCatalog = (String) enCats.nextElement();
catalogManager.debug.message(2, "\t" + delegatedCatalog); catalogManager.debug.message(2, "\t" + delegatedCatalog);
} }
} }
Catalog dcat = newCatalog(); Catalog dcat = newCatalog();
enumCats = delCats.elements(); enCats = delCats.elements();
while (enumCats.hasMoreElements()) { while (enCats.hasMoreElements()) {
String delegatedCatalog = (String) enumCats.nextElement(); String delegatedCatalog = (String) enCats.nextElement();
dcat.parseCatalog(delegatedCatalog); dcat.parseCatalog(delegatedCatalog);
} }

View File

@ -197,9 +197,9 @@ public class Resolver extends Catalog {
return resolved; return resolved;
} }
Enumeration enum = catalogEntries.elements(); Enumeration en = catalogEntries.elements();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == RESOLVER) { if (e.getEntryType() == RESOLVER) {
resolved = resolveExternalSystem(uri, e.getEntryArg(0)); resolved = resolveExternalSystem(uri, e.getEntryArg(0));
if (resolved != null) { if (resolved != null) {
@ -254,9 +254,9 @@ public class Resolver extends Catalog {
return resolved; return resolved;
} }
Enumeration enum = catalogEntries.elements(); Enumeration en = catalogEntries.elements();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == RESOLVER) { if (e.getEntryType() == RESOLVER) {
resolved = resolveExternalSystem(systemId, e.getEntryArg(0)); resolved = resolveExternalSystem(systemId, e.getEntryArg(0));
if (resolved != null) { if (resolved != null) {
@ -316,9 +316,9 @@ public class Resolver extends Catalog {
return resolved; return resolved;
} }
Enumeration enum = catalogEntries.elements(); Enumeration en = catalogEntries.elements();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == RESOLVER) { if (e.getEntryType() == RESOLVER) {
if (systemId != null) { if (systemId != null) {
resolved = resolveExternalSystem(systemId, resolved = resolveExternalSystem(systemId,
@ -557,9 +557,9 @@ public class Resolver extends Catalog {
Vector map = new Vector(); Vector map = new Vector();
String osname = System.getProperty("os.name"); String osname = System.getProperty("os.name");
boolean windows = (osname.indexOf("Windows") >= 0); boolean windows = (osname.indexOf("Windows") >= 0);
Enumeration enum = catalogEntries.elements(); Enumeration en = catalogEntries.elements();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == SYSTEM if (e.getEntryType() == SYSTEM
&& (e.getEntryArg(0).equals(systemId) && (e.getEntryArg(0).equals(systemId)
|| (windows || (windows
@ -585,9 +585,9 @@ public class Resolver extends Catalog {
Vector map = new Vector(); Vector map = new Vector();
String osname = System.getProperty("os.name"); String osname = System.getProperty("os.name");
boolean windows = (osname.indexOf("Windows") >= 0); boolean windows = (osname.indexOf("Windows") >= 0);
Enumeration enum = catalogEntries.elements(); Enumeration en = catalogEntries.elements();
while (enum.hasMoreElements()) { while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) enum.nextElement(); CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == SYSTEM if (e.getEntryType() == SYSTEM
&& (e.getEntryArg(1).equals(systemId) && (e.getEntryArg(1).equals(systemId)
|| (windows || (windows