Skip to content

Commit

Permalink
Adds rule BigIntegerInstantiation in pmd-ruleset (getodk#1447)
Browse files Browse the repository at this point in the history
  • Loading branch information
shobhitagarwal1612 authored and lognaturel committed Sep 11, 2017
1 parent 5c01b09 commit bd62470
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private void disableWidget() {

private boolean isWidgetValid() {
boolean result = true;
if (rangeStep.compareTo(new BigDecimal(0)) == 0 || rangeEnd.subtract(rangeStart).remainder(rangeStep).compareTo(new BigDecimal(0)) != 0) {
if (rangeStep.compareTo(BigDecimal.ZERO) == 0 || rangeEnd.subtract(rangeStart).remainder(rangeStep).compareTo(BigDecimal.ZERO) != 0) {
disableWidget();
result = false;
}
Expand Down
1 change: 0 additions & 1 deletion config/quality/pmd/pmd-ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
<exclude name="AvoidStringBufferField" />
</rule>
<rule ref="rulesets/java/basic.xml">
<exclude name="BigIntegerInstantiation" />
<exclude name="DontUseFloatTypeForLoopIndices" />
<exclude name="CollapsibleIfStatements" />
<exclude name="SimplifiedTernary" />
Expand Down

0 comments on commit bd62470

Please sign in to comment.