]> source.dussan.org Git - jgit.git/commitdiff
[findBugs] Prefer short-cut logic as it's more performant 37/4637/1
authorMatthias Sohn <matthias.sohn@sap.com>
Wed, 16 Nov 2011 19:54:40 +0000 (20:54 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 16 Nov 2011 19:54:40 +0000 (20:54 +0100)
Change-Id: I64577f8fd19ee0d2d407479cc70e521adc367f37
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsReader.java

index 02077a99acc3f14ddb96995de2447658bd6011cd..5d3f9a93546b94654a5c0ca5aae776525b0db7ea 100644 (file)
@@ -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);