Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350394 - NPE when reflog view is open, and non git project is selected
Summary: NPE when reflog view is open, and non git project is selected
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.1-M1   Edit
Assignee: Ian Bull CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-27 01:18 EDT by Ian Bull CLA
Modified: 2011-06-27 15:13 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Bull CLA 2011-06-27 01:18:03 EDT
If you have two projects in your workspace (one attached to a git repo, the other one not) and you have the reflog viewer open, you will get an NPE when changing selection between these two projects.


java.lang.NullPointerException
	at org.eclipse.egit.ui.internal.reflog.ReflogView.reactOnSelection(ReflogView.java:270)
	at org.eclipse.egit.ui.internal.reflog.ReflogView.access$1(ReflogView.java:252)
	at org.eclipse.egit.ui.internal.reflog.ReflogView$6.selectionChanged(ReflogView.java:228)
	at org.eclipse.ui.internal.AbstractSelectionService.firePostSelection(AbstractSelectionService.java:179)
	at org.eclipse.ui.internal.AbstractSelectionService$2.selectionChanged(AbstractSelectionService.java:71)
	at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:888)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:886)
	at org.eclipse.jface.viewers.StructuredViewer.handlePostSelect(StructuredViewer.java:1226)
	at org.eclipse.jface.viewers.StructuredViewer$5.widgetSelected(StructuredViewer.java:1251)
	at org.eclipse.jface.util.OpenStrategy.firePostSelectionEvent(OpenStrategy.java:262)
	at org.eclipse.jface.util.OpenStrategy.access$5(OpenStrategy.java:256)
	at org.eclipse.jface.util.OpenStrategy$3.run(OpenStrategy.java:433)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
Comment 1 Ian Bull CLA 2011-06-27 02:00:13 EDT
I'm not sure if I did this right, but I fixed this problem and pushed it to gerrit

 http://egit.eclipse.org/r/3781
Comment 2 Ian Bull CLA 2011-06-27 02:22:59 EDT
Sorry, I tried to update my patch, but it created a new gerrit document (http://egit.eclipse.org/r/#change,3782).
Comment 3 Chris Aniszczyk CLA 2011-06-27 15:13:02 EDT
Fixed in master, thanks Ian.