From 24a86f5afe090da1ae199732d7a4d7963b47dd54 Mon Sep 17 00:00:00 2001 From: rinoux Date: Fri, 23 Sep 2022 09:46:52 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-80922=20=E8=BF=9C=E7=A8=8B=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E4=B8=8B=E5=AD=98=E5=82=A8=E8=BF=87=E7=A8=8B=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E5=8A=A0=E8=BD=BD=E7=8A=B6=E6=80=81NPE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wrapper/MultiResultTableDataWrapper.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java index ae68bd112b..c72baf4356 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java @@ -187,18 +187,20 @@ public final class MultiResultTableDataWrapper implements TableDataWrapper { protected Void doInBackground() throws Exception { loadingBar.close(); PreviewTablePane.resetPreviewTable(); - connectionBar.start(); // 存储过程需要先测试一下连接 if (tableData instanceof StoreProcedure) { - boolean status = DataOperator.getInstance().testConnection(((StoreProcedure) getTableData()).getDatabaseConnection()); - if (!status) { + try { + connectionBar.start(); + boolean success = DataOperator.getInstance().testConnection(((StoreProcedure) getTableData()).getDatabaseConnection()); + if (!success) { + throw new Exception(Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed")); + } + } finally { connectionBar.close(); - throw new Exception(Toolkit.i18nText("Fine-Design_Basic_Database_Connection_Failed")); } } - connectionBar.close(); tableData.resetDataModelList(); // 获取结果