Hi, i investigated the problem described in JDK-8022748[1] i found that the parser needed to be rescued for confusion while handling relative URIs.
A URI created through the relativize-method is schemaless and so it need to handle the special-case (a colon in the path-element). While there is also another way to handle it (encode the colon as %3A) i think we should not choose to encode everything. First it would introduce another style of special-case handling of a colon in the path (see the method maybeAddLeadingDot which is used while normalizing) and when resolving it back we would need to decode it back or leave it the encoded way which is not suggest by RFC2396 section "1.5 URI Transcribability". Also in Section 5 of RFC2396 it is suggested to rescue a colon in the path-element in a relative URI through prepending a "./" just like in maybeAddLeadingDot. I am not sure if it is worth to refactor the split(),join(),normalize() methods to provide a reusable colon-detection and -handling. So, please find my webrev with a simpler solution at: http://cr.openjdk.java.net/~sebastian/8022748/webrev.00/ -- Sebastian [1] https://bugs.openjdk.java.net/browse/JDK-8022748