From 58bc5e247e1f26c0288d5e65af6af5cb3e6b4ac0 Mon Sep 17 00:00:00 2001 From: mengao <283296419@qq.com> Date: Tue, 20 Jun 2017 17:57:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9pmd=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/editor/editor/ColumnSelectedEditor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java b/designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java index 22516882b..71014d4c8 100644 --- a/designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java +++ b/designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java @@ -68,7 +68,7 @@ public class ColumnSelectedEditor extends Editor { dsColumn.setDsName(tableDataWrappe.getTableDataName()); TableDataColumn column; String columnExp = (String) this.columnNameComboBox.getSelectedItem(); - if (StringUtils.isNotBlank(columnExp) && (columnExp.length() > 0 && columnExp.charAt(0) == '#') && !columnExp.endsWith("#")) { + if (StringUtils.isNotBlank(columnExp) && checkColumnExp(columnExp)) { String number = columnExp.substring(1); Pattern pattern = Pattern.compile("[^\\d]"); if (pattern.matcher(number).find()) { @@ -84,6 +84,10 @@ public class ColumnSelectedEditor extends Editor { return dsColumn; } + private boolean checkColumnExp (String columnExp) { + return (columnExp.length() > 0 && columnExp.charAt(0) == '#') && !columnExp.endsWith("#"); + } + public String getIconName() { return "ds_column"; }