mirror of
https://github.com/hapifhir/org.hl7.fhir.core.git
synced 2025-03-09 14:31:17 +00:00
fix bugs in RulesDrivenPolicyAdvisor
This commit is contained in:
parent
73b53b9d7a
commit
2fa3b49915
@ -53,7 +53,7 @@ public class RulesDrivenPolicyAdvisor extends BasePolicyAdvisorForFullValidation
|
||||
|
||||
public boolean matches(@Nonnull String mid, @Nonnull String path, String[] p) {
|
||||
if (regex) {
|
||||
return stringMatches(id, mid) && regexMatches(path, path);
|
||||
return stringMatches(id, mid) && regexMatches(this.path, path);
|
||||
} else {
|
||||
return stringMatches(id, mid) && pathMatches(pathSegments, p);
|
||||
}
|
||||
@ -97,7 +97,7 @@ public class RulesDrivenPolicyAdvisor extends BasePolicyAdvisorForFullValidation
|
||||
if (specifier == null) {
|
||||
return true;
|
||||
} else if (specifier.endsWith("*")) {
|
||||
return specifier.substring(0, specifier.length()-1).equalsIgnoreCase(actual.substring(0, specifier.length()-1));
|
||||
return specifier.substring(0, specifier.length()-1).equalsIgnoreCase(actual.substring(0, Integer.min(specifier.length()-1, actual.length())));
|
||||
} else {
|
||||
return specifier.equalsIgnoreCase(actual);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user