Browse Source

修改pmd错误

master
mengao 8 years ago
parent
commit
58bc5e247e
  1. 6
      designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java

6
designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java

@ -68,7 +68,7 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
dsColumn.setDsName(tableDataWrappe.getTableDataName()); dsColumn.setDsName(tableDataWrappe.getTableDataName());
TableDataColumn column; TableDataColumn column;
String columnExp = (String) this.columnNameComboBox.getSelectedItem(); 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); String number = columnExp.substring(1);
Pattern pattern = Pattern.compile("[^\\d]"); Pattern pattern = Pattern.compile("[^\\d]");
if (pattern.matcher(number).find()) { if (pattern.matcher(number).find()) {
@ -84,6 +84,10 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
return dsColumn; return dsColumn;
} }
private boolean checkColumnExp (String columnExp) {
return (columnExp.length() > 0 && columnExp.charAt(0) == '#') && !columnExp.endsWith("#");
}
public String getIconName() { public String getIconName() {
return "ds_column"; return "ds_column";
} }

Loading…
Cancel
Save