} else if (errCode == ErrorConstants.ILLEGAL_CONFIG) {
//isLegalConfig
if (errCtx instanceof Map.Entry) { //unchecked cast below
Map.Entry<EnterableState, Set<EnterableState>> badConfigMap =
(Map.Entry<EnterableState, Set<EnterableState>>) errCtx;
EnterableState es = badConfigMap.getKey();
Set<EnterableState> vals = badConfigMap.getValue();
msg.append(LogUtils.getTTPath(es) + " : [");
for (Iterator<EnterableState> i = vals.iterator(); i.hasNext();) {
EnterableState ex = i.next();
msg.append(LogUtils.getTTPath(ex));
if (i.hasNext()) { // reason for iterator usage
msg.append(", ");
}
}
msg.append(']');
} else if (errCtx instanceof Set) { //unchecked cast below
Set<EnterableState> vals = (Set<EnterableState>) errCtx;
msg.append("<SCXML> : [");
for (Iterator<EnterableState> i = vals.iterator(); i.hasNext();) {
EnterableState ex = i.next();
msg.append(LogUtils.getTTPath(ex));
if (i.hasNext()) {
msg.append(", ");
}
}