mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-26 01:05:38 +00:00
more tests
This commit is contained in:
parent
7abc072911
commit
1a001a1af4
6 changed files with 115 additions and 4 deletions
|
|
@ -81,7 +81,14 @@ public class RelativeUriResolver implements URIResolver {
|
|||
}
|
||||
|
||||
private boolean isUnderBaseUri(final URI resolved) {
|
||||
final String base = this.baseUri.toASCIIString().replaceAll("file:/+", "");
|
||||
return isUnderBaseUri(resolved, this.baseUri);
|
||||
}
|
||||
|
||||
private static boolean isUnderBaseUri(final URI resolved, final URI baseUri) {
|
||||
if (resolved == null || baseUri == null) {
|
||||
return false;
|
||||
}
|
||||
final String base = baseUri.toASCIIString().replaceAll("file:/+", "");
|
||||
final String r = resolved.toASCIIString().replaceAll("file:/+", "");
|
||||
return r.startsWith(base);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue