Skip to content

Commit

Permalink
Never use PropertyDescriptors of a proxy class
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed Apr 23, 2014
1 parent 099fdcb commit 47cb34b
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -269,7 +269,12 @@ protected Map<String, PropertyDescriptor> resolveAutowireablePropertyDescriptors
return resolveAutowireablePropertyDescriptorsForClass(existingBean.getClass(), new Callable<BeanWrapper>() {
public BeanWrapper call() throws Exception {
BeanWrapperImpl bw = new BeanWrapperImpl(false);
bw.setWrappedInstance(existingBean);
Class userClass = ClassUtils.getUserClass(existingBean.getClass());
if(userClass != existingBean.getClass()) {
bw.setWrappedInstance(BeanUtils.instantiate(userClass));
} else {
bw.setWrappedInstance(existingBean);
}
bw.setConversionService(getConversionService());
return bw;
}
Expand Down

1 comment on commit 47cb34b

@lhotari
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a fix for http://jira.grails.org/browse/GRAILS-11323 , related to #487

Please sign in to comment.