Bug 212122

Summary: [move member type] Incorrect computation of signature when using Inner class of Generis Type
Product: [Eclipse Project] JDT Reporter: Alexandre FAU <fau.alexandre>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: jjohnstn, martinae
Version: 3.3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard: stalebug
Attachments:
Description Flags
The project needed to reproduce the problem. none

Description Alexandre FAU CLA 2007-12-06 03:51:43 EST
Created attachment 84609 [details]
The project needed to reproduce the problem.

Build ID: M20071023-1652

Steps To Reproduce:
1. Open the attached project
2. Try to "Convert Member To Level" for inner class 'Allocator'
3. The resulting project is not compilable because the signature of the methode 'methd' was not changed.



More information:
This sample (I hope) illustrate my probleme which is :
I have a plugin that refactor Java class using JDT, when I try to compute the signature of a method (calling method getSignature() on an IMethode) like this : 'public void mthd(InnerInGeneric<P1, P2>.Allocator a)' JDT throw an JavaModelException: Java Model Status [mthd(Allocator) {key=Ltests/enums/InnerInGeneric;.mthd(Ltests/enums/InnerInGeneric<TP1;TP2;>.Allocator;)V} [in InnerInGeneric [in InnerInGeneric.java [in tests.enums [in <project root> [in translation_InnerGeneric_Thu_Dec_06_09_49_23_CET_2007]]]]] does not exist]
Comment 1 Martin Aeschlimann CLA 2007-12-07 08:26:50 EST
Seems that this case is not yet handled. 'InnerInGeneric<P1, P2>.Allocator' needs to be changed to 'Allocator<P1, P2>'

package tests.enums;

public class InnerInGeneric<P1, P2> {


	public final class Allocator {
	}

	public void mthd(InnerInGeneric<P1, P2>.Allocator a) {
		
	}
}
Comment 2 Eclipse Genie CLA 2020-07-15 13:13:28 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 Jeff Johnston CLA 2020-07-15 13:51:29 EDT
Performing a Move Type to New File for Allocator class still causes a compilation error when complete in latest JDT.
Comment 4 Eclipse Genie CLA 2022-07-09 01:56:35 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.