-
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
Clean up public non-final statics #14221
Conversation
Following up on apache#14151 and apache#14152, I decided to grep for other non-final public static variables in the Lucene codebase. This change makes statics final where it is both possible and seems appropriate. (That is, the variables really do seem to be constants.)
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! I think this can be merged as is, but I'll wait a bit if anybody else wants to chime in.
LGTM, thanks! |
lucene/analysis/smartcn/src/java/org/apache/lucene/analysis/cn/smart/AnalyzerProfile.java
Outdated
Show resolved
Hide resolved
#14216 may help with this specifically |
Also, renamed method to be more descriptive.
Once #14216 and this PR are merged, I'm happy to make the required changes to enable the |
Done. Thank you! |
Description
Following up on #14151 and #14152, I decided to grep for other
public static
non-final
variables in the Lucene codebase.This change makes
static
sfinal
where it is both possible and seems appropriate. (That is, the variables really do seem to be constants.) I made a coupleprivate
instead, since they are modified, but privately.I also updated some old-school code where IntelliJ flagged opportunities to use newer Java idioms.