-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Closed
Copy link
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug
Milestone
Description
Thomas Bruyelle opened SPR-9490 and commented
/**
* Returns the type of the handler for this handler method.
* Note that if the bean type is a CGLIB-generated class, the original, user-defined class is returned.
*/
public Class<?> getBeanType() {
if (bean instanceof String) {
String beanName = (String) bean;
return beanFactory.getType(beanName);
}
else {
return ClassUtils.getUserClass(bean.getClass());
}
}
When bean instanceof String
is true, the method returns the CGLIB-generated class instead of the user-defined one.
ClassUtils.getUserClass()
should also wrap the return of beanFactory.getType( beanName )
.
Affects: 3.1.1, 3.2 M1
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug