Skip to content

Commit 2ea0ba3

Browse files
committed
check endpoint of OpenSergoClient
Signed-off-by: Jiangnan Jia <[email protected]>
1 parent bd5f15f commit 2ea0ba3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/io/opensergo/OpenSergoClient.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class OpenSergoClient implements AutoCloseable {
5353
public static class Builder {
5454

5555
private String host;
56-
private int port;
56+
private int port = 10246;
5757
private OpenSergoClientConfig openSergoConfig;
5858

5959
public OpenSergoClient.Builder endpoint(String host, int port) {
@@ -83,6 +83,8 @@ public OpenSergoClient(String host, int port) {
8383
}
8484

8585
public OpenSergoClient(String host, int port, OpenSergoClientConfig clientConfig) {
86+
AssertUtils.notEmpty(host, "host cannot be empty, need to give a valid host");
87+
AssertUtils.isTrue(port < 1, "port < 1 is invalid, need to give a valid port");
8688
checkClientConfig(clientConfig);
8789
// TODO: support TLS
8890
this.clientConfig = clientConfig;

0 commit comments

Comments
 (0)