diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 0a39776fd1e..8bb9115e0a3 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2003-12-31 Guilhem Lavaux + + * java/net/URL.java + (URL): Change context path to "/" if it is empty. + 2003-12-31 Michael Koch * testsuite/libjava.mauve/xfails: Removed tests that pass now: diff --git a/libjava/java/net/URL.java b/libjava/java/net/URL.java index 79771d916de..85f0efba579 100644 --- a/libjava/java/net/URL.java +++ b/libjava/java/net/URL.java @@ -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.