throw new IllegalStateException("Return type of " + IBundleProvider.class.getSimpleName() + " is not supported in clients");
}
break;
}
case RESOURCE: {
IResource resource;
if (myResourceType != null) {
resource = parser.parseResource(myResourceType, theResponseReader);
} else {
resource = parser.parseResource(theResponseReader);
}
List<String> lmHeaders = theHeaders.get(Constants.HEADER_LAST_MODIFIED_LOWERCASE);
if (lmHeaders != null && lmHeaders.size() > 0 && StringUtils.isNotBlank(lmHeaders.get(0))) {
String headerValue = lmHeaders.get(0);
Date headerDateValue;
try {
headerDateValue = DateUtils.parseDate(headerValue);
InstantDt lmValue = new InstantDt(headerDateValue);
resource.getResourceMetadata().put(ResourceMetadataKeyEnum.UPDATED, lmValue);
} catch (Exception e) {
ourLog.warn("Unable to parse date string '{}'. Error is: {}", headerValue, e.toString());
}
}