Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354704

Summary: A cast exception occured in line 593 of the class OpenDeclarationHandler.
Product: [Tools] PTP Reporter: John Liu <jwsliu>
Component: RDTAssignee: John Liu <jwsliu>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 4.0.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
a fix patch none

Description John Liu CLA 2011-08-14 13:44:10 EDT
A cast exception occured in line 593 of the class OpenDeclarationHandler.
 
return OpenDeclarationResult.resultCElements((ICElement[])elems.toArray());

elems.toArray() returns an Object[], which can not be cast to ICElement[].
Comment 1 John Liu CLA 2011-08-14 13:55:58 EDT
Created attachment 201478 [details]
a fix patch

Fix the reported problem, also fix another problem that the return list could contain duplicate elements.
Comment 2 John Liu CLA 2011-09-27 13:50:51 EDT
The patch is checked into head stream and was checked into ptp_4_1 already.