July 2018
Intermediate to advanced
266 pages
7h 11m
English
If we look at the stack of the exception, it indicates that the error happened when we tried to create User. The line in question is this:
return User( name.getCompleted(), age.getCompleted(), profession.getCompleted())
If we read the documentation of getCompleted() we will see that IllegalStateException is thrown because the job has not completed—this can be seen by reading the stack trace of the exception as well. The exception makes sense because we are running getCompleted() as soon as profession is ready, regardless of the readiness of name.
Read now
Unlock full access