From 21312ff1f1e207384e13cf260a4f72a0f0913740 Mon Sep 17 00:00:00 2001 From: gmantele <gmantele@ari.uni-heidelberg.de> Date: Thu, 10 Apr 2014 11:45:34 +0200 Subject: [PATCH] UWS: Fix bug: logical error while trying to get the error that occurred in a UWSThread --- src/uws/job/UWSJob.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/uws/job/UWSJob.java b/src/uws/job/UWSJob.java index babceb8..9fe509a 100644 --- a/src/uws/job/UWSJob.java +++ b/src/uws/job/UWSJob.java @@ -31,16 +31,13 @@ import java.util.Map; import java.util.Set; import java.util.Vector; -import java.lang.IllegalStateException; import javax.servlet.ServletOutputStream; import uws.UWSException; import uws.UWSExceptionFactory; import uws.UWSToolBox; - import uws.job.manager.ExecutionManager; import uws.job.parameters.UWSParameters; - import uws.job.serializer.UWSSerializer; import uws.job.user.JobOwner; import uws.service.UWS; @@ -1648,7 +1645,7 @@ public class UWSJob extends SerializableUWSObject { * @return The error which interrupts the thread or <i>null</i> if there was no error or if the job is still running. */ public final UWSException getWorkError(){ - return (thread == null && !thread.isAlive()) ? null : thread.getError(); + return (thread == null || !thread.isAlive()) ? null : thread.getError(); } /* ************* */ -- GitLab