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

#35 Upgrade jackson-databind to 2.10.2 and bump version to alpha #36

Merged

Conversation

cbeach47
Copy link
Contributor

#35

Based on the changelog, I switched ObjectMapper to JsonMapper. Didn't see anything else that would to be modified. Looks like databind is only used in a single class in the admin console launcher, and it's a fairly simple one at that.


public class JsonService {

private static final ObjectMapper jsonMapper = new ObjectMapper();

private static final JsonMapper jsonMapper = new JsonMapper();
Copy link
Member

Choose a reason for hiding this comment

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

Why the change to explicit JsonMapper? Unless we're need something specifically from the child implementation we normally keep a level of abstraction and go with the parent - as was there before. Further, you'll note this is the approach taken in most documentation and tutorials.

Unless there is a need, could we please change back?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After reading the release notes / change log, I had thought it was more secure. However on re-reviewing the documentation, I only found a specific reference (below), but I can't go so far as to say it's a need. I'll flip it back.

From FasterXML/jackson-databind#2153 :

ObjectMapper will still exist, and may even be instantiated (more so with 2.10, less with 3.x), but usage should move over to specific mappers for 3.x.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, that's changed back now.

@cbeach47
Copy link
Contributor Author

Since the change was made from @edalex-ian 's review, I'm going to go ahead and merge this.

@cbeach47 cbeach47 merged commit c086438 into openequella:develop Jan 31, 2020
@cbeach47 cbeach47 deleted the chore/6-upgrade-jackson-databind branch January 31, 2020 13:50
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.

3 participants