From: jprocter Date: Mon, 17 May 2010 16:15:12 +0000 (+0000) Subject: status can be null to begin with X-Git-Tag: Release_2_6~221 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=69f408036444f7301ff157e1ed319370cd884788;p=jalview.git status can be null to begin with --- diff --git a/src/jalview/ws/jws2/JWs2Job.java b/src/jalview/ws/jws2/JWs2Job.java index 4bf97a3..0239537 100644 --- a/src/jalview/ws/jws2/JWs2Job.java +++ b/src/jalview/ws/jws2/JWs2Job.java @@ -73,7 +73,7 @@ public abstract class JWs2Job extends AWsJob @Override public boolean isBroken() { - return status.equals(status.UNDEFINED); + return status==null ? false : status.equals(status.UNDEFINED); } /* (non-Javadoc) @@ -82,7 +82,7 @@ public abstract class JWs2Job extends AWsJob @Override public boolean isFailed() { - return status.equals(status.FAILED); + return status==null ? false : status.equals(status.FAILED); } /* (non-Javadoc) @@ -91,7 +91,7 @@ public abstract class JWs2Job extends AWsJob @Override public boolean isFinished() { - return status.equals(status.FINISHED); + return status==null ? false : status.equals(status.FINISHED); } /* (non-Javadoc) @@ -100,7 +100,7 @@ public abstract class JWs2Job extends AWsJob @Override public boolean isQueued() { - return status.equals(status.SUBMITTED) || status.equals(status.PENDING); + return status==null ? false : status.equals(status.SUBMITTED) || status.equals(status.PENDING); } /* (non-Javadoc) @@ -110,7 +110,7 @@ public abstract class JWs2Job extends AWsJob public boolean isRunning() { // TODO Auto-generated method stub - return status.equals(status.RUNNING) || status.equals(status.STARTED); + return status!=null && (status.equals(status.RUNNING) || status.equals(status.STARTED)); } /* (non-Javadoc) @@ -120,7 +120,7 @@ public abstract class JWs2Job extends AWsJob public boolean isServerError() { // server errors are raised as exceptions on the service method calls. - return false; // status.equals(status.FAILED); + return status==null ? false : false; // status.equals(status.FAILED); } }