Merge branch '2.1.x'

Closes gh-17381
This commit is contained in:
Andy Wilkinson
2019-07-01 15:47:48 +01:00
2 changed files with 3 additions and 3 deletions

View File

@@ -51,7 +51,7 @@ public class Handler extends URLStreamHandler {
private static final String CURRENT_DIR = "/./";
private static final Pattern CURRENT_DIR_PATTERN = Pattern.compile(CURRENT_DIR);
private static final Pattern CURRENT_DIR_PATTERN = Pattern.compile(CURRENT_DIR, Pattern.LITERAL);
private static final String PARENT_DIR = "/../";

View File

@@ -127,7 +127,7 @@ class HandlerTests {
@Test
void urlWithSpecReferencingParentDirectory() throws MalformedURLException {
assertStandardAndCustomHandlerUrlsAreEqual("file:/test.jar!/BOOT-INF/classes!/xsd/folderA/a.xsd",
"../folderB/b.xsd");
"../folderB/c/d/e.xsd");
}
@Test
@@ -139,7 +139,7 @@ class HandlerTests {
@Test
void urlWithSpecReferencingCurrentDirectory() throws MalformedURLException {
assertStandardAndCustomHandlerUrlsAreEqual("file:/test.jar!/BOOT-INF/classes!/xsd/folderA/a.xsd",
"./folderB/./b.xsd");
"./folderB/c/d/e.xsd");
}
@Test