polishing

This commit is contained in:
Juergen Hoeller
2011-07-27 22:38:59 +00:00
parent 4385367f2d
commit fad865fbad
2 changed files with 5 additions and 8 deletions

View File

@@ -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.