Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315279 - Rename Class/Interface causes code garbage with Subversive and keyword substitution
Summary: Rename Class/Interface causes code garbage with Subversive and keyword substi...
Status: RESOLVED FIXED
Alias: None
Product: Subversive
Classification: Technology
Component: Core (show other bugs)
Version: 0.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Igor Burilo CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 311808 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-01 15:15 EDT by Stephan Herrmann CLA
Modified: 2011-07-10 03:56 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2010-06-01 15:15:57 EDT
I was just caught by the same issue as has been reported in bug 281557:
if keyword substitution is enabled renaming a Java class may result
in corrupt source code.

Bug 281557 was closed as NOT_ECLIPSE, assuming that bug was caused by
Subclipse. See http://subclipse.tigris.org/issues/show_bug.cgi?id=923
which contains a patch for Subclipse.

Also bug 281557 comment 38 reports that subversive could cause the same
problem as subclipse previously did.

I could reproduce the issue on two different machines using
Eclipse SDK Helios RC3 + latest Subversive (I20100528-1600). 
Unfortunately, when trying the same in a runtime workbench 
(debug or run - no difference) the bug did not occur.

After the failed refactoring the keyword part looked like this:
 * $Id: QuickAssistProcessor.java -1   $
i.e., the revision, date and author info was replaced by "-1".
Not sure if that is relevant here.

More details: 
- the class was just renamed, not moved to a different package
- refactoring also modified a reference in plugin.xml
- I use JavaHL 1.6.6
Comment 1 Stephan Herrmann CLA 2010-06-01 15:18:39 EDT
This might be the reason, why the runtime workbench didn't exhibit the bug:
since it couldn't find the native library subversive reverted to using
the SVNKit connector.
Comment 2 Alexander Gurov CLA 2011-05-09 14:02:40 EDT
Fixed.
Comment 3 Alexander Gurov CLA 2011-07-10 03:56:27 EDT
*** Bug 311808 has been marked as a duplicate of this bug. ***