test/lib/testlibrary/jdk/testlibrary/Utils.java

Print this page
rev 10463 : 8055111: [TESTBUG] jdk.testlibrary.Utils.removeGcOpts doesn't remove -Xconcgc

*** 124,134 **** * Removes any options matching: -XX:(+/-)Use*GC * Used when a test need to set its own GC version. Then any * GC specified by the framework must first be removed. * @return A copy of given opts with all GC options removed. */ ! private static final Pattern useGcPattern = Pattern.compile("\\-XX\\:[\\+\\-]Use.+GC"); public static List<String> removeGcOpts(List<String> opts) { List<String> optsWithoutGC = new ArrayList<String>(); for (String opt : opts) { if (useGcPattern.matcher(opt).matches()) { System.out.println("removeGcOpts: removed " + opt); --- 124,134 ---- * Removes any options matching: -XX:(+/-)Use*GC * Used when a test need to set its own GC version. Then any * GC specified by the framework must first be removed. * @return A copy of given opts with all GC options removed. */ ! private static final Pattern useGcPattern = Pattern.compile("(?:\\-XX\\:[\\+\\-]Use.+GC)|(?:\\-Xconcgc)"); public static List<String> removeGcOpts(List<String> opts) { List<String> optsWithoutGC = new ArrayList<String>(); for (String opt : opts) { if (useGcPattern.matcher(opt).matches()) { System.out.println("removeGcOpts: removed " + opt);