From 6a1eb30af055e14e6299962dffcac408797260d2 Mon Sep 17 00:00:00 2001 From: neil <459208047@qq.com> Date: Wed, 15 Aug 2018 09:00:24 +0800 Subject: [PATCH] =?UTF-8?q?DEC-3905=20=E6=95=B0=E6=8D=AE=E9=9B=86=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=BC=82=E5=B8=B8=E6=8B=A6=E6=88=AA=E4=B8=80=E4=B8=8B?= =?UTF-8?q?,=20=E9=98=BB=E6=AD=A2=E6=8A=9B=E5=88=B0=E6=9C=80=E5=A4=96?= =?UTF-8?q?=E5=B1=82.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tabledata/wrapper/TableDataFactory.java | 41 +++++++++++++++---- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java index 622f88204c..28c6628a6c 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/TableDataFactory.java @@ -3,17 +3,37 @@ package com.fr.design.data.tabledata.wrapper; import com.fr.base.FRContext; import com.fr.base.TableData; import com.fr.data.TableDataSource; -import com.fr.data.impl.*; +import com.fr.data.impl.ClassTableData; +import com.fr.data.impl.DBTableData; +import com.fr.data.impl.DecoratedTableData; +import com.fr.data.impl.EmbeddedTableData; +import com.fr.data.impl.FileTableData; +import com.fr.data.impl.MultiFieldTableData; +import com.fr.data.impl.MultiTDTableData; +import com.fr.data.impl.RecursionTableData; import com.fr.data.impl.storeproc.StoreProcedure; import com.fr.design.data.datapane.TableDataNameObjectCreator; -import com.fr.design.data.tabledata.tabledatapane.*; +import com.fr.design.data.tabledata.tabledatapane.AbstractTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.ClassTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.DBTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.DecoratedTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.EmbeddedTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.FileTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.MultiTDTableDataPane; +import com.fr.design.data.tabledata.tabledatapane.ProcedureDataPane; +import com.fr.design.data.tabledata.tabledatapane.TreeTableDataPane; import com.fr.file.TableDataConfig; import com.fr.general.ComparatorUtils; +import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.StringUtils; import java.lang.reflect.Constructor; -import java.util.*; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; import java.util.Map.Entry; /** @@ -155,12 +175,17 @@ public abstract class TableDataFactory { @SuppressWarnings("unchecked") public static String[] getSortOfChineseNameOfServerData(TableDataConfig tableDataConfig) { clearAll(); - java.util.Iterator nameIt = tableDataConfig.getTableDatas().keySet().iterator(); - while (nameIt.hasNext()) { - String name = nameIt.next(); - TableData td = TableDataConfig.getInstance().getTableData(name); - addName(name, td); + try { + java.util.Iterator nameIt = tableDataConfig.getTableDatas().keySet().iterator(); + while (nameIt.hasNext()) { + String name = nameIt.next(); + addName(name, tableDataConfig.getTableData(name)); + } + } catch (Exception e) { + FineLoggerFactory.getLogger().error(e.getMessage(), e); + return ArrayUtils.EMPTY_STRING_ARRAY; } + return getSortedNameArray(); }