lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [lucenenet] theolivenbaum opened a new issue #375: Unnecessary boxing of IndexOptions enum
Date Mon, 19 Oct 2020 15:08:00 GMT

theolivenbaum opened a new issue #375:

   Found another easy improvement:
   There are plenty of calls to IndexOptions.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
in the code, such as [this one](
   if (outerInstance.fieldInfo.IndexOptions.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
< 0)
       // Positions were not indexed:
       return null;
   The problem is that CompareTo receives an object, which leads to boxing the enum:

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.

For queries about this service, please contact Infrastructure at:

View raw message