You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by ra...@apache.org on 2005/05/14 11:23:50 UTC

cvs commit: xml-security/src/org/apache/xml/security/utils UnsyncBufferedOutputStream.java

raul        2005/05/14 02:23:50

  Modified:    src/org/apache/xml/security/utils
                        UnsyncBufferedOutputStream.java
  Log:
  Fix a bug raised by scott cantor.
  
  Revision  Changes    Path
  1.2       +2 -1      xml-security/src/org/apache/xml/security/utils/UnsyncBufferedOutputStream.java
  
  Index: UnsyncBufferedOutputStream.java
  ===================================================================
  RCS file: /home/cvs/xml-security/src/org/apache/xml/security/utils/UnsyncBufferedOutputStream.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UnsyncBufferedOutputStream.java	3 Apr 2005 11:30:01 -0000	1.1
  +++ UnsyncBufferedOutputStream.java	14 May 2005 09:23:50 -0000	1.2
  @@ -28,13 +28,14 @@
   	
   	/** @inheritDoc */
   	public void write(byte[] arg0, int arg1, int len) throws IOException {
  -		final int newLen=pointer+len;
  +		int newLen=pointer+len;
   		if (newLen> size) {
   			flushBuffer();		
   			if (len>size) {
   				out.write(arg0,arg1,len);
   				return;
   			}
  +			newLen=len;
   		}
   		System.arraycopy(arg0,arg1,buf,pointer,len);
   		pointer=newLen;