Polish FrameworkServlet Javadoc; fix warnings

This commit is contained in:
Chris Beams 2011-05-23 10:01:49 +00:00
parent 7430fcd904
commit 3c6254df90
1 changed files with 14 additions and 11 deletions

View File

@ -18,6 +18,7 @@ package org.springframework.web.servlet;
import java.io.IOException; import java.io.IOException;
import java.security.Principal; import java.security.Principal;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@ -50,9 +51,9 @@ import org.springframework.web.util.WebUtils;
* *
* <p>This class offers the following functionality: * <p>This class offers the following functionality:
* <ul> * <ul>
* <li>Manages a {@link org.springframework.web.context.WebApplicationContext} * <li>Manages a {@link org.springframework.web.context.WebApplicationContext
* instance per servlet. The servlet's configuration is determined by beans * WebApplicationContext} instance per servlet. The servlet's configuration is determined
* in the servlet's namespace. * by beans in the servlet's namespace.
* <li>Publishes events on request processing, whether or not a request is * <li>Publishes events on request processing, whether or not a request is
* successfully handled. * successfully handled.
* </ul> * </ul>
@ -64,10 +65,11 @@ import org.springframework.web.util.WebUtils;
* *
* <p>Detects a "contextClass" parameter at the servlet init-param level, * <p>Detects a "contextClass" parameter at the servlet init-param level,
* falling back to the default context class, * falling back to the default context class,
* {@link org.springframework.web.context.support.XmlWebApplicationContext}, * {@link org.springframework.web.context.support.XmlWebApplicationContext
* if not found. Note that, with the default FrameworkServlet, * XmlWebApplicationContext}, if not found. Note that, with the default
* a custom context class needs to implement the * {@code FrameworkServlet}, a custom context class needs to implement the
* {@link org.springframework.web.context.ConfigurableWebApplicationContext} SPI. * {@link org.springframework.web.context.ConfigurableWebApplicationContext
* ConfigurableWebApplicationContext} SPI.
* *
* <p>Passes a "contextConfigLocation" servlet init-param to the context instance, * <p>Passes a "contextConfigLocation" servlet init-param to the context instance,
* parsing it into potentially multiple file paths which can be separated by any * parsing it into potentially multiple file paths which can be separated by any
@ -93,6 +95,7 @@ import org.springframework.web.util.WebUtils;
* @see #setContextConfigLocation * @see #setContextConfigLocation
* @see #setNamespace * @see #setNamespace
*/ */
@SuppressWarnings("serial")
public abstract class FrameworkServlet extends HttpServletBean { public abstract class FrameworkServlet extends HttpServletBean {
/** /**
@ -106,7 +109,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
* Default context class for FrameworkServlet. * Default context class for FrameworkServlet.
* @see org.springframework.web.context.support.XmlWebApplicationContext * @see org.springframework.web.context.support.XmlWebApplicationContext
*/ */
public static final Class DEFAULT_CONTEXT_CLASS = XmlWebApplicationContext.class; public static final Class<?> DEFAULT_CONTEXT_CLASS = XmlWebApplicationContext.class;
/** /**
* Prefix for the ServletContext attribute for the WebApplicationContext. * Prefix for the ServletContext attribute for the WebApplicationContext.
@ -119,7 +122,7 @@ public abstract class FrameworkServlet extends HttpServletBean {
private String contextAttribute; private String contextAttribute;
/** WebApplicationContext implementation class to create */ /** WebApplicationContext implementation class to create */
private Class contextClass = DEFAULT_CONTEXT_CLASS; private Class<?> contextClass = DEFAULT_CONTEXT_CLASS;
/** Namespace for this servlet */ /** Namespace for this servlet */
private String namespace; private String namespace;
@ -174,14 +177,14 @@ public abstract class FrameworkServlet extends HttpServletBean {
* interface. * interface.
* @see #createWebApplicationContext * @see #createWebApplicationContext
*/ */
public void setContextClass(Class contextClass) { public void setContextClass(Class<?> contextClass) {
this.contextClass = contextClass; this.contextClass = contextClass;
} }
/** /**
* Return the custom context class. * Return the custom context class.
*/ */
public Class getContextClass() { public Class<?> getContextClass() {
return this.contextClass; return this.contextClass;
} }