Bug 48422 - Calling isStructureKnown() on ILocalVaraible throws JavaModelExceptions
Summary: Calling isStructureKnown() on ILocalVaraible throws JavaModelExceptions
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-10 12:50 EST by Dirk Baeumer CLA
Modified: 2003-12-17 06:01 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Baeumer CLA 2003-12-10 12:50:15 EST
I20031209

Calling isStrucutureKnown on the local variable a in the attached example 
throws a JavaModelException.

Java Model Exception: Java Model Status [a [in run() [in <anonymous #1> [in foo
(int) [in A [in [Working copy] A.java [in <default> [in <project root> [in 
TT]]]]]]]] does not exist.]

public class A {
    static class XX extends A {
        public void foo() {
        }
        public void bar() {
        }
    }
    public void foo(int y) {
        Runnable runnable= new Runnable() {
            private int field;
            public void run() {
                A a= null;
            }
        };
    }
    
    public String foo(String s) {
        return s;
    }
}
Comment 1 Philipe Mulet CLA 2003-12-11 00:46:28 EST
It should always return true... 
Comment 2 Jerome Lanneluc CLA 2003-12-11 05:44:14 EST
Fixed and added regression test ResolveTests.testLocalVarIsStructureKnown()
Comment 3 Frederic Fusier CLA 2003-12-17 06:01:12 EST
Verified for 3.0 M6 with build I200312162000:
  - code in M6 OK
  - test case failed in M5 and OK in M6