Skip to content

RESTWS-711- Change to new MappingJackson2HttpMessageConverter in spring 4.3.x#335

Merged
dkayiwa merged 2 commits intoopenmrs:masterfrom
wluyima:RESTWS-711
Feb 26, 2020
Merged

RESTWS-711- Change to new MappingJackson2HttpMessageConverter in spring 4.3.x#335
dkayiwa merged 2 commits intoopenmrs:masterfrom
wluyima:RESTWS-711

Conversation

@wluyima
Copy link
Member

@wluyima wluyima commented Aug 22, 2018

@coveralls
Copy link

coveralls commented Aug 22, 2018

Coverage Status

Coverage increased (+0.2%) to 41.788% when pulling cf589fd on wluyima:RESTWS-711 into df4734e on openmrs:master.

import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;

@Configuration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need some javadoc explaining what's going on here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do, actually I need to rename this class


private static final String PACKAGE = "org.springframework.http.converter.json.";

private static final String OLD_CLASS_NAME = PACKAGE + "MappingJacksonHttpMessageConverter";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of OLD_CLASS_NAME and NEW_CLASS_NAME wouldn't it be better to call these CLASS_FROM_SPRING43 and CLASS_BEFORE_SPRING43 or something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense


private static final String PACKAGE = "org.springframework.http.converter.json.";

private static final String CLASS_BEFORE_SPRING_4_1 = PACKAGE + "MappingJacksonHttpMessageConverter";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it's more like the OpenMRS version rather than the spring version. When we upgraded to spring 4.1.x, the dev copied the removed classes into core because I guess we were still running Jackson 1.x yet the new converter requires Jackson 2.x

@dkayiwa dkayiwa merged commit df0b957 into openmrs:master Feb 26, 2020
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

Successfully merging this pull request may close these issues.

4 participants