janhoy commented on PR #4786: URL: https://github.com/apache/solr/pull/4786#issuecomment-5373234912
> RE clone: why? Can we instead stop/prevent re-use, by adding a boolean like `_used` The clone is what lets `builder(JettyConfig other)` snapshot the builder without the field-by-field copy factory — a `_used` flag wouldn't remove that need, and would ban the build-a-base-config-then-tweak pattern the copy factory exists for. You're right about the shallow maps though (an aliasing that predates this PR). Pushed a fix: `clone()` now deep-copies both maps, and the built config exposes them via `Collections.unmodifiableMap`. Repeated `build()` and copied builders are now fully independent. -- 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]
