Fix null pointer bug.

From-SVN: r45692
This commit is contained in:
Anthony Green
2001-09-19 18:28:59 +00:00
committed by Anthony Green
parent 216183ce28
commit bb7fd9624b
2 changed files with 7 additions and 1 deletions
+2 -1
View File
@@ -32,7 +32,8 @@ public class Handler extends URLStreamHandler
{
// If a hostname is set, then we need to switch protocols to ftp
// in order to transfer this from the remote host.
if (! url.getHost().equals(""))
String host = url.getHost();
if ((host != null) && (! host.equals("")))
{
// Reset the protocol (and implicitly the handler) for this URL.
// Then have the URL attempt the connection again, as it will