Skip to content

Commit bbe5ff9

Browse files
authored
Merge pull request tronprotocol#2091 from tronprotocol/solve_checkstyle
solve checkstyle problem
2 parents c18bfc0 + ec574b0 commit bbe5ff9

6 files changed

Lines changed: 12 additions & 16 deletions

File tree

‎src/main/java/org/tron/common/overlay/server/FastForward.java‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.tron.common.overlay.server;
22

3-
import com.beust.jcommander.internal.Lists;
43
import java.net.InetAddress;
54
import java.net.InetSocketAddress;
65
import java.util.List;
@@ -45,7 +44,6 @@ public class FastForward {
4544
private byte[] witnessAddress = args.getLocalWitnesses().getWitnessAccountAddress();
4645
private int keySize = args.getLocalWitnesses().getPrivateKeys().size();
4746

48-
4947
public void init() {
5048

5149
logger.info("Fast forward config, isWitness: {}, keySize: {}, fastForwardNodes: {}",

‎src/main/java/org/tron/common/runtime/vm/program/Program.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,8 +1406,8 @@ public interface ProgramOutListener {
14061406
* ---------------------------------------------------------------------------------------------
14071407
* [Long.Min, 0) Not possible error
14081408
* --------------------------------------------------------------------------------------------- 0
1409-
* allowed and only allowed error (guaranteed in CALLTOKEN)
1410-
* transfertoken id=0 should not transfer trx) ---------------------------------------------------------------------------------------------
1409+
* allowed and only allowed error (guaranteed in CALLTOKEN) transfertoken id=0
1410+
* should not transfer trx) ---------------------------------------------------------------------------------------------
14111411
* (0-100_0000] Not possible error
14121412
* ---------------------------------------------------------------------------------------------
14131413
* (100_0000, Long.Max] Not possible allowed

‎src/main/java/org/tron/common/utils/FastByteComparisons.java‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@
3535
import com.google.common.primitives.UnsignedBytes;
3636

3737
/**
38-
* Utility code to do optimized byte-array comparison.
39-
* This is borrowed and slightly modified from Guava's {@link UnsignedBytes}
40-
* class to be able to compare arrays that start at non-zero offsets.
38+
* Utility code to do optimized byte-array comparison. This is borrowed and slightly modified from
39+
* Guava's {@link UnsignedBytes} class to be able to compare arrays that start at non-zero offsets.
4140
*/
4241
@SuppressWarnings("restriction")
4342
public abstract class FastByteComparisons {
@@ -75,8 +74,8 @@ int compareTo(T buffer1, int offset1, int length1,
7574
}
7675

7776
/**
78-
* <p>Uses reflection to gracefully fall back to the Java implementation if
79-
* {@code Unsafe} isn't available.
77+
* <p>Uses reflection to gracefully fall back to the Java implementation if {@code Unsafe} isn't
78+
* available.
8079
*/
8180
private static class LexicographicalComparerHolder {
8281

@@ -87,8 +86,8 @@ private static class LexicographicalComparerHolder {
8786
static final Comparer<byte[]> BEST_COMPARER = getBestComparer();
8887

8988
/**
90-
* Returns the Unsafe-using Comparer, or falls back to the pure-Java
91-
* implementation if unable to do so.
89+
* Returns the Unsafe-using Comparer, or falls back to the pure-Java implementation if unable to
90+
* do so.
9291
*/
9392
static Comparer<byte[]> getBestComparer() {
9493
try {

‎src/main/java/org/tron/core/net/TronNetDelegate.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,14 @@ public boolean validBlock(BlockCapsule block) throws P2pException {
223223
}
224224
boolean flag = false;
225225
List<WitnessCapsule> witnesses = witnessStore.getAllWitnesses();
226-
for (WitnessCapsule witness: witnesses){
226+
for (WitnessCapsule witness : witnesses) {
227227
if (witness.getAddress().equals(block.getWitnessAddress())) {
228228
flag = true;
229229
break;
230230
}
231231
}
232232
return flag;
233-
}catch (ValidateSignatureException e) {
233+
} catch (ValidateSignatureException e) {
234234
throw new P2pException(TypeEnum.BAD_BLOCK, e);
235235
}
236236
}

‎src/main/java/org/tron/core/net/service/AdvService.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class AdvService {
6464

6565
private boolean fastForward = Args.getInstance().isFastForward();
6666

67-
public void init () {
67+
public void init() {
6868
if (!fastForward) {
6969
spreadExecutor.scheduleWithFixedDelay(() -> {
7070
try {

‎src/test/java/stest/tron/wallet/common/client/utils/HttpMethed.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ public static HttpResponse broadcastTransaction(String httpNode, String transact
849849
Integer times = 0;
850850

851851
while (times++ <= 10 && responseContent.getString("code") != null && responseContent
852-
.getString("code").equalsIgnoreCase("SERVER_BUSY")) {
852+
.getString("code").equalsIgnoreCase("SERVER_BUSY")) {
853853
logger.info("retry num are " + times);
854854
try {
855855
response = httpClient.execute(httppost);
@@ -2051,7 +2051,6 @@ public static HttpResponse easyTransferAssetByPrivate(String httpNode, String pr
20512051
}
20522052

20532053

2054-
20552054
/**
20562055
* constructor.
20572056
*/

0 commit comments

Comments
 (0)