Project: Eclipse_Platform_UI
Bug 211646 [JFace] StructuredSelection.toList(...) allows modification to original selection
Reported: 2007-11-30 16:27:48 | Status: verified fixed

3.4 The implementation of StructuredSelection.toList() looks like this: "return Arrays.asList(elements == null ? new Object[0] : elements);" This returns a list with the actual underlying array of selected elements. Changes to the list returned by this method write through to the underlying array and change the original selection. I don't think this is intentional?

Files changed in fix:
bundles/org.eclipse.jface/src/org/eclipse/jface/viewers/IStructuredSelection.java