It may be the case that no previous step set a build
status. If that is the case, calling getResult().isBetterThan()
will throw an exception since 'null' has no method isBetterThan().
The fix as implemented here is to check if a status has already
been set. If it hasn't, set the status to 'SUCCESS', so that the
following line can check against this state.
It may be the case that no previous step set a build status. If that is the case, calling getResult().isBetterThan() will throw an exception since 'null' has no method isBetterThan().
The fix as implemented here is to check if a status has already been set. If it hasn't, set the status to 'SUCCESS', so that the following line can check against this state.
Signed-off-by: Chris Lalancette clalancette@openrobotics.org
An alternative solution here would be to change the conditional line to: