Bug 231512 - Rename Refactoring (packages or classes) throws exceptions
Summary: Rename Refactoring (packages or classes) throws exceptions
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 RC2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-12 05:41 EDT by Ulli Hafner CLA
Modified: 2008-05-23 06:52 EDT (History)
2 users (show)

See Also:


Attachments
Error log with stacktraces (160.90 KB, text/plain)
2008-05-12 05:42 EDT, Ulli Hafner CLA
no flags Details
Eclipse Project that caused the problem (152.32 KB, text/plain)
2008-05-12 05:45 EDT, Ulli Hafner CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ulli Hafner CLA 2008-05-12 05:41:33 EDT
After upgrading to 3.4M7 (from 3.3) the rename refactoring seems to be quite unstable. Typically every second big rename refactoring stops in the middle of the process and leaves duplicate classes (before and after). This happens both for class  or package refactoring. The problems are not really deterministic, the occur not every time. After replacing our code from HEAD and retrying suddenly the refactoring works. Maybe a concurreny problem?

Attached several exception messages. (I'm not sure whether this happens only if there is a compile error in one of the refactored files.)
Comment 1 Ulli Hafner CLA 2008-05-12 05:42:34 EDT
Created attachment 99664 [details]
Error log with stacktraces
Comment 2 Ulli Hafner CLA 2008-05-12 05:45:43 EDT
Created attachment 99665 [details]
Eclipse Project that caused the problem

Not: this is a maven project. You need to run a mvn eclipse:eclipse to get the required dependencies.
Comment 3 Ulli Hafner CLA 2008-05-12 05:48:21 EDT
I attached the project where it happens.

What I tried is to do a rename of the package org.hudson.pmd to org.hudson.checkstyle in any of the 4 source folders (recursive package rename). Sometimes it breaks in the src/main, sometimes in the src/test folder.
Comment 4 Jerome Lanneluc CLA 2008-05-12 11:52:02 EDT
It sounds like some external process is keeping a file handle on the resources being moved. Does it happen after a reboot?

If it still happens, can you please make sure that:
- the attachment is not marked as text/plain
- the project doesn't depend on Maven
Comment 5 Ulli Hafner CLA 2008-05-12 12:24:15 EDT
Well, I think Eclipse holds these file locks. I even can't remove these zombie files in Eclipse: I need to exit and restart Eclipse, then the locks are removed and I can remove them again in Eclipse. There is no reboot required.
Comment 6 Ulli Hafner CLA 2008-05-12 16:20:36 EDT
Just one additional remark: I'm using the subversive team provider. 
Comment 7 Jerome Lanneluc CLA 2008-05-15 05:15:22 EDT
(In reply to comment #4)
> If it still happens, can you please make sure that:
> - the attachment is not marked as text/plain
> - the project doesn't depend on Maven
Comment 8 Jerome Lanneluc CLA 2008-05-15 05:15:57 EDT
Also does it happen in a plain Eclipse SDK, or do you have other plugins installed?
Comment 9 Ulli Hafner CLA 2008-05-20 02:22:40 EDT
I'll wait for the RC1 and re-test. There are some other save bugs already fixed, maybe these correlate...
Comment 10 Ulli Hafner CLA 2008-05-21 16:24:09 EDT
I installed 3.4RC1 and the bug seems to be fixed here. 

I set the resolution to WORKSFORME...
Comment 11 Jerome Lanneluc CLA 2008-05-22 03:47:38 EDT
Setting target milestone as per JDT/Core process
Comment 12 Eric Jodet CLA 2008-05-23 06:52:47 EDT
marking VERIFIED (verified by the bug reporter)