google-code-export / umple

Automatically exported from code.google.com/p/umple
1 stars 0 forks source link

Constraint checks on setter methods can be used in one if condition #601

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Try this model:

// Example with a few more operators
class X {
   Integer age;

  [age > 18]
  [age < 99]

}

The "setAge" method will contain nested if condition calls for each constraint 
rule:
if (aAge>18)
{
if (aAge<99)
{
age = aAge;
wasSet = true;
}
}

What is the expected output? What do you see instead?
We shall have all of these checks only in one if condition instead.
There seems also to be an indent issue.

Please use labels and text to provide additional information.
N/A

Original issue reported on code.google.com by ahmedvc@gmail.com on 28 Jun 2014 at 4:53

GoogleCodeExporter commented 9 years ago

Original comment by ahmedvc@gmail.com on 9 Jul 2014 at 10:06

GoogleCodeExporter commented 9 years ago

Original comment by TimothyCLethbridge on 24 Jul 2014 at 2:57