romseygeek opened a new issue, #15480: URL: https://github.com/apache/lucene/issues/15480
### Description `Sort` objects are shallowly immutable, but their inner `SortField` implementations are not, which could cause hard-to-track down bugs. We should make `SortField` immutable as well. The `field`, `type` and `reverse` fields can be made final with no change in API. Missing values are trickier, as they are currently mutable via a `setMissingValue` method. My suggestion would be to deprecate this method in 10.4, and add constructors that explicitly take missing values (which could also enhance type safety); and then remove the method in 11.0. -- 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]
