Enable PMD rule SimplifyBooleanReturns and fix violations

This commit is contained in:
Manuel Fuhr 2022-11-13 16:08:15 +01:00
parent 5f942cc458
commit 41d25cd523
3 changed files with 2 additions and 9 deletions

View file

@ -141,10 +141,7 @@ public class CompactLongSet {
n = nn; n = nn;
} }
} }
if (a[n] == id) { return a[n] == id;
return true;
}
return false;
} }
protected void moveToFrozenArray(long[] faid) { protected void moveToFrozenArray(long[] faid) {

View file

@ -61,10 +61,7 @@ public class FrozenLongSet extends CompactLongSet {
} }
offset >>= 1; offset >>= 1;
} }
if (a[n] == id) { return a[n] == id;
return true;
}
return false;
} }
} }

View file

@ -31,7 +31,6 @@
<exclude name="PreserveStackTrace" /> <exclude name="PreserveStackTrace" />
<exclude name="PrimitiveWrapperInstantiation" /> <exclude name="PrimitiveWrapperInstantiation" />
<exclude name="ReturnEmptyCollectionRatherThanNull" /> <exclude name="ReturnEmptyCollectionRatherThanNull" />
<exclude name="SimplifyBooleanReturns" />
<exclude name="UncommentedEmptyConstructor" /> <exclude name="UncommentedEmptyConstructor" />
<exclude name="UncommentedEmptyMethodBody" /> <exclude name="UncommentedEmptyMethodBody" />
<exclude name="UnusedFormalParameter" /> <exclude name="UnusedFormalParameter" />