Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Commit

Permalink
stop ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
dangdang01234 committed May 17, 2023
1 parent dcfa4f6 commit 0daca93
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package com.alibaba.dbhub.server.domain.support.datasource;

import java.net.MalformedURLException;
import java.util.Objects;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;

Expand All @@ -15,6 +16,8 @@
import com.alibaba.dbhub.server.domain.support.sql.DbhubContext;
import com.alibaba.dbhub.server.domain.support.sql.IDriverManager;

import org.springframework.util.ObjectUtils;

/**
* @author jipengfei
* @version : DataSourceManger.java
Expand Down Expand Up @@ -70,7 +73,7 @@ private static IDataSource createDataSource(ConnectInfo connectInfo) throws Malf
dataSource.setPassword(connectInfo.getPassword());
dataSource.setConnectionErrorRetryAttempts(2);
dataSource.setBreakAfterAcquireFailure(true);
if (connectInfo.getExtendInfo() != null) {
if (!ObjectUtils.isEmpty(connectInfo.getExtendMap())) {
Properties properties = new Properties();
properties.putAll(connectInfo.getExtendMap());
dataSource.setConnectProperties(properties);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public class ConnectInfo {
*/
public LinkedHashMap<String,Object> getExtendMap() {
if (ObjectUtils.isEmpty(extendInfo)) {
return null;
return new LinkedHashMap<>();
}
LinkedHashMap<String,Object> map = new LinkedHashMap<>();
for (KeyValue keyValue : extendInfo) {
Expand Down

0 comments on commit 0daca93

Please sign in to comment.