]> gcc.gnu.org Git - gcc.git/commitdiff
Fix null pointer bug.
authorAnthony Green <green@redhat.com>
Wed, 19 Sep 2001 18:28:59 +0000 (18:28 +0000)
committerAnthony Green <green@gcc.gnu.org>
Wed, 19 Sep 2001 18:28:59 +0000 (18:28 +0000)
From-SVN: r45692

libjava/ChangeLog
libjava/gnu/gcj/protocol/file/Handler.java

index d5add01d2dac94080a734ae657abd78ebe3a3490..31745a9bc08d9a1d3451a3bf972e7d59e176acc7 100644 (file)
@@ -1,3 +1,8 @@
+2001-09-19  Anthony Green  <green@redhat.com>
+
+       * gnu/gcj/protocol/file/Handler.java: Avoid NullPointerException
+       when host is null.
+
 2001-09-17  Andreas Jaeger  <aj@suse.de>
 
        * jni.cc (array_from_valist): Use promoted types for va_arg.
index b12ebd42b290424da817bb21c4b09df96a1d7915..b4d8fbfbe42488cc9aaa40b1b1a2ba099ce8045b 100644 (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
This page took 0.074042 seconds and 5 git commands to generate.