openmicroscopy/openmicroscopy — pull request #2957 by PaulVanSchayck (2014-08-21 07:54:46+00:00)
Title: jobHandle.setMessage(message) does not work, as null status is not allowed

This originates from discussion at
http://www.openmicroscopy.org/community/viewtopic.php?f=6&t=7544&start=10

Calling jobHandle.setMessage(message) will call jobHandle.setStatusAndMessage(null, message). But this will fail as status is actually not allowed to be null. Here is the exeception:

omero.ApiUsageException: exception ::omero::ApiUsageException
{
serverStackTrace = ome.conditions.ApiUsageException: An ome.model.jobs.JobStatus enum does not exist with the value: null
at ome.logic.TypesImpl.getEnumeration(TypesImpl.java:128)
at ome.services.JobBean.setStatusAndMessage(JobBean.java:304)
at ome.services.JobBean.setMessage(JobBean.java:297)

I think this is fixed if the status is first checked for not being null.