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 252166 - Incorrect detection of annotations after class in method
Summary: Incorrect detection of annotations after class in method
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0.2
Hardware: All All
: P4 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2015-04-29 16:13 UTC by SirIntellegence
Modified: 2017-05-04 20:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

Sample Code (126 bytes, text/plain)
2015-04-29 16:13 UTC, SirIntellegence

Note You need to log in before you can comment on or make changes to this bug.
Description SirIntellegence 2015-04-29 16:13:20 UTC
Created attachment 153463 [details]
Sample Code

Given the attached method, Netbeans will warn that you are dereferencing a possible null pointer, even though the check has been done. The warning goes away if the line is placed before the class.  I haven't checked to see if it is the same with @NonNull or others
Comment 1 SirIntellegence 2017-05-04 20:28:08 UTC
This might be related to bug 269784, but I am not sure.