mrglavas    2003/11/12 07:48:19

  Modified:    java/src/org/apache/xerces/parsers AbstractDOMParser.java
  Log:
  Fixing some NPEs from the previous commit.
  
  Revision  Changes    Path
  1.96      +6 -6      
xml-xerces/java/src/org/apache/xerces/parsers/AbstractDOMParser.java
  
  Index: AbstractDOMParser.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/AbstractDOMParser.java,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -r1.95 -r1.96
  --- AbstractDOMParser.java    11 Nov 2003 20:15:00 -0000      1.95
  +++ AbstractDOMParser.java    12 Nov 2003 15:48:19 -0000      1.96
  @@ -973,9 +973,9 @@
                           // in the DTD.
                           if (isDeclared) {
                               type = attributes.getType(i);
  +                            id = "ID".equals(type);
                           }
                           attrImpl.setType(type);
  -                        id = (type.equals("ID")) ? true : false;
                                        }
                   
                                        if (id) {
  @@ -1073,8 +1073,8 @@
                       // in the DTD.
                       if (isDeclared) {
                           type = attributes.getType(i);
  -                    }                                        
  -                                     id = (type.equals("ID")) ? true : false;
  +                        id = "ID".equals(type);
  +                    }
                                }
                   
                   // create attribute
  @@ -2359,7 +2359,7 @@
                   // add default attribute
                   int attrIndex = fDeferredDocumentImpl.createDeferredAttribute(
                                       attributeName, defaultValue.toString(), false);
  -                if (type.equals("ID")) {               
  +                if ("ID".equals(type)) {               
                       fDeferredDocumentImpl.setIdAttribute(attrIndex);
                   }
                   // REVISIT: set ID type correctly
  @@ -2405,7 +2405,7 @@
                   }
                   attr.setValue(defaultValue.toString());
                   attr.setSpecified(false);
  -                attr.setIdAttribute(type.equals("ID"));
  +                attr.setIdAttribute("ID".equals(type));
   
                   // add default attribute to element definition
                   if (nsEnabled){
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to