diff --git a/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java b/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java index 3551c9d030..9b75bffab3 100644 --- a/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java +++ b/spring-test/src/main/java/org/springframework/test/context/TestContextManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -83,8 +83,6 @@ public class TestContextManager { private final TestContext testContext; - private final TestContextBootstrapper testContextBootstrapper; - private final List testExecutionListeners = new ArrayList(); @@ -99,12 +97,11 @@ public class TestContextManager { public TestContextManager(Class testClass) { CacheAwareContextLoaderDelegate cacheAwareContextLoaderDelegate = new DefaultCacheAwareContextLoaderDelegate(contextCache); BootstrapContext bootstrapContext = new DefaultBootstrapContext(testClass, cacheAwareContextLoaderDelegate); - this.testContextBootstrapper = BootstrapUtils.resolveTestContextBootstrapper(bootstrapContext); - this.testContext = new DefaultTestContext(this.testContextBootstrapper); - registerTestExecutionListeners(this.testContextBootstrapper.getTestExecutionListeners()); + TestContextBootstrapper testContextBootstrapper = BootstrapUtils.resolveTestContextBootstrapper(bootstrapContext); + this.testContext = new DefaultTestContext(testContextBootstrapper); + registerTestExecutionListeners(testContextBootstrapper.getTestExecutionListeners()); } - /** * Get the {@link TestContext} managed by this {@code TestContextManager}. */