rich7420 commented on code in PR #9532:
URL: https://github.com/apache/ozone/pull/9532#discussion_r2636726641


##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -863,9 +864,9 @@ private ReplicationConfig getReplicationConfig(OzoneBucket 
ozoneBucket,
   public Response completeMultipartUpload(
       @PathParam(BUCKET) String bucket,
       @PathParam(PATH) String key,
-      @QueryParam(QueryParams.UPLOAD_ID) @DefaultValue("") String uploadID,
-      CompleteMultipartUploadRequest multipartUploadRequest)
-      throws IOException, OS3Exception {
+      CompleteMultipartUploadRequest multipartUploadRequest
+  ) throws IOException, OS3Exception {
+    final String uploadID = getQueryParam(QueryParams.UPLOAD_ID);

Review Comment:
   Although underlying checkNotNull throws exception, it returns 
NullPointerException, not S3 standard error.
   Should we add validation here?
   ```suggestion
       final String uploadID = getQueryParam(QueryParams.UPLOAD_ID);
       if (StringUtils.isEmpty(uploadID)) {
         throw newError(INVALID_ARGUMENT, key,
             new IllegalArgumentException("uploadId is required"));
       }
   ```



##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -863,9 +864,9 @@ private ReplicationConfig getReplicationConfig(OzoneBucket 
ozoneBucket,
   public Response completeMultipartUpload(
       @PathParam(BUCKET) String bucket,
       @PathParam(PATH) String key,
-      @QueryParam(QueryParams.UPLOAD_ID) @DefaultValue("") String uploadID,
-      CompleteMultipartUploadRequest multipartUploadRequest)
-      throws IOException, OS3Exception {
+      CompleteMultipartUploadRequest multipartUploadRequest
+  ) throws IOException, OS3Exception {
+    final String uploadID = getQueryParam(QueryParams.UPLOAD_ID);

Review Comment:
   plz correct me if I'm wrong.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to