Use catalogManager's debug object instead of static Debug object to print messages

git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226007 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ndw 2002-11-13 20:47:19 +00:00
parent 32de5fd9df
commit dcec3ff81e

View File

@ -174,14 +174,14 @@ public class Resolver extends Catalog {
entry.setEntryArg(1, fsi); entry.setEntryArg(1, fsi);
Debug.message(4, "URISUFFIX", suffix, fsi); catalogManager.debug.message(4, "URISUFFIX", suffix, fsi);
} else if (type == SYSTEMSUFFIX) { } else if (type == SYSTEMSUFFIX) {
String suffix = normalizeURI(entry.getEntryArg(0)); String suffix = normalizeURI(entry.getEntryArg(0));
String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1))); String fsi = makeAbsolute(normalizeURI(entry.getEntryArg(1)));
entry.setEntryArg(1, fsi); entry.setEntryArg(1, fsi);
Debug.message(4, "SYSTEMSUFFIX", suffix, fsi); catalogManager.debug.message(4, "SYSTEMSUFFIX", suffix, fsi);
} }
super.addEntry(entry); super.addEntry(entry);
@ -435,17 +435,17 @@ public class Resolver extends Catalog {
return r; return r;
} catch (CatalogException cex) { } catch (CatalogException cex) {
if (cex.getExceptionType() == CatalogException.UNPARSEABLE) { if (cex.getExceptionType() == CatalogException.UNPARSEABLE) {
Debug.message(1, "Unparseable catalog: " + RFC2483); catalogManager.debug.message(1, "Unparseable catalog: " + RFC2483);
} else if (cex.getExceptionType() } else if (cex.getExceptionType()
== CatalogException.UNKNOWN_FORMAT) { == CatalogException.UNKNOWN_FORMAT) {
Debug.message(1, "Unknown catalog format: " + RFC2483); catalogManager.debug.message(1, "Unknown catalog format: " + RFC2483);
} }
return null; return null;
} catch (MalformedURLException mue) { } catch (MalformedURLException mue) {
Debug.message(1, "Malformed resolver URL: " + RFC2483); catalogManager.debug.message(1, "Malformed resolver URL: " + RFC2483);
return null; return null;
} catch (IOException ie) { } catch (IOException ie) {
Debug.message(1, "I/O Exception opening resolver: " + RFC2483); catalogManager.debug.message(1, "I/O Exception opening resolver: " + RFC2483);
return null; return null;
} }
} }
@ -668,12 +668,12 @@ public class Resolver extends Catalog {
try { try {
c.parseCatalog(catfile); c.parseCatalog(catfile);
} catch (MalformedURLException mue) { } catch (MalformedURLException mue) {
Debug.message(1, "Malformed Catalog URL", catfile); catalogManager.debug.message(1, "Malformed Catalog URL", catfile);
} catch (FileNotFoundException fnfe) { } catch (FileNotFoundException fnfe) {
Debug.message(1, "Failed to load catalog, file not found", catalogManager.debug.message(1, "Failed to load catalog, file not found",
catfile); catfile);
} catch (IOException ioe) { } catch (IOException ioe) {
Debug.message(1, "Failed to load catalog, I/O error", catfile); catalogManager.debug.message(1, "Failed to load catalog, I/O error", catfile);
} }
catalogs.setElementAt(c, catPos); catalogs.setElementAt(c, catPos);