From e685b604eeeed9c48bee2f728c3ecec3303e5c56 Mon Sep 17 00:00:00 2001 From: Stephen Connolly Date: Mon, 27 Apr 2015 16:24:31 +0100 Subject: [PATCH] [FIXED JENKINS-28115] Division by zero in Executor.getProgress() ``` WARNING: Caught exception evaluating: executor.progress in /ajaxExecutors. Reason: java.lang.reflect.InvocationTargetException java.lang.reflect.InvocationTargetException ... at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.ArithmeticException: / by zero at hudson.model.Executor.getProgress(Executor.java:649) ... 154 more ``` --- core/src/main/java/hudson/model/Executor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/model/Executor.java b/core/src/main/java/hudson/model/Executor.java index b6c1f727c67c..08864961ebd9 100644 --- a/core/src/main/java/hudson/model/Executor.java +++ b/core/src/main/java/hudson/model/Executor.java @@ -642,7 +642,7 @@ public int getProgress() { } finally { lock.readLock().unlock(); } - if (d < 0) { + if (d <= 0) { return -1; }