Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354704 - A cast exception occured in line 593 of the class OpenDeclarationHandler.
Summary: A cast exception occured in line 593 of the class OpenDeclarationHandler.
Status: CLOSED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: RDT (show other bugs)
Version: 4.0.7   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: John Liu CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-14 13:44 EDT by John Liu CLA
Modified: 2011-09-27 13:51 EDT (History)
0 users

See Also:


Attachments
a fix patch (2.30 KB, text/plain)
2011-08-14 13:55 EDT, John Liu CLA
no flags Details

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