W3C home > Mailing lists > Public > www-validator-cvs@w3.org > October 2009

2006/unicorn/src/org/w3c/unicorn/input URIInputParameter.java,1.7,1.8

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 02 Oct 2009 11:18:32 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Mtg9g-00012b-NV@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/input
In directory hutz:/tmp/cvs-serv3987/src/org/w3c/unicorn/input

Modified Files:
	URIInputParameter.java 
Log Message:
cast the connection object to URLConnection

Index: URIInputParameter.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/input/URIInputParameter.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- URIInputParameter.java	2 Oct 2009 10:13:15 -0000	1.7
+++ URIInputParameter.java	2 Oct 2009 11:18:30 -0000	1.8
@@ -6,6 +6,7 @@
 import java.net.MalformedURLException;
 import java.net.SocketTimeoutException;
 import java.net.URL;
+import java.net.URLConnection;
 import java.net.UnknownHostException;
 import java.util.regex.Pattern;
 
@@ -51,7 +52,7 @@
 				throw new UnicornException(Message.Level.ERROR, "$message_unsupported_protocol " + docUrl.getProtocol(), null);
 			HttpURLConnection con = (HttpURLConnection) docUrl.openConnection();
 			con.setConnectTimeout(connectTimeOut);
-			con.connect();
+			((URLConnection) con).connect();
 			int responseCode = con.getResponseCode();
 			switch (responseCode) {
 			case HttpURLConnection.HTTP_UNAUTHORIZED:
Received on Friday, 2 October 2009 11:18:34 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:39 UTC