changeset 8074:cc710b873046

Ensure array offsets are swapped when arrays are swapped.
author psandoz
date Tue, 09 Apr 2013 14:14:39 +0200
parents fbc1c394e9bf
children 726c6557d709
files src/share/classes/java/util/DualPivotQuicksort.java
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/DualPivotQuicksort.java	Mon Apr 08 20:30:54 2013 -0700
+++ b/src/share/classes/java/util/DualPivotQuicksort.java	Tue Apr 09 14:14:39 2013 +0200
@@ -199,6 +199,7 @@
                 run[++last] = right;
             }
             int[] t = a; a = b; b = t;
+            int o = ao; ao = bo; bo = o;
         }
     }
 
@@ -646,6 +647,7 @@
                 run[++last] = right;
             }
             long[] t = a; a = b; b = t;
+            int o = ao; ao = bo; bo = o;
         }
     }
 
@@ -1129,6 +1131,7 @@
                 run[++last] = right;
             }
             short[] t = a; a = b; b = t;
+            int o = ao; ao = bo; bo = o;
         }
     }
 
@@ -1612,6 +1615,7 @@
                 run[++last] = right;
             }
             char[] t = a; a = b; b = t;
+            int o = ao; ao = bo; bo = o;
         }
     }
 
@@ -2191,6 +2195,7 @@
                 run[++last] = right;
             }
             float[] t = a; a = b; b = t;
+            int o = ao; ao = bo; bo = o;
         }
     }
 
@@ -2729,6 +2734,7 @@
                 run[++last] = right;
             }
             double[] t = a; a = b; b = t;
+            int o = ao; ao = bo; bo = o;
         }
     }