-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False positive of "Dead instanceof" hint #50
Comments
Why is |
The hint only checks the compile-type of "e". "e" is an Set, so internally With kind regards, markiewb 2015-04-16 11:52 GMT+02:00 FrantaM [email protected]:
|
I can see what it does I'm asking as to why. Instance of |
My usecase is to catch the following construct
With kind regards, markiewb 2015-04-16 12:39 GMT+02:00 FrantaM [email protected]:
|
Indeed this bug is still active: I see this for |
Still not fixed in v1.6.0.3-SNAPSHOT: InterfaceA something = new ClassBExtendsCImplementsA();
System.out.println(something instanceof ClassC); // Runtime: true, Netbeans: "Dead instanceof. InterfaceA cannot be assigned to ClassC" |
@btbouwens, @jrb0001 , @FrantaM : You are all correct. That hint makes no sense. I will remove it via #70 NB already warns you about invalid combinations.
|
ACTUAL:
EXPECTED:
The text was updated successfully, but these errors were encountered: