Skip to content

Commit 3ef4af1

Browse files
committed
remove reduant throw exception
1 parent 8ec46aa commit 3ef4af1

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

common/src/main/java/org/tron/common/logsfilter/FilterQuery.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ public static long parseFromBlockNumber(String blockNum) {
3131
if (StringUtils.isEmpty(blockNum) || FilterQuery.EARLIEST.equalsIgnoreCase(blockNum)) {
3232
number = FilterQuery.EARLIEST_BLOCK_NUM;
3333
} else {
34-
try {
35-
number = Long.parseLong(blockNum);
36-
} catch (Exception e) {
37-
throw e;
38-
}
34+
number = Long.parseLong(blockNum);
3935
}
4036
return number;
4137
}
@@ -45,11 +41,7 @@ public static long parseToBlockNumber(String blockNum) {
4541
if (StringUtils.isEmpty(blockNum) || FilterQuery.LATEST.equalsIgnoreCase(blockNum)) {
4642
number = FilterQuery.LATEST_BLOCK_NUM;
4743
} else {
48-
try {
49-
number = Long.parseLong(blockNum);
50-
} catch (Exception e) {
51-
throw e;
52-
}
44+
number = Long.parseLong(blockNum);
5345
}
5446
return number;
5547
}

framework/src/test/java/org/tron/core/services/WalletApiTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ public void listNodesTest() {
6969
@AfterClass
7070
public static void destroy() {
7171
context.destroy();
72-
appT.shutdown();
7372
Args.clearParam();
7473
}
7574

framework/src/test/java/org/tron/core/services/filter/LiteFnQueryGrpcInterceptorTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public static void init() throws IOException {
7575
.usePlaintext()
7676
.build();
7777
context = new TronApplicationContext(DefaultConfig.class);
78-
// context.registerShutdownHook();
7978
blockingStubFull = WalletGrpc.newBlockingStub(channelFull);
8079
blockingStubSolidity = WalletSolidityGrpc.newBlockingStub(channelSolidity);
8180
blockingStubpBFT = WalletSolidityGrpc.newBlockingStub(channelpBFT);

0 commit comments

Comments
 (0)