You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-cvs@xml.apache.org by nd...@apache.org on 2003/04/22 16:12:10 UTC

cvs commit: xml-commons/java/src/org/apache/xml/resolver Catalog.java

ndw         2003/04/22 07:12:10

  Modified:    java/src/org/apache/xml/resolver Catalog.java
  Log:
  Fix bug in addReader(), using contains() where containsKey() was intended
  
  Revision  Changes    Path
  1.6       +2 -1      xml-commons/java/src/org/apache/xml/resolver/Catalog.java
  
  Index: Catalog.java
  ===================================================================
  RCS file: /home/cvs/xml-commons/java/src/org/apache/xml/resolver/Catalog.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Catalog.java	17 Feb 2003 12:45:02 -0000	1.5
  +++ Catalog.java	22 Apr 2003 14:12:09 -0000	1.6
  @@ -461,7 +461,7 @@
      * @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 void loadSystemCatalogs()
       throws MalformedURLException, IOException {
  +
       Vector catalogs = catalogManager.getCatalogFiles();
       if (catalogs != null) {
         for (int count = 0; count < catalogs.size(); count++) {