public void method() {
returnValue = optional.absent();
try {
GetDate dateResponse = client.call();
if (dateResponse != null) {
myDate = dateResponse.getDate();
if (myDate != null) {
returnValue = convertDateToAnotherDate() //actual function
if (!returnValue.isPresent()) {
LOG.error("Missing required fields");
}
} else {
LOG.error("No myDate");
}
} else {
LOG.error("Service returned no dateResponse");
}
} catch (CustomException exception) {
LOG.error("Custom service failed");
}
return retVal;
}
1474 次