Skip to content

Commit

Permalink
[JENKINS-39617] - JnlpAgentEndpointResolver should not fail if one of…
Browse files Browse the repository at this point in the history
… the URLs is malformed
  • Loading branch information
oleg-nenashev committed Nov 9, 2016
1 parent fa398e1 commit ecefcc7
Showing 1 changed file with 10 additions and 1 deletion.
Expand Up @@ -127,7 +127,16 @@ public void setTunnel(String tunnel) {
public JnlpAgentEndpoint resolve() throws IOException {
IOException firstError = null;
for (String jenkinsUrl : jenkinsUrls) {
URL salURL = toAgentListenerURL(jenkinsUrl);

final URL selectedJenkinsURL;
final URL salURL;
try {
selectedJenkinsURL = new URL(jenkinsUrl);
salURL = toAgentListenerURL(jenkinsUrl);
} catch (MalformedURLException ex) {
LOGGER.log(Level.WARNING, String.format("Cannot parse agent endpoint URL %s. Skipping it", jenkinsUrl), ex);
continue;
}

// find out the TCP port
HttpURLConnection con =
Expand Down

0 comments on commit ecefcc7

Please sign in to comment.