: (StateManagerImpl) _conflicts.remove(id);
if (orig == sm) {
orig = (StateManagerImpl) _main.put(id, sm);
if (orig != null && !orig.isDeleted()) {
_main.put(sm.getObjectId(), orig);
throw new UserException(_loc.get("dup-oid-assign",
sm.getObjectId(), Exceptions.toString
(sm.getManagedInstance()))).setFailedObject
(sm.getManagedInstance()).setFatal(true);
}
}
return;
}
// oid changed, so it must previously have been a new instance
// without an assigned oid. remove it from the new cache; ok if
// we end up removing another instance with same id
if (_news != null)
_news.remove(id);
// and put into main cache now that id is asssigned
orig = (StateManagerImpl) _main.put(sm.getObjectId(), sm);
if (orig != null && orig != sm && !orig.isDeleted()) {
// put back orig and throw error
_main.put(sm.getObjectId(), orig);
throw new UserException(_loc.get("dup-oid-assign",
sm.getObjectId(), Exceptions.toString
(sm.getManagedInstance()))).setFailedObject
(sm.getManagedInstance()).setFatal(true);
}
}