Simplify DownloadUtils::isJenkinsAvailable (#437)

master
Priyadarshi Raj 2019-06-21 01:38:27 +05:30 committed by Tobias Nett
parent 28a88a73ba
commit 1841723c5f
1 changed files with 1 additions and 3 deletions

View File

@ -200,12 +200,10 @@ public final class DownloadUtils {
if (conn.getResponseCode() == HttpURLConnection.HTTP_OK) {
logger.trace("Jenkins is available at {}", JENKINS_URL);
return true;
} else {
throw new ConnectException();
}
}
} catch (Exception e) {
logger.warn("Could not connect to Jenkins at {}", JENKINS_URL);
logger.warn("Could not connect to Jenkins at {} - {}", JENKINS_URL, e.getMessage());
}
return false;
}