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

Bug 315279

Summary: Rename Class/Interface causes code garbage with Subversive and keyword substitution
Product: [Technology] Subversive Reporter: Stephan Herrmann <stephan.herrmann>
Component: CoreAssignee: Igor Burilo <igor.burilo>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: maxb
Version: 0.7   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

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. ***