jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r577808 - /jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/BufferedStringValue.java
Date Thu, 20 Sep 2007 16:41:59 GMT
Author: jukka
Date: Thu Sep 20 09:41:58 2007
New Revision: 577808

URL: http://svn.apache.org/viewvc?rev=577808&view=rev
Log:
1.3: Merged revision 562403 (JCR-1038)

Modified:
    jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/BufferedStringValue.java

Modified: jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/BufferedStringValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/BufferedStringValue.java?rev=577808&r1=577807&r2=577808&view=diff
==============================================================================
--- jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/BufferedStringValue.java
(original)
+++ jackrabbit/branches/1.3/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/BufferedStringValue.java
Thu Sep 20 09:41:58 2007
@@ -194,7 +194,9 @@
             } else {
                 if (bufferPos + length > buffer.length) {
                     // reallocate new buffer and spool old buffer contents
-                    char[] newBuffer = new char[buffer.length + BUFFER_INCREMENT];
+                    int bufferSize =
+                            BUFFER_INCREMENT * (((bufferPos + length) / BUFFER_INCREMENT)
+ 1);
+                    char[] newBuffer = new char[bufferSize];
                     System.arraycopy(buffer, 0, newBuffer, 0, bufferPos);
                     buffer = newBuffer;
                 }



Mime
View raw message