Bug 233938 - Bug in search classes algorithm
Summary: Bug in search classes algorithm
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-26 06:52 EDT by Sergey Gomanyuk CLA
Modified: 2008-09-15 09:37 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.