rich7420 opened a new pull request, #11992: URL: https://github.com/apache/ozone/pull/11992
## What changes were proposed in this pull request? `SignedChunksInputStream` and `UnsignedChunksInputStream` duplicated the chunk read loop, line reading, chunk terminator and trailer parsing, and `TrailerHeader` was nested in `SignedChunksInputStream`. This moves `TrailerHeader` to a top-level class and extracts the shared parsing into a new `AwsChunkedInputStream` base class. The subclasses only parse the chunk header line, and the signed stream also verifies chunk and trailer signatures. S3 error codes don't change. The unsigned stream now reports the same messages as the signed one, and "Unexpected data after trailer terminator" replaces the two stream-specific messages. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-17478 ## How was this patch tested? The existing tests cover both streams; only imports and one message assertion changed. On JDK 21 at `ff8b64d917`: - `TestSignedChunksInputStream` (82), `TestUnsignedChunkInputStream` (75), `TestTrailerChecksum` (22), `TestS3ObjectWriteGuard` (15), `TestObjectPut` (169) and `TestPartUpload` (39) passed. - Checkstyle and PMD passed for `ozone-s3gateway`. [Fork CI](https://github.com/rich7420/ozone/actions/runs/42556301767) passed for `028d158fb0`; the next commit only updates a Javadoc comment. -- 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]
