From 918ebb48cde514fcb3ea04261cd92e181d20abba Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Thu, 28 Feb 2019 16:11:26 +0100 Subject: Add null guard --- config/src/main/java/com/yahoo/vespa/config/UrlDownloader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config') diff --git a/config/src/main/java/com/yahoo/vespa/config/UrlDownloader.java b/config/src/main/java/com/yahoo/vespa/config/UrlDownloader.java index 4f0600eb191..b7d9f9e14ca 100644 --- a/config/src/main/java/com/yahoo/vespa/config/UrlDownloader.java +++ b/config/src/main/java/com/yahoo/vespa/config/UrlDownloader.java @@ -61,7 +61,7 @@ public class UrlDownloader { } public boolean isValid() { - return target.isValid(); + return target != null && target.isValid(); } private boolean temporaryError(Request req) { @@ -70,7 +70,7 @@ public class UrlDownloader { public File waitFor(UrlReference urlReference, long timeout) { long start = System.currentTimeMillis() / 1000; - if (target == null || !target.isValid()) + if (! isValid()) connect(); long timeLeft = timeout; do { -- cgit v1.2.3