Bug 233938

Summary: Bug in search classes algorithm
Product: [Eclipse Project] JDT Reporter: Sergey Gomanyuk <SergeyGomanyuk>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: jerome_lanneluc
Version: 3.3.2   
Target Milestone: 3.5 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Sergey Gomanyuk CLA 2008-05-26 06:52:30 EDT
Build ID: M20080221-1800

Steps To Reproduce:
1. Create outside Eclipse two classes:
file S1.java:
package p;

public class S1
{
    public static class InnerS1 {
        
    }
}

file S2.java:
package p;

public class S2
{
    public static class InnerS2 extends S1.InnerS1 {
        
    }
}
2. compile them with javac : javac S1.java S2.java
3. create in Eclipse a java project with different source and output folders
4. outside eclipse copy folder p with S1.java, S2.java and correspondent class files to the source folder of the created project
5. refresh created project
6. open S2.java and look at Error Log View. A number of error messages will appear there, first one:
 java.lang.ClassCastException: org.eclipse.jdt.internal.core.ClassFile cannot be cast to org.eclipse.jdt.core.ICompilationUnit
at org.eclipse.jdt.internal.core.NameLookup.seekTypesInSourcePackage(NameLookup.java:1046)
at org.eclipse.jdt.internal.core.NameLookup.seekTypes(NameLookup.java:952)
at org.eclipse.jdt.internal.core.NameLookup.findType(NameLookup.java:746)
at org.eclipse.jdt.internal.core.NameLookup.findType(NameLookup.java:630)
at org.eclipse.jdt.internal.core.NameLookup.findType(NameLookup.java:589)
....


More information:
Comment 1 Jerome Lanneluc CLA 2008-05-29 07:16:48 EDT
Following the steps you gave, I cannot reproduce the problem. When I open S2.java, the Error Log view remains empty. Do you have more details?
Comment 2 Jerome Lanneluc CLA 2008-08-25 09:39:53 EDT
Please reopen if you have more details
Comment 3 Frederic Fusier CLA 2008-09-15 09:37:51 EDT
Cannot reproduce neither with 3.5M2 not with 3.3.2...
Verified for 3.5M2 using I20080914-2000.