aboutsummaryrefslogtreecommitdiff
path: root/libjava/gnu/gcj
diff options
context:
space:
mode:
authorAnthony Green <green@redhat.com>2001-09-19 18:28:59 +0000
committerAnthony Green <green@gcc.gnu.org>2001-09-19 18:28:59 +0000
commitbb7fd9624b935a2edae7dc29864a95e7b6dfbdbe (patch)
tree907d2addb623e37b22e9e8c28fc88c37b33bf901 /libjava/gnu/gcj
parent216183ce28d62a3897632d1077ff039a714ad280 (diff)
downloadgcc-bb7fd9624b935a2edae7dc29864a95e7b6dfbdbe.zip
gcc-bb7fd9624b935a2edae7dc29864a95e7b6dfbdbe.tar.gz
gcc-bb7fd9624b935a2edae7dc29864a95e7b6dfbdbe.tar.bz2
Fix null pointer bug.
From-SVN: r45692
Diffstat (limited to 'libjava/gnu/gcj')
-rw-r--r--libjava/gnu/gcj/protocol/file/Handler.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/libjava/gnu/gcj/protocol/file/Handler.java b/libjava/gnu/gcj/protocol/file/Handler.java
index b12ebd4..b4d8fbf 100644
--- a/libjava/gnu/gcj/protocol/file/Handler.java
+++ b/libjava/gnu/gcj/protocol/file/Handler.java
@@ -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