Bug #3406
closedChanging delimiters on ConfigureDataSource doesn't work
0%
Description
Here's a stack trace
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0
at edu.msu.first.dataimport.gui.ConfigureDataSource$8.valueChanged(ConfigureDataSource.java:511)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
at javax.swing.DefaultListSelectionModel.changeSelection(Unknown Source)
at javax.swing.DefaultListSelectionModel.removeSelectionIntervalImpl(Unknown Source)
at javax.swing.DefaultListSelectionModel.clearSelection(Unknown Source)
at javax.swing.JTable.clearSelection(Unknown Source)
at javax.swing.JTable.clearSelectionAndLeadAnchor(Unknown Source)
at javax.swing.JTable.tableChanged(Unknown Source)
at javax.swing.table.AbstractTableModel.fireTableChanged(Unknown Source)
at javax.swing.table.AbstractTableModel.fireTableStructureChanged(Unknown Source)
at edu.msu.first.dataimport.DataSourcePreviewPanel.propertyChange(DataSourcePreviewPanel.java:430)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at edu.msu.first.dataimport.DelimitedDataSource.setDelimiter(DelimitedDataSource.java:43)
at edu.msu.first.dataimport.gui.ConfigureDataSource$1.actionPerformed(ConfigureDataSource.java:395)
Updated by Ryan McFall over 15 years ago
This was due to code that was attempting to handle the change in the selected rows/columns in the table, which was being cleared when the delimiter was changed.
Adding a check for an empty selection fixed this problem.