sandygao    2002/10/17 14:42:51

  Modified:    java/src/org/apache/xerces/impl XMLEntityManager.java
  Log:
  It doesn't make much sense if the buffer size is too small (smaller than 64).
  And if it's set to something less than 6, there isn't enough space to hold the
  "<?xml" string, and we'll get an ArrayIndexOutOfBoundException.
  
  Revision  Changes    Path
  1.50      +3 -2      xml-xerces/java/src/org/apache/xerces/impl/XMLEntityManager.java
  
  Index: XMLEntityManager.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/XMLEntityManager.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- XMLEntityManager.java     2 Oct 2002 18:06:08 -0000       1.49
  +++ XMLEntityManager.java     17 Oct 2002 21:42:51 -0000      1.50
  @@ -1155,7 +1155,8 @@
               }
               if (property.equals(Constants.BUFFER_SIZE_PROPERTY)) {
                   Integer bufferSize = (Integer)value;
  -                if (bufferSize != null && bufferSize.intValue() > 0) {
  +                if (bufferSize != null &&
  +                    bufferSize.intValue() > DEFAULT_XMLDECL_BUFFER_SIZE) {
                       fBufferSize = bufferSize.intValue();
                   }
               }
  
  
  

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

Reply via email to