Merge changes I366435e2,I64577f8f

* changes:
  [findBugs] Silence returning null for StringUtils.toBooleanOrNull()
  [findBugs] Prefer short-cut logic as it's more performant
This commit is contained in:
Shawn Pearce 2011-11-18 16:05:27 -05:00 committed by Code Review
commit ce02c82b82
2 changed files with 8 additions and 1 deletions

View File

@ -45,4 +45,11 @@
<Class name="org.eclipse.jgit.util.TemporaryBuffer$BlockInputStream" />
<Bug pattern="UR_UNINIT_READ" />
</Match>
<!-- Silence returning null for Boolean return type -->
<Match>
<Class name="org.eclipse.jgit.util.StringUtils" />
<Method name="toBooleanOrNull" />
<Bug pattern="NP_BOOLEAN_RETURN_NULL" />
</Match>
</FindBugsFilter>

View File

@ -688,7 +688,7 @@ int inflate(DfsPackFile pack, long position, byte[] dstbuf,
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);