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

Bug 368460

Summary: NPE when trying to compare two commits that are already being compared with E4
Product: [Technology] EGit Reporter: Marc Khouzam <marc.khouzam>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: minor    
Priority: P3 CC: robin
Version: 1.1   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Marc Khouzam CLA 2012-01-12 10:19:33 EST
I'm running E4.2.  The problem does not happen on 3.8.

1- open a repo history
2- select two commits
3- right-click and select "Compare with each other"
=> a compare editor will open
4- while the compare editor is still present, go back to history view and with the same two commits selected choose again "Compare with each other"
=> NPE


java.lang.NullPointerException
    at org.eclipse.egit.ui.internal.merge.GitCompareEditorInput.equals(GitCompareEditorInput.java:378)
    at org.eclipse.egit.ui.internal.CompareUtils.findReusableCompareEditor(CompareUtils.java:243)
    at org.eclipse.egit.ui.internal.CompareUtils.openInCompare(CompareUtils.java:211)
    at org.eclipse.egit.ui.internal.history.command.AbstractHistoryCommandHandler.openInCompare(AbstractHistoryCommandHandler.java:71)
    at org.eclipse.egit.ui.internal.history.command.CompareVersionsHandler.execute(CompareVersionsHandler.java:73)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:68)
    at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
Comment 1 Robin Stocker CLA 2013-05-19 19:57:15 EDT

*** This bug has been marked as a duplicate of bug 349418 ***