Issue 1518: Should set_<referencename>(nil) be legal? (mof-rtf) Source: (, ) Nature: Revision Severity: Minor Summary: Summary: This relates to the previous issue. Should it be legal to call a set_<referencename>(in <ReferenceType> new_value> operation (see 7.3.8) with a nil object reference as the new_value? Resolution: resolved Revised Text: Actions taken: June 10, 1998: received issue May 8, 2000: closed issue Discussion: Discussion: If this is legal then the semantics should be spelled out. We should alsodecide if this makes the unset_<reference_name operation redundant. If this is illegal, then operation needs to be able to raise StructuralError in all cases to in-dicate an invalid link. In favour of making set_<referefencename>(nil) legal is that it is legal in the attribute case. On the other hand, setting a reference to nil is semantically different to setting an at-tribute to nil: this is another example of the "nil != not present" issue. FONT COLOR="#FF0000"Proposed resolution: This should raise StructuralError. Am-mend the text of 7.3.8 to make this clear. Implementation: As a byproduct of the resolution of “Issue 1085: Consider a better approach to generated exceptions (mof-rtf)”, the set_<reference> operations already return MofError (which subsumes StructuralEr-ror). Added text to Section 5.8.12, “Reference Template,” on page 5-81 requiring that the new value(s) supplied must be non-null references. Done [KR]. End of Annotations:===== Return-Path: To: mof-rtf@omg.org, issues@omg.org Subject: MOF-RTF issue: Should set_(nil) be legal? Date: Wed, 10 Jun 1998 15:03:07 +1000 From: Stephen Crawley Source: DSTC (Dr. Stephen Crawley, crawley@dstc.edu.au) Nature: Revision Severity: Minor Summary: This relates to the previous issue. Should it be legal to call a set_(in new_value> operation (see 7.3.8) with a nil object reference as the new_value? Additional Text: If this is legal (as I assumed in the previous issue) then the semantics should be spelled out. We should also decide if this makes the unset_ operation redundant. If this is illegal, then operation needs to be able to raise StructuralError in all cases ... including the Z = 0 case in the last issue ... to indicate an invalid link. In favour of making set_(nil) legal is that it is legal in the attribute case. On the other hand, setting a reference to nil is semantically different to setting an attribute to nil: this is another example of the "nil != not present" issue.