}
}
if (bcContextEntries_!=null) {
LinkedList<ContextEntry> bcContextEntriesCopy = new LinkedList<ContextEntry>();
for (Iterator<ContextEntry> it = bcContextEntries_.iterator(); it.hasNext();) {
ContextEntry ce = it.next();
if (!bcContextEntriesCopy.contains(ce)) {
bcContextEntriesCopy.add(ce);
}
}
for (Iterator<ContextEntry> it = bcContextEntriesCopy.iterator(); it.hasNext();) {
ContextEntry ce = it.next();
boolean foundIt = false;
for (Iterator<ILoggingResourceable> it2 = inputCopy.iterator(); it2.hasNext();) {
ILoggingResourceable resourceInfo = it2.next();
if (resourceInfo.correspondsTo(ce)) {
// perfecto
result.add(resourceInfo);
it2.remove();
foundIt = true;
break;
}
}
if (!foundIt) {
String oresourceableOres = "n/a (null)";
if (ce !=null && ce.getOLATResourceable() !=null) {
try {
java.lang.reflect.Method getOlatResource = ce.getOLATResourceable().getClass().getDeclaredMethod("getOlatResource");
if (getOlatResource!=null) {
oresourceableOres = String.valueOf(getOlatResource.invoke(ce.getOLATResourceable()));
}
} catch (SecurityException e) {
log_.error("SecurityException while retrieving getOlatResource() Method from "+ce.getOLATResourceable().getClass());
} catch (NoSuchMethodException e) {
log_.info("(OK) ContextEntry's OLATResourceable had no further getOlatResource() method: "+ce.getOLATResourceable().getClass());
} catch (IllegalArgumentException e) {
log_.error("IllegalArgumentException while calling getOlatResource() Method from "+ce.getOLATResourceable().getClass(), e);
} catch (IllegalAccessException e) {
log_.error("IllegalAccessException while calling getOlatResource() Method from "+ce.getOLATResourceable().getClass(), e);
} catch (InvocationTargetException e) {
log_.error("IllegalAccessException while calling getOlatResource() Method from "+ce.getOLATResourceable().getClass(), e);
}
}
log_.info("Could not find any LoggingResourceable corresponding to this ContextEntry: "+ce.toString()+", ce.getOLATResourceable()="+ce.getOLATResourceable()+", ce.getOLATResourceable().getOlatResource()="+oresourceableOres+", dump of resource infos:");
for (Iterator<ILoggingResourceable> it2 = inputCopy.iterator(); it2.hasNext();) {
ILoggingResourceable resourceInfo = it2.next();
log_.info("id: "+resourceInfo.getId()+", name="+resourceInfo.getName()+", type="+resourceInfo.getType()+", toString: "+resourceInfo.toString());
}
log_.error("Could not find any LoggingResourceable corresponding to this ContextEntry: "+ce.toString(),
new Exception("UserActivityLoggerImpl.getCombinedOrderedLoggingResourceables()"));
}
}
}