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 256484 - Method @NotNull outcome or parameter suggestion
Summary: Method @NotNull outcome or parameter suggestion
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks: 256485
  Show dependency tree
 
Reported: 2015-11-10 07:28 UTC by Svata Dedic
Modified: 2015-11-10 12:34 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Svata Dedic 2015-11-10 07:28:42 UTC
1/ The IDE should suggest @NonNull annotation for methods, which, on all its normal exit paths, produce non-null result. Even lazy getters have often such a property 

2/ If a method parameter si blindly dereferenced, the IDE could offer @NonNull annotation to the parameter or assert param != null guard, to help the programmer if the non-nullness is a designed property.