David Daney wrote:
With this test case (just added to mauve):
import java.net.URL;
public class URLTest {
public static void main(String []args) {
try {
URL url = new URL("http://www.foo.bar.com");
url = new URL(url, "_urn:testing/");
System.out.println("url: " + url);
} catch (Exception e) {
e.printStackTrace();
}
}
}
Classpath is currently treating the "_urn:" as a protocol and discarding
the context even though "_urn:" is not a valid protocol. Sun's runtime
will append the spec to the context in this case instead of replacing
the context.
Unless objections are raised in the next 24 hours, I plan in committing
the folowing patch:
Although concerns were raised, they seemed about the sanity of the
reference implementation not whether of not we should match it. I think
there was consensus that the patch should be committed.
It was committed unchanged with this ChangeLog:
2006-03-01 David Daney <[EMAIL PROTECTED]>
* java/net/URL.java (URL(URL, String, URLStreamHandler)): Treat spec
as relative if it contains a colon but no protocol handler can be
found.