NightOwl888 opened a new pull request #581: URL: https://github.com/apache/lucenenet/pull/581
This reverts `Lucene.Net.Util.Fst` to be more like the original design, using reference types as the generic closing type for generic classes and methods. It reverts to the original reference equality checking that Lucene uses. It also adds a class constraint on all of the generic types to enforce this, as using value types is incompatible with the reference equality checks. The original design of FST uses reference equality to compare output values. There are also extensions to FST in `Lucene.Net.Misc` that declare the generic type as `object` so either a long integer type or another reference type can be returned. This had been changed to use `long?` as the generic closing type and the reference equality checking was changed to value equality checking. This of course meant that boxing would take place in the `Lucene.Net.Misc` extensions and also made it impossible to use `long` instead of `long?` as the generic closing type because of how equality was being compared, which made the API confusing to use. > NOTE: There are numeric reference type wrappers in the `J2N.Numerics` namespace that can be used with this API. The built-in implementation uses `J2N.Numerics.Int64`. This PR also adds a `MoveNext()` method to the `Lucene.Net.Util.Fst.Int32sRefFSTEnum` and deprecates the `Next()` method (see #279). -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
