polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4808 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
904a1314b5
commit
87af61b877
|
|
@ -59,7 +59,6 @@ import org.springframework.beans.factory.config.BeanExpressionContext;
|
||||||
import org.springframework.beans.factory.config.BeanExpressionResolver;
|
import org.springframework.beans.factory.config.BeanExpressionResolver;
|
||||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||||
import org.springframework.core.LocalVariableTableParameterNameDiscoverer;
|
import org.springframework.core.LocalVariableTableParameterNameDiscoverer;
|
||||||
import org.springframework.core.MethodParameter;
|
|
||||||
import org.springframework.core.Ordered;
|
import org.springframework.core.Ordered;
|
||||||
import org.springframework.core.ParameterNameDiscoverer;
|
import org.springframework.core.ParameterNameDiscoverer;
|
||||||
import org.springframework.core.annotation.AnnotationUtils;
|
import org.springframework.core.annotation.AnnotationUtils;
|
||||||
|
|
@ -418,7 +417,6 @@ public class AnnotationMethodHandlerAdapter extends PortletContentGenerator
|
||||||
* @return the PortletRequestDataBinder instance to use
|
* @return the PortletRequestDataBinder instance to use
|
||||||
* @throws Exception in case of invalid state or arguments
|
* @throws Exception in case of invalid state or arguments
|
||||||
* @see PortletRequestDataBinder#bind(javax.portlet.PortletRequest)
|
* @see PortletRequestDataBinder#bind(javax.portlet.PortletRequest)
|
||||||
* @see PortletRequestDataBinder#convertIfNecessary(Object, Class, MethodParameter)
|
|
||||||
*/
|
*/
|
||||||
protected PortletRequestDataBinder createBinder(PortletRequest request, Object target, String objectName) throws Exception {
|
protected PortletRequestDataBinder createBinder(PortletRequest request, Object target, String objectName) throws Exception {
|
||||||
return new PortletRequestDataBinder(target, objectName);
|
return new PortletRequestDataBinder(target, objectName);
|
||||||
|
|
|
||||||
|
|
@ -394,14 +394,13 @@ public class AnnotationMethodHandlerAdapter extends WebContentGenerator
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
Class<?> clazz = ClassUtils.getUserClass(handler);
|
Class<?> clazz = ClassUtils.getUserClass(handler);
|
||||||
Boolean annotated = this.sessionAnnotatedClassesCache.get(clazz);
|
Boolean annotatedWithSessionAttributes = this.sessionAnnotatedClassesCache.get(clazz);
|
||||||
|
if (annotatedWithSessionAttributes == null) {
|
||||||
if (annotated == null) {
|
annotatedWithSessionAttributes = (AnnotationUtils.findAnnotation(clazz, SessionAttributes.class) != null);
|
||||||
annotated = (AnnotationUtils.findAnnotation(handler.getClass(), SessionAttributes.class) != null);
|
this.sessionAnnotatedClassesCache.put(clazz, annotatedWithSessionAttributes);
|
||||||
this.sessionAnnotatedClassesCache.put(clazz, annotated);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (annotated) {
|
if (annotatedWithSessionAttributes) {
|
||||||
// Always prevent caching in case of session attribute management.
|
// Always prevent caching in case of session attribute management.
|
||||||
checkAndPrepare(request, response, this.cacheSecondsForSessionAttributeHandlers, true);
|
checkAndPrepare(request, response, this.cacheSecondsForSessionAttributeHandlers, true);
|
||||||
// Prepare cached set of session attributes names.
|
// Prepare cached set of session attributes names.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue