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 125021 - Extract Interface does not create imports for type parameter bounds
Summary: Extract Interface does not create imports for type parameter bounds
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
Depends on:
Blocks: 152192
  Show dependency tree
 
Reported: 2008-01-10 10:06 UTC by matthies
Modified: 2009-07-16 14:55 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 matthies 2008-01-10 10:06:28 UTC
When applying "Extract Interface" on a class with bounded type parameters,
where the bound is a type from a different package, no import statement is
added for that type in the new source file created for the extracted interface.

Example:

    import java.io.Closeable;

    public class Test<C extends Closeable>
    {
        public C foo() { return null; }
    }

Then Extract Interface generates

    public interface NewInterface<C extends Closeable>
    {
        C foo();
    }

which is missing the import statement for java.io.Closeable.

Product Version: NetBeans IDE 6.0 (Build 200711261600)
Java: 1.6.0_02; Java HotSpot(TM) Client VM 1.6.0_02-b05
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Comment 1 Daniel Prusa 2008-02-01 11:12:12 UTC
reproducoble
Comment 2 Jiri Prox 2008-04-11 01:48:27 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 3 Jan Pokorsky 2008-11-14 10:52:37 UTC
fixed http://hg.netbeans.org/main/rev/038b594d652a
Comment 4 Quality Engineering 2008-11-14 16:23:18 UTC
Integrated into 'main-golden', will be available in build *200811141401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/038b594d652a
User: Jan Pokorsky <jpokorsky@netbeans.org>
Log: #125021: fixing import of copied type parameter bounderies
Comment 5 matthies 2009-07-16 14:55:09 UTC
Verified in 6.7.