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.
Summary: | Incorrect NetBeans Java hint for instanceof | ||
---|---|---|---|
Product: | third-party | Reporter: | gooddreams <gooddreams> |
Component: | -- Other -- | Assignee: | issues@third-party <issues> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | sdedic |
Priority: | P3 | ||
Version: | 8.0.2 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
gooddreams
2015-03-17 09:29:16 UTC
sorry, example code is: if (o instanceof BigDecimal) { return (BigDecimal) o; } I can confirm this, using Netbeans 8.0.2 on Ubuntu Linux 14.04, using Oracle java 7, all x86_64. The hint is flagging instanceof statements where the instance under test is an Object, or at least is a Supertype of the class being tested. I checked the github repository for the hints plugin: https://github.com/markiewb/nb-additional-hints, and found that this bug was already submitted (issue #50 on github) and fixed in versions 1.4.1.1 and 1.5 of the nb-additional-hints plugin. I updated the plugin to 1.5 and no longer see the false-positives. According to comment #3, marking as fixed (in the 3rd party plugin) |