Merge pull request #410 from nsacyber/issue/409

[#409] Loop will exit if delta component is matched.
This commit is contained in:
iadgovuser26 2021-10-27 12:53:10 -04:00 committed by GitHub
commit cf97b15b13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -659,14 +659,17 @@ public final class SupplyChainCredentialValidator implements CredentialValidator
// error
resultMessage.append("ADDED attempted with prior instance\n");
deltaSb.append(String.format("%s;", ci.hashCode()));
break;
}
if (ciV2.isModified()) {
// since the base list doesn't have this ci
// just add the delta
baseCompList.add(deltaCi);
break;
}
if (ciV2.isRemoved()) {
baseCompList.remove(ciV2);
break;
}
// if it is a remove
// we do nothing because baseCompList doesn't have it