Bug 395020 - [introduce factory] Introduce Factory introduces additional type on factory method which leads to compilation error
Summary: [introduce factory] Introduce Factory introduces additional type on factory m...
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.2.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-25 09:40 EST by Milos Gligoric CLA
Modified: 2023-04-25 17:46 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milos Gligoric CLA 2012-11-25 09:40:48 EST
Steps to reproduce:
1. Invoke "Introduce Factory" on the "C" constructor below
2. Confirm default settings for the transformation
3. The resulting file does not compile ("Type mismatch: Cannot convert from C<Object> to C<T>")

class C<T> {
    // Invoke "Introduce Factory" on the following constructor
    C(T o) {
    }

    C<T> f() {
        return new C(new Object());
    }
}

(Thanks to Yilong Li for helping with the bug report.)
Comment 1 Martin Mathew CLA 2013-01-23 23:51:40 EST
Issue is reproducible using I20130115-1300. The refactoring results in  compiler error.
Comment 2 Eclipse Genie CLA 2019-04-24 16:44:33 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Dani Megert CLA 2019-04-25 08:48:12 EDT
Still an issue in 4.12 M1.
Comment 4 Eclipse Genie CLA 2021-04-15 13:04:27 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Eclipse Genie CLA 2023-04-25 17:46:44 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.