Magic number '0'?

I'm getting "Magic number '0'" inspection errors when I check for zero-length strings. This seems to be new behavior in the last couple of builds.

The documentation for the inspection states, "The numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0L, 1L, 0.0, 1.0, 0.0F and 1.0F are not reported by this inspection," but that doesn't seem to be the case any more.

I haven't reported this as a bug yet (JIRA seems to be down), but it would be good to know if anyone else has already reported this?

0
2 comments

Hello.

Can confirm this, i get it when using a for loop to iterate through an array (ie. for (int i=0 .....).

Looks like a bug

Cheers
Oliver

0

This is fixed already for the next build, sorry for the inconvenience.

Bas

0

Please sign in to leave a comment.