Project: JDT
Bug 171359 'Open Type' brings error dialog when filtering
Reported: 2007-01-23 03:54:45 | Status: verified fixed

I20070116-1510 + plug-in export I20070116-1510.from20070122_1159. Not reproducible with all patterns. In my dev workspace I type "s" into the filter field and get an error dialog (see attached picture) and the following .log entry: !ENTRY org.eclipse.core.jobs 4 2 2007-01-23 09:46:34.843 !MESSAGE An internal error occurred during: "Items filtering". !STACK 0 java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(String.java:558) at org.eclipse.jdt.internal.ui.dialogs.FilteredTypesSelectionDialog$TypeItemsComparator.compareName(FilteredTypesSelectionDialog.java:1271) at org.eclipse.jdt.internal.ui.dialogs.FilteredTypesSelectionDialog$TypeItemsComparator.compare(FilteredTypesSelectionDialog.java:1251) at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$HistoryComparator.compare(FilteredItemsSelectionDialog.java:3152) at java.util.Arrays.mergeSort(Arrays.java:1307) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.mergeSort(Arrays.java:1295) at java.util.Arrays.sort(Arrays.java:1223) at java.util.Collections.sort(Collections.java:159) at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$ContentProvider.getItems(FilteredItemsSelectionDialog.java:2697) at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$ContentProvider.rememberResult(FilteredItemsSelectionDialog.java:2711) at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$FilterJob.filterContent(FilteredItemsSelectionDialog.java:2040) at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$AbstractFilterJob.internalRun(FilteredItemsSelectionDialog.java:1915) at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$AbstractFilterJob.doRun(FilteredItemsSelectionDialog.java:1876) at org.eclipse.ui.dialogs.FilteredItemsSelectionDialog$AbstractFilterJob.run(FilteredItemsSelectionDialog.java:1856) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/FilteredTypesSelectionDialog.java