Added @Override and @Deprecated annotations to web module

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@156 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Arjen Poutsma 2008-10-28 00:15:39 +00:00
parent 573b39a790
commit ae9ce5ac15
53 changed files with 104 additions and 0 deletions

View File

@ -105,6 +105,7 @@ public class BurlapClientInterceptor extends UrlBasedRemoteAccessor implements M
}
@Override
public void afterPropertiesSet() {
super.afterPropertiesSet();
prepare();

View File

@ -45,6 +45,7 @@ public class BurlapProxyFactoryBean extends BurlapClientInterceptor implements F
private Object serviceProxy;
@Override
public void afterPropertiesSet() {
super.afterPropertiesSet();
this.serviceProxy = new ProxyFactory(getServiceInterface(), this).getProxy(getBeanClassLoader());

View File

@ -56,6 +56,7 @@ class Hessian1SkeletonInvoker extends HessianSkeletonInvoker {
}
}
@Override
public void invoke(InputStream inputStream, OutputStream outputStream) throws Throwable {
HessianInput in = new HessianInput(inputStream);
HessianOutput out = new HessianOutput(outputStream);

View File

@ -55,6 +55,7 @@ class Hessian2SkeletonInvoker extends HessianSkeletonInvoker {
this.debugLogger = debugLog;
}
@Override
public void invoke(final InputStream inputStream, final OutputStream outputStream) throws Throwable {
InputStream isToUse = inputStream;
OutputStream osToUse = outputStream;

View File

@ -177,6 +177,7 @@ public class HessianClientInterceptor extends UrlBasedRemoteAccessor implements
}
@Override
public void afterPropertiesSet() {
super.afterPropertiesSet();
prepare();

View File

@ -45,6 +45,7 @@ public class HessianProxyFactoryBean extends HessianClientInterceptor implements
private Object serviceProxy;
@Override
public void afterPropertiesSet() {
super.afterPropertiesSet();
this.serviceProxy = new ProxyFactory(getServiceInterface(), this).getProxy(getBeanClassLoader());

View File

@ -119,6 +119,7 @@ public class CommonsHttpInvokerRequestExecutor extends AbstractHttpInvokerReques
* @see #validateResponse
* @see #getResponseBody
*/
@Override
protected RemoteInvocationResult doExecuteRequest(
HttpInvokerClientConfiguration config, ByteArrayOutputStream baos)
throws IOException, ClassNotFoundException {

View File

@ -122,6 +122,7 @@ public class HttpInvokerClientInterceptor extends RemoteInvocationBasedAccessor
return this.httpInvokerRequestExecutor;
}
@Override
public void afterPropertiesSet() {
super.afterPropertiesSet();

View File

@ -53,6 +53,7 @@ public class HttpInvokerProxyFactoryBean extends HttpInvokerClientInterceptor
private Object serviceProxy;
@Override
public void afterPropertiesSet() {
super.afterPropertiesSet();
if (getServiceInterface() == null) {

View File

@ -55,6 +55,7 @@ public class SimpleHttpInvokerRequestExecutor extends AbstractHttpInvokerRequest
* @see #validateResponse
* @see #readResponseBody
*/
@Override
protected RemoteInvocationResult doExecuteRequest(
HttpInvokerClientConfiguration config, ByteArrayOutputStream baos)
throws IOException, ClassNotFoundException {

View File

@ -56,6 +56,7 @@ public class JaxRpcPortProxyFactoryBean extends JaxRpcPortClientInterceptor
this.beanClassLoader = classLoader;
}
@Override
public void afterPropertiesSet() {
if (getServiceInterface() == null) {
// Use JAX-RPC port interface (a traditional RMI interface)

View File

@ -46,18 +46,22 @@ public class JaxRpcSoapFaultException extends SoapFaultException {
}
@Override
public String getFaultCode() {
return getOriginalException().getFaultCode().toString();
}
@Override
public QName getFaultCodeAsQName() {
return getOriginalException().getFaultCode();
}
@Override
public String getFaultString() {
return getOriginalException().getFaultString();
}
@Override
public String getFaultActor() {
return getOriginalException().getFaultActor();
}

View File

@ -45,6 +45,7 @@ public class JaxWsPortProxyFactoryBean extends JaxWsPortClientInterceptor
this.beanClassLoader = classLoader;
}
@Override
public void afterPropertiesSet() {
super.afterPropertiesSet();

View File

@ -47,18 +47,22 @@ public class JaxWsSoapFaultException extends SoapFaultException {
}
@Override
public String getFaultCode() {
return getFault().getFaultCode();
}
@Override
public QName getFaultCodeAsQName() {
return getFault().getFaultCodeAsQName();
}
@Override
public String getFaultString() {
return getFault().getFaultString();
}
@Override
public String getFaultActor() {
return getFault().getFaultActor();
}

View File

@ -149,6 +149,7 @@ public class SimpleHttpServerJaxWsServiceExporter extends AbstractJaxWsServiceEx
}
@Override
public void afterPropertiesSet() throws Exception {
if (this.server == null) {
InetSocketAddress address = (this.hostname != null ?
@ -163,6 +164,7 @@ public class SimpleHttpServerJaxWsServiceExporter extends AbstractJaxWsServiceEx
super.afterPropertiesSet();
}
@Override
protected void publishEndpoint(Endpoint endpoint, WebService annotation) {
String fullPath = this.basePath + annotation.serviceName();
HttpContext httpContext = this.server.createContext(fullPath);
@ -175,6 +177,7 @@ public class SimpleHttpServerJaxWsServiceExporter extends AbstractJaxWsServiceEx
endpoint.publish(httpContext);
}
@Override
public void destroy() {
super.destroy();
if (this.localServer) {

View File

@ -62,6 +62,7 @@ public class SimpleJaxWsServiceExporter extends AbstractJaxWsServiceExporter {
}
@Override
protected void publishEndpoint(Endpoint endpoint, WebService annotation) {
String fullAddress = this.baseAddress + annotation.serviceName();
endpoint.publish(fullAddress);

View File

@ -76,6 +76,7 @@ public class ContextLoaderServlet extends HttpServlet {
/**
* Initialize the root web application context.
*/
@Override
public void init() throws ServletException {
this.contextLoader = createContextLoader();
this.contextLoader.initWebApplicationContext(getServletContext());
@ -101,6 +102,7 @@ public class ContextLoaderServlet extends HttpServlet {
/**
* Close the root web application context.
*/
@Override
public void destroy() {
if (this.contextLoader != null) {
this.contextLoader.closeWebApplicationContext(getServletContext());
@ -113,6 +115,7 @@ public class ContextLoaderServlet extends HttpServlet {
* ever be created in web.xml. That's why a correctly invoked Servlet 2.3
* listener is much more appropriate for initialization work ;-)
*/
@Override
public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
getServletContext().log(
"Attempt to call service method on ContextLoaderServlet as [" +
@ -121,6 +124,7 @@ public class ContextLoaderServlet extends HttpServlet {
}
@Override
public String getServletInfo() {
return "ContextLoaderServlet for Servlet API 2.3 " +
"(deprecated in favor of ContextLoaderListener for Servlet API 2.4)";

View File

@ -110,6 +110,7 @@ public class FacesWebRequest extends FacesRequestAttributes implements NativeWeb
return buffer.toString();
}
@Override
public String toString() {
return "FacesWebRequest: " + getDescription(true);
}

View File

@ -43,6 +43,7 @@ package org.springframework.web.context.request;
*/
public class RequestScope extends AbstractRequestAttributesScope {
@Override
protected int getScope() {
return RequestAttributes.SCOPE_REQUEST;
}

View File

@ -208,6 +208,7 @@ public class ServletRequestAttributes extends AbstractRequestAttributes {
* Update all accessed session attributes through <code>session.setAttribute</code>
* calls, explicitly indicating to the container that they might have been modified.
*/
@Override
protected void updateAccessedSessionAttributes() {
// Store session reference for access after request completion.
this.session = this.request.getSession(false);
@ -245,6 +246,7 @@ public class ServletRequestAttributes extends AbstractRequestAttributes {
}
@Override
public String toString() {
return this.request.toString();
}

View File

@ -159,6 +159,7 @@ public class ServletWebRequest extends ServletRequestAttributes implements Nativ
return buffer.toString();
}
@Override
public String toString() {
return "ServletWebRequest: " + getDescription(true);
}

View File

@ -76,6 +76,7 @@ public class SessionScope extends AbstractRequestAttributesScope {
}
@Override
protected int getScope() {
return this.scope;
}
@ -84,6 +85,7 @@ public class SessionScope extends AbstractRequestAttributesScope {
return RequestContextHolder.currentRequestAttributes().getSessionId();
}
@Override
public Object get(String name, ObjectFactory objectFactory) {
Object mutex = RequestContextHolder.currentRequestAttributes().getSessionMutex();
synchronized (mutex) {
@ -91,6 +93,7 @@ public class SessionScope extends AbstractRequestAttributesScope {
}
}
@Override
public Object remove(String name) {
Object mutex = RequestContextHolder.currentRequestAttributes().getSessionMutex();
synchronized (mutex) {

View File

@ -125,6 +125,7 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR
return this.namespace;
}
@Override
public String[] getConfigLocations() {
return super.getConfigLocations();
}
@ -133,6 +134,7 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR
/**
* Register request/session scopes, a {@link ServletContextAwareProcessor}, etc.
*/
@Override
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext, this.servletConfig));
beanFactory.ignoreDependencyInterface(ServletContextAware.class);
@ -147,6 +149,7 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR
* This implementation supports file paths beneath the root of the ServletContext.
* @see ServletContextResource
*/
@Override
protected Resource getResourceByPath(String path) {
return new ServletContextResource(this.servletContext, path);
}
@ -155,6 +158,7 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR
* This implementation supports pattern matching in unexpanded WARs too.
* @see ServletContextResourcePatternResolver
*/
@Override
protected ResourcePatternResolver getResourcePatternResolver() {
return new ServletContextResourcePatternResolver(this);
}
@ -162,6 +166,7 @@ public abstract class AbstractRefreshableWebApplicationContext extends AbstractR
/**
* Initialize the theme capability.
*/
@Override
protected void onRefresh() {
this.themeSource = UiApplicationContextUtils.initThemeSource(this);
}

View File

@ -77,6 +77,7 @@ public class ContextExposingHttpServletRequest extends HttpServletRequestWrapper
}
@Override
public Object getAttribute(String name) {
if ((this.explicitAttributes == null || !this.explicitAttributes.contains(name)) &&
(this.exposedContextBeanNames == null || this.exposedContextBeanNames.contains(name)) &&
@ -88,6 +89,7 @@ public class ContextExposingHttpServletRequest extends HttpServletRequestWrapper
}
}
@Override
public void setAttribute(String name, Object value) {
super.setAttribute(name, value);
if (this.explicitAttributes == null) {

View File

@ -99,6 +99,7 @@ public class GenericWebApplicationContext extends GenericApplicationContext
* Register ServletContextAwareProcessor.
* @see ServletContextAwareProcessor
*/
@Override
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
beanFactory.addBeanPostProcessor(new ServletContextAwareProcessor(this.servletContext));
beanFactory.ignoreDependencyInterface(ServletContextAware.class);
@ -111,6 +112,7 @@ public class GenericWebApplicationContext extends GenericApplicationContext
* This implementation supports file paths beneath the root of the ServletContext.
* @see ServletContextResource
*/
@Override
protected Resource getResourceByPath(String path) {
return new ServletContextResource(this.servletContext, path);
}
@ -119,6 +121,7 @@ public class GenericWebApplicationContext extends GenericApplicationContext
* This implementation supports pattern matching in unexpanded WARs too.
* @see ServletContextResourcePatternResolver
*/
@Override
protected ResourcePatternResolver getResourcePatternResolver() {
return new ServletContextResourcePatternResolver(this);
}
@ -126,6 +129,7 @@ public class GenericWebApplicationContext extends GenericApplicationContext
/**
* Initialize the theme capability.
*/
@Override
protected void onRefresh() {
this.themeSource = UiApplicationContextUtils.initThemeSource(this);
}

View File

@ -51,12 +51,14 @@ public class HttpRequestHandlerServlet extends HttpServlet {
private HttpRequestHandler target;
@Override
public void init() throws ServletException {
WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
this.target = (HttpRequestHandler) wac.getBean(getServletName(), HttpRequestHandler.class);
}
@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {

View File

@ -150,6 +150,7 @@ public class RequestHandledEvent extends ApplicationEvent {
return sb.toString();
}
@Override
public String toString() {
return ("RequestHandledEvent: " + getDescription());
}

View File

@ -110,6 +110,7 @@ public class ServletContextPropertyPlaceholderConfigurer extends PropertyPlaceho
}
@Override
protected String resolvePlaceholder(String placeholder, Properties props) {
String value = null;
if (this.contextOverride && this.servletContext != null) {

View File

@ -96,6 +96,7 @@ public class ServletContextResource extends AbstractResource implements ContextR
* This implementation checks <code>ServletContext.getResource</code>.
* @see javax.servlet.ServletContext#getResource(String)
*/
@Override
public boolean exists() {
try {
URL url = this.servletContext.getResource(this.path);
@ -124,6 +125,7 @@ public class ServletContextResource extends AbstractResource implements ContextR
* but throws a FileNotFoundException if no resource found.
* @see javax.servlet.ServletContext#getResource(String)
*/
@Override
public URL getURL() throws IOException {
URL url = this.servletContext.getResource(this.path);
if (url == null) {
@ -138,6 +140,7 @@ public class ServletContextResource extends AbstractResource implements ContextR
* but throws a FileNotFoundException if not found or not resolvable.
* @see javax.servlet.ServletContext#getRealPath(String)
*/
@Override
public File getFile() throws IOException {
String realPath = WebUtils.getRealPath(this.servletContext, this.path);
return new File(realPath);
@ -148,6 +151,7 @@ public class ServletContextResource extends AbstractResource implements ContextR
* relative to the path of the underlying file of this resource descriptor.
* @see org.springframework.util.StringUtils#applyRelativePath(String, String)
*/
@Override
public Resource createRelative(String relativePath) {
String pathToUse = StringUtils.applyRelativePath(this.path, relativePath);
return new ServletContextResource(this.servletContext, pathToUse);
@ -158,6 +162,7 @@ public class ServletContextResource extends AbstractResource implements ContextR
* resource refers to.
* @see org.springframework.util.StringUtils#getFilename(String)
*/
@Override
public String getFilename() {
return StringUtils.getFilename(this.path);
}
@ -178,6 +183,7 @@ public class ServletContextResource extends AbstractResource implements ContextR
/**
* This implementation compares the underlying ServletContext resource locations.
*/
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
@ -193,6 +199,7 @@ public class ServletContextResource extends AbstractResource implements ContextR
* This implementation returns the hash code of the underlying
* ServletContext resource location.
*/
@Override
public int hashCode() {
return this.path.hashCode();
}

View File

@ -54,6 +54,7 @@ public class ServletContextResourceLoader extends DefaultResourceLoader {
* This implementation supports file paths beneath the root of the web application.
* @see ServletContextResource
*/
@Override
protected Resource getResourceByPath(String path) {
return new ServletContextResource(this.servletContext, path);
}

View File

@ -67,6 +67,7 @@ public class ServletContextResourcePatternResolver extends PathMatchingResourceP
* @see ServletContextResource
* @see javax.servlet.ServletContext#getResourcePaths
*/
@Override
protected Set doFindPathMatchingFileResources(Resource rootDirResource, String subPattern) throws IOException {
if (rootDirResource instanceof ServletContextResource) {
ServletContextResource scResource = (ServletContextResource) rootDirResource;

View File

@ -117,6 +117,7 @@ public class ServletRequestHandledEvent extends RequestHandledEvent {
}
@Override
public String getShortDescription() {
StringBuffer sb = new StringBuffer();
sb.append("url=[").append(getRequestUrl()).append("]; ");
@ -125,6 +126,7 @@ public class ServletRequestHandledEvent extends RequestHandledEvent {
return sb.toString();
}
@Override
public String getDescription() {
StringBuffer sb = new StringBuffer();
sb.append("url=[").append(getRequestUrl()).append("]; ");
@ -135,6 +137,7 @@ public class ServletRequestHandledEvent extends RequestHandledEvent {
return sb.toString();
}
@Override
public String toString() {
return "ServletRequestHandledEvent: " + getDescription();
}

View File

@ -132,6 +132,7 @@ public class StaticWebApplicationContext extends StaticApplicationContext
/**
* Register request/session scopes, a {@link ServletContextAwareProcessor}, etc.
*/
@Override
protected void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
beanFactory.registerScope(SCOPE_REQUEST, new RequestScope());
beanFactory.registerScope(SCOPE_SESSION, new SessionScope(false));
@ -146,6 +147,7 @@ public class StaticWebApplicationContext extends StaticApplicationContext
* This implementation supports file paths beneath the root of the ServletContext.
* @see ServletContextResource
*/
@Override
protected Resource getResourceByPath(String path) {
return new ServletContextResource(this.servletContext, path);
}
@ -154,6 +156,7 @@ public class StaticWebApplicationContext extends StaticApplicationContext
* This implementation supports pattern matching in unexpanded WARs too.
* @see ServletContextResourcePatternResolver
*/
@Override
protected ResourcePatternResolver getResourcePatternResolver() {
return new ServletContextResourcePatternResolver(this);
}
@ -161,6 +164,7 @@ public class StaticWebApplicationContext extends StaticApplicationContext
/**
* Initialize the theme capability.
*/
@Override
protected void onRefresh() {
this.themeSource = UiApplicationContextUtils.initThemeSource(this);
}

View File

@ -57,6 +57,7 @@ public abstract class WebApplicationObjectSupport extends ApplicationObjectSuppo
* @see #getServletContext()
* @see #getTempDir()
*/
@Override
protected boolean isContextRequired() {
return true;
}
@ -65,6 +66,7 @@ public abstract class WebApplicationObjectSupport extends ApplicationObjectSuppo
* Calls {@link #initServletContext(javax.servlet.ServletContext)} if the
* given ApplicationContext is a {@link WebApplicationContext}.
*/
@Override
protected void initApplicationContext(ApplicationContext context) {
super.initApplicationContext(context);
if (context instanceof WebApplicationContext) {

View File

@ -77,6 +77,7 @@ public class XmlWebApplicationContext extends AbstractRefreshableWebApplicationC
* @see #initBeanDefinitionReader
* @see #loadBeanDefinitions
*/
@Override
protected void loadBeanDefinitions(DefaultListableBeanFactory beanFactory) throws IOException {
// Create a new XmlBeanDefinitionReader for the given BeanFactory.
XmlBeanDefinitionReader beanDefinitionReader = new XmlBeanDefinitionReader(beanFactory);
@ -131,6 +132,7 @@ public class XmlWebApplicationContext extends AbstractRefreshableWebApplicationC
* and "/WEB-INF/test-servlet.xml" for a context with the namespace "test-servlet"
* (like for a DispatcherServlet instance with the servlet-name "test").
*/
@Override
protected String[] getDefaultConfigLocations() {
if (getNamespace() != null) {
return new String[] {DEFAULT_CONFIG_LOCATION_PREFIX + getNamespace() + DEFAULT_CONFIG_LOCATION_SUFFIX};

View File

@ -147,6 +147,7 @@ public abstract class AbstractRequestLoggingFilter extends OncePerRequestFilter
* @see #beforeRequest
* @see #afterRequest
*/
@Override
protected void doFilterInternal(
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {

View File

@ -83,6 +83,7 @@ public class CharacterEncodingFilter extends OncePerRequestFilter {
}
@Override
protected void doFilterInternal(
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {

View File

@ -36,6 +36,7 @@ public class CommonsRequestLoggingFilter extends AbstractRequestLoggingFilter {
/**
* Writes a log message before the request is processed.
*/
@Override
protected void beforeRequest(HttpServletRequest request, String message) {
if (logger.isDebugEnabled()) {
logger.debug(message);
@ -45,6 +46,7 @@ public class CommonsRequestLoggingFilter extends AbstractRequestLoggingFilter {
/**
* Writes a log message after the request is processed.
*/
@Override
protected void afterRequest(HttpServletRequest request, String message) {
if (logger.isDebugEnabled()) {
logger.debug(message);

View File

@ -130,6 +130,7 @@ public class DelegatingFilterProxy extends GenericFilterBean {
}
@Override
protected void initFilterBean() throws ServletException {
// If no target bean name specified, use filter name.
if (this.targetBeanName == null) {
@ -167,6 +168,7 @@ public class DelegatingFilterProxy extends GenericFilterBean {
invokeDelegate(delegateToUse, request, response, filterChain);
}
@Override
public void destroy() {
Filter delegateToUse = null;
synchronized (this.delegateMonitor) {

View File

@ -47,6 +47,7 @@ public class Log4jNestedDiagnosticContextFilter extends AbstractRequestLoggingFi
* Logs the before-request message through Log4J and
* adds a message the Log4J NDC before the request is processed.
*/
@Override
protected void beforeRequest(HttpServletRequest request, String message) {
if (log4jLogger.isDebugEnabled()) {
log4jLogger.debug(message);
@ -69,6 +70,7 @@ public class Log4jNestedDiagnosticContextFilter extends AbstractRequestLoggingFi
* Removes the log message from the Log4J NDC after the request is processed
* and logs the after-request message through Log4J.
*/
@Override
protected void afterRequest(HttpServletRequest request, String message) {
NDC.pop();
if (NDC.getDepth() == 0) {

View File

@ -69,6 +69,7 @@ public class RequestContextFilter extends OncePerRequestFilter {
}
@Override
protected void doFilterInternal(
HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {

View File

@ -36,6 +36,7 @@ public class ServletContextRequestLoggingFilter extends AbstractRequestLoggingFi
/**
* Writes a log message before the request is processed.
*/
@Override
protected void beforeRequest(HttpServletRequest request, String message) {
getServletContext().log(message);
}
@ -43,6 +44,7 @@ public class ServletContextRequestLoggingFilter extends AbstractRequestLoggingFi
/**
* Writes a log message after the request is processed.
*/
@Override
protected void afterRequest(HttpServletRequest request, String message) {
getServletContext().log(message);
}

View File

@ -68,6 +68,7 @@ public abstract class DecoratingNavigationHandler extends NavigationHandler {
* NavigationHandler as argument.
* @see #handleNavigation(javax.faces.context.FacesContext, String, String, javax.faces.application.NavigationHandler)
*/
@Override
public final void handleNavigation(FacesContext facesContext, String fromAction, String outcome) {
handleNavigation(facesContext, fromAction, outcome, this.decoratedNavigationHandler);
}

View File

@ -105,6 +105,7 @@ public class DelegatingNavigationHandlerProxy extends NavigationHandler {
* as argument will be used. Else, the standard <code>handleNavigation</code>
* method will be called.
*/
@Override
public void handleNavigation(FacesContext facesContext, String fromAction, String outcome) {
NavigationHandler handler = getDelegate(facesContext);
if (handler instanceof DecoratingNavigationHandler) {

View File

@ -103,6 +103,7 @@ public class DelegatingVariableResolver extends VariableResolver {
* Delegate to the original VariableResolver first, then try to
* resolve the variable as Spring bean in the root WebApplicationContext.
*/
@Override
public Object resolveVariable(FacesContext facesContext, String name) throws EvaluationException {
Object value = resolveOriginal(facesContext, name);
if (value != null) {

View File

@ -38,6 +38,7 @@ public class SpringBeanVariableResolver extends DelegatingVariableResolver {
super(originalVariableResolver);
}
@Override
public Object resolveVariable(FacesContext facesContext, String name) throws EvaluationException {
Object bean = resolveSpringBean(facesContext, name);
if (bean != null) {

View File

@ -87,6 +87,7 @@ public class WebApplicationContextVariableResolver extends VariableResolver {
* <p>If no WebApplicationContext is available, all requests
* will be delegated to the original VariableResolver.
*/
@Override
public Object resolveVariable(FacesContext context, String name) throws EvaluationException {
Object value = null;
if (WEB_APPLICATION_CONTEXT_VARIABLE_NAME.equals(name)) {

View File

@ -74,6 +74,7 @@ public class SpringBeanFacesELResolver extends SpringBeanELResolver {
* @param elContext the current JSF ELContext
* @return the Spring BeanFactory (never <code>null</code>)
*/
@Override
protected BeanFactory getBeanFactory(ELContext elContext) {
return getWebApplicationContext(elContext);
}

View File

@ -67,6 +67,7 @@ public class WebApplicationContextFacesELResolver extends ELResolver {
protected final Log logger = LogFactory.getLog(getClass());
@Override
public Object getValue(ELContext elContext, Object base, Object property) throws ELException {
if (base != null) {
if (base instanceof WebApplicationContext) {
@ -103,6 +104,7 @@ public class WebApplicationContextFacesELResolver extends ELResolver {
return null;
}
@Override
public Class<?> getType(ELContext elContext, Object base, Object property) throws ELException {
if (base != null) {
if (base instanceof WebApplicationContext) {
@ -139,9 +141,11 @@ public class WebApplicationContextFacesELResolver extends ELResolver {
return null;
}
@Override
public void setValue(ELContext elContext, Object base, Object property, Object value) throws ELException {
}
@Override
public boolean isReadOnly(ELContext elContext, Object base, Object property) throws ELException {
if (base instanceof WebApplicationContext) {
elContext.setPropertyResolved(true);
@ -150,10 +154,12 @@ public class WebApplicationContextFacesELResolver extends ELResolver {
return false;
}
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext elContext, Object base) {
return null;
}
@Override
public Class<?> getCommonPropertyType(ELContext elContext, Object base) {
return Object.class;
}

View File

@ -440,6 +440,7 @@ public abstract class ExpressionEvaluationUtils {
this.hashCode = this.value.hashCode() * 29 + this.resultClass.hashCode();
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof ExpressionCacheKey)) {
return false;
@ -448,6 +449,7 @@ public abstract class ExpressionEvaluationUtils {
return (this.value.equals(other.value) && this.resultClass.equals(other.resultClass));
}
@Override
public int hashCode() {
return this.hashCode;
}

View File

@ -53,10 +53,12 @@ import javax.servlet.http.HttpServletResponse;
*/
public class Log4jConfigServlet extends HttpServlet {
@Override
public void init() {
Log4jWebConfigurer.initLogging(getServletContext());
}
@Override
public void destroy() {
Log4jWebConfigurer.shutdownLogging(getServletContext());
}
@ -67,6 +69,7 @@ public class Log4jConfigServlet extends HttpServlet {
* ever be created in web.xml. That's why a correctly invoked Servlet 2.3
* listener is much more appropriate for initialization work ;-)
*/
@Override
public void service(HttpServletRequest request, HttpServletResponse response) throws IOException {
getServletContext().log(
"Attempt to call service method on Log4jConfigServlet as [" +
@ -74,6 +77,7 @@ public class Log4jConfigServlet extends HttpServlet {
response.sendError(HttpServletResponse.SC_BAD_REQUEST);
}
@Override
public String getServletInfo() {
return "Log4jConfigServlet for Servlet API 2.3 " +
"(deprecated in favor of Log4jConfigListener for Servlet API 2.4)";

View File

@ -71,6 +71,7 @@ public class NestedServletException extends ServletException {
* Return the detail message, including the message from the nested exception
* if there is one.
*/
@Override
public String getMessage() {
return NestedExceptionUtils.buildMessage(super.getMessage(), getCause());
}

View File

@ -45,18 +45,21 @@ public class UrlPathHelper {
* @deprecated as of Spring 2.0, in favor of <code>WebUtils.INCLUDE_REQUEST_URI_ATTRIBUTE</code>
* @see org.springframework.web.util.WebUtils#INCLUDE_REQUEST_URI_ATTRIBUTE
*/
@Deprecated
public static final String INCLUDE_URI_REQUEST_ATTRIBUTE = WebUtils.INCLUDE_REQUEST_URI_ATTRIBUTE;
/**
* @deprecated as of Spring 2.0, in favor of <code>WebUtils.INCLUDE_CONTEXT_PATH_ATTRIBUTE</code>
* @see org.springframework.web.util.WebUtils#INCLUDE_CONTEXT_PATH_ATTRIBUTE
*/
@Deprecated
public static final String INCLUDE_CONTEXT_PATH_REQUEST_ATTRIBUTE = WebUtils.INCLUDE_CONTEXT_PATH_ATTRIBUTE;
/**
* @deprecated as of Spring 2.0, in favor of <code>WebUtils.INCLUDE_SERVLET_PATH_ATTRIBUTE</code>
* @see org.springframework.web.util.WebUtils#INCLUDE_SERVLET_PATH_ATTRIBUTE
*/
@Deprecated
public static final String INCLUDE_SERVLET_PATH_REQUEST_ATTRIBUTE = WebUtils.INCLUDE_SERVLET_PATH_ATTRIBUTE;