summaryrefslogtreecommitdiffstats
path: root/libjava/gnu
diff options
context:
space:
mode:
authorgreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-19 18:28:59 +0000
committergreen <green@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-19 18:28:59 +0000
commitc2c76df5218727dbba0a8e4b3eed4eb01ed14e48 (patch)
tree907d2addb623e37b22e9e8c28fc88c37b33bf901 /libjava/gnu
parent381eb1e75e69aed07563028b87749fdae60c251b (diff)
downloadppe42-gcc-c2c76df5218727dbba0a8e4b3eed4eb01ed14e48.tar.gz
ppe42-gcc-c2c76df5218727dbba0a8e4b3eed4eb01ed14e48.zip
Fix null pointer bug.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45692 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/gnu')
-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 b12ebd42b29..b4d8fbfbe42 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
OpenPOWER on IntegriCloud