azraa006 opened a new pull request, #15007: URL: https://github.com/apache/iceberg/pull/15007
This PR ensures that the stack trace returned by ErrorResponse is truly immutable. Previously, the stack trace was created using Arrays.asList(...), which returns a fixed-size but still mutable list. This could allow unintended modifications to the stack trace after the response is constructed. The implementation has been updated to use ImmutableList.copyOf(...), guaranteeing immutability and aligning with the intended contract of ErrorResponse. Changes Replaced Arrays.asList(...) with ImmutableList.copyOf(...) when constructing the stack trace list in ErrorResponse. Verification Added a temporary reproduction test to confirm that modifying the stack trace now throws UnsupportedOperationException. Removed the temporary test after verification. Documented the change in walkthrough.md. -- 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]
