Query module AutoBoxing

name
Auto boxing or unboxing
description
Implicit boxing or unboxing of primitive types, such as ‘int’ and ‘double’, may cause confusion and subtle performance problems.
kind
problem
problem.severity
warning
precision
low
id
java/implicit-auto-boxing
tags
efficiency

Imports

java

Provides all default Java QL imports.

Predicates

boxed

Holds if e is in a syntactic position where it is implicitly boxed.

flowTarget

Relate expressions and the variables they flow into in one step, either by assignment or parameter passing.

rebox

Holds if e is an assignment that unboxes, updates and reboxes v.

unboxed

Holds if e is in a syntactic position where it is implicitly unboxed.

Classes

BoxedExpr

An expression of boxed type.

PrimitiveExpr

An expression of primitive type.