Introduce ObjectMapperValueToTree Refaster rule#1938
Conversation
| NullNode.getInstance().optional("qux")); | ||
| } | ||
|
|
||
| JsonNode testObjectMapperValueToTree() throws JsonProcessingException { |
There was a problem hiding this comment.
Not sure how we usually do this, but I am keeping this throws statement for the diff; ObjectMapper#valueToTree does not throw this exception.
|
Looks good. No mutations were possible for these changes. |
ObjectMapperValueToTree refaster ruleObjectMapperValueToTree Refaster rule
There was a problem hiding this comment.
Added a small commit. Tnx @mohamedsamehsalah!
I'd like to wrap up and merge #1927 #1942 before this one, so that we stop seeing the Error Prone compatibility check failure on master.
| </dependency> | ||
| <dependency> | ||
| <groupId>com.fasterxml.jackson.core</groupId> | ||
| <artifactId>jackson-core</artifactId> |
There was a problem hiding this comment.
We should omit this one from the runtime classpath:
| <artifactId>jackson-core</artifactId> | |
| <artifactId>jackson-core</artifactId> | |
| <scope>provided</scope> |
| } | ||
| } | ||
|
|
||
| /** Prefer {@link ObjectMapper#valueToTree(Object)} over more contrived alternatives. */ |
There was a problem hiding this comment.
It's also significantly less efficient, IIUC.
|
Looks good. No mutations were possible for these changes. |
c7dd3b2 to
f61e505
Compare
rickie
left a comment
There was a problem hiding this comment.
Nice addition @mohamedsamehsalah !
|
Looks good. No mutations were possible for these changes. |
61ad4b3 to
7ab6dbe
Compare
|
Looks good. No mutations were possible for these changes. |
|



Suggested commit message 🎉