The input stream must be opened.

This commit is contained in:
Olof Larsson 2015-09-18 11:37:24 +02:00
parent 88156dc0c4
commit 19f38125e4

View File

@ -72,10 +72,12 @@ public class WebUtil
protected static void touch(final URL url) protected static void touch(final URL url)
{ {
HttpURLConnection uc = null; HttpURLConnection uc = null;
InputStream is = null;
try try
{ {
uc = openHttpUrlConnection(url); uc = openHttpUrlConnection(url);
uc.connect(); uc.connect();
is = uc.getInputStream();
} }
catch (IOException e) catch (IOException e)
{ {
@ -83,6 +85,7 @@ public class WebUtil
} }
finally finally
{ {
try { is.close(); } catch (Exception ignored) {}
try { uc.disconnect(); } catch (Exception ignored) {} try { uc.disconnect(); } catch (Exception ignored) {}
} }
} }