提交 fad865fb 编写于 作者: J Juergen Hoeller

polishing

上级 4385367f
......@@ -59,7 +59,6 @@ import org.springframework.beans.factory.config.BeanExpressionContext;
import org.springframework.beans.factory.config.BeanExpressionResolver;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.core.LocalVariableTableParameterNameDiscoverer;
import org.springframework.core.MethodParameter;
import org.springframework.core.Ordered;
import org.springframework.core.ParameterNameDiscoverer;
import org.springframework.core.annotation.AnnotationUtils;
......@@ -418,7 +417,6 @@ public class AnnotationMethodHandlerAdapter extends PortletContentGenerator
* @return the PortletRequestDataBinder instance to use
* @throws Exception in case of invalid state or arguments
* @see PortletRequestDataBinder#bind(javax.portlet.PortletRequest)
* @see PortletRequestDataBinder#convertIfNecessary(Object, Class, MethodParameter)
*/
protected PortletRequestDataBinder createBinder(PortletRequest request, Object target, String objectName) throws Exception {
return new PortletRequestDataBinder(target, objectName);
......
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册