Browse Source

REPORT-90013 设计器新增不支持的数据连接类型可以保存

【问题原因】之前每个空bean对象都是新建的且写equals方法
【改动思路】修改空bean对象,实现equals方法
new-design
Leo.Qin 2 years ago
parent
commit
33b8a22e2a
  1. 3
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java

3
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionManagerPane.java

@ -8,6 +8,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.file.ConnectionConfig;
import com.fr.general.NameObject;
import com.fr.license.exception.DataBaseNotSupportedException;
import com.fr.stable.AssistUtils;
import com.fr.stable.Nameable;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.database.DataBaseTypeOperator;
@ -80,7 +81,7 @@ public class ConnectionManagerPane extends LoadingBasicPane implements Connectio
// 仅校验jdbc连接,其他插件数据连接不进行校验
if (connection instanceof JDBCDatabaseConnection) {
DatabaseResultBean bean = WorkContext.getCurrent().get(DataBaseTypeOperator.class).validateDatabaseType(connection.getDriver(), connection.feature());
if (!bean.equals(DatabaseResultBean.DefaultBean())) {
if (!AssistUtils.equals(DatabaseResultBean.EMPTY_BEAN, bean)) {
throw new DataBaseNotSupportedException(bean.getMsg());
}
}

Loading…
Cancel
Save