Skip to content

Commit ced26d3

Browse files
FIX: spotless
Signed-off-by: Thomas Zamojski <[email protected]>
1 parent 3e22232 commit ced26d3

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

evm/src/jmh/java/org/hyperledger/besu/evm/UIntFromBytesBenchmark.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
* SPDX-License-Identifier: Apache-2.0
1414
*/
1515
package org.hyperledger.besu.ethereum.vm.operations;
16+
1617
import org.hyperledger.besu.evm.UInt256;
1718

18-
import java.util.Random;
19-
import java.util.concurrent.TimeUnit;
2019
import java.util.concurrent.ThreadLocalRandom;
20+
import java.util.concurrent.TimeUnit;
2121

2222
import org.openjdk.jmh.annotations.Benchmark;
2323
import org.openjdk.jmh.annotations.BenchmarkMode;
@@ -32,7 +32,6 @@
3232
import org.openjdk.jmh.annotations.Warmup;
3333
import org.openjdk.jmh.infra.Blackhole;
3434

35-
3635
@State(Scope.Thread)
3736
@Warmup(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
3837
@Measurement(iterations = 5, time = 1, timeUnit = TimeUnit.SECONDS)
@@ -85,7 +84,6 @@ public enum Case {
8584
"SIZE_RAND_PAD_0",
8685
"SIZE_RAND_PAD_RAND"
8786
})
88-
8987
private String caseName;
9088

9189
@Setup(Level.Iteration)
@@ -117,4 +115,3 @@ public void fromBytesBE(final Blackhole blackhole) {
117115
index = (index + 1) % SAMPLE_SIZE;
118116
}
119117
}
120-

evm/src/main/java/org/hyperledger/besu/evm/UInt256.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ int[] limbs() {
8787
* @return Big-endian UInt256 represented by the bytes.
8888
*/
8989
public static UInt256 fromBytesBE(final byte[] bytes) {
90-
// Unchecked : bytes.length <= BYTESIZE
90+
// Unchecked : bytes.length <= BYTESIZE
9191
if (bytes.length == 0) return ZERO;
92-
int msb = Arrays.mismatch(bytes, ZERO_BYTES); // Most significant byte index
92+
int msb = Arrays.mismatch(bytes, ZERO_BYTES); // Most significant byte index
9393
if (msb == -1 || msb >= bytes.length) return ZERO;
9494
int[] limbs = new int[N_LIMBS];
95-
int i = N_LIMBS - 1; // Index in int array
96-
int b = bytes.length - 1; // Index in bytes array
95+
int i = N_LIMBS - 1; // Index in int array
96+
int b = bytes.length - 1; // Index in bytes array
9797
int limb;
9898
for (; b >= msb; i--) {
9999
int shift = 0;

0 commit comments

Comments
 (0)