You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by as...@apache.org on 2009/06/01 23:23:04 UTC

svn commit: r780834 - /jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/block/BlockDisk.java

Author: asmuts
Date: Mon Jun  1 21:23:03 2009
New Revision: 780834

URL: http://svn.apache.org/viewvc?rev=780834&view=rev
Log:
Resolved bug JCS-56.  There was a problem in the chunking method.

Modified:
    jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/block/BlockDisk.java

Modified: jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/block/BlockDisk.java
URL: http://svn.apache.org/viewvc/jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/block/BlockDisk.java?rev=780834&r1=780833&r2=780834&view=diff
==============================================================================
--- jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/block/BlockDisk.java (original)
+++ jakarta/jcs/trunk/src/java/org/apache/jcs/auxiliary/disk/block/BlockDisk.java Mon Jun  1 21:23:03 2009
@@ -132,11 +132,7 @@
             log.info( "Constructing BlockDisk, blockSizeBytes [" + blockSizeBytes + "]" );
         }
         this.blockSizeBytes = blockSizeBytes;
-        
-        if ( log.isInfoEnabled() )
-        {
-            log.info( "Used default block size [" + DEFAULT_BLOCK_SIZE_BYTES + "]" );
-        }
+
         this.elementSerializer = elementSerializer;   
     }
 
@@ -165,7 +161,7 @@
 
         if ( log.isDebugEnabled() )
         {
-            log.debug( "read, total pre-chunking data.length = " + data.length );
+            log.debug( "write, total pre-chunking data.length = " + data.length );
         }
         
         this.addToPutBytes( data.length );
@@ -231,7 +227,7 @@
             {
                 // use the max that can be written to a block or whatever is left in the original
                 // array
-                int chunkSize = Math.min( totalUsed + maxChunkSize, totalBytes - totalUsed );
+                int chunkSize = Math.min( maxChunkSize, totalBytes - totalUsed );
                 byte[] chunk = new byte[chunkSize];
                 // copy from the used position to the chunk size on the complete array to the chunk
                 // array.



---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-dev-help@jakarta.apache.org