commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject [1/3] [math] Initialize at declaration.
Date Tue, 31 May 2016 00:48:19 GMT
Repository: commons-math
Updated Branches:
  refs/heads/develop e7c42ed0f -> fc9d93db6


Initialize at declaration.

Thanks to Dave Brosius.


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/633de29f
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/633de29f
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/633de29f

Branch: refs/heads/develop
Commit: 633de29fedf11544f2c3d5052890cb014e612bd5
Parents: e7c42ed
Author: Gilles <gilles@harfang.homelinux.org>
Authored: Tue May 31 02:28:14 2016 +0200
Committer: Gilles <gilles@harfang.homelinux.org>
Committed: Tue May 31 02:28:14 2016 +0200

----------------------------------------------------------------------
 .../commons/math4/distribution/AbstractIntegerDistribution.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/633de29f/src/main/java/org/apache/commons/math4/distribution/AbstractIntegerDistribution.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/math4/distribution/AbstractIntegerDistribution.java
b/src/main/java/org/apache/commons/math4/distribution/AbstractIntegerDistribution.java
index 4612b58..0bc377d 100644
--- a/src/main/java/org/apache/commons/math4/distribution/AbstractIntegerDistribution.java
+++ b/src/main/java/org/apache/commons/math4/distribution/AbstractIntegerDistribution.java
@@ -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);


Mime
View raw message