Skip to content

Commit c760630

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

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

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
@@ -102,13 +102,13 @@ int[] limbs() {
102102
* @return Big-endian UInt256 represented by the bytes.
103103
*/
104104
public static UInt256 fromBytesBE(final byte[] bytes) {
105-
// Unchecked : bytes.length <= BYTESIZE
105+
// Unchecked : bytes.length <= BYTESIZE
106106
if (bytes.length == 0) return ZERO;
107-
int msb = Arrays.mismatch(bytes, ZERO_BYTES); // Most significant byte index
107+
int msb = Arrays.mismatch(bytes, ZERO_BYTES); // Most significant byte index
108108
if (msb == -1 || msb >= bytes.length) return ZERO;
109109
int[] limbs = new int[N_LIMBS];
110-
int i = N_LIMBS - 1; // Index in int array
111-
int b = bytes.length - 1; // Index in bytes array
110+
int i = N_LIMBS - 1; // Index in int array
111+
int b = bytes.length - 1; // Index in bytes array
112112
int limb;
113113
for (; b >= msb; i--) {
114114
int shift = 0;

0 commit comments

Comments
 (0)