LouisLou2 opened a new pull request, #2212:
URL: https://github.com/apache/fury/pull/2212

   ## What does this PR do?
   This PR fixes issue #2096 by improving the handling of empty strings in 
MetaStringBytes. The primary changes are:
   
   1. Explicitly defining that empty strings will use UTF-8 encoding for meta 
string encoding
   2. Adding a dedicated constant for empty MetaStringBytes: `public static 
final MetaStringBytes EMPTY = MetaStringBytes.of(MetaString.EMPTY)`
   3. Adding a length check to prevent potential buffer reading issues when 
length is zero
   
   These changes ensure that empty strings are handled consistently throughout 
the codebase and prevent potential errors when processing empty strings during 
serialization and deserialization.
   
   ## Related issues
   - #2096
   
   ## Does this PR introduce any user-facing change?
   
   - [ ] Does this PR introduce any public API change?
   - [ ] Does this PR introduce any binary protocol compatibility change?
   
   ## Benchmark
   
   ## Additional Notes
   
   Since this PR involves changes across multiple components related to string 
handling, I'd appreciate a thorough review to ensure there are no unintended 
side effects. If there's a better approach to solving the empty string issue, 
I'm open to suggestions.
   
   Also, please note that the current main branch has an issue (#2211) 
affecting CrossLanguageTest, which this PR will also encounter. It might be 
beneficial to address #2211 first or at least be aware of it when reviewing 
this PR.
   


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