if (result == null) {
if (log.isDebugEnabled()) {
log.debug("Evaluation of the XPath : " + xPath + " result in null," +
" returning given default value");
}
return new ReturnValue(defaultValue);
}
ReturnValue returnValue = new ReturnValue(result);
returnValue.setFresh(true);
return returnValue;
} catch (JaxenException e) {
throw new LoggedRuntimeException("Error when evaluating XPath : " + xPath, log);
}