Issue 2192: RefObject::value() needs to raise NotSet (mof-rtf) Source: (, ) Nature: Revision Severity: Minor Summary: Summary: In cases with a multiplicity of [0..1], the NotSet exception can be thrown, so the value() method should be defined to raise the NotSet exception. Additional text: Proposed fix - redefine the value() to have the following signature. ValueType value (in DesignatorType feature) raises (InvalidDesignator, NotSet, SemanticError); Resolution: closed resolved Revised Text: Actions taken: November 6, 1998: received issue July 23, 1999: closed issue Discussion: The question here is how do we want the "value" operation of the RefObject interface to behave for different multiplicities. For a single X value, the returned-any contains an X. For a 0..1 X value, we can either 1) if value-exists return an X, else raise NotSet, or 2) always return a sequence with 0 or 1 Xs as appropriate. Only the second option is currently possible (as the "value" operation does not raise NotSet). Similarly, if a value has 0..N multiplicity, what should be done if there are 0 elements. Should we 1) raise NotSet or 2) return an 0- length sequence? Semantically, is a 0-lenth sequence different to a NotSet sequence? Implementation: Ref_value() changed to be analogous to the specific version; i.e it raises NotSet in the [0..1] case and returns an empty sequence in the [0..n>1] case; see Section 6.2.3, “Reflective::RefObject,” on page 6-10. Done. [SC] End of Annotations:===== Return-Path: To: mof-rtf@omg.org, issues@omg.org Subject: Issues with the MOF Reflective interfaces Date: Sat, 07 Nov 1998 02:04:02 +1000 From: Stephen Crawley This message contains a set of issues that DSTC have discovered while implementing the MOF Reflective interfaces. Don't panic. They are all "minor" :-) Credit for finding them and carefully documenting them is due to Douglas Kosovic. -- Steve =================================================================== Subject: RefObject::value() needs to raise NotSet Source: DSTC (Douglas Kosovic, douglask@dstc.edu.au) Nature: Revision Severity: Minor Summary: In cases with a multiplicity of [0..1], the NotSet exception can be thrown, so the value() method should be defined to raise the NotSet exception. Additional text: Proposed fix - redefine the value() to have the following signature. ValueType value (in DesignatorType feature) raises (InvalidDesignator, NotSet, SemanticError);