ModelDriven / Alf-Reference-Implementation

Open-source implementation of the Action Language for fUML (Alf) specification.
30 stars 2 forks source link

ReadLine should always return a value #24

Closed seidewitz closed 8 years ago

seidewitz commented 8 years ago

According to the fUML specification, ReadLine has a return multiplicity of 1..1. This indicates that it should return an empty string, not null, even if there is also an error status. However, the Alf code for FoundationalModelLibrary::BasicInputOutput::ReadLine currently has a return multiplicity of 0..1. (This becomes an issue when multiplicities are more closely checked, per the resolution of OMG issue ALF11-44.)

seidewitz commented 8 years ago

The library implementation of TextInputChannel::readLine in the fUML Reference Implementation currently returns null, not "", when there is an error status, and, therefore, so does ReadLine. This can be accounted for in the Alf implementation of ReadLine, at least, by returning "" if the call to readLine returns null.

seidewitz commented 8 years ago

Fixed in v1.0.3.