Skip to content

Commit e0b0e5a

Browse files
author
lucaijun
committed
AJ-542: add simple connection pool with parameter verification
1 parent 9a3f7bc commit e0b0e5a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/com/xxdb/SimpleDBConnectionPoolConfig.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ public void validate() {
128128
hostName = "localhost";
129129
log.warn("HostName not set, use the default value 'localhost'");
130130
}
131-
if (port <= 0)
132-
throw new RuntimeException("The port should be positive.");
131+
if (port <= 0) {
132+
port = 8848;
133+
log.warn("invalid port, use the default value 8848.");
134+
}
133135
userId = getNullIfEmpty(userId);
134136
if (Objects.isNull(userId))
135137
log.warn("Logging in needs userId.");

0 commit comments

Comments
 (0)