Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ public static void setParam(final String[] args, final String confFileName) {
AnsiConsole.systemUninstall();
throw new TronError(e, TronError.ErrCode.JDK_VERSION);
}
clearParam(); // reset all parameters to avoid the influence in test
JCommander.newBuilder().addObject(PARAMETER).build().parse(args);
if (PARAMETER.version) {
printVersion();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.google.common.collect.Lists;
import java.io.IOException;
import java.security.SecureRandom;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Rule;
Expand Down Expand Up @@ -52,6 +53,11 @@ public void setLocalWitness() {
PRIVATE_KEY));
}

@AfterClass
public static void clear() {
Args.clearParam();
}

@Test
public void whenSetNullPrivateKey() {
localWitness.setPrivateKeys(null);
Expand Down