What steps will reproduce the problem?
1. Create a new create
2. Order the query by a column
3. Unselect the column you sorted by
What is the expected output? What do you see instead?
The order by clause should just be dropped. Instead you get the following
error message:
java.lang.ArrayIndexOutOfBoundsException: -1
at ca.sqlpower.sql.CachedRowSet.getObject(CachedRowSet.java:586)
at
ca.sqlpower.swingui.table.ResultSetTableModel.getValueAt(ResultSetTableMode
l.java:74)
at
ca.sqlpower.swingui.table.TableModelSortDecorator$Row.compareTo(TableModelS
ortDecorator.java:374)
at java.util.Arrays.mergeSort(Unknown Source)
at java.util.Arrays.mergeSort(Unknown Source)
at java.util.Arrays.mergeSort(Unknown Source)
at java.util.Arrays.sort(Unknown Source)
at
ca.sqlpower.swingui.table.TableModelSortDecorator.getViewToModel(TableModel
SortDecorator.java:302)
at
ca.sqlpower.swingui.table.TableModelSortDecorator.modelIndex(TableModelSort
Decorator.java:309)
at
ca.sqlpower.swingui.table.TableModelSortDecorator.getValueAt(TableModelSort
Decorator.java:351)
at
ca.sqlpower.swingui.table.TableModelSearchDecorator.getValueAt(TableModelSe
archDecorator.java:172)
at javax.swing.JTable.getValueAt(Unknown Source)
at javax.swing.JTable.prepareRenderer(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source)
at javax.swing.plaf.ComponentUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JViewport.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at
javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at
javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown
Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Please use labels and text to provide additional information.
Original issue reported on code.google.com by bdietz.de on 3 Jul 2009 at 7:22
Original issue reported on code.google.com by
bdietz.de
on 3 Jul 2009 at 7:22