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 201739 - [Change return type] Change to void
Summary: [Change return type] Change to void
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.1
Hardware: PC Other
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-07 12:21 UTC by Jiri Prox
Modified: 2013-09-02 14:24 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Shows the error without any fixable hint (2.06 KB, image/png)
2013-02-08 19:24 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2011-09-07 12:21:51 UTC
Change return type hint can suggest changing to void it the return statement is not followed by any value, e.g. "return;"
Comment 1 markiewb 2013-02-08 19:24:46 UTC
Created attachment 131172 [details]
Shows the error without any fixable hint

The errorcode is "compiler.err.missing.ret.val".

Provide fixes
* "Change return type to void" (as reported)
* "Return null" -> return null;
* "Return local variable, field of the given type String" -> return localVar; return field;