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

Summary: Incorrect detection of annotations after class in method
Product: java Reporter: SirIntellegence
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal    
Priority: P4    
Version: 8.0.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Sample Code

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.