if (elementResult.getOverallResult().compareTo(overallResult)>0) {
overallResult = elementResult.getOverallResult();
}
if (results.containsKey(element)) {
HandlerProcessingResultImpl previousResult = (HandlerProcessingResultImpl) results.get(element);
previousResult.addAll(elementResult);
} else {
if (elementResult instanceof HandlerProcessingResultImpl) {
results.put(element, elementResult);
} else {
HandlerProcessingResultImpl result = new HandlerProcessingResultImpl();
result.addAll(elementResult);
results.put(element, result);
}
}