Skip to content
Permalink
Browse files
[JENKINS-39617] - JnlpAgentEndpointResolver should not fail if one of…
… the URLs is malformed
  • Loading branch information
oleg-nenashev committed Nov 9, 2016
1 parent fa398e1 commit ecefcc75ecee7c188aff19d0dfdc3c5b247a587a
Showing 1 changed file with 10 additions and 1 deletion.
@@ -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 =

0 comments on commit ecefcc7

Please sign in to comment.