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

Unscalable code in Jaxb2Marshaller [SPR-9867] #14500

Closed
spring-projects-issues opened this issue Oct 9, 2012 · 1 comment
Closed

Unscalable code in Jaxb2Marshaller [SPR-9867] #14500

spring-projects-issues opened this issue Oct 9, 2012 · 1 comment
Assignees
Labels
in: data type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Oct 9, 2012

Serkan Kaba opened SPR-9867 and commented

Jaxb2Marshaller.getJaxbContext() is synchronized and is in code path of both marshal() and unmarshal(). I think this should be synchronized if and only if it's not lazily initialized.


No further details from SPR-9867

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 11, 2012

Juergen Hoeller commented

Indeed, using a volatile field and only entering a synchronized block if that field isn't set yet (with the synchronized block performing another not-null check at its beginning) should be more appropriate here. We're using similar lazy initialization techniques in other parts of Spring already.

Juergen

@spring-projects-issues spring-projects-issues added type: bug in: data labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.1.3 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data type: bug
Projects
None yet
Development

No branches or pull requests

2 participants