# HG changeset patch # User hannesw # Date 1510593273 -3600 # Node ID 9f913dffab13127bd3def5867fca058807008495 # Parent 45af799ceb6a2d7fb08e4f606db96a9c3b953898 8191131: Nashorn test comparator breaks comparator contract Reviewed-by: sundar, jlaskey diff -r 45af799ceb6a -r 9f913dffab13 test/nashorn/src/jdk/nashorn/internal/test/framework/TestReorderInterceptor.java --- a/test/nashorn/src/jdk/nashorn/internal/test/framework/TestReorderInterceptor.java Mon Nov 13 16:32:30 2017 +0100 +++ b/test/nashorn/src/jdk/nashorn/internal/test/framework/TestReorderInterceptor.java Mon Nov 13 18:14:33 2017 +0100 @@ -47,6 +47,10 @@ final Object o2 = mi2.getInstance(); if (o1 instanceof ITest && o2 instanceof ITest) { return ((ITest)o1).getTestName().compareTo(((ITest)o2).getTestName()); + } else if (o1 instanceof ITest) { + return 1; + } else if (o2 instanceof ITest) { + return -1; } // something else, don't care about the order return 0;