Bug 41821 - Refactoring - ClassCastException occurs when trying to move class to a different package
Summary: Refactoring - ClassCastException occurs when trying to move class to a differ...
Status: RESOLVED DUPLICATE of bug 36479
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1.1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.0 M3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-21 14:10 EDT by Jan Ploski CLA
Modified: 2003-08-21 14:43 EDT (History)
0 users

See Also:


Attachments
Log file with the exception stack traces (two attempts logged) (9.95 KB, text/plain)
2003-08-21 14:11 EDT, Jan Ploski CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Ploski CLA 2003-08-21 14:10:41 EDT
See the attached log file.
Comment 1 Jan Ploski CLA 2003-08-21 14:11:32 EDT
Created attachment 5822 [details]
Log file with the exception stack traces (two attempts logged)
Comment 2 Olivier Thomann CLA 2003-08-21 14:14:53 EDT
Could you please provide steps to reproduce?
Source of the class, package names (source and destination).
Thanks.
Comment 3 Jan Ploski CLA 2003-08-21 14:28:35 EDT
I can reproduce it in my current workspace (which I backed up for this purpose),
but cannot send you the code (which is proprietary). The exception occurs when
the "Move" refactoring is executed and causes it to fail. Running the same step
under debugger shows that in TypeReferencePattern:230, which contains

typeBinding = (TypeBinding)binding;

the real type of the "binding" object is ProblemBinding, not TypeBinding.

This seems to have something to do with the fact that my workspace contains
compilation errors. Anything else I can inspect for you to provide clues?
Comment 4 Olivier Thomann CLA 2003-08-21 14:33:52 EDT
I think this is fixed in the 3.0 integration build.
It looks like a duplicate of bug 36479.
Comment 5 Jan Ploski CLA 2003-08-21 14:39:45 EDT
Correct, it's a duplicate. Fixing compilation errors made the exception go
away like in the other bug report, too.
Comment 6 Olivier Thomann CLA 2003-08-21 14:43:16 EDT

*** This bug has been marked as a duplicate of 36479 ***