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

Bug 365834

Summary: [repoView] NullPointer in Repositories view
Product: [Technology] EGit Reporter: Stefan Lay <stefan.lay>
Component: UIAssignee: Project Inbox <egit.ui-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: matthias.sohn
Version: unspecified   
Target Milestone: 1.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Stefan Lay CLA 2011-12-07 03:19:44 EST
There is a NullPointer exception in the Git Repositories View which causes the repo view to be broken. No repositories are shown anymore.

It can be reproduced on windows by creating two bare repositories directly below c:\

The compare handling does not work properly for bare repositories.

java.lang.NullPointerException
	at org.eclipse.egit.ui.internal.repository.tree.RepositoryTreeNode.compareTo(RepositoryTreeNode.java:280)
	at org.eclipse.egit.ui.internal.repository.tree.RepositoryTreeNode.compareTo(RepositoryTreeNode.java:1)
	at java.util.Arrays.mergeSort(Unknown Source)
	at java.util.Arrays.sort(Unknown Source)
	at java.util.Collections.sort(Unknown Source)
	at org.eclipse.egit.ui.internal.repository.RepositoriesViewContentProvider.getElements(RepositoriesViewContentProvider.java:131)
	at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.getElements(SafeDelegateTreeContentProvider.java:101)
	at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider$1.run(NavigatorContentServiceContentProvider.java:149)
Comment 1 Matthias Sohn CLA 2011-12-08 17:59:46 EST
merged as 9a4d4680eaa0972429f63ba898100460303364db