|
|
@@ -189,7 +189,8 @@ public class HttpSupport { |
|
|
|
try { |
|
|
|
return c.getResponseCode(); |
|
|
|
} catch (ConnectException ce) { |
|
|
|
final String host = c.getURL().getHost(); |
|
|
|
final URL url = c.getURL(); |
|
|
|
final String host = (url == null) ? "<null>" : url.getHost(); |
|
|
|
// The standard J2SE error message is not very useful. |
|
|
|
// |
|
|
|
if ("Connection timed out: connect".equals(ce.getMessage())) //$NON-NLS-1$ |
|
|
@@ -216,7 +217,8 @@ public class HttpSupport { |
|
|
|
try { |
|
|
|
return c.getResponseCode(); |
|
|
|
} catch (ConnectException ce) { |
|
|
|
final String host = c.getURL().getHost(); |
|
|
|
final URL url = c.getURL(); |
|
|
|
final String host = (url == null) ? "<null>" : url.getHost(); |
|
|
|
// The standard J2SE error message is not very useful. |
|
|
|
// |
|
|
|
if ("Connection timed out: connect".equals(ce.getMessage())) //$NON-NLS-1$ |