paulirwin opened a new pull request, #1042: URL: https://github.com/apache/lucenenet/pull/1042
- [X] You've read the [Contributor Guide](https://github.com/apache/lucenenet/blob/main/CONTRIBUTING.md) and [Code of Conduct](https://www.apache.org/foundation/policies/conduct.html). - [ ] You've included unit or integration tests for your change, where applicable. - [X] You've included inline docs for your change, where applicable. - [X] There's an open issue for the PR that you are making. If you'd like to propose a change, please [open an issue](https://github.com/apache/lucenenet/issues/new/choose) to discuss the change or find an existing issue. Fix csharpsquid:S1117 SonarCloud warnings about shadowing fields with variable names Fixes #678 ## Description This renames variables that shadowed fields of the same name, causing the SonarCloud S1117 warning. In the case of methods that replace static constructor initialization, this was named `result` instead of the field name. In other cases where there was no Lucene equivalent, the variable was renamed. This also fixes a bug in FieldInfos where there was the possibility of a KeyNotFoundException due to a coding oversight. Perhaps most importantly, this investigation discovered a potentially severe bug in `SortedSetDocValuesWriter.Flush`. Due to GetOrdCountEnumerable and GetOrdsEnumerable (previously named with a typo) having the same return type, they were accidentally swapped in their argument order to AddSortedSetField. I'm not quite sure what the impact would be, but it certainly was wrong. I fixed the typo in the names and fixed the order of their usage to match upstream. I also confirmed that the signature of AddSortedSetField expected them in this order. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org