FUML 1.0b2 NO IDEA Avatar
  1. OMG Issue

FUML — IntegerValue::toString uses Java String.valueOf

  • Key: FUML-18
  • Legacy Issue Number: 13460
  • Status: closed  
  • Source: Model Driven Solutions ( Mr. Ed Seidewitz)
  • Summary:

    Specification: Semantics of a Foundation Subset for Executable UML Models, FTF – Beta 1 (ptc/08-11-03)
    Section: 8.3.2.2.10 IntegerValue

    Summary:

    The IntegerValue::toString operation uses the Java String.valueOf operation, which has no Annex A mapping.

    Proposed Resolution:

    Replace the body of the toString operation with:

    String stringValue = "";

    if (this.value == 0)

    { stringValue = "0"; }

    else {

    int positiveValue = this.value;

    if (positiveValue < 0)

    { positiveValue = -positiveValue; }

    do {

    int digit = positiveValue % 10;

    if (digit == 0)

    { stringValue = "0" + stringValue; }

    else if (digit == 1)

    { stringValue = "1" + stringValue; }

    else if (digit == 2)

    { stringValue = "2" + stringValue; }

    else if (digit == 3)

    { stringValue = "3" + stringValue; }

    else if (digit == 4)

    { stringValue = "4" + stringValue; }

    else if (digit == 5)

    { stringValue = "5" + stringValue; }

    else if (digit == 6)

    { stringValue = "6" + stringValue; }

    else if (digit == 7)

    { stringValue = "7" + stringValue; }

    else if (digit == 8)

    { stringValue = "8" + stringValue; }

    else if (digit == 9)

    { stringValue = "9" + stringValue; }

    positiveValue = positiveValue / 10;

    } while (positiveValue > 0);

    if (this.value < 0)

    { stringValue = "-" + stringValue; }

    }

    return stringValue;

  • Reported: FUML 1.0b1 — Sat, 7 Feb 2009 05:00 GMT
  • Disposition: Resolved — FUML 1.0b2
  • Disposition Summary:

    Change the code as proposed

  • Updated: Fri, 6 Mar 2015 20:58 GMT