summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorGabriel Luong2013-05-27 16:20:08 (EDT)
committer Szymon Brandys2013-06-14 08:00:18 (EDT)
commit443d51fe2e628938e0950d5d7fb0912b2543096f (patch)
tree4571b7b0c665cc43a3ff1f7bf92e1214150c1b7e
parent2aa910bc533fcd82b654cf8f9c85d988ccaa8092 (diff)
downloadorg.eclipse.orion.server-443d51fe2e628938e0950d5d7fb0912b2543096f.zip
org.eclipse.orion.server-443d51fe2e628938e0950d5d7fb0912b2543096f.tar.gz
org.eclipse.orion.server-443d51fe2e628938e0950d5d7fb0912b2543096f.tar.bz2
Added check for when commitToTagMap does not contain the commit idv20130614-1200
-rw-r--r--bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/objects/Commit.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/objects/Commit.java b/bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/objects/Commit.java
index 22d08b8..eb19212 100644
--- a/bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/objects/Commit.java
+++ b/bundles/org.eclipse.orion.server.git/src/org/eclipse/orion/server/git/objects/Commit.java
@@ -256,7 +256,10 @@ public class Commit extends GitObject {
}
private Map<String, Ref> getTagsForCommit() throws MissingObjectException, IOException, GitAPIException, JSONException, URISyntaxException, CoreException {
- return getCommitToTagMap().get(revCommit.getId());
+ Map<String, Ref> tags = getCommitToTagMap().get(revCommit.getId());
+ if (tags == null)
+ tags = new HashMap<String, Ref>();
+ return tags;
}
private URI createDiffLocation(String toRefId, String fromRefId, String path) throws URISyntaxException {