polishing

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4808 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Juergen Hoeller
2011-07-27 22:38:59 +00:00
parent 904a1314b5
commit 87af61b877
2 changed files with 5 additions and 8 deletions
@@ -394,14 +394,13 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
throws Exception {
Class<?> clazz = ClassUtils.getUserClass(handler);
Boolean annotated = this.sessionAnnotatedClassesCache.get(clazz);
if (annotated == null) {
annotated = (AnnotationUtils.findAnnotation(handler.getClass(), SessionAttributes.class) != null);
this.sessionAnnotatedClassesCache.put(clazz, annotated);
Boolean annotatedWithSessionAttributes = this.sessionAnnotatedClassesCache.get(clazz);
if (annotatedWithSessionAttributes == null) {
annotatedWithSessionAttributes = (AnnotationUtils.findAnnotation(clazz, SessionAttributes.class) != null);
this.sessionAnnotatedClassesCache.put(clazz, annotatedWithSessionAttributes);
}
if (annotated) {
if (annotatedWithSessionAttributes) {
// Always prevent caching in case of session attribute management.
checkAndPrepare(request, response, this.cacheSecondsForSessionAttributeHandlers, true);
// Prepare cached set of session attributes names.