Remove unnecessary buffer initialization after confirmation that it is
not needed.
This commit is contained in:
Timothy Bish 2016-03-03 17:35:21 -05:00
parent edfc23ee9d
commit 5e0f49332b
1 changed files with 1 additions and 6 deletions

View File

@ -279,12 +279,7 @@ public class Journal {
private void doPreallocationZeros(RecoverableRandomAccessFile file) {
ByteBuffer buffer = ByteBuffer.allocate(maxFileLength);
// intentional double initialization due to interaction with the OS level
// file allocation mechanics.
for (int i = 0; i < maxFileLength; i++) {
buffer.put((byte) 0x00);
}
buffer.flip();
buffer.limit(maxFileLength);
try {
FileChannel channel = file.getChannel();