-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove redundant field initializers #13060
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,13 +32,13 @@ | |
*/ | ||
public final class PhoneticFilter extends TokenFilter { | ||
/** true if encoded tokens should be added as synonyms */ | ||
protected boolean inject = true; | ||
final boolean inject; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could be changed to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a strange case. We're not really breaking backwards compatibility, since no one could have accessed this field anyway with the class being final. |
||
|
||
/** phonetic encoder */ | ||
protected Encoder encoder = null; | ||
final Encoder encoder; | ||
|
||
/** captured state, non-null when <code>inject=true</code> and a token is buffered */ | ||
protected State save = null; | ||
State save = null; | ||
|
||
private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class); | ||
private final PositionIncrementAttribute posAtt = addAttribute(PositionIncrementAttribute.class); | ||
|
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 would make these fields
private
, but not sure if breaking backward compatibility here would be ok?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.
Since this class is marked with
@lucene.experimental
, we can make the change.