From afebe7880dea9e5243467f5113a7ebfa65f3c079 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Wed, 16 Nov 2011 20:54:40 +0100 Subject: [PATCH] [findBugs] Prefer short-cut logic as it's more performant Change-Id: I64577f8fd19ee0d2d407479cc70e521adc367f37 Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/storage/dfs/DfsReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5