Enable PMD rule SimplifiedTernary and fix violations
This commit is contained in:
parent
a07fc132d2
commit
09a9c1a104
3 changed files with 2 additions and 3 deletions
|
@ -309,7 +309,7 @@ public class RoutingEngine extends Thread {
|
|||
}
|
||||
if (hasInfo()) {
|
||||
boolean found = nearbyTrack != null;
|
||||
boolean dirty = found ? nearbyTrack.isDirty : false;
|
||||
boolean dirty = found && nearbyTrack.isDirty;
|
||||
logInfo("read referenceTrack, found=" + found + " dirty=" + dirty + " " + debugInfo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -882,7 +882,7 @@ public abstract class BExpressionContext implements IByteArrayUnifier {
|
|||
}
|
||||
|
||||
public final boolean isLookupIdxUsed(int idx) {
|
||||
return idx < lookupIdxUsed.length ? lookupIdxUsed[idx] : false;
|
||||
return idx < lookupIdxUsed.length && lookupIdxUsed[idx];
|
||||
}
|
||||
|
||||
public final void setAllTagsUsed() {
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
<exclude name="PrimitiveWrapperInstantiation" />
|
||||
<exclude name="ReturnEmptyCollectionRatherThanNull" />
|
||||
<exclude name="SimplifiableTestAssertion" />
|
||||
<exclude name="SimplifiedTernary" />
|
||||
<exclude name="SimplifyBooleanReturns" />
|
||||
<exclude name="UncommentedEmptyConstructor" />
|
||||
<exclude name="UncommentedEmptyMethodBody" />
|
||||
|
|
Loading…
Reference in a new issue