Initialize at declaration.

Thanks to Dave Brosius.
This commit is contained in:
Gilles 2016-05-31 02:28:14 +02:00
parent e7c42ed0fb
commit 633de29fed
1 changed files with 1 additions and 2 deletions

View File

@ -156,8 +156,7 @@ public abstract class AbstractIntegerDistribution implements IntegerDistribution
*/
private double checkedCumulativeProbability(int argument)
throws MathInternalError {
double result = Double.NaN;
result = cumulativeProbability(argument);
final double result = cumulativeProbability(argument);
if (Double.isNaN(result)) {
throw new MathInternalError(LocalizedFormats
.DISCRETE_CUMULATIVE_PROBABILITY_RETURNED_NAN, argument);