You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is in fact a subset of a more generalisable bug.
add command increments employee ID whenever an optional field is incorrectly given.
From the above, we see that employeeId = new EmployeeId() is called (which increments the ID) after the mandatory fields are parsed. So an invalid department is fine, for example, but if there is an invalid phone number, then the ID is already incremented regardless.
A simple fix would be to move that line to right before the creation of the Person object near the return statement, because the error catching blocks are working fine.
Labels:
type.FunctionalityBug
severity.High
original: TheSoggy/ped#12
The text was updated successfully, but these errors were encountered: