} else {
// We need to clone the profile, otherwise the cache contents will be modifyable from the outside
final EndEntityProfile eep = profileCache.getProfileCache(entityManager).get(Integer.valueOf(id));
try {
if (eep != null) {
returnval = (EndEntityProfile)eep.clone();
}
} catch (CloneNotSupportedException e) {
LOG.error("Should never happen: ", e);
throw new RuntimeException(e);
}