From 3fdf6193d24d5e3b36499c552abd1e913c46a8d7 Mon Sep 17 00:00:00 2001 From: Marja van Aken Date: Tue, 28 Nov 2023 14:54:16 +0100 Subject: [PATCH] #405: Fix code style to meet the codacy criteria. --- .../metal/data/ConcatenatedValueSourceTest.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/src/test/java/io/parsingdata/metal/data/ConcatenatedValueSourceTest.java b/core/src/test/java/io/parsingdata/metal/data/ConcatenatedValueSourceTest.java index 97ff80ed..b26a24bd 100644 --- a/core/src/test/java/io/parsingdata/metal/data/ConcatenatedValueSourceTest.java +++ b/core/src/test/java/io/parsingdata/metal/data/ConcatenatedValueSourceTest.java @@ -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; @@ -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.