+{"files":[{"patch":"@@ -2120,2 +2120,2 @@\n- \/\/ 5.2 (6a)\n- if (i >= 0)\n+ \/\/ 5.2 (6a-b)\n+ if (i >= 0 || !absolute) {\n@@ -2123,3 +2123,4 @@\n- \/\/ 5.2 (6b)\n- else\n- path = child;\n+ } else {\n+ path = \"\/\".concat(child);\n+ }\n+\n@@ -2186,1 +2187,1 @@\n- ru.path = resolvePath(base.path, cp);\n+ ru.path = resolvePath(base.path, cp, base.isAbsolute());\n","filename":"src\/java.base\/share\/classes\/java\/net\/URI.java","additions":7,"deletions":6,"binary":false,"changes":13,"status":"modified"},{"patch":"@@ -2,1 +2,1 @@\n- * Copyright (c) 2000, 2019, Oracle and\/or its affiliates. All rights reserved.\n+ * Copyright (c) 2000, 2022, Oracle and\/or its affiliates. All rights reserved.\n@@ -27,1 +27,1 @@\n- * 7171415 6933879\n+ * 7171415 6339649 6933879 8037396 8272072\n@@ -1367,0 +1367,1 @@\n+ testCount++;\n@@ -1615,0 +1616,1 @@\n+ header(\"Bugs\");\n@@ -1618,0 +1620,1 @@\n+ b8272072();\n@@ -1629,0 +1632,1 @@\n+ testCount++;\n@@ -1676,0 +1680,18 @@\n+ \/\/ 8272072 - Resolving URI relative path with no \"\/\" may lead to incorrect toString\n+ private static void b8272072() {\n+ try {\n+ URI baseURI = new URI(\"http:\/\/example.com\");\n+ URI relativeURI = new URI(\"test\");\n+ URI resolvedURI = baseURI.resolve(relativeURI);\n+\n+ eq(new URI(\"http:\/\/example.com\/test\"), resolvedURI);\n+\n+ baseURI = new URI(\"relativeBase\");\n+ resolvedURI = baseURI.resolve(relativeURI);\n+\n+ eq(new URI(\"test\"), resolvedURI);\n+ } catch (URISyntaxException e) {\n+ throw new AssertionError(\"shouldn't ever happen\", e);\n+ }\n+ }\n+\n","filename":"test\/jdk\/java\/net\/URI\/Test.java","additions":24,"deletions":2,"binary":false,"changes":26,"status":"modified"}]}
0 commit comments