Project: Eclipse_Platform_UI
Bug 157799 [WorkingSets] Add to working can cause stack overflow
Reported: 2006-09-19 09:07:57 | Status: verified fixed

I20060918 1) set the Package Explorer to show working sets as top level element 2) select a working set 3) from the add to working set drop down attempt to add it to itself. 4) Boom headshot! This is a perfect example of why we need a working set validator class that can be used to test objects before they are added to working sets. In the interim we can simply add a hack to the working set action code to check to see if an element is a working set (or adapts to one) and if so exclude it from the operation. at java.util.ArrayList.get(ArrayList.java:321) at java.util.AbstractList$Itr.next(AbstractList.java:422) at java.util.AbstractList.hashCode(AbstractList.java:629) at org.eclipse.ui.internal.WorkingSet.hashCode(WorkingSet.java:136) at java.util.AbstractList.hashCode(AbstractList.java:630) at org.eclipse.ui.internal.WorkingSet.hashCode(WorkingSet.java:136) at java.util.AbstractList.hashCode(AbstractList.java:630) at org.eclipse.ui.internal.WorkingSet.hashCode(WorkingSet.java:136) at java.util.AbstractList.hashCode(AbstractList.java:630) at org.eclipse.ui.internal.WorkingSet.hashCode(WorkingSet.java:136) at java.util.AbstractList.hashCode(AbstractList.java:630) at org.eclipse.ui.internal.WorkingSet.hashCode(WorkingSet.java:136) at java.util.AbstractList.hashCode(AbstractList.java:630) at org.eclipse.ui.internal.WorkingSet.hashCode(WorkingSet.java:136)

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