generified FactoryBeans and further Java 5 code style updates

This commit is contained in:
Juergen Hoeller
2009-02-25 00:34:22 +00:00
parent 555fa3b4c8
commit 160249c012
48 changed files with 346 additions and 335 deletions

View File

@@ -375,19 +375,19 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator implemen
/**
* Handle the case where no request handler method was found for the particular HTTP request method.
*
* <p/>The default implementation logs a warning, sends an HTTP 405 error and sets the "Allow" header. Alternatively, a
* fallback view could be chosen, or the HttpRequestMethodNotSupportedException could be rethrown as-is.
*
* @param ex the HttpRequestMethodNotSupportedException to be handled
* @param request current HTTP request
* <p>The default implementation logs a warning, sends an HTTP 405 error and sets the "Allow" header.
* Alternatively, a fallback view could be chosen, or the HttpRequestMethodNotSupportedException
* could be rethrown as-is.
* @param ex the HttpRequestMethodNotSupportedException to be handled
* @param request current HTTP request
* @param response current HTTP response
* @return a ModelAndView to render, or <code>null</code> if handled directly
* @throws Exception an Exception that should be thrown as result of the servlet request
*/
protected ModelAndView handleHttpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException ex,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
protected ModelAndView handleHttpRequestMethodNotSupportedException(
HttpRequestMethodNotSupportedException ex, HttpServletRequest request, HttpServletResponse response)
throws Exception {
pageNotFoundLogger.warn(ex.getMessage());
response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED);
response.addHeader("Allow", StringUtils.arrayToDelimitedString(ex.getSupportedMethods(), ", "));

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2008 the original author or authors.
* Copyright 2002-2009 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.
@@ -32,7 +32,7 @@ import com.sun.syndication.feed.rss.Item;
* <p>Application-specific view classes will extend this class.
* The view will be held in the subclass itself, not in a template.
*
* <p/>Main entry points are the {@link #buildFeedMetadata(Map, WireFeed , HttpServletRequest)}
* <p>Main entry points are the {@link #buildFeedMetadata(Map, WireFeed , HttpServletRequest)}
* and {@link #buildFeedItems(Map, HttpServletRequest, HttpServletResponse)}.
*
* <p>Thanks to Jettro Coenradie and Sergio Bossa for the original feed view prototype!