jpountz opened a new pull request #350:
URL: https://github.com/apache/lucene/pull/350


   I noticed a bug in `FieldSchema#assertSame` on `docValuesGen`. Since
   `docValuesGen` is a `long`, we end up calling
   `assertSame(String label, Object expected, Object actual)` which checks using
   object identity. In addition to the performance overhead (I only found this
   because it showed up in a profile), this would be wrong for large values of
   `docValuesGen` that wouldn't return cached longs.
   
   In order to remove the trap, I replaced `Object` with `Enum` in the method
   signature.
   


-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to