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.
If you try the below code the Editor doesn't give you a hint like Eclispe does. In Eclispe you will get the hint "Null pointer access: The variable statement can only be null at this location" java.sql.Statement statement = null; try { statement.executeUpdate("<sql statement>"); } catch (SQLException ex) { throw ex; } I hint is very usefull because the code still builds and you won't hit a NPE until you use the code.
Started working on as part of the First Patch Program...
I am glad to here that! There is a sketchy prototype implementation in: http://hg.netbeans.org/main/contrib/file/tip/javahints/src/org/netbeans/modules/javahints/NPECheck.java which sometimes produces false positives (warnings that are not appropriate) and is quite slow because it tries to read @CheckForNull from project metadata (was done before the common annotations has been introduced, and can probably be removed now). Tests for the prototype are here: http://hg.netbeans.org/main/contrib/file/tip/javahints/test/unit/src/org/netbeans/modules/javahints/NPECheckTest.java
What is the current state?
You will now in 7.3 get a hint saying "Dereferencing null pointer". More info: https://blogs.oracle.com/geertjan/entry/netbeans_ide_7_3_knows
(In reply to comment #4) > You will now in 7.3 get a hint saying "Dereferencing null pointer". > > More info: https://blogs.oracle.com/geertjan/entry/netbeans_ide_7_3_knows Thank you Geertjan. Why is this issue not marked as resolved?
It probably should be.
(In reply to comment #6) > It probably should be. So am resolving this issue as worksforme.