@@ -132,17 +132,17 @@ public Response get(
132132
133133 // Actual bucket processing starts here
134134 // Validate and prepare parameters
135- BucketListingContext context = validateAndPrepareParameters (
135+ BucketListingContext listingContext = validateAndPrepareParameters (
136136 bucketName , delimiter , encodingType , marker , maxKeys , prefix ,
137137 continueToken , startAfter );
138138
139139 // Initialize response object
140140 ListObjectResponse response = initializeListObjectResponse (
141- bucketName , delimiter , encodingType , marker , maxKeys , prefix ,
141+ bucketName , delimiter , encodingType , marker , listingContext . getMaxKeys () , prefix ,
142142 continueToken , startAfter );
143143
144144 // Process key listing
145- processKeyListing (context , response );
145+ processKeyListing (listingContext , response );
146146
147147 // Build final response
148148 return buildFinalResponse (response , s3GAction , startNanos , perf );
@@ -172,7 +172,6 @@ public Response get(
172172
173173 // Log audit entry for empty response to align with previous behavior
174174 long opLatencyNs = getMetrics ().updateGetBucketSuccessStats (startNanos );
175- PerformanceStringBuilder perf = new PerformanceStringBuilder ();
176175 perf .appendCount (0 );
177176 perf .appendOpLatencyNanos (opLatencyNs );
178177 auditReadSuccess (s3GAction , perf );
@@ -281,20 +280,6 @@ public ContinueToken getDecodedToken() {
281280 }
282281 }
283282
284- /**
285- * Handle GetBucketAcl request.
286- * Implements the GetBucketAcl API operation.
287- * @see <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAcl.html">GetBucketAcl</a>
288- */
289- Response handleGetBucketAcl (String bucketName , long startNanos )
290- throws OS3Exception , IOException {
291- S3GAction s3GAction = S3GAction .GET_ACL ;
292- S3BucketAcl result = getAcl (bucketName );
293- getMetrics ().updateGetAclSuccessStats (startNanos );
294- auditReadSuccess (s3GAction );
295- return Response .ok (result , MediaType .APPLICATION_XML_TYPE ).build ();
296- }
297-
298283 /**
299284 * Validate and prepare parameters for bucket listing.
300285 */
@@ -306,20 +291,13 @@ BucketListingContext validateAndPrepareParameters(
306291
307292 // If you specify the encoding-type request parameter, should return encoded key name values
308293 // in the following response elements: Delimiter, Prefix, Key, and StartAfter.
309- // For detail refer: https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html#AmazonS3-ListObjectsV2-response-EncodingType
294+ // For detail refer:
295+ // https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html#AmazonS3-ListObjectsV2-response-EncodingType
310296
311297 // Validate encoding type
312298 if (encodingType != null && !encodingType .equals (ENCODING_TYPE )) {
313299 throw S3ErrorTable .newError (S3ErrorTable .INVALID_ARGUMENT , encodingType );
314300 }
315- // If you specify the encoding-type request parameter,should return
316- // encoded key name values in the following response elements:
317- // Delimiter, Prefix, Key, and StartAfter.
318- //
319- // For detail refer:
320- // https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html
321- // #AmazonS3-ListObjectsV2-response-EncodingType
322- //
323301 maxKeys = validateMaxKeys (maxKeys );
324302
325303 if (prefix == null ) {
@@ -459,7 +437,8 @@ void processKeyListing(BucketListingContext context, ListObjectResponse response
459437 /**
460438 * Build final response with metrics and audit logging.
461439 */
462- Response buildFinalResponse (ListObjectResponse response , S3GAction s3GAction , long startNanos , PerformanceStringBuilder perf ) {
440+ Response buildFinalResponse (ListObjectResponse response , S3GAction s3GAction ,
441+ long startNanos , PerformanceStringBuilder perf ) {
463442 int keyCount = response .getCommonPrefixes ().size () + response .getContents ().size ();
464443 long opLatencyNs = getMetrics ().updateGetBucketSuccessStats (startNanos );
465444 getMetrics ().incListKeyCount (keyCount );
0 commit comments