final Map<Object, UpdateResponse> updates = updateResult.getResults();
//Verify the map is not null. If so, this is a developer error.
if (updates == null)
{
throw new RestLiServiceException(HttpStatus.S_500_INTERNAL_SERVER_ERROR,
"Unexpected null encountered. Null Map found inside of the BatchUpdateResult returned by the resource method: "
+ routingResult.getResourceMethod());
}
//Verify that there is no null key in the map. If so, this is a developer error.
if (updates.containsKey(null))
{
throw new RestLiServiceException(HttpStatus.S_500_INTERNAL_SERVER_ERROR,
"Unexpected null encountered. Null key inside of the Map returned inside of the BatchUpdateResult returned by the resource method: "
+ routingResult.getResourceMethod());
}
final Map<Object, RestLiServiceException> serviceErrors = updateResult.getErrors();
//Verify the errors map is not null. If so, this is a developer error.
//Note that we don't have to check the errors map for nulls, because its taken care
//of in populateErrors below.
if (serviceErrors == null)
{
throw new RestLiServiceException(HttpStatus.S_500_INTERNAL_SERVER_ERROR,
"Unexpected null encountered. Null errors Map found inside of the BatchUpdateResult returned by the resource method: "
+ routingResult.getResourceMethod());
}
final Map<Object, ErrorResponse> errors =