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

PropertyValue does not copy the converted semantics of a given pv [SPR-5293] #9966

Closed
spring-projects-issues opened this issue Nov 12, 2008 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Costin Leau opened SPR-5293 and commented

Constructor PropertyValue(PropertyValue) does not copy all the properties of the given pv. In my case, the given pv is converted already which means the converted flag is set to true. However, the constructor does not copies this field (though it does copy conversionNecessary which is package protected) which means the property gets converted again on the next run. Additionally, the converted value is ignored as well.
Not sure what's the relationship between resolvedTokens and convertedValue but the two should be synchronized somehow.

(I've attached a patch with a trivial fix)


Affects: 2.5.6

Attachments:

Referenced from: commits 46cbaa9

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

Hey Costin,

After a bit of research, I couldn't come up with a good reason for not copying the converted value there either... for the constructor that fully copies a given PropertyValue (in contrast to the constructor that overrides an existing PropertyValue with a new value object). So I've changed it for 3.0 M2.

Juergen

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0 M2 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants