From c2afe7d5594855e402d1f408288ee486ba751ea8 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Sun, 12 Aug 2007 23:22:19 +0000 Subject: [PATCH] contract says can't return null. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4238 71c3de6d-444a-0410-be80-ed276b4c234a --- core/src/main/java/hudson/model/Slave.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/model/Slave.java b/core/src/main/java/hudson/model/Slave.java index d8bc7a85e2..bcc63084cd 100644 --- a/core/src/main/java/hudson/model/Slave.java +++ b/core/src/main/java/hudson/model/Slave.java @@ -218,7 +218,8 @@ public final class Slave implements Node, Serializable { public ClockDifference getClockDifference() throws IOException, InterruptedException { VirtualChannel channel = getComputer().getChannel(); - if(channel==null) return null; // can't check + if(channel==null) + throw new IOException(getNodeName()+" is offline"); long startTime = System.currentTimeMillis(); long slaveTime = channel.call(new Callable() { -- GitLab