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 145018

Summary: Change return type hint
Product: java Reporter: Jiri Prox <jiriprox>
Component: HintsAssignee: Jan Lahoda <jlahoda>
Severity: blocker CC: markiewb
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: Works in 7.3

Description Jiri Prox 2008-08-25 15:16:24 UTC
Product Version: NetBeans IDE Dev (Build 20080825043643)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13
System: Linux version 2.6.22-15-generic running on i386; UTF-8; en_US (nb)

Change type hint can be extended to work also for methods. It will suggest change return type of method when there is
incompatible type used in the return clause.


    public String meth() {
        return 1;

the hint on line with return can suggest changing the method into:

    public int meth() {
        return 1;
Comment 1 markiewb 2012-12-27 11:15:44 UTC
Created attachment 129713 [details]
Works in 7.3

Works for me in 7.3 (201212260001). See screenshot