Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343783 - BasicEList$BasicIndexOutOfBoundsException triggered via Element.destroy()
Summary: BasicEList$BasicIndexOutOfBoundsException triggered via Element.destroy()
Status: CLOSED FIXED
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: RC1   Edit
Assignee: Kenn Hussey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-25 21:37 EDT by Keith W. Campbell CLA
Modified: 2012-05-22 12:10 EDT (History)
1 user (show)

See Also:
Kenn.Hussey: indigo+


Attachments
Junit test plugin to reproduce the problem. (2.47 KB, application/octet-stream)
2011-04-25 21:38 EDT, Keith W. Campbell CLA
no flags Details
proposed patch (1.31 KB, patch)
2011-04-25 21:45 EDT, Keith W. Campbell CLA
Kenn.Hussey: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith W. Campbell CLA 2011-04-25 21:37:09 EDT
Build Identifier: org.eclipse.uml2.common_1.5.0.v201005031530

The attached zip file contains a small junit test class that demonstrates
how the exception occurs.

Reproducible: Always

Steps to Reproduce:
1. Run the attached junit test.
Comment 1 Keith W. Campbell CLA 2011-04-25 21:38:58 EDT
Created attachment 194030 [details]
Junit test plugin to reproduce the problem.
Comment 2 Keith W. Campbell CLA 2011-04-25 21:45:00 EDT
Here is the stack trace of the exception as triggered by the junit test.

org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=1, size=1
  at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:352)
  at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.hasNext(EContentsEList.java:484)
  at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.next(EContentsEList.java:565)
  at org.eclipse.emf.common.util.AbstractTreeIterator.next(AbstractTreeIterator.java:139)
  at org.eclipse.uml2.uml.internal.operations.ElementOperations.destroy(ElementOperations.java:1623)
  at org.eclipse.uml2.uml.internal.operations.ElementOperations.destroy(ElementOperations.java:1593)
  at org.eclipse.uml2.uml.internal.impl.ElementImpl.destroy(ElementImpl.java:567)
  at bug.example.DestroyTest.testDestroy(DestroyTest.java:94)
  ...
Comment 3 Keith W. Campbell CLA 2011-04-25 21:45:51 EDT
Created attachment 194031 [details]
proposed patch
Comment 4 Kenn Hussey CLA 2011-05-02 17:21:50 EDT
The proposed fix has been committed to CVS. I'll post an integration build later this week.
Comment 5 Kenn Hussey CLA 2011-05-02 21:44:42 EDT
Integration build I201105021958 is now available. Please confirm that this build resolves the issue.
Comment 6 Kenn Hussey CLA 2011-05-17 23:02:24 EDT
The fix is available in the RC1 build.
Comment 7 Kenn Hussey CLA 2011-05-31 10:34:20 EDT
Closing for Indigo release.