Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XmlBeanDefinitionReader报错空指针 #8

Open
easonzhang1992 opened this issue Jul 17, 2017 · 1 comment
Open

XmlBeanDefinitionReader报错空指针 #8

easonzhang1992 opened this issue Jul 17, 2017 · 1 comment

Comments

@easonzhang1992
Copy link

您好:你的step4中的XmlBeanDefinitionReader.processProperty(Element element, BeanDefinition beanDefinition)方法在beanDefinition.getPropertyValues().addPropertyValue(new PropertyValue(name,value))步骤会报空指针,原因是传递进来的beanDefinition在上个方法中只是new出来的 BeanDefinition beanDefinition = new BeanDefinition(),所以beanDefinition.getPropertyValues()其实是null,在addPropertyValue的时候会报空指针~

@kengdingxiaoman
Copy link

propertyValues 是已经初始化过的,所以不会报 空指针
在 BeanDefinition 第 16 行:
private PropertyValues propertyValues = new PropertyValues();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants