Inspections: Object comparison...

I sometimes have the following code:

if ( provider.getLocation() != Location.NO_LOCATION )

where the "!=" is marked yellow.
What about offering an option that does not report object comparisons
with static final instances?

Johannes Schneider

1 comment
Comment actions Permalink

Reasonable in many circumstances, if you know for sure that exciting classloader stuff won't be happening. Less so now that enumerated types are in the language, but there are still circumstances. Please submit a JIRA request, but I will absolutely gaurantee it won't go into Irida.

--Dave Griffith


Please sign in to leave a comment.