You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2004/04/30 04:42:43 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/impl/xs/opti SchemaDOMParser.java
mrglavas 2004/04/29 19:42:43
Modified: java/src/org/apache/xerces/impl/xs/opti SchemaDOMParser.java
Log:
Fixing a NPE which occured for any schema containing a CDATA
section outside of an annotation.
Revision Changes Path
1.8 +9 -3 xml-xerces/java/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java
Index: SchemaDOMParser.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/opti/SchemaDOMParser.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- SchemaDOMParser.java 24 Feb 2004 22:59:11 -0000 1.7
+++ SchemaDOMParser.java 30 Apr 2004 02:42:43 -0000 1.8
@@ -337,7 +337,10 @@
* Thrown by handler to signal an error.
*/
public void startCDATA(Augmentations augs) throws XNIException {
- schemaDOM.startAnnotationCDATA();
+ // only deal with CDATA boundaries within an annotation.
+ if (fAnnotationDepth != -1) {
+ schemaDOM.startAnnotationCDATA();
+ }
}
/**
@@ -349,7 +352,10 @@
* Thrown by handler to signal an error.
*/
public void endCDATA(Augmentations augs) throws XNIException {
- schemaDOM.endAnnotationCDATA();
+ // only deal with CDATA boundaries within an annotation.
+ if (fAnnotationDepth != -1) {
+ schemaDOM.endAnnotationCDATA();
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org