Fix the NPE

Former-commit-id: aee509bd20e8dd9f5e6112e655e50ecb2fff0ac3 [formerly 0254d0a19ad611877aa6f311c6f1476c4b6ec1d6]
Former-commit-id: 3a5fd38570095b1e138e2ba10eee439d279f11fb
This commit is contained in:
Ghost_chu committed 2019-05-28 18:58:46 +08:00
1 parent 1d9c8e3ef8
commit 8d1226f8c8
1 file changed
+6 -6
@@ -16,12 +16,12 @@ public class MySQLCore implements DatabaseCore {
public MySQLCore(String host, String user, String pass, String database, String port, boolean useSSL) {
info = new Properties();
info.put("autoReconnect", "true");
info.put("user", user);
info.put("password", pass);
info.put("useUnicode", "true");
info.put("characterEncoding", "utf8");
info.put("useSSL", useSSL);
info.setProperty("autoReconnect", "true");
info.setProperty("user", user);
info.setProperty("password", pass);
info.setProperty("useUnicode", "true");
info.setProperty("characterEncoding", "utf8");
info.setProperty("useSSL", String.valueOf(useSSL));
this.url = "jdbc:mysql://" + host + ":" + port + "/" + database;
for (int i = 0; i < MAX_CONNECTIONS; i++)
pool.add(null);