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

AllEncompassingFormHttpMessageConverter ignores JAXB XML when Jackson used for JSON [SPR-14336] #18908

Closed
spring-projects-issues opened this issue Jun 7, 2016 · 0 comments
Assignees
Labels
status: backported An issue that has been backported to maintenance branches type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jun 7, 2016

Jan Zahornadsky opened SPR-14336 and commented

After changes introduced in #17894, the new conditions are causing that in a project that uses both XML (via JAXB) and JSON (via Jackson) AllEncompassingFormHttpMessageConverter no longer works correctly with XML.

Referring to the code in https://github.com/spring-projects/spring-framework/blob/master/spring-web/src/main/java/org/springframework/http/converter/support/AllEncompassingFormHttpMessageConverter.java, the condition for including Jaxb part converter should read

// instead of && !jackson2Present
if (jaxb2Present && !jackson2XmlPresent) {
	addPartConverter(new Jaxb2RootElementHttpMessageConverter());
}

Affects: 4.2.6

Issue Links:

Referenced from: commits abcfffd, d0b2fe5

Backported to: 4.2.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: backported An issue that has been backported to maintenance branches type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants