[ https://issues.apache.org/jira/browse/LUCENE-9325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17425063#comment-17425063 ]
ASF subversion and git services commented on LUCENE-9325: --------------------------------------------------------- Commit 9e9c3bd249e777fd0355b695038922482910bf5e in lucene's branch refs/heads/main from Alan Woodward [ https://gitbox.apache.org/repos/asf?p=lucene.git;h=9e9c3bd ] LUCENE-9325: Make Sort final (#338) Sort is used in all sorts of settings where we assume that it is immutable (for example, in IndexWriterConfig). This commit makes it so, plus it also updates the severely outdated javadoc. > Sort and SortField are not immutable > ------------------------------------ > > Key: LUCENE-9325 > URL: https://issues.apache.org/jira/browse/LUCENE-9325 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Alan Woodward > Assignee: Alan Woodward > Priority: Major > Time Spent: 40m > Remaining Estimate: 0h > > The `Sort` and `SortField` classes are currently mutable, which makes them > dangerous to use in multiple threads. In particular, you can set an index > sort on an IndexWriterConfig and then change its internal sort fields while > the index is being written to. > We should make all member fields on these classes final, and in addition we > should make `Sort` final itself. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org