[
https://issues.apache.org/jira/browse/LUCENE-9664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17263357#comment-17263357
]
Robert Muir commented on LUCENE-9664:
-------------------------------------
Thanks [~Gromov].
In general changes look fine, but I noticed one thing I think we should do
differently:
{noformat}
@@ -574,27 +568,26 @@
affixReader.skipBytes(2); // strip
int condition = (char) (affixReader.readShort() & 0xffff);
boolean crossProduct = (condition & 1) == 1;
- condition >>>= 1;
{noformat}
In cases like this, while some tool might say the write to {{condition}} is
unnecessary, unless we remove that bit its not really the condition at all:
https://github.com/apache/lucene-solr/blob/master/lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/Dictionary.java#L586-L587
So it could cause confusion for someone later if they try to do something with
it in the future, as it will no longer be what it claims to be.
I think we should adjust the code here... maybe rename the variable from
condition to something like patternOrd to match the Dictionary code?
> Hunspell support: fix most IntelliJ warnings, cleanup
> -----------------------------------------------------
>
> Key: LUCENE-9664
> URL: https://issues.apache.org/jira/browse/LUCENE-9664
> Project: Lucene - Core
> Issue Type: Improvement
> Components: modules/analysis
> Reporter: Peter Gromov
> Priority: Major
> Attachments: LUCENE-9664.patch
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]