Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2018-08-14 14:20:14 +0000
committerThomas Wolf2018-08-25 11:15:26 +0000
commit8c8e7917d5c00c485cc54e86ba8e4777c2283589 (patch)
tree038c68092c240071c0fd09992b75c19ec302c94a /org.eclipse.egit.mylyn.ui
parent4377af5af4c7a463e858123c306093c250258711 (diff)
downloadegit-8c8e7917d5c00c485cc54e86ba8e4777c2283589.tar.gz
egit-8c8e7917d5c00c485cc54e86ba8e4777c2283589.tar.xz
egit-8c8e7917d5c00c485cc54e86ba8e4777c2283589.zip
Refactor: Remove unneeded null checks
RevWalk.parseCommit() was marked @NonNull in January 2018, and existing egit code has not been adapted in all cases. Change-Id: Ic5f35768852cf695ac7ee8fdf53a24d53f6cc10e Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Diffstat (limited to 'org.eclipse.egit.mylyn.ui')
-rw-r--r--org.eclipse.egit.mylyn.ui/src/org/eclipse/egit/internal/mylyn/ui/commit/TaskReferenceFactory.java8
1 files changed, 3 insertions, 5 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) {

Back to the top