uschindler commented on PR #13296:
URL: https://github.com/apache/lucene/pull/13296#issuecomment-2056532260
> The change looks good to me, I'd like @uschindler to have a look since he
knows more about records than I do.
They are not too complicated, you just have to think simpler and use the
special syntax. Something to keep in mind when you add records:
- The default ctor cannot be hidden, so when you add public records, make
sure all consistency checks are done in the default ctor (the one in the source
file having no parameters: `public Classname {`). This ensures that all checks
are at one place. My recommendation is to override the default ctor. You can
add additional ctors for easy usage for common special cases (see IOContext
class for examples), calling the default one with this().
- Be sure to remove equals, hashcode, toString: it does not warn you when
you define your own
--
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]