Fix bug in addReader(), using contains() where containsKey() was intended

git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226058 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ndw
2003-04-22 14:12:09 +00:00
parent 88ecab6845
commit 46f117aae8

View File

@@ -461,7 +461,7 @@ public class Catalog {
* @param reader The CatalogReader to use.
*/
public void addReader(String mimeType, CatalogReader reader) {
if (readerMap.contains(mimeType)) {
if (readerMap.containsKey(mimeType)) {
Integer pos = (Integer) readerMap.get(mimeType);
readerArr.set(pos.intValue(), reader);
} else {
@@ -578,6 +578,7 @@ public class Catalog {
*/
public void loadSystemCatalogs()
throws MalformedURLException, IOException {
Vector catalogs = catalogManager.getCatalogFiles();
if (catalogs != null) {
for (int count = 0; count < catalogs.size(); count++) {