xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an...@apache.org
Subject cvs commit: xml-xerces/java/src/org/apache/xerces/validators/common XMLValidator.java
Date Wed, 21 Feb 2001 08:08:38 GMT
andyc       01/02/21 00:08:38

  Modified:    java/src/org/apache/xerces/validators/common
                        XMLValidator.java
  Log:
  NullPointerException thrown when a grammar was queried
  because the namespace URI was set to -1 instead of 0
  (StringPool.EMPTY_STRING). This may not be the last
  inconsistency but it should solve this problem at least.
  
  Revision  Changes    Path
  1.121     +5 -5      xml-xerces/java/src/org/apache/xerces/validators/common/XMLValidator.java
  
  Index: XMLValidator.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/validators/common/XMLValidator.java,v
  retrieving revision 1.120
  retrieving revision 1.121
  diff -u -r1.120 -r1.121
  --- XMLValidator.java	2001/02/20 10:20:09	1.120
  +++ XMLValidator.java	2001/02/21 08:08:36	1.121
  @@ -121,7 +121,7 @@
   /**
    * This class is the super all-in-one validator used by the parser.
    *
  - * @version $Id: XMLValidator.java,v 1.120 2001/02/20 10:20:09 andyc Exp $
  + * @version $Id: XMLValidator.java,v 1.121 2001/02/21 08:08:36 andyc Exp $
    */
   public final class XMLValidator
       implements DefaultEntityHandler.EventHandler,
  @@ -313,7 +313,7 @@
      private DatatypeValidator fXsiTypeValidator = null;
   
      private Grammar fGrammar = null;
  -   private int fGrammarNameSpaceIndex = -1;
  +   private int fGrammarNameSpaceIndex = StringPool.EMPTY_STRING;
      private GrammarResolver fGrammarResolver = null;
   
      // state and stuff
  @@ -1458,7 +1458,7 @@
   
            fGrammarNameSpaceIndex = fGrammarNameSpaceIndexStack[fElementDepth];
            if ( fValidating && fGrammarIsSchemaGrammar )
  -             if (fGrammarNameSpaceIndex == -1) {
  +             if (fGrammarNameSpaceIndex == StringPool.EMPTY_STRING) {
                    fGrammar = null;
                    fGrammarIsSchemaGrammar = false;
                    fGrammarIsDTDGrammar = false;
  @@ -1871,12 +1871,12 @@
   
         fCurrentScope = TOP_LEVEL_SCOPE;
         fCurrentSchemaURI = -1;
  -      fEmptyURI = - 1; 
  +      fEmptyURI = StringPool.EMPTY_STRING; 
         fXsiPrefix = - 1;
         fXsiTypeValidator = null;
   
         fGrammar = null;
  -      fGrammarNameSpaceIndex = -1;
  +      fGrammarNameSpaceIndex = StringPool.EMPTY_STRING;
         //fGrammarResolver = null;
         if (fGrammarResolver != null) {
            fGrammarResolver.clearGrammarResolver(); //This also clears the Datatype registry
  
  
  

Mime
View raw message