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 48107

Summary: [40cat] When a method returning an object or primitive created and no return value entered the editor does not complain. Error reported only at compile time.
Product: java Reporter: uaimp <uaimp>
Component: UnsupportedAssignee: issues@java <issues>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P3    
Version: 4.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: This is the screen shot that explains the reported bug

Description uaimp 2004-08-28 03:09:07 UTC
[ BUILD # : 4.0-beta1 ]
[ JDK VERSION : J2SE 1.5.0 ]

In the attached screen shot the method acrostic should return a String. But the return statement has been commented out. The editor does not complain. 

However when the class is compiled, following error reported:
Compiling 1 source file to /home/uaimp/NetBeans-Projects/MyLib/build/classes
/home/uaimp/NetBeans-Projects/MyLib/src/org/me/mylib/LibClass.java:30: missing return statement
Comment 1 uaimp 2004-08-28 03:20:27 UTC
Created attachment 17202 [details]
This is the screen shot that explains the reported bug
Comment 2 Martin Roskanin 2004-08-30 08:46:58 UTC
reassigning to java module
Comment 3 Martin Matula 2004-08-30 09:37:37 UTC
At this point this is as designed - the error checker in the editor
does not do flow analysis, so it catches just most common errors
(unresolved types, syntax errors).
Problems like exception not being caught, or no value returned are not
reported.