Browse Source

Pull request #11534: REPORT-90598 首次重启设计器新建sql server数据连接首次保存报错数据库限制

Merge in DESIGN/design from ~LEO.QIN/design:release/11.0 to release/11.0

* commit 'aeff582dcac4bbc8d9950a92fd9e33d61463d080':
  REPORT-90598 首次重启设计器新建sql server数据连接首次保存报错数据库限制 【问题原因】首次获取lic中支持的数据库类型时,枚举类未初始化,导致获取为空 【改动思路】修改接口
release/11.0
Leo.Qin-覃宇攀 2 years ago
parent
commit
c7284a4474
  1. 9
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java

9
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionListPane.java

@ -21,8 +21,8 @@ import com.fr.event.EventDispatcher;
import com.fr.file.ConnectionConfig; import com.fr.file.ConnectionConfig;
import com.fr.file.ConnectionOperator; import com.fr.file.ConnectionOperator;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.license.database.BaseDataBaseTypePoint;
import com.fr.license.database.DBTypes; import com.fr.license.database.DBTypes;
import com.fr.license.database.DataBaseTypePointManager;
import com.fr.license.exception.DataBaseNotSupportedException; import com.fr.license.exception.DataBaseNotSupportedException;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
@ -279,8 +279,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
Connection connection = bean.getConnection(); Connection connection = bean.getConnection();
// 仅校验jdbc连接,其他插件数据连接不进行校验 // 仅校验jdbc连接,其他插件数据连接不进行校验
if (connection instanceof JDBCDatabaseConnection) { if (connection instanceof JDBCDatabaseConnection) {
BaseDataBaseTypePoint dataBaseTypePoint = BaseDataBaseTypePoint.getDataBaseTypePoint(connection.getDriver(), connection.feature()); DBTypes dataBaseTypePoint = DataBaseTypePointManager.getInstance().getDataBaseTypePoint(connection.getDriver(), connection.feature());
if (connectionIsNotSupported(connection, dataBaseTypePoint)) { if (connectionIsNotSupported(connection, dataBaseTypePoint)) {
notSupportedConnections.addAll(dataBaseTypePoint.getDataBaseType()); notSupportedConnections.addAll(dataBaseTypePoint.getDataBaseType());
} }
@ -296,9 +295,9 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh
/** /**
* 校验当前数据连接是否被限制 * 校验当前数据连接是否被限制
*/ */
private static boolean connectionIsNotSupported(Connection connection, BaseDataBaseTypePoint dataBaseTypePoint) { private static boolean connectionIsNotSupported(Connection connection, DBTypes dataBaseTypePoint) {
return !validateFRDemo(connection.getDriver(), connection.feature()) && return !validateFRDemo(connection.getDriver(), connection.feature()) &&
(dataBaseTypePoint != null && !supportedDatabaseTypes.containsAll(dataBaseTypePoint.getDatabaseType())); (dataBaseTypePoint != null && !supportedDatabaseTypes.containsAll(dataBaseTypePoint.getDataBaseType()));
} }
/** /**

Loading…
Cancel
Save