You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an overview issue about all classes in current Lucene's main branch to be ported over to record classes. Record classes are fine for immutable data structures which have no functionality and are not part of class hierarchy (they have no superclass).
Records offer several simplifications for implementing them:
equals, hashCode and toString are autogenerated by an invokedynamic, so we can't forget to handle it correctly
it is also immutable
all parameter checking logic can be moved to some special constructor without any parameters (this is new syntax since Java 17)
In later java versions they will have an optimized internal layout and arrays of record classes may no longer be pointer arrays (see Project Valhalla with a first preview of it in Java 22). In future they will also not have identity anymore (I don't understand the impact yet).
The first PR #13205 already added support for record classes in our Javadoc linter (missing-doclet plugin).
The following classes are candidates (please add more here and add link to PR):
Description
This is an overview issue about all classes in current Lucene's main branch to be ported over to
record
classes. Record classes are fine for immutable data structures which have no functionality and are not part of class hierarchy (they have no superclass).Records offer several simplifications for implementing them:
The first PR #13205 already added support for record classes in our Javadoc linter (
missing-doclet
plugin).The following classes are candidates (please add more here and add link to PR):
IOContext
,MergeInfo
,FlushInfo
: Convert IOContext, MergeInfo, and FlushInfo to record classes #13205BooleanClause
Convert BooleanClause class to record class #13261FieldInfo
?FieldEntry
classes used by codecs internally: Convert FieldEntry to record #13296FieldMetaData
/FSTMetadata
/DirectMonotonicReader.Meta
classes used by codecs internally.The text was updated successfully, but these errors were encountered: