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 228636 - UseSupertypeWherePossible ignores use of generic type
Summary: UseSupertypeWherePossible ignores use of generic type
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.2.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-16 22:29 UTC by liu281
Modified: 2015-09-17 11:16 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 liu281 2013-04-16 22:29:13 UTC
Build 201210100934

After refactoring, there will be a compilation error.

interface A1<T> {
    T m(T a);
}

// Invoke 'Use Supertype Where Possible' (select 'A1')
class C1 implements A1<C1> {
    public C1 m(C1 a) {
        return null;
    }
}

--------------
After refactoring:

interface A1<T> {
    T m(T a);
}

class C1 implements A1<C1> {
    public C1 m(A1 a) { //should not change to A1
        return null;
    }
}
Comment 1 Martin Balin 2015-09-17 11:16:22 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.