Description
There is a simple testcase as below. You can see StackOverflowError if run this testcase. This is a defect of Arrays.sort(double []), I have attached a fix for it.
import java.util.Arrays;
public class SortTest {
public static void main(String[] args) {
double[] array =
;
displayArray(array);
Arrays.sort(array);
displayArray(array);
System.out.println();
}
private static void displayArray(double[] array)
{ for (double d : array) System.out.print(d + " "); System.out.println(); }}