chaokunyang commented on PR #1565:
URL: https://github.com/apache/incubator-fury/pull/1565#issuecomment-2078635475
> In `MetaStringEncoder.java`, we use `0x08`:
>
> ```java
> boolean stripLastChar = bytes.length * 8 >= totalBits + bitsPerChar;
> if (stripLastChar) {
> bytes[0] = (byte) (bytes[0] | 0x80);
> }
> ```
>
> In `MetaString.java`, we use `0b1`:
>
> ```java
> if (encoding != Encoding.UTF_8) {
> Preconditions.checkArgument(bytes.length > 0);
> this.stripLastChar = (bytes[0] & 0b1) != 0;
> } else {
> this.stripLastChar = false;
> }
> ```
>
> These two are not consistent.
The MetaStringDecoder parse the flag by itself, and didn't use this flag.
Currently the `org.apache.fury.meta.MetaString#stripLastChar` is not called by
other classes. So the fury serializaiton ut still succceed.
--
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]