Fix NPE processing constraints without keys + fix for R5 terminology package problem

This commit is contained in:
Grahame Grieve 2022-09-16 23:49:26 -04:00
parent 43420db756
commit ccc38e48df
2 changed files with 7 additions and 1 deletions

View File

@ -4439,7 +4439,13 @@ public class ProfileUtilities extends TranslatingUtilities {
}
private boolean isBaseConstraint(ElementDefinitionConstraintComponent con) {
if (con == null) {
return false;
}
String key = con.getKey();
if (key == null) {
return false;
}
return key != null && key.startsWith("ele-") || key.startsWith("res-") || key.startsWith("ext-") || key.startsWith("dom-") || key.startsWith("dr-");
}

View File

@ -227,7 +227,7 @@ public class FilesystemPackageCacheManager extends BasePackageCacheManager imple
public String getLatestVersion(String id) throws IOException {
for (String nextPackageServer : getPackageServers()) {
// special case:
if (!(CommonPackages.ID_PUBPACK.equals(id) && PackageClient.PRIMARY_SERVER.equals(nextPackageServer))) {
if (!(Utilities.existsInList(id,CommonPackages.ID_PUBPACK, "hl7.terminology.r5") && PackageClient.PRIMARY_SERVER.equals(nextPackageServer))) {
CachingPackageClient pc = new CachingPackageClient(nextPackageServer);
try {
return pc.getLatestVersion(id);