Issue 10701: non-existing elements (data-distribution-rtf) Source: PrismTech (Mr. Erik Hendriks, erik.hendriks(at)prismtech.com) Nature: Clarification Severity: Summary: Problem: It is not clear what will happen when someone tries to obtain or remove a non-existing element from a Collection type (i.e. use the get/remove operation with a non-existing key/index). The NoSuchElement Exception was meant for that purpose. Solution: Explicitly mention the siutuations in which the NoSuchElement exception will be raised. Section 3.1.6.3.16 Replace: · "remove - to remove the item with the highest index from the collection. · "get - to retrieve an item in the collection (based on its index). With: · remove - to remove the item with the highest index from the collection. If the List is already empty, a NoSuchElement is raised. · get - to retrieve an item in the collection (based on its index). If the specified index is greater than or equal to the length of the List, a NoSuchElement is raised. Section 3.1.6.3.17 Replace: · "remove - to remove an element from the Set. If the specified element is not contained in the Set, the operation is ignored. With: · remove - to remove an element from the Set. If the specified element is not contained in the Set, a NoSuchElement is raised. Section 3.1.6.3.18 AND 3.1.6.3.19 Replace: · "remove - to remove an item from the collection. · "get - to retrieve an item in the collection (based on its key). With: · remove - to remove an item from the collection. If no item matches the specified key, a NoSuchElement is raised. · get - to retrieve an item in the collection (based on its key). If no item matches the specified key, a NoSuchElement is raised. Resolution: Revised Text: Actions taken: February 12, 2007: received issue Discussion: When accessing or removing non-existing elements in Collections a NoSuchElement should be thrown. End of Annotations:===== s is issue # 10701 non-existing elements When accessing or removing non-existing elements in Collections a NoSuchElement should be thrown. Problem: It is not clear what will happen when someone tries to obtain or remove a non-existing element from a Collection type (i.e. use the get/remove operation with a non-existing key/index). The NoSuchElement Exception was meant for that purpose. Solution: Explicitly mention the siutuations in which the NoSuchElement exception will be raised. Section 3.1.6.3.16 Replace: · "remove - to remove the item with the highest index from the collection. · "get - to retrieve an item in the collection (based on its index). With: · remove - to remove the item with the highest index from the collection. If the List is already empty, a NoSuchElement is raised. · get - to retrieve an item in the collection (based on its index). If the specified index is greater than or equal to the length of the List, a NoSuchElement is raised. Section 3.1.6.3.17 Replace: · "remove - to remove an element from the Set. If the specified element is not contained in the Set, the operation is ignored. With: · remove - to remove an element from the Set. If the specified element is not contained in the Set, a NoSuchElement is raised. Section 3.1.6.3.18 AND 3.1.6.3.19 Replace: · "remove - to remove an item from the collection. · "get - to retrieve an item in the collection (based on its key). With: · remove - to remove an item from the collection. If no item matches the specified key, a NoSuchElement is raised. · get - to retrieve an item in the collection (based on its key). If no item matches the specified key, a NoSuchElement is raised.