andyc       2003/03/22 18:12:24

  Modified:    java/docs releases.xml
               java/src/org/apache/xerces/parsers DTDConfiguration.java
  Log:
  Fixed null pointer exception caused when no DTD handlers are
  registered with the parser.
  
  Revision  Changes    Path
  1.150     +8 -1      xml-xerces/java/docs/releases.xml
  
  Index: releases.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/docs/releases.xml,v
  retrieving revision 1.149
  retrieving revision 1.150
  diff -u -r1.149 -r1.150
  --- releases.xml      17 Feb 2003 21:45:26 -0000      1.149
  +++ releases.xml      23 Mar 2003 02:12:24 -0000      1.150
  @@ -27,6 +27,13 @@
       </note>
       <submitter name="J. Pietschmann, Neil Graham"/> 
      </fix>
  +   <fix>
  +    <note>
  +     Fixed null pointer exception in DTDConfiguration caused when
  +     no DTD handlers are registered.
  +    </note>
  +    <submitter name='Andy Clark'/>
  +   </fix>
     </changes>
     </release>
     <release version="&ParserName; 2.3.0">
  
  
  
  1.12      +13 -5     
xml-xerces/java/src/org/apache/xerces/parsers/DTDConfiguration.java
  
  Index: DTDConfiguration.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/DTDConfiguration.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DTDConfiguration.java     3 Mar 2003 22:17:17 -0000       1.11
  +++ DTDConfiguration.java     23 Mar 2003 02:12:24 -0000      1.12
  @@ -687,18 +687,26 @@
                                fDTDScanner.setDTDHandler(fDTDProcessor);
                                fDTDProcessor.setDTDSource(fDTDScanner);
                                fDTDProcessor.setDTDHandler(fDTDHandler);
  -                             fDTDHandler.setDTDSource(fDTDProcessor);
  +                if (fDTDHandler != null) {
  +                    fDTDHandler.setDTDSource(fDTDProcessor);
  +                }
   
                                fDTDScanner.setDTDContentModelHandler(fDTDProcessor);
                                fDTDProcessor.setDTDContentModelSource(fDTDScanner);
                                
fDTDProcessor.setDTDContentModelHandler(fDTDContentModelHandler);
  -                             
fDTDContentModelHandler.setDTDContentModelSource(fDTDProcessor);
  +                if (fDTDContentModelHandler != null) {
  +                    fDTDContentModelHandler.setDTDContentModelSource(fDTDProcessor);
  +                }
                        }
                        else {
                                fDTDScanner.setDTDHandler(fDTDHandler);
  -                             fDTDHandler.setDTDSource(fDTDScanner);
  +                if (fDTDHandler != null) {
  +                    fDTDHandler.setDTDSource(fDTDScanner);
  +                }
                                
fDTDScanner.setDTDContentModelHandler(fDTDContentModelHandler);
  -                             
fDTDContentModelHandler.setDTDContentModelSource(fDTDScanner);
  +                if (fDTDContentModelHandler != null) {
  +                    fDTDContentModelHandler.setDTDContentModelSource(fDTDScanner);
  +                }
                        }
                }
   
  
  
  

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

Reply via email to