433563 - Jetty fails to startup on windows - InvalidPathException

+ Adjusted PathMatchers.isAbsolute() to only consider the
  search root, and not the whole path.
This commit is contained in:
Joakim Erdfelt 2014-04-28 13:59:55 -07:00
parent 609945fe7c
commit 1de043d6c3
1 changed files with 7 additions and 2 deletions

View File

@ -47,7 +47,7 @@ public class PathMatchers
}
}
}
private static final char GLOB_CHARS[] = "*?".toCharArray();
private static final char SYNTAXED_GLOB_CHARS[] = "{}[]|:".toCharArray();
private static final Path EMPTY_PATH = new File(".").toPath();
@ -167,7 +167,12 @@ public class PathMatchers
*/
public static boolean isAbsolute(final String pattern)
{
return asPath(pattern).isAbsolute();
Path searchRoot = getSearchRoot(pattern);
if (searchRoot == EMPTY_PATH)
{
return false;
}
return searchRoot.isAbsolute();
}
/**