Skip to content

Commit

Permalink
[BS-157] Fix misnamed method
Browse files Browse the repository at this point in the history
Fix typo in EmbeddedServletContainerFactory.
e enter the commit message for your changes. Lines starting
  • Loading branch information
gregturn authored and philwebb committed Jun 17, 2013
1 parent 018231d commit f8c2091
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public InetAddress getAddress() {

/**
* 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
Expand All @@ -172,7 +172,7 @@ public void setInitializers(List<? extends ServletContextInitializer> initialize

/**
* 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
Expand All @@ -185,7 +185,7 @@ public void addInitializers(ServletContextInitializer... initializers) {

/**
* 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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public interface EmbeddedServletContainerFactory {
* @return a fully configured and started {@link EmbeddedServletContainer}
* @see EmbeddedServletContainer#stop()
*/
EmbeddedServletContainer getEmbdeddedServletContainer(
EmbeddedServletContainer getEmbeddedServletContainer(
ServletContextInitializer... initializers);

}
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private synchronized void createAndStartEmbeddedServletContainer() {
if (this.embeddedServletContainer == null && getServletContext() == null) {
EmbeddedServletContainerFactory containerFactory = getEmbeddedServletContainerFactory();
this.embeddedServletContainer = containerFactory
.getEmbdeddedServletContainer(getSelfInitializer());
.getEmbeddedServletContainer(getSelfInitializer());
} else if (getServletContext() != null) {
try {
getSelfInitializer().onStartup(getServletContext());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public JettyEmbeddedServletContainerFactory(String contextPath, int port) {
}

@Override
public EmbeddedServletContainer getEmbdeddedServletContainer(
public EmbeddedServletContainer getEmbeddedServletContainer(
ServletContextInitializer... initializers) {
if (getPort() == 0) {
return EmbeddedServletContainer.NONE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public TomcatEmbeddedServletContainerFactory(String contextPath, int port) {
}

@Override
public EmbeddedServletContainer getEmbdeddedServletContainer(
public EmbeddedServletContainer getEmbeddedServletContainer(
ServletContextInitializer... initializers) {
if (getPort() == 0) {
return EmbeddedServletContainer.NONE;
Expand Down Expand Up @@ -339,7 +339,7 @@ public TomcatEmbeddedServletContainerFactory getChildContextFactory(final String
return new TomcatEmbeddedServletContainerFactory() {

@Override
public EmbeddedServletContainer getEmbdeddedServletContainer(
public EmbeddedServletContainer getEmbeddedServletContainer(
ServletContextInitializer... initializers) {

if (getPort() == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void teardown() {
public void startServlet() throws Exception {
ConfigurableEmbeddedServletContainerFactory factory = getFactory();
this.container = factory
.getEmbdeddedServletContainer(exampleServletRegistration());
.getEmbeddedServletContainer(exampleServletRegistration());
assertThat(getResponse("http://localhost:8080/hello"), equalTo("Hello World"));
}

Expand All @@ -90,7 +90,7 @@ public void emptyServer() throws Exception {
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");
Expand All @@ -100,7 +100,7 @@ public void emptyServer() throws Exception {
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");
Expand All @@ -111,7 +111,7 @@ public void stopServlet() throws Exception {
public void restartWithKeepAlive() throws Exception {
ConfigurableEmbeddedServletContainerFactory factory = getFactory();
this.container = factory
.getEmbdeddedServletContainer(exampleServletRegistration());
.getEmbeddedServletContainer(exampleServletRegistration());

MultiThreadedHttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager();
HttpClient client = new HttpClient(connectionManager);
Expand All @@ -121,7 +121,7 @@ public void restartWithKeepAlive() throws Exception {

this.container.stop();
this.container = factory
.getEmbdeddedServletContainer(exampleServletRegistration());
.getEmbeddedServletContainer(exampleServletRegistration());

GetMethod get2 = new GetMethod("http://localhost:8080/hello");
assertThat(client.executeMethod(get2), equalTo(200));
Expand All @@ -131,7 +131,7 @@ public void restartWithKeepAlive() throws Exception {
@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]"));
Expand All @@ -143,7 +143,7 @@ public void startBlocksUntilReadyToServe() throws Exception {
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 {
Expand All @@ -163,7 +163,7 @@ public void specificPort() throws Exception {
ConfigurableEmbeddedServletContainerFactory factory = getFactory();
factory.setPort(8081);
this.container = factory
.getEmbdeddedServletContainer(exampleServletRegistration());
.getEmbeddedServletContainer(exampleServletRegistration());
assertThat(getResponse("http://localhost:8081/hello"), equalTo("Hello World"));
}

Expand All @@ -172,7 +172,7 @@ public void specificContextRoot() throws Exception {
ConfigurableEmbeddedServletContainerFactory factory = getFactory();
factory.setContextPath("/say");
this.container = factory
.getEmbdeddedServletContainer(exampleServletRegistration());
.getEmbeddedServletContainer(exampleServletRegistration());
assertThat(getResponse("http://localhost:8080/say/hello"), equalTo("Hello World"));
}

Expand Down Expand Up @@ -202,7 +202,7 @@ public void contextRootPathMustNotBeSlash() throws Exception {
public void doubleStop() throws Exception {
ConfigurableEmbeddedServletContainerFactory factory = getFactory();
this.container = factory
.getEmbdeddedServletContainer(exampleServletRegistration());
.getEmbeddedServletContainer(exampleServletRegistration());
this.container.stop();
this.container.stop();
}
Expand All @@ -216,7 +216,7 @@ public void multipleConfigurations() throws Exception {
}
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) {
Expand All @@ -230,7 +230,7 @@ public void documentRoot() throws Exception {
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"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void jettyConfigurations() throws Exception {
}
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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void tomcatListeners() throws Exception {
}
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());
Expand Down

0 comments on commit f8c2091

Please sign in to comment.