The GitHub Actions job "Publish Fory Java Snapshot" on fory.git/main has succeeded. Run started by GitHub user chaokunyang (triggered by chaokunyang).
Head commit for run: e8328046924518fb24d6272c57c217f565f33353 / Leo <[email protected]> fix(java): Use (long, long, byte) key for MetaStringBytes cache to prevent collisions (#2308) ## What does this PR do? This PR fixes a `ClassCastException` during deserialization caused by an incorrect `MetaStringBytes` being retrieved from the cache. The previous cache key `(long, long)` in `MetaStringResolver` (for small meta strings) didn't include the string's `encoding` byte, leading to collisions when different strings (e.g., "aclass" vs "Aclass") hashed to the same two longs. **Changes:** 1. **Introduced `LongLongByteMap`:** A new map using a `(long k1, long k2, byte k3)` key. 2. **Updated `MetaStringResolver`:** Modified relevant methods (e.g., `createSmallMetaStringBytes`, `readSmallMetaStringBytes`) to use `LongLongByteMap`, incorporating the `encoding` byte into the cache key for small meta strings. 3. **Renamed Test:** `LongLongMapTest.java` renamed to `LongLongByteMapTest.java` and updated to test the new map. ## Related issues - #2307 ## Does this PR introduce any user-facing change? <!-- If any user-facing interface changes, please [open an issue](https://github.com/apache/fory/issues/new/choose) describing the need to do so and update the document if necessary. --> - [ ] Does this PR introduce any public API change? - [ ] Does this PR introduce any binary protocol compatibility change? ## Benchmark <!-- When the PR has an impact on performance (if you don't know whether the PR will have an impact on performance, you can submit the PR first, and if it will have impact on performance, the code reviewer will explain it), be sure to attach a benchmark data here. --> Report URL: https://github.com/apache/fory/actions/runs/15505559418 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
