On 16 August 2012 22:35, <er...@apache.org> wrote: > Author: erans > Date: Thu Aug 16 21:35:14 2012 > New Revision: 1374071 > > URL: http://svn.apache.org/viewvc?rev=1374071&view=rev > Log: > Change suggested by "FindBugs". > > Modified: > > commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java > > commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java > > Modified: > commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java > URL: > http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java?rev=1374071&r1=1374070&r2=1374071&view=diff > ============================================================================== > --- > commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java > (original) > +++ > commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreHighPrecisionRuleFactory.java > Thu Aug 16 21:35:14 2012 > @@ -193,7 +193,7 @@ public class LegendreHighPrecisionRuleFa > weights[idx] = tmp2; > } > // If "numberOfPoints" is odd, 0 is a root. > - if (numberOfPoints % 2 == 1) { > + if (numberOfPoints % 2 != 0) {
Maybe add a comment to say why the comparison is done this way? Finding the associated SVN log comment would be hard work in the future. > BigDecimal pmc = BigDecimal.ONE; > for (int j = 1; j < numberOfPoints; j += 2) { > final BigDecimal b_j = new BigDecimal(j, mContext); > > Modified: > commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java > URL: > http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java?rev=1374071&r1=1374070&r2=1374071&view=diff > ============================================================================== > --- > commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java > (original) > +++ > commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/integration/gauss/LegendreRuleFactory.java > Thu Aug 16 21:35:14 2012 > @@ -129,7 +129,7 @@ public class LegendreRuleFactory extends > weights[idx] = w; > } > // If "numberOfPoints" is odd, 0 is a root. > - if (numberOfPoints % 2 == 1) { > + if (numberOfPoints % 2 != 0) { > double pmc = 1; > for (int j = 1; j < numberOfPoints; j += 2) { > pmc = -j * pmc / (j + 1); > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org