Remove SetLength and SetEmpty from ICharTermAttribute #1038
Labels
is:task
A chore to be done
notes:breaking-change
Has changes that will break backward compatibility
pri:high
Milestone
There doesn't seem to be a good reason to force implementations to define
SetLength()
, since it should just cascade the call to the setter ofLength
. We should remove this from the interface and make this method into an extension method onICharTermAttribute
(in aLucene.Net.Analysis.TokenAttributes.Extensions
namespace). It should also be made to return the type ofICharTermAttribute
it is called upon rather than the interface type.Originally posted by @NightOwl888 in #1028 (comment)
Update: We should also remove SetEmpty and make it an extension method as well, and add a Clear() method in its place for API consistency.
The text was updated successfully, but these errors were encountered: