test/lib/jdk/test/lib/Utils.java
changeset 59053 ba6c248cae19
parent 58144 d003b3ef8b60
equal deleted inserted replaced
59051:f0312c7d5b37 59053:ba6c248cae19
   196      * Used when a test need to set its own GC version. Then any
   196      * Used when a test need to set its own GC version. Then any
   197      * GC specified by the framework must first be removed.
   197      * GC specified by the framework must first be removed.
   198      * @return A copy of given opts with all GC options removed.
   198      * @return A copy of given opts with all GC options removed.
   199      */
   199      */
   200     private static final Pattern useGcPattern = Pattern.compile(
   200     private static final Pattern useGcPattern = Pattern.compile(
   201             "(?:\\-XX\\:[\\+\\-]Use.+GC)"
   201             "(?:\\-XX\\:[\\+\\-]Use.+GC)");
   202             + "|(?:\\-Xconcgc)");
       
   203     public static List<String> removeGcOpts(List<String> opts) {
   202     public static List<String> removeGcOpts(List<String> opts) {
   204         List<String> optsWithoutGC = new ArrayList<String>();
   203         List<String> optsWithoutGC = new ArrayList<String>();
   205         for (String opt : opts) {
   204         for (String opt : opts) {
   206             if (useGcPattern.matcher(opt).matches()) {
   205             if (useGcPattern.matcher(opt).matches()) {
   207                 System.out.println("removeGcOpts: removed " + opt);
   206                 System.out.println("removeGcOpts: removed " + opt);