Repository: netty/netty
File: microbench/src/main/java/io/netty/microbench/util/AbstractMicrobenchmark.java (Java)

Code before:
                    throw new UnsupportedOperationException();
                }

                @Override
                public void execute(Runnable command) {
                    throw new UnsupportedOperationException();
                }
            };
            setThreadFactory(ThreadExecutorMap.apply(getThreadFactory(), eventExecutor));

            logger.debug("Using harness executor");
        }
    }

    private final String[] jvmArgs;

    public AbstractMicrobenchmark() {
        this(false, false);
    }

    public AbstractMicrobenchmark(boolean disableAssertions) {
        this(disableAssertions, false);
    }

    public AbstractMicrobenchmark(boolean disableAssertions, boolean disableHarnessExecutor) {
        final List<String> jvmArgs = new ArrayList<>(Arrays.asList(BASE_JVM_ARGS));
        jvmArgs.add("-Xms768m");
        jvmArgs.add("-Xmx768m");
        jvmArgs.add("-XX:MaxDirectMemorySize=768m");
        if (PlatformDependent.javaVersion() < 15) { // not entirely sure when this option was removed, but
            jvmArgs.add("-XX:BiasedLockingStartupDelay=0");
        }
        if (!disableHarnessExecutor) {
            jvmArgs.add("-Djmh.executor=CUSTOM");
            jvmArgs.add("-Djmh.executor.class=" + HarnessExecutor.class.getName());
        }
        if (disableAssertions) {
            removeAssertions(jvmArgs);
        }
        this.jvmArgs = jvmArgs.toArray(EmptyArrays.EMPTY_STRINGS);
    }

    @Override
    protected String[] jvmArgs() {
        return jvmArgs;
    }

    @Override
    protected ChainedOptionsBuilder newOptionsBuilder() throws Exception {
        ChainedOptionsBuilder runnerOptions = super.newOptionsBuilder();
        if (getForks() > 0) {

Review comment (suggestion):
```suggestion
        final List<String> jvmArgs = new ArrayList<String>(Arrays.asList(BASE_JVM_ARGS));
```

Code after:
                    throw new UnsupportedOperationException();
                }

                @Override
                public void execute(Runnable command) {
                    throw new UnsupportedOperationException();
                }
            };
            setThreadFactory(ThreadExecutorMap.apply(getThreadFactory(), eventExecutor));

            logger.debug("Using harness executor");
        }
    }

    private final String[] jvmArgs;

    public AbstractMicrobenchmark() {
        this(false, false);
    }

    public AbstractMicrobenchmark(boolean disableAssertions) {
        this(disableAssertions, false);
    }

    public AbstractMicrobenchmark(boolean disableAssertions, boolean disableHarnessExecutor) {
        final List<String> jvmArgs = new ArrayList<String>(Arrays.asList(BASE_JVM_ARGS));
        jvmArgs.add("-Xms768m");
        jvmArgs.add("-Xmx768m");
        jvmArgs.add("-XX:MaxDirectMemorySize=768m");
        if (PlatformDependent.javaVersion() < 15) { // not entirely sure when this option was removed, but
            jvmArgs.add("-XX:BiasedLockingStartupDelay=0");
        }
        if (!disableHarnessExecutor) {
            jvmArgs.add("-Djmh.executor=CUSTOM");
            jvmArgs.add("-Djmh.executor.class=" + HarnessExecutor.class.getName());
        }
        if (disableAssertions) {
            removeAssertions(jvmArgs);
        }
        this.jvmArgs = jvmArgs.toArray(EmptyArrays.EMPTY_STRINGS);
    }

    @Override
    protected String[] jvmArgs() {
        return jvmArgs;
    }

    @Override
    protected ChainedOptionsBuilder newOptionsBuilder() throws Exception {
        ChainedOptionsBuilder runnerOptions = super.newOptionsBuilder();
        if (getForks() > 0) {