Auto-boxing inspection glitch?

Hi gang I have the Auto-boxing and Auto-unboxing inspection turned on but when I have code such as

Long benbid = Long.valueOf(1); // For example

if (benbid == null || benbid < 0) { // <== why isn't this highligted as a warning or error???

The inspection doesn't appear to catch the unboxing that occurs on the  if line.

I've tried turning off the unecessary boxing/unboxing inspection with no luck

This is causing me problems as we have a company policy that we will not use auto-boxing/unboxing in our code.


Comment actions Permalink

Hello Martin,

It seems that in this case unboxing long values is not properly detected.
Could you please submit an issue at ?



Please sign in to leave a comment.