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 128676 - [Use Supertype] Refactoring does not respect bound generic type
Summary: [Use Supertype] Refactoring does not respect bound generic type
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks: 131406
  Show dependency tree
 
Reported: 2008-02-28 10:33 UTC by Jiri Prox
Modified: 2011-09-09 15:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2008-02-28 10:33:14 UTC
Product Version: NetBeans IDE Dev (Build 20080228044232)
Java: 1.6.0_10-ea; Java HotSpot(TM) Client VM 11.0-b11
System: Linux version 2.6.22-14-generic running on i386; UTF-8; en_US (nb)

Refactoring does not respect bound generic type. It changes the type to super type regardless on restriction given by
generic type.

Steps to reproduce:
1) have class SubClass with method subMethod() extending SuperClass
2) have a class Test:
public class Test {

    public void method() {
        SubClass sub = new SubClass();
        action(sub);
    }
    
    public <T extends SubClass> void action(T input) {
        input.subMethod();
    }
    
}

3) call Use Supertype on SubClass
-> type of 'sub' changed to SuperType but declaration of method action() does not allow it.
Comment 1 Daniel Prusa 2008-02-29 10:49:30 UTC
reproducible
Comment 2 Jan Becicka 2011-08-02 08:39:17 UTC
please take a look at this one. Thanks
Comment 3 Ralph Ruijs 2011-09-08 09:53:52 UTC
Changeset: 135e539202d2
Author:    Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Date:      2011-09-08 11:46
Message:   
Issue #128676 - [Use Supertype]  Refactoring does not respect bound generic type
Comment 4 Quality Engineering 2011-09-09 15:04:52 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/135e539202d2
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: Issue #128676 - [Use Supertype]  Refactoring does not respect bound generic type