Auto-Boxing inspection quickfix

I have this inspection enabled, to show any points of auto-boxing.
The quickfix "make auto-boxing explicit" inserts something like
"new Integer(value)".
Shouldn't it better use "Integer.valueOf(value)".

3 comments

Sven Steiniger schrieb:

I have this inspection enabled, to show any points of auto-boxing.
The quickfix "make auto-boxing explicit" inserts something like
"new Integer(value)".
Shouldn't it better use "Integer.valueOf(value)".


Yes ... performance wise that is 100x better.

0

Definitely, please submit a JIRA request.

Sven Steiniger wrote:

I have this inspection enabled, to show any points of auto-boxing.
The quickfix "make auto-boxing explicit" inserts something like
"new Integer(value)".
Shouldn't it better use "Integer.valueOf(value)".

0

http://www.jetbrains.net/jira/browse/IDEA-5330

Bas Leijdekkers schrieb:

Definitely, please submit a JIRA request.

Sven Steiniger wrote:

>> I have this inspection enabled, to show any points of auto-boxing.
>> The quickfix "make auto-boxing explicit" inserts something like
>> "new Integer(value)".
>> Shouldn't it better use "Integer.valueOf(value)".

0

Please sign in to leave a comment.