db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r584093 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/StoredPage.java
Date Fri, 12 Oct 2007 07:53:31 GMT
Author: kahatlen
Date: Fri Oct 12 00:53:30 2007
New Revision: 584093

URL: http://svn.apache.org/viewvc?rev=584093&view=rev
Log:
DERBY-3113: Use Arrays.fill() in StoredPage.clearSection()

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/StoredPage.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/StoredPage.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/StoredPage.java?rev=584093&r1=584092&r2=584093&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/StoredPage.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/StoredPage.java Fri
Oct 12 00:53:30 2007
@@ -73,6 +73,7 @@
 import org.apache.derby.iapi.services.io.ErrorObjectInput;
 
 
+import java.util.Arrays;
 import java.util.zip.CRC32;
 
 import java.io.IOException;
@@ -1830,14 +1831,13 @@
 
     /**
      * Zero out a portion of the page.
-     * <p>
+     *
+     * @param offset position of first byte to clear
+     * @param length how many bytes to clear
      **/
 	protected final void clearSection(int offset, int length)
 	{
-		int endOffset = offset + length;
-
-		while (offset < endOffset) 
-			pageData[offset++] = 0;
+        Arrays.fill(pageData, offset, offset + length, (byte) 0);
 	}
 
     /**



Mime
View raw message