Browse Source

Merge changes I366435e2,I64577f8f

* changes:
  [findBugs] Silence returning null for StringUtils.toBooleanOrNull()
  [findBugs] Prefer short-cut logic as it's more performant
stable-1.2
Shawn Pearce 13 years ago committed by Code Review
parent
commit
ce02c82b82
  1. 7
      org.eclipse.jgit/findBugs/FindBugsExcludeFilter.xml
  2. 2
      org.eclipse.jgit/src/org/eclipse/jgit/storage/dfs/DfsReader.java

7
org.eclipse.jgit/findBugs/FindBugsExcludeFilter.xml

@ -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>

2
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);

Loading…
Cancel
Save