diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2011-11-16 20:54:40 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2011-11-16 20:54:40 +0100 |
commit | afebe7880dea9e5243467f5113a7ebfa65f3c079 (patch) | |
tree | 274c0d6fa41018644127d430305f4e969353466e | |
parent | e7ec5e147357f30cfde2e6921bd1bb5913b76e3b (diff) | |
download | jgit-afebe7880dea9e5243467f5113a7ebfa65f3c079.tar.gz jgit-afebe7880dea9e5243467f5113a7ebfa65f3c079.zip |
[findBugs] Prefer short-cut logic as it's more performant
Change-Id: I64577f8fd19ee0d2d407479cc70e521adc367f37
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsReader.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsReader.java index 02077a99ac..5d3f9a9354 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsReader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsReader.java @@ -688,7 +688,7 @@ final class DfsReader extends ObjectReader implements ObjectReuseAsIs { for (;;) { dstoff = block.inflate(inf, position, dstbuf, dstoff); - if (headerOnly & dstoff == dstbuf.length) + if (headerOnly && dstoff == dstbuf.length) return dstoff; if (inf.needsInput()) { position += block.remaining(position); |