This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 251194 - Incorrect warning message for instanceof
Summary: Incorrect warning message for instanceof
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2015-03-15 23:23 UTC by xarax
Modified: 2015-08-12 11:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description xarax 2015-03-15 23:23:51 UTC
Product Version = NetBeans IDE 8.0.2 (Build 201411181905)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.8.0
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.0-b70

NetBeans issue incorrect warning statement for instanceof. Code compiles and executes correctly.

public class TestInstanceof
    public static class Fubar
    implements Runnable
        public void run()

    public static void main(String[] args)
        Runnable runnable;

        runnable = new Fubar();
        if(runnable instanceof Fubar)
            Fubar fubar;

            fubar = (Fubar) runnable;