Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java8
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java2
2 files changed, 4 insertions, 6 deletions
diff --git a/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java b/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java
index a3622942ad..4d417a979e 100644
--- a/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java
+++ b/org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java
@@ -91,11 +91,9 @@ public class TaskReferenceFactory implements IAdapterFactory {
// try to get repository url and commit message
try (RevWalk revWalk = new RevWalk(r)) {
RevCommit revCommit = revWalk.parseCommit(commit);
- if (revCommit != null) {
- repoUrl = getRepoUrl(r);
- message = revCommit.getFullMessage();
- timestamp = (long)revCommit.getCommitTime() * 1000;
- }
+ repoUrl = getRepoUrl(r);
+ message = revCommit.getFullMessage();
+ timestamp = (long) revCommit.getCommitTime() * 1000;
} catch (IOException e) {
continue;
} catch (RuntimeException e) {
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java
index 56cdd065b5..5efc881404 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java
@@ -610,7 +610,7 @@ public class CompareUtils {
destCommit = getFileRevisionTypedElement(gitPath, commit,
repository);
- if (base != null && commit != null) {
+ if (base != null) {
final ObjectId headCommitId = repository
.resolve(Constants.HEAD);
commonAncestor = getFileRevisionTypedElementForCommonAncestor(

Back to the top