2003-12-31 Guilhem Lavaux <guilhem@kaffe.org>
authorGuilhem Lavaux <guilhem@kaffe.org>
Wed, 31 Dec 2003 10:55:40 +0000 (10:55 +0000)
committerMichael Koch <mkoch@gcc.gnu.org>
Wed, 31 Dec 2003 10:55:40 +0000 (10:55 +0000)
* java/net/URL.java
(URL): Change context path to "/" if it is empty.

From-SVN: r75264

libjava/ChangeLog
libjava/java/net/URL.java

index 0a39776fd1ef5ec0be3abc813cfd2f1fa60f672a..8bb9115e0a3b2d6a3ae6f3a7fc75b43c2ee81377 100644 (file)
@@ -1,3 +1,8 @@
+2003-12-31 Guilhem Lavaux <guilhem@kaffe.org>
+
+       * java/net/URL.java
+       (URL): Change context path to "/" if it is empty.
+
 2003-12-31  Michael Koch  <konqueror@gmx.de>
 
        * testsuite/libjava.mauve/xfails: Removed tests that pass now:
index 79771d916dec21a0c2d6cb6f7328014964a43172..85f0efba5795cee8329af92bffc18741b94646b0 100644 (file)
@@ -396,6 +396,8 @@ public final class URL implements Serializable
            host = context.host;
            port = context.port;
            file = context.file;
+           if (file == null || file.length() == 0)
+             file = "/";
            authority = context.authority;
          }
       }
@@ -408,6 +410,8 @@ public final class URL implements Serializable
        host = context.host;
        port = context.port;
        file = context.file;
+       if (file == null || file.length() == 0)
+         file = "/";
         authority = context.authority;
       }
     else       // Protocol NOT specified in spec. and no context available.