Project: Eclipse_Platform_UI
Bug 131397 [Progress] IllegalArgumentException in ProgressInfoItem.refresh()
Reported: 2006-03-10 16:30:50 | Status: verified fixed

While running some of the import tests (specifically, the ImportExistingTest class) I get the an illegal arg exception which appears to be a result of code in the ProgressInfoItem.refresh() method: taskEntries = taskEntries.subList(0, infos.length-1); In my case, infos is an empty array so subList is called with (0, -1) which throws an IllegalArgumentException. Caused by: java.lang.IllegalArgumentException: fromIndex(0) > toIndex(-1) at java.util.SubList.<init>(AbstractList.java:707) at java.util.RandomAccessSubList.<init>(AbstractList.java:861) at java.util.AbstractList.subList(AbstractList.java:570) at org.eclipse.ui.internal.progress.ProgressInfoItem.refresh(ProgressInfoItem.java:535) at org.eclipse.ui.internal.progress.ProgressInfoItem.createChildren(ProgressInfoItem.java:269) at org.eclipse.ui.internal.progress.ProgressInfoItem.<init>(ProgressInfoItem.java:173) at org.eclipse.ui.internal.progress.DetailedProgressViewer.createNewItem(DetailedProgressViewer.java:129) at org.eclipse.ui.internal.progress.DetailedProgressViewer.refreshAll(DetailedProgressViewer.java:407) at org.eclipse.ui.internal.progress.DetailedProgressViewer.internalRefresh(DetailedProgressViewer.java:307) at org.eclipse.jface.viewers.StructuredViewer.internalRefresh(StructuredViewer.java:1182) at org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredViewer.java:1386) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1294) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1384) at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1341)

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressInfoItem.java