db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1499675 - in /db/derby/code/branches/10.10: ./ java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java
Date Thu, 04 Jul 2013 08:25:19 GMT
Author: kahatlen
Date: Thu Jul  4 08:25:19 2013
New Revision: 1499675

URL: http://svn.apache.org/r1499675
Log:
DERBY-6196: ArrayIndexOutOfBoundsException in SURQueryMixTest

Merged revision 1471275 from trunk.

Modified:
    db/derby/code/branches/10.10/   (props changed)
    db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java

Propchange: db/derby/code/branches/10.10/
------------------------------------------------------------------------------
  Merged /db/derby/code/trunk:r1471275

Modified: db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java?rev=1499675&r1=1499674&r2=1499675&view=diff
==============================================================================
--- db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java
(original)
+++ db/derby/code/branches/10.10/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/SURQueryMixTest.java
Thu Jul  4 08:25:19 2013
@@ -207,7 +207,7 @@ public class SURQueryMixTest extends SUR
                 double p = (double) k / (double) n; 
                 if (d<p) {
                     // Replace a random value from the sample with the new value
-                    int keyToReplace = Math.abs(r.nextInt())%k;                    
+                    int keyToReplace = r.nextInt(k);
                     sampledKeys.set(keyToReplace, key);
                 }
             }



Mime
View raw message