Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Baumgart2011-02-16 12:13:16 -0500
committerMatthias Sohn2011-02-20 19:07:41 -0500
commit776cce68fa204881ba8af727a5fca36dfa46954e (patch)
treeff22e6bdbb814b44d05aa241b4ff4b53f9e916b8
parent7bb700aa9c8172a8409abc3ae0f97fa261c03a8f (diff)
downloadegit-776cce68fa204881ba8af727a5fca36dfa46954e.tar.gz
egit-776cce68fa204881ba8af727a5fca36dfa46954e.tar.xz
egit-776cce68fa204881ba8af727a5fca36dfa46954e.zip
Fix NPE in Repositories View
Bug: 337304 Change-Id: I54f8ef478c3a7f111c37a2f905c8a83a35702579 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/BranchHierarchyNode.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/BranchHierarchyNode.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/BranchHierarchyNode.java
index d0d04658f..be392ea3a 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/BranchHierarchyNode.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/tree/BranchHierarchyNode.java
@@ -37,7 +37,8 @@ public class BranchHierarchyNode extends RepositoryTreeNode<IPath> {
*/
public BranchHierarchyNode(RepositoryTreeNode parent,
Repository repository, IPath path) {
- super(parent, RepositoryTreeNodeType.BRANCHHIERARCHY, repository, path);
+ // path must end with /
+ super(parent, RepositoryTreeNodeType.BRANCHHIERARCHY, repository, path.addTrailingSeparator());
}
/**
@@ -83,7 +84,7 @@ public class BranchHierarchyNode extends RepositoryTreeNode<IPath> {
private List<IPath> getPathList() throws IOException {
List<IPath> result = new ArrayList<IPath>();
Map<String, Ref> refsMap = getRepository().getRefDatabase().getRefs(
- getObject().toPortableString());
+ getObject().toPortableString()); // getObject() returns path ending with /
for (Map.Entry<String, Ref> entry : refsMap.entrySet()) {
if (entry.getValue().isSymbolic())
continue;

Back to the top