Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 131406 - [Use Supertype] Refactoring does not check method return type
[Use Supertype] Refactoring does not check method return type
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Refactoring
6.x
All All
: P3 (vote)
: 7.1
Assigned To: Ralph Ruijs
issues@java
:
: 172346 (view as bug list)
Depends on: 128676
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-28 14:09 UTC by Jiri Prox
Modified: 2011-09-08 14:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2008-03-28 14:09:33 UTC
Product Version: NetBeans IDE Dev (Build 20080328094427)
Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11
System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)

Refactoring does not check method return type when changing type of field. It can produce uncompilable code.

Steps to reproduce:
1) have a class (Iface is empty interface):
public class Main implements Iface {

    static Main default;

    static Main getDefault() {
        return default;
    }
}

2) call User supertype on Main and select Iface

->

public class Main implements Iface {

    static Iface default;

    static Main getDefault() {
        return default;   // <---- not compatible types
    }
}
Comment 1 Jan Pokorsky 2008-04-02 12:44:24 UTC
Sorry I was typing too fast. Reassigning back.
Comment 2 Jiri Prox 2008-04-11 01:48:40 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 3 Jan Pokorsky 2008-11-13 17:12:43 UTC
It relates to issue 128676.
Comment 4 Jan Becicka 2011-08-02 08:40:11 UTC
please evaluate. thanks
Comment 5 Ralph Ruijs 2011-09-07 15:21:10 UTC
Changeset: 34edd0682d38
Author:    Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Date:      2011-09-07 17:17
Message:   
Issue #131406 - [Use Supertype] Refactoring does not check method return type
Comment 6 Ralph Ruijs 2011-09-08 10:02:33 UTC
*** Bug 172346 has been marked as a duplicate of this bug. ***
Comment 7 Quality Engineering 2011-09-08 14:33:14 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/34edd0682d38
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: Issue #131406 - [Use Supertype] Refactoring does not check method return type


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo