Browse Source

修复pmd错误

master
mengao 8 years ago
parent
commit
382268234d
  1. 14
      designer_base/src/com/fr/design/editor/editor/ColumnSelectedEditor.java

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

@ -36,13 +36,13 @@ public class ColumnSelectedEditor extends Editor<SimpleDSColumn> {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
TableDataWrapper tableDataWrapper = tableDataComboBox.getSelectedItem(); TableDataWrapper tableDataWrapper = tableDataComboBox.getSelectedItem();
if (tableDataWrapper == null) { if (tableDataWrapper == null) {
return; return;
} }
//这边需要重新初始化columnNames, 否则nameList长度和columnNames长度不同导致出錯。 //这边需要重新初始化columnNames, 否则nameList长度和columnNames长度不同导致出錯。
List<String> nameList = tableDataComboBox.getSelectedItem().calculateColumnNameList(); List<String> nameList = tableDataWrapper.calculateColumnNameList();
columnNames = new String[nameList.size()]; columnNames = new String[nameList.size()];
columnNames = tableDataComboBox.getSelectedItem().calculateColumnNameList().toArray(columnNames); columnNames = tableDataComboBox.getSelectedItem().calculateColumnNameList().toArray(columnNames);
columnNameComboBox.removeAllItems(); columnNameComboBox.removeAllItems();
for (int i = 0; i < columnNames.length; i++) { for (int i = 0; i < columnNames.length; i++) {

Loading…
Cancel
Save