Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339828 - StringIndexOutOfBoundsException in CompareUtils#getFileCachedRevisionTypedElement
Summary: StringIndexOutOfBoundsException in CompareUtils#getFileCachedRevisionTypedEle...
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 0.12   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-13 11:49 EDT by Nicolas Bros CLA
Modified: 2011-05-11 13:16 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Bros CLA 2011-03-13 11:49:06 EDT
I get the following exception when double-clicking on a file in the synchronize view:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at java.lang.String.substring(Unknown Source)
at org.eclipse.egit.ui.internal.CompareUtils.getFileCachedRevisionTypedElement(CompareUtils.java:378)
at org.eclipse.egit.ui.internal.synchronize.compare.GitLocalCompareInput.getRight(GitLocalCompareInput.java:64)
at org.eclipse.egit.ui.internal.synchronize.compare.GitCompareInput.prepareInput(GitCompareInput.java:154)
at org.eclipse.egit.ui.internal.synchronize.model.GitModelBlob.prepareInput(GitModelBlob.java:148)
at org.eclipse.team.internal.ui.mapping.ModelCompareEditorInput.prepareCompareInput(ModelCompareEditorInput.java:121)
at org.eclipse.team.ui.synchronize.SaveableCompareEditorInput.prepareInput(SaveableCompareEditorInput.java:235)
at org.eclipse.compare.CompareEditorInput.run(CompareEditorInput.java:483)
at org.eclipse.compare.internal.CompareUIPlugin.prepareInput(CompareUIPlugin.java:548)
at org.eclipse.compare.internal.CompareEditor$2.run(CompareEditor.java:349)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

eclipse.buildId=M20100909-0800
Comment 1 Kevin Sawicki CLA 2011-03-24 19:27:36 EDT
I believe this was fixed in: http://egit.eclipse.org/r/#change,2740
Comment 2 Kevin Sawicki CLA 2011-05-11 13:16:13 EDT
Merged as f8777aacad8a27da7190b0287fc20fc061284f8a