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

Bug 322231

Summary: NPE when double clicking a non existing file in History View
Product: [Technology] EGit Reporter: Jens Baumgart <jens.baumgart>
Component: UIAssignee: Jens Baumgart <jens.baumgart>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: caniszczyk
Version: unspecified   
Target Milestone: 0.9.0-M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Jens Baumgart CLA 2010-08-10 09:43:18 EDT
Given a commit that deletes a file x.
Select the commit in the history view.
x is shown in the file list on the right bottom of the history view.
Double click on x => NPE is thrown.

java.lang.NullPointerException
at org.eclipse.egit.ui.internal.EgitUiEditorUtils.openEditor(EgitUiEditorUtils.java:50)
at org.eclipse.egit.ui.internal.history.CommitFileDiffViewer.openFileInEditor(CommitFileDiffViewer.java:103)
at org.eclipse.egit.ui.internal.history.CommitFileDiffViewer.access$2(CommitFileDiffViewer.java:96)
at org.eclipse.egit.ui.internal.history.CommitFileDiffViewer$1.open(CommitFileDiffViewer.java:84)
Comment 1 Jens Baumgart CLA 2010-08-10 09:52:58 EDT
Fix proposed: http://egit.eclipse.org/r/#change,1275
Comment 2 Chris Aniszczyk CLA 2010-08-10 10:26:55 EDT
Fixed with cee1a9902d0e41c1854270f787c2f5fc2fba697d.

Thanks Jens.