You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mi...@apache.org on 2006/10/31 04:20:34 UTC
svn commit: r469356 -
/xalan/java/trunk/src/org/apache/xml/serializer/WriterToUTF8Buffered.java
Author: minchau
Date: Mon Oct 30 19:20:34 2006
New Revision: 469356
URL: http://svn.apache.org/viewvc?view=rev&rev=469356
Log:
Fix for buffer splitting bug, patch from XALANJ-2316 is applied.
Modified:
xalan/java/trunk/src/org/apache/xml/serializer/WriterToUTF8Buffered.java
Modified: xalan/java/trunk/src/org/apache/xml/serializer/WriterToUTF8Buffered.java
URL: http://svn.apache.org/viewvc/xalan/java/trunk/src/org/apache/xml/serializer/WriterToUTF8Buffered.java?view=diff&rev=469356&r1=469355&r2=469356
==============================================================================
--- xalan/java/trunk/src/org/apache/xml/serializer/WriterToUTF8Buffered.java (original)
+++ xalan/java/trunk/src/org/apache/xml/serializer/WriterToUTF8Buffered.java Mon Oct 30 19:20:34 2006
@@ -201,10 +201,10 @@
*/
int split = length/CHARS_MAX;
final int chunks;
- if (split > 1)
- chunks = split;
+ if (length % CHARS_MAX > 0)
+ chunks = split + 1;
else
- chunks = 2;
+ chunks = split;
int end_chunk = start;
for (int chunk = 1; chunk <= chunks; chunk++)
{
@@ -336,10 +336,10 @@
final int start = 0;
int split = length/CHARS_MAX;
final int chunks;
- if (split > 1)
- chunks = split;
+ if (length % CHARS_MAX > 0)
+ chunks = split + 1;
else
- chunks = 2;
+ chunks = split;
int end_chunk = 0;
for (int chunk = 1; chunk <= chunks; chunk++)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org