Inspectopedia
 
2024.3

Wrapper type may be primitive

Warning
New
Last modified: 03 December 2024

Reports local variables of wrapper type that are mostly used as primitive types.

In some cases, boxing can be source of significant performance penalty, especially in loops.

Heuristics are applied to estimate the number of boxing operations. For example, conversions inside loops are considered as much more numerous.

Example:

After the quick-fix is applied:

New in 2018.2