]> source.dussan.org Git - jgit.git/commitdiff
Fix redundant null check warning in Repository 98/8598/1
authorRobin Stocker <robin@nibor.org>
Thu, 8 Nov 2012 13:17:13 +0000 (14:17 +0100)
committerRobin Stocker <robin@nibor.org>
Thu, 8 Nov 2012 13:18:21 +0000 (14:18 +0100)
rev is always null because of `if (rev != null) return ...` above.

Change-Id: I8168aefd344e0c4b0c68caea1a3daee66c07173b

org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java

index 76f537817995dba3cf8e3ef85394ad7fd2783e00..911b1f6a7c1fd2b905d73910cf0c5f153bcbe5fd 100644 (file)
@@ -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))