[8011944] Sort fails with ArrayIndexOutOfBoundsException
Miroslaw Niemiec
Miroslaw.Niemiec at Oracle.COM
Thu Jan 23 22:55:12 UTC 2014
Hello!
This is a simple backport from 8 to 7.
Looking for a review of this even though it only requires a testcase
change due to the use of lambda expressions.
Since this is the first of these I've encountered I thought I better
play it safe, but generally speaking, are we ok
to skip the review process for backports like this? (minor lambda
related testcase changes - if the lambda's are in the actual fix it
probably makes sense to re-review).
The fix:
src/share/classes/java/util/ComparableTimSort.java
src/share/classes/java/util/TimSort.java
applied with no modification to 7
The only simple change was to replace a lambda expression in test case
test/java/util/Arrays/TimSortStackSize.java:
Arrays.sort(genData(), Integer::compare);
got replaced with
Arrays.sort(genData(),
new java.util.Comparator<Integer>() {
public int compare(Integer a1, Integer a2){
return Integer.compare(a1.intValue(), a2.intValue());
}
});
Jdk bug:
https://bugs.openjdk.java.net/browse/JDK-8011944
Original fix for 8:
http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/07585a2483fa
Fix for 7:
http://cr.openjdk.java.net/~miroslawzn/801144/webrev.01/
Thank you
Miroslaw
More information about the core-libs-dev
mailing list