On Thu, 26 May 2022 09:18:56 GMT, KIRIYAMA Takuya <d...@openjdk.java.net> wrote:
> Consider an authority component without trailing "/" as a base URI. When > resolving a relative path against this base URI, the resulting URI is a > concatenated URI without "/". > This behaviour should be fixed, which is rationalized by > rfc3986#section-5.2.3. > Could you review this fix? Changes requested by dfuchs (Reviewer). src/java.base/share/classes/java/net/URI.java line 2140: > 2138: } else { > 2139: sb.append("/"); > 2140: } This is wrong as it will cause `URI.create("foo").resolve(URI.create("test"))` to return `"/test"` instead of `"test"` ------------- PR: https://git.openjdk.java.net/jdk/pull/8899