Russole opened a new pull request, #9370: URL: https://github.com/apache/ozone/pull/9370
## What changes were proposed in this pull request? This PR removes duplicated instanceof checks in OzoneOutputStream by extracting a shared unwrap helper and reusing it in both getKeyOutputStream() and getMetadata(). Please describe your PR in detail: * Introduced a private unwrap(OutputStream) helper to handle all wrapper unwrapping logic in one place. * Updated getKeyOutputStream() to use unwrap(). * Updated getMetadata() to use the same unwrap() logic, eliminating the duplicated instanceof checks. * Ensured that metadata retrieval correctly handles both plain and wrapped KeyMetadataAware streams. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-10791 ## How was this patch tested? I relied on existing unit and integration tests, and verified that the full CI passed on my fork. Please let me know if additional tests are needed. -- 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]
