From 106e8b87625cd1ad6b2cec14d676c23174422352 Mon Sep 17 00:00:00 2001 From: Robin Stocker Date: Thu, 8 Nov 2012 14:17:13 +0100 Subject: [PATCH] Fix redundant null check warning in Repository rev is always null because of `if (rev != null) return ...` above. Change-Id: I8168aefd344e0c4b0c68caea1a3daee66c07173b --- org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java index 76f5378179..911b1f6a7c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java @@ -697,7 +697,7 @@ public abstract class Repository { return rev.copy(); if (name != null) return name; - if (rev == null && done == revstr.length()) + if (done == revstr.length()) return null; name = revstr.substring(done); if (!Repository.isValidRefName("x/" + name)) -- 2.39.5