Bug 109059

Summary: [import rewrite] ImportRewrite#addImportFromSignature(..) creates invalid import for local types
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Markus Keller CLA 2005-09-08 11:05:40 EDT
I20050906-1200

package xy;
import java.util.ArrayList;
public class LocalTest {
    void m() {
        class Local {
        	Local fSelf;
        }
        new ArrayList().add(new Local().fSelf);
    }
}

Infer generic type arguments for the CU above. An import xy.LocalTest.98.Local
is created for the local class 'Local'. addImportFromSignature(..) should handle
local types by just skipping package name segments that start with a number.

See also bug 104879 which made support for local classes possible at all.
Comment 1 Markus Keller CLA 2005-09-26 06:26:52 EDT
*** Bug 110390 has been marked as a duplicate of this bug. ***
Comment 2 Eclipse Genie CLA 2020-06-12 15:25:23 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 Eclipse Genie CLA 2022-07-19 10:25:26 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.