list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

E083 Invalid Multivalued Attribute Initialization

Umple syntactic error raised when initializing multivalued attributes with invalid values

When indicating initial values for a multivalued attribute, an error is raised if the values to assign cannot be parsed properly.
The error might be caused by a typographical mistake.

Example

// For derived attributes remove list indicator []
// For list initializer, there should be a semicolon on the end
class Office {
  Integer number;
  String[] emails = {"abc@umple.org", "def@umple.org"}
  Integer [] incomingNumber = {765432, 987654}
}


      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

//emails and incomingNumber can now be initialized
class Office {
  Integer number;
  String[] emails = {"abc@umple.org", "def@umple.org"};
  Integer [] incomingNumber = {765432, 987654};
} 

      

Load the above code into UmpleOnline