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 - [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.
Summary: [40cat] When a method returning an object or primitive created and no return ...
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-28 03:09 UTC by uaimp
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
This is the screen shot that explains the reported bug (92.60 KB, image/png)
2004-08-28 03:20 UTC, uaimp
Details

Note You need to log in before you can comment on or make changes to this 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.