package org.junit.internal.requests;


import org.junit.internal.builders.AllDefaultPossibilitiesBuilder;
import org.junit.runner.Request;
import org.junit.runner.Runner;

public class ClassRequest extends Request {
	private final Class<?> fTestClass;

	private boolean fCanUseSuiteMethod;

	public ClassRequest(Class<?> testClass, boolean canUseSuiteMethod) {
		fTestClass= testClass;
		fCanUseSuiteMethod= canUseSuiteMethod;
	}

	public ClassRequest(Class<?> testClass) {
		this(testClass, true);
	}

	@Override
	public Runner getRunner() {
		return new AllDefaultPossibilitiesBuilder(fCanUseSuiteMethod).safeRunnerForClass(fTestClass);
	}
}
@@ -209,16 +209,66 @@
 quest %7B%0A
+%09private final Object fRunnerLock = new Object();%0A
 %09private
@@ -295,17 +295,16 @@
 tClass;%0A
-%0A
 %09private
@@ -304,16 +304,22 @@
 private 
+final 
 boolean 
@@ -337,16 +337,41 @@
 eMethod;
+%0A%09private Runner fRunner;
 %0A%0A%09publi
@@ -622,14 +622,76 @@
 %7B%0A%09%09
-return
+synchronized (fRunnerLock) %7B%0A%09%09%09if (fRunner == null) %7B%0A%09%09%09%09fRunner =
  new
@@ -774,12 +774,40 @@
 Class);%0A
+%09%09%09%7D%0A%09%09%09return fRunner;%0A%09%09%7D%0A
 %09%7D%0A%7D

Make ClassRequest memoize the runner. Creating the runner can be an expensive operation. Other types of requests are written in such a way that the runner is already memoized.