Polishing

Issue: SPR-11357
This commit is contained in:
Juergen Hoeller
2014-01-24 17:46:56 +01:00
parent 9845d9eb21
commit 341d645d09
2 changed files with 12 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2013 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.
@@ -38,11 +38,12 @@ import org.springframework.web.WebApplicationInitializer;
*/
public abstract class AbstractContextLoaderInitializer implements WebApplicationInitializer {
/** Logger available to subclasses. */
/** Logger available to subclasses */
protected final Log logger = LogFactory.getLog(getClass());
public void onStartup(ServletContext servletContext) throws ServletException {
this.registerContextLoaderListener(servletContext);
registerContextLoaderListener(servletContext);
}
/**
@@ -52,7 +53,7 @@ public abstract class AbstractContextLoaderInitializer implements WebApplication
* @param servletContext the servlet context to register the listener against
*/
protected void registerContextLoaderListener(ServletContext servletContext) {
WebApplicationContext rootAppContext = this.createRootApplicationContext();
WebApplicationContext rootAppContext = createRootApplicationContext();
if (rootAppContext != null) {
servletContext.addListener(new ContextLoaderListener(rootAppContext));
}