isEnabled.put(autoPing.getPingTarget().getId(), Boolean.TRUE);
}
// Somewhat awkward, but the two loops save building a separate combined list.
// Add disabled common ones with FALSE
for (Iterator i = commonPingTargets.iterator(); i.hasNext();) {
PingTargetData pingTarget = (PingTargetData) i.next();
if (isEnabled.get(pingTarget.getId()) == null) {
isEnabled.put(pingTarget.getId(), Boolean.FALSE);
}
}
// Add disabled custom ones with FALSE
for (Iterator i = customPingTargets.iterator(); i.hasNext();) {
PingTargetData pingTarget = (PingTargetData) i.next();
if (isEnabled.get(pingTarget.getId()) == null) {
isEnabled.put(pingTarget.getId(), Boolean.FALSE);
}
}
return isEnabled;
}