LuciferYang opened a new issue, #13230: URL: https://github.com/apache/gravitino/issues/13230
**Version** main branch **Describe what's wrong** `IndexImpl` stores the caller-supplied `String[][] fieldNames` and `Map` properties by reference and returns both directly, so the value-object index stays externally mutable after `build`: mutating the caller's arrays (before or after `Indexes.of`) changes the built index and drifts its equality. **Error message and/or stacktrace** N/A: unexpected shared mutability, no exception. **How to reproduce** Build an index with `Indexes.of(...)`, then mutate the `String[][]` array you passed in; the built index's `fieldNames()` reflects the mutation and its `equals`/`hashCode` change. **Additional context** Index is a value object and should be immutable after `build`. Found during a code audit of the `api` module. -- 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]
