Enable checkstyle for simple boolean expressions

master
Evan Harris 5 years ago committed by jvoisin
parent f738819625
commit 389db3f1b4
  1. 2
      airsonic-main/src/main/java/org/airsonic/player/controller/DownloadController.java
  2. 2
      airsonic-main/src/main/java/org/airsonic/player/monitor/MetricsManager.java
  3. 2
      checkstyle.xml

@ -240,7 +240,7 @@ public class DownloadController implements LastModified {
} }
} }
} }
if (coverArtFile != null && coverArtFile.exists() && cover_embedded == false) { if (coverArtFile != null && coverArtFile.exists() && !cover_embedded) {
zip(out, coverArtFile.getParentFile(), coverArtFile, status, range); zip(out, coverArtFile.getParentFile(), coverArtFile, status, range);
} }

@ -79,7 +79,7 @@ public class MetricsManager {
*/ */
public TimerBuilder condition(boolean ifTrue) { public TimerBuilder condition(boolean ifTrue) {
if (metricsActivatedByConfiguration()) { if (metricsActivatedByConfiguration()) {
if (ifTrue == false) { if (!ifTrue) {
return conditionFalseTimerBuilderSingleton; return conditionFalseTimerBuilderSingleton;
} }
return new TimerBuilder(); return new TimerBuilder();

@ -38,6 +38,8 @@
<module name="OneStatementPerLine"/> <module name="OneStatementPerLine"/>
<module name="ParenPadCheck"/> <module name="ParenPadCheck"/>
<module name="RedundantImport"/> <module name="RedundantImport"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/> <module name="StringLiteralEquality"/>
<module name="TypecastParenPad"/> <module name="TypecastParenPad"/>
<module name="UnusedImports"/> <module name="UnusedImports"/>

Loading…
Cancel
Save