commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r810206 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomDataImpl.java
Date Tue, 01 Sep 2009 20:05:23 GMT
Author: luc
Date: Tue Sep  1 20:05:22 2009
New Revision: 810206

URL: http://svn.apache.org/viewvc?rev=810206&view=rev
Log:
handle an impossible case consistently with other parts of the library

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomDataImpl.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomDataImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomDataImpl.java?rev=810206&r1=810205&r2=810206&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomDataImpl.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/random/RandomDataImpl.java
Tue Sep  1 20:05:22 2009
@@ -241,7 +241,8 @@
         try {
             alg = MessageDigest.getInstance("SHA-1");
         } catch (NoSuchAlgorithmException ex) {
-            return null; // gulp FIXME? -- this *should* never fail.
+            // this should never happen
+            throw MathRuntimeException.createInternalError(ex);
         }
         alg.reset();
 



Mime
View raw message