Issue 18800: Correction of method UnlimitedNaturalValue.equals (fuml-rtf) Source: LieberLieber Software (Mrs. Tanja Mayerhofer, mayerhofer(at)big.tuwien.ac.at.) Nature: Revision Severity: Minor Summary: The method UnlimitedNaturalValue.equals compares if the two compared UnlimitedNaturalValue instances refer to the same instance of UnlimitedNatural: isEqual = ((UnlimitedNaturalValue) otherValue).value.naturalValue == this.value.naturalValue; Instead the integer values of the attribute "naturalValue" of the referenced UnlimitedNatural instances should be compared: isEqual = ((UnlimitedNaturalValue) otherValue).value.naturalValue == this.value.naturalValue; Alternatively the equals method could be overriden in the class UnlimitedNatural and called by the method UnlimitedNaturalValue.equals Resolution: Update UnlimitedNaturalValue::equals The two code snippets given in the issue description are identical. However, the actual statement in the current specification is isEqual = ((UnlimitedNaturalValue) otherValue).value == this.value; which, as stated in the issue, incorrectly compares the UnlimitedNatural objects, not their natural values. The correction is as given in the issue. Revised Text: In 8.3.2.2.26 UnlimitedNaturalValue, in operation equals, change the statement isEqual = ((UnlimitedNaturalValue)otherValue).value == this.value; to isEqual = ((UnlimitedNaturalValue) otherValue).value.naturalValue == this.value.naturalValue; Actions taken: July 3, 2013: received issue October 8, 2015: Resolved December 22, 2015: closed issue Discussion: End of Annotations:===== m: webmaster@omg.org Date: 03 Jul 2013 16:38:06 -0400 To: Subject: Issue/Bug Report ******************************************************************************* Name: Tanja Mayerhofer Employer: Vienna University of Technology mailFrom: mayerhofer@big.tuwien.ac.at Terms_Agreement: I agree Specification: Semantics of a Foundational Subset for Executable UML Models (fUML) Section: 8.3.2.2.26 UnlimitedNaturalValue FormalNumber: ptc/2012-10-18 Version: v1.1 Doc_Year: 2012 Doc_Month: October Doc_Day: 18 Page: 156-157 Title: Correction of method UnlimitedNaturalValue.equals Nature: Revision Severity: Minor CODE: 3TMw8 B1: Report Issue Remote Name: fortinat9.ifs.tuwien.ac.at Remote User: HTTP User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 Time: 04:38 PM Description: The method UnlimitedNaturalValue.equals compares if the two compared UnlimitedNaturalValue instances refer to the same instance of UnlimitedNatural: isEqual = ((UnlimitedNaturalValue) otherValue).value.naturalValue == this.value.naturalValue; Instead the integer values of the attribute "naturalValue" of the referenced UnlimitedNatural instances should be compared: isEqual = ((UnlimitedNaturalValue) otherValue).value.naturalValue == this.value.naturalValue; Alternatively the equals method could be overriden in the class UnlimitedNatural and called by the method UnlimitedNaturalValue.equals X-Virus-Scanned: OK From: Ed Seidewitz To: Juergen Boldt , "issues@omg.org" , "fuml-rtf@omg.org" Subject: RE: issue # 18800 -- fUML RTF issue Thread-Topic: issue # 18800 -- fUML RTF issue Thread-Index: AQHOfMmvlk8azvgHVEOFNqGVrZh1AJlcn4JA Date: Tue, 9 Jul 2013 17:52:29 +0000 Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [198.228.225.252] X-Virus-Scanned: amavisd-new at omg.org The two lines of code given in the description of this issue are the same. I think the first one is supposed to be: isEqual = ((UnlimitedNaturalValue) otherValue).value == this.value; This is the actual code as currently given in the specification. From: Juergen Boldt [mailto:juergen@omg.org] Sent: Tuesday, July 09, 2013 1:28 PM To: issues@omg.org; fuml-rtf@omg.org Subject: issue # 18800 -- fUML RTF issue From: webmaster@omg.org Date: 03 Jul 2013 16:38:06 -0400 To: Subject: Issue/Bug Report ******************************************************************************* Name: Tanja Mayerhofer Employer: Vienna University of Technology mailFrom: mayerhofer@big.tuwien.ac.at Terms_Agreement: I agree Specification: Semantics of a Foundational Subset for Executable UML Models (fUML) Section: 8.3.2.2.26 UnlimitedNaturalValue FormalNumber: ptc/2012-10-18 Version: v1.1 Doc_Year: 2012 Doc_Month: October Doc_Day: 18 Page: 156-157 Title: Correction of method UnlimitedNaturalValue.equals Nature: Revision Severity: Minor CODE: 3TMw8 B1: Report Issue Remote Name: fortinat9.ifs.tuwien.ac.at Remote User: HTTP User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0 Time: 04:38 PM Description: The method UnlimitedNaturalValue.equals compares if the two compared UnlimitedNaturalValue instances refer to the same instance of UnlimitedNatural: isEqual = ((UnlimitedNaturalValue) otherValue).value.naturalValue == this.value.naturalValue; Instead the integer values of the attribute "naturalValue" of the referenced UnlimitedNatural instances should be compared: isEqual = ((UnlimitedNaturalValue) otherValue).value.naturalValue == this.value.naturalValue; Alternatively the equals method could be overriden in the class UnlimitedNatural and called by the method UnlimitedNaturalValue.equals Juergen Boldt Director, Member Services 109 Highland Ave Needham, MA 02494 USA Tel: 781 444 0404 x 132 fax: 781 444 0320 www.omg.org []