peterxcli opened a new pull request, #10195:
URL: https://github.com/apache/ozone/pull/10195

   ## What changes were proposed in this pull request?
   
   This pull request updates the handling of empty string values for the `name` 
parameter in the `EncodingTypeObject` class, ensuring that empty strings are 
treated as valid (rather than null) and are properly marshaled and tested. It 
also improves test coverage and correctness for these cases.
   
   ### EncodingTypeObject handling improvements
   
   * Changed the logic in `EncodingTypeObject.createNullable` to only return 
`null` if `name` is actually `null`, not if it is an empty string, ensuring 
empty strings are allowed as valid names.
   * Removed the unused import of `StringUtils` from `EncodingTypeObject.java`.
   
   ### Test coverage and correctness
   
   * Added new test cases in `TestObjectKeyNameAdapter` to verify that empty 
strings are correctly marshaled, both with and without an encoding type.
   * Updated `TestBucketList` to assert that the prefix in the response is not 
null and that its name is an empty string, improving test robustness for root 
listing scenarios.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-7710
   
   ## How was this patch tested?
   
   (Please explain how this patch was tested. Ex: unit tests, manual tests, 
workflow run on the fork git repo.)
   (If this patch involves UI changes, please attach a screenshot; otherwise, 
remove this.)
   


-- 
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