Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 364185

Summary: Differences of behavior when getting the first element of an empty sequence and an ordered set.
Product: [Modeling] MMT.ATL Reporter: Dominique Blouin <dominique.blouin>
Component: emfvmAssignee: mmt-atl.toolkit-inbox <mmt-atl.toolkit-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Source code of the modified class. none

Description Dominique Blouin CLA 2011-11-18 12:56:20 EST
Created attachment 207234 [details]
Source code of the modified class.

There is a discrepancy in the behavior of getting the first element of an empty ordered set and a sequence. When the collection is a sequence, getting the first element of the sequence returns null. When it is an ordered set, a no such element exception is thrown. On the other hand, getting the last element of an empty ordered set returns null. For the regular vm, null is returned for all these cases.

This can be fixed by modifying the ExecEnv class by changing the implementation of the registered ordered set first operation. The class is attached.