Bug 395020

Summary: [introduce factory] Introduce Factory introduces additional type on factory method which leads to compilation error
Product: [Eclipse Project] JDT Reporter: Milos Gligoric <milos.gligoric>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, manju656
Version: 4.2.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug

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.