-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IAttribute and ICharTermAttribute method changes, #1038 #1049
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR.
Looks good except it is missing the implementation of the SetLength()
extension method and SetLength()
hasn't been removed from CharTermAttribute
. See the inline comments.
src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
Outdated
Show resolved
Hide resolved
src/Lucene.Net/Support/Analysis/TokenAttributes/Extensions/CharTermAttributeExtensions.cs
Outdated
Show resolved
Hide resolved
src/Lucene.Net.Tests.Analysis.Common/Analysis/Position/PositionFilterTest.cs
Outdated
Show resolved
Hide resolved
src/Lucene.Net/Analysis/TokenAttributes/CharTermAttributeImpl.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Putting the Clear()
method on ICharTermAttribute
seems to be the best solution.
However, there is some cleanup left to do. Please see the inline comments.
Remove SetLength and SetEmpty from ICharTermAttribute and moves them to extension methods. Add
Clear()
in place of SetEmpty.Fixes #1038
Description
See the rationale in #1038.
This PR makes the following breaking changes: