ISPN-4505 Lucene Directory polishing

Since auto-boxing can be a performance pain when it happens unintentionally, we made the choice to set IDEs to flag these as a warning, hence it's preferrable to keep it as an explicit operation when we need to use the "uppercase versions" of primitives.