Summary: | Creating hierarchy failed. See log for details. 0 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Christopher Daly <cjdaly> | ||||||
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | ||||||||
Version: | 3.0 | ||||||||
Target Milestone: | 3.0 RC2 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Christopher Daly
2004-06-04 04:28:46 EDT
Simple test case to reproduce: 1. Create cu X.java: public class X { } 2. Create cu Y.java: public class Y extends X { } 3. Open Y.java in Java editor 4. Remove its contents without saving so that editor is empty 5. Select X 6. Open type hierarchy Observe: You get ArrayIndexOutOfBoundsException: 0 Created attachment 11586 [details]
Proposed patch
Changed HierarchyResolver do skip cus with no top level types.
Created attachment 11587 [details]
Regression tests
Added regression test TypeHierarchyTests#testEmptyWorkingCopyPotentialSubtype()
Approved for RC2. Protected SourceTypeConverter as well to return an empty CompilationUnitDeclaration if no ISourceType. Released in HEAD. Verified in 200406110010 |