Skip to content

Commit

Permalink
#405: Fix code style to meet the codacy criteria.
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanaken committed Nov 28, 2023
1 parent 14cd4ca commit 3fdf619
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import static io.parsingdata.metal.expression.value.ConstantFactory.createFromBytes;
import static io.parsingdata.metal.util.EncodingFactory.enc;

import java.io.IOException;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -121,16 +120,14 @@ public void concatenatedValueSourceRead() {
.map(slice -> new CoreValue(slice, Encoding.DEFAULT_ENCODING)).get();

// Read from the big value.
long start, end;
final int readSize = 512;

final byte[] valueBytes = new byte[arraySize];
start = System.currentTimeMillis();
final long start = System.currentTimeMillis();
for (int part = 0; part < arraySize / readSize; part++) {
final byte[] data = bigValue.slice().source.getData(bigValue.slice().offset.add(valueOf(readSize * part)), valueOf(readSize));
System.arraycopy(data, 0, valueBytes, readSize * part, data.length);
}
end = System.currentTimeMillis();
final long end = System.currentTimeMillis();
System.out.printf("Value read: %ss%n", (end - start) / 1000.0);

// Make sure we read the data correctly.
Expand Down

0 comments on commit 3fdf619

Please sign in to comment.