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

Constructor sets the source incorrectly in org.springframework.beans.PropertyValue [SPR-8337] #12985

Closed
spring-projects-issues opened this issue May 13, 2011 · 1 comment
Assignees
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented May 13, 2011

Sandu Turcan opened SPR-8337 and commented

I'm using my own document loader to preserve the line numbers but source information is not available in PropertyValue instances.
I tracked down the problem to PropertyValue code.
PropertyValue defines a field named 'source' and uses it instead of the one inherited from BeanMetadataAttributeAccessor.
As a result when the beandefinition is merged and PropertyValues are cloned the source is lost.
Line 84 in PropertyValue.java:

this.source = original.getSource();

should be

this.setSource(original.getSource());

or the same as line 104, which is:

this.source = original;

I'm not sure which one is right, I'd prefer the first one.


Issue Links:

  • #10462 PropertyOverrideConfigurer ignores some invalid keys but not others

Backported to: 4.2.8, 3.2.18

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

Successfully merging a pull request may close this issue.

None yet
2 participants