Merge pull request #4 from gregturn/BS-157

# By Greg Turnquist
* BS-157:
  [BS-157] Fix misnamed method
pull/5/merge
Phillip Webb 12 years ago
commit 19c2a076c2

@ -159,7 +159,7 @@ public abstract class AbstractEmbeddedServletContainerFactory implements
/**
* Sets {@link ServletContextInitializer} that should be applied in addition to
* {@link #getEmbdeddedServletContainer(ServletContextInitializer...)} parameters.
* {@link #getEmbeddedServletContainer(ServletContextInitializer...)} parameters.
* This method will replace any previously set or added initializers.
* @param initializers the initializers to set
* @see #addInitializers
@ -172,7 +172,7 @@ public abstract class AbstractEmbeddedServletContainerFactory implements
/**
* Add {@link ServletContextInitializer}s to those that should be applied in addition
* to {@link #getEmbdeddedServletContainer(ServletContextInitializer...)} parameters.
* to {@link #getEmbeddedServletContainer(ServletContextInitializer...)} parameters.
* @param initializers the initializers to add
* @see #setInitializers
* @see #getInitializers
@ -185,7 +185,7 @@ public abstract class AbstractEmbeddedServletContainerFactory implements
/**
* Returns a mutable list of {@link ServletContextInitializer} that should be applied
* in addition to {@link #getEmbdeddedServletContainer(ServletContextInitializer...)}
* in addition to {@link #getEmbeddedServletContainer(ServletContextInitializer...)}
* parameters.
* @return the initializers
*/

@ -40,7 +40,7 @@ public interface EmbeddedServletContainerFactory {
* @return a fully configured and started {@link EmbeddedServletContainer}
* @see EmbeddedServletContainer#stop()
*/
EmbeddedServletContainer getEmbdeddedServletContainer(
EmbeddedServletContainer getEmbeddedServletContainer(
ServletContextInitializer... initializers);
}

@ -130,7 +130,7 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
if (this.embeddedServletContainer == null && getServletContext() == null) {
EmbeddedServletContainerFactory containerFactory = getEmbeddedServletContainerFactory();
this.embeddedServletContainer = containerFactory
.getEmbdeddedServletContainer(getSelfInitializer());
.getEmbeddedServletContainer(getSelfInitializer());
} else if (getServletContext() != null) {
try {
getSelfInitializer().onStartup(getServletContext());

@ -94,7 +94,7 @@ public class JettyEmbeddedServletContainerFactory extends
}
@Override
public EmbeddedServletContainer getEmbdeddedServletContainer(
public EmbeddedServletContainer getEmbeddedServletContainer(
ServletContextInitializer... initializers) {
if (getPort() == 0) {
return EmbeddedServletContainer.NONE;

@ -105,7 +105,7 @@ public class TomcatEmbeddedServletContainerFactory extends
}
@Override
public EmbeddedServletContainer getEmbdeddedServletContainer(
public EmbeddedServletContainer getEmbeddedServletContainer(
ServletContextInitializer... initializers) {
if (getPort() == 0) {
return EmbeddedServletContainer.NONE;
@ -339,7 +339,7 @@ public class TomcatEmbeddedServletContainerFactory extends
return new TomcatEmbeddedServletContainerFactory() {
@Override
public EmbeddedServletContainer getEmbdeddedServletContainer(
public EmbeddedServletContainer getEmbeddedServletContainer(
ServletContextInitializer... initializers) {
if (getPort() == 0) {

@ -81,7 +81,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
public void startServlet() throws Exception {
ConfigurableEmbeddedServletContainerFactory factory = getFactory();
this.container = factory
.getEmbdeddedServletContainer(exampleServletRegistration());
.getEmbeddedServletContainer(exampleServletRegistration());
assertThat(getResponse("http://localhost:8080/hello"), equalTo("Hello World"));
}
@ -90,7 +90,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
ConfigurableEmbeddedServletContainerFactory factory = getFactory();
factory.setPort(0);
this.container = factory
.getEmbdeddedServletContainer(exampleServletRegistration());
.getEmbeddedServletContainer(exampleServletRegistration());
this.thrown.expect(ConnectException.class);
this.thrown.expectMessage("Connection refused");
getResponse("http://localhost:8080/hello");
@ -100,7 +100,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
public void stopServlet() throws Exception {
ConfigurableEmbeddedServletContainerFactory factory = getFactory();
this.container = factory
.getEmbdeddedServletContainer(exampleServletRegistration());
.getEmbeddedServletContainer(exampleServletRegistration());
this.container.stop();
this.thrown.expect(ConnectException.class);
getResponse("http://localhost:8080/hello");
@ -111,7 +111,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
public void restartWithKeepAlive() throws Exception {
ConfigurableEmbeddedServletContainerFactory factory = getFactory();
this.container = factory
.getEmbdeddedServletContainer(exampleServletRegistration());
.getEmbeddedServletContainer(exampleServletRegistration());
MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
HttpClient client = new HttpClient(connectionManager);
@ -121,7 +121,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
this.container.stop();
this.container = factory
.getEmbdeddedServletContainer(exampleServletRegistration());
.getEmbeddedServletContainer(exampleServletRegistration());
GetMethod get2 = new GetMethod("http://localhost:8080/hello");
assertThat(client.executeMethod(get2), equalTo(200));
@ -131,7 +131,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
@Test
public void startServletAndFilter() throws Exception {
ConfigurableEmbeddedServletContainerFactory factory = getFactory();
this.container = factory.getEmbdeddedServletContainer(
this.container = factory.getEmbeddedServletContainer(
exampleServletRegistration(), new FilterRegistrationBean(
new ExampleFilter()));
assertThat(getResponse("http://localhost:8080/hello"), equalTo("[Hello World]"));
@ -143,7 +143,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
ConfigurableEmbeddedServletContainerFactory factory = getFactory();
final Date[] date = new Date[1];
this.container = factory
.getEmbdeddedServletContainer(new ServletContextInitializer() {
.getEmbeddedServletContainer(new ServletContextInitializer() {
@Override
public void onStartup(ServletContext servletContext)
throws ServletException {
@ -163,7 +163,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
ConfigurableEmbeddedServletContainerFactory factory = getFactory();
factory.setPort(8081);
this.container = factory
.getEmbdeddedServletContainer(exampleServletRegistration());
.getEmbeddedServletContainer(exampleServletRegistration());
assertThat(getResponse("http://localhost:8081/hello"), equalTo("Hello World"));
}
@ -172,7 +172,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
ConfigurableEmbeddedServletContainerFactory factory = getFactory();
factory.setContextPath("/say");
this.container = factory
.getEmbdeddedServletContainer(exampleServletRegistration());
.getEmbeddedServletContainer(exampleServletRegistration());
assertThat(getResponse("http://localhost:8080/say/hello"), equalTo("Hello World"));
}
@ -202,7 +202,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
public void doubleStop() throws Exception {
ConfigurableEmbeddedServletContainerFactory factory = getFactory();
this.container = factory
.getEmbdeddedServletContainer(exampleServletRegistration());
.getEmbeddedServletContainer(exampleServletRegistration());
this.container.stop();
this.container.stop();
}
@ -216,7 +216,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
}
factory.setInitializers(Arrays.asList(initializers[2], initializers[3]));
factory.addInitializers(initializers[4], initializers[5]);
this.container = factory.getEmbdeddedServletContainer(initializers[0],
this.container = factory.getEmbeddedServletContainer(initializers[0],
initializers[1]);
InOrder ordered = inOrder((Object[]) initializers);
for (ServletContextInitializer initializer : initializers) {
@ -230,7 +230,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
new FileWriter(this.temporaryFolder.newFile("test.txt")));
AbstractEmbeddedServletContainerFactory factory = getFactory();
factory.setDocumentRoot(this.temporaryFolder.getRoot());
this.container = factory.getEmbdeddedServletContainer();
this.container = factory.getEmbeddedServletContainer();
assertThat(getResponse("http://localhost:8080/test.txt"), equalTo("test"));
}

@ -49,7 +49,7 @@ public class MockEmbeddedServletContainerFactory extends
private MockEmbeddedServletContainer container;
@Override
public EmbeddedServletContainer getEmbdeddedServletContainer(
public EmbeddedServletContainer getEmbeddedServletContainer(
ServletContextInitializer... initializers) {
this.container = spy(new MockEmbeddedServletContainer(initializers, getPort()));
return this.container;

@ -47,7 +47,7 @@ public class JettyEmbeddedServletContainerFactoryTests extends
}
factory.setConfigurations(Arrays.asList(configurations[0], configurations[1]));
factory.addConfigurations(configurations[2], configurations[3]);
this.container = factory.getEmbdeddedServletContainer();
this.container = factory.getEmbeddedServletContainer();
InOrder ordered = inOrder((Object[]) configurations);
for (Configuration configuration : configurations) {
ordered.verify(configuration).configure((WebAppContext) anyObject());

@ -48,7 +48,7 @@ public class TomcatEmbeddedServletContainerFactoryTests extends
}
factory.setContextLifecycleListeners(Arrays.asList(listeners[0], listeners[1]));
factory.addContextLifecycleListeners(listeners[2], listeners[3]);
this.container = factory.getEmbdeddedServletContainer();
this.container = factory.getEmbeddedServletContainer();
InOrder ordered = inOrder((Object[]) listeners);
for (LifecycleListener listener : listeners) {
ordered.verify(listener).lifecycleEvent((LifecycleEvent) anyObject());

Loading…
Cancel
Save