Potential IG issue

I have two inspections turned on (among others):
- Redundant cast
- Unnecessary fully qualified name

I see two weird things going on:

1. I would have expected the following to trigger the second inspection,
but it doesn't:

PrintStream out = java.lang.System.out;


2. With the following code:

PrintStream out = (PrintStream) java.lang.System.out;

if I use the "Remove redundant cast(s)" quickfix, the line gets
fixed into:

PrintStream out = System.out;

which is a little too much for the fix (where is the "java.lang."
prefix?)

Are those behaviors expected?


Also, would it make sense for the inspections "Redundant type arguments" and
"Redundant type cast" to move from "Local Code Analysis" to "Verbose or
redundant code constructs" ?

Thanks,

Vince.




5 comments
Comment actions Permalink

"Redundant cast" is a built-in inspection, not IG. Definitely file a JIRA item for it. I'll look into the "Unnecessary fully qualified name" issue, although filing a JIRA item for that will help ensure it doesn't get lost.

--Dave Griffith

0
Comment actions Permalink

Another one:
Renaming parameters according parameter name in interface start refactoring with searching in comments and other files (XML for instance). It must use Rename settings.

0
Comment actions Permalink

Yeah, I've seen that, but please post to JIRA anyway.

--Dave Griffith

0

Please sign in to leave a comment.