List<Part> getParts(CompleteMultipartUpload request) throws RestServiceException {
    Part[] part = request.getPart();
    if (part == null) {
      throw new RestServiceException(S3Constants.ERR_EMPTY_REQUEST_BODY, RestServiceErrorCode.BadRequest);
    }
    // Arrays.asList() can return an empty list, but only if it is called with no arguments.
    // Therefore, the list below will always have at least one element as we are passing an argument.
    List<Part> parts = Arrays.asList(part);
    if (parts.size() > S3Constants.MAX_LIST_SIZE) {
      throw new RestServiceException(S3Constants.ERR_PART_LIST_TOO_LONG, RestServiceErrorCode.BadRequest);
    }
    return parts;
  }
Get the list of parts from the request
@param request
@return
@throws RestServiceException
ambry-frontend/src/main/java/com/github/ambry/frontend/s3/S3MultipartCompleteUploadHandler.java