FUML 1.2 RTF Avatar
  1. OMG Issue

FUML12 — Correction of method UnlimitedNaturalValue.equals

  • Key: FUML12-31
  • Legacy Issue Number: 18800
  • Status: closed  
  • Source: LieberLieber Software ( Mrs. Tanja Mayerhofer)
  • 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

  • Reported: FUML 1.1 — Wed, 3 Jul 2013 04:00 GMT
  • Disposition: Resolved — FUML 1.2
  • Disposition Summary:

    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.

  • Updated: Tue, 22 Dec 2015 15:09 GMT