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

Bug 312644

Summary: NullPointer after "Compare with each other" in HistoryView
Product: [Technology] EGit Reporter: Stefan Lay <stefan.lay>
Component: UIAssignee: Stefan Lay <stefan.lay>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: matthias.sohn
Version: unspecified   
Target Milestone: 0.8.0   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Stefan Lay CLA 2010-05-12 11:17:00 EDT
When the file does not exist in the newer of the two commits there is a NullPointer Exception:

java.lang.NullPointerException
at org.eclipse.egit.ui.internal.GitCompareFileRevisionEditorInput.compare(GitCompareFileRevisionEditorInput.java:125)
at org.eclipse.egit.ui.internal.GitCompareFileRevisionEditorInput.createCompareInput(GitCompareFileRevisionEditorInput.java:121)
at org.eclipse.egit.ui.internal.GitCompareFileRevisionEditorInput.prepareCompareInput(GitCompareFileRevisionEditorInput.java:384)
at org.eclipse.team.ui.synchronize.SaveableCompareEditorInput.prepareInput(SaveableCompareEditorInput.java:239)
at org.eclipse.compare.CompareEditorInput.run(CompareEditorInput.java:472)
at org.eclipse.compare.internal.CompareUIPlugin.prepareInput(CompareUIPlugin.java:548)
at org.eclipse.compare.internal.CompareEditor$2.run(CompareEditor.java:343)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Stefan Lay CLA 2010-05-12 11:34:35 EDT
Patch proposed on http://egit.eclipse.org/r/#change,691
Comment 2 Matthias Sohn CLA 2010-05-12 14:11:24 EDT
merged as 2196fe73844331f47f639fdb77a36439a13feed3