Reported by Roman Kennke <roman@ontographics.com> (bug #9331)

Reported by Roman Kennke <roman@ontographics.com> (bug #9331)
	* java/net/URLStreamHandler.java (parseURL): When url file part
	doesn't contain a '/' just ignore context.

From-SVN: r84518
This commit is contained in:
Mark Wielaard 2004-07-11 16:48:29 +00:00 committed by Mark Wielaard
parent 1e38f15929
commit eeb3298836
2 changed files with 11 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2004-07-11 Mark Wielaard <mark@klomp.org>
Reported by Roman Kennke <roman@ontographics.com> (bug #9331)
* java/net/URLStreamHandler.java (parseURL): When url file part
doesn't contain a '/' just ignore context.
2004-07-11 Ulrich Weigand <uweigand@de.ibm.com>
* include/s390-signal.c (SIGNAL_HANDLER): Use SIGINFO-style prototype.

View File

@ -208,9 +208,11 @@ public abstract class URLStreamHandler
{
// Context is available, but only override it if there is a new file.
int lastSlash = file.lastIndexOf('/');
file =
file.substring(0, lastSlash) + '/' + spec.substring(start, end);
if (lastSlash < 0)
file = spec.substring(start, end);
else
file = (file.substring(0, lastSlash)
+ '/' + spec.substring(start, end));
if (url.getProtocol().equals("file"))
{