diff --git a/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java b/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java index 5e3807b0ad..b44893f7a1 100644 --- a/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java +++ b/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java @@ -118,7 +118,7 @@ public Response put( OzoneOutputStream output = null; - if (!uploadID.equals("")) { + if (uploadID != null && !uploadID.equals("")) { // If uploadID is specified, it is a request for upload part return createMultipartKey(bucketName, keyPath, length, partNumber, uploadID, body);