List<String> nonExisting = new ArrayList<String>();
for (String principalName : toAdd) {
Principal principal = (principals.containsKey(principalName)) ?
principals.get(principalName) :
new PrincipalImpl(principalName);
if (!imp.grantImpersonation(principal)) {
handleFailure("Failed to grant impersonation for " + principalName + " on " + a);
if (importBehavior == ImportBehavior.BESTEFFORT &&
getPrincipalManager().getPrincipal(principalName) == null) {
log.info("ImportBehavior.BESTEFFORT: Remember non-existing impersonator for special processing.");
nonExisting.add(principalName);