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

Missing Inline Variable refactoring #466

Closed
pedramnoori opened this issue May 8, 2023 · 0 comments
Closed

Missing Inline Variable refactoring #466

pedramnoori opened this issue May 8, 2023 · 0 comments

Comments

@pedramnoori
Copy link

Problem

Missing Inline Variable refactoring happened within an Extract and Move Method refactoring. Similar to #461 and #462, and related to #443

Commit

FasterXML/jackson-databind@da29a04

Refactoring

Extract And Move Method public serialize(gen JsonGenerator, value Object, prov DefaultSerializerProvider) : void extracted from public writeValue(gen JsonGenerator, value Object) : void in class com.fasterxml.jackson.databind.ObjectWriter & moved to class com.fasterxml.jackson.databind.ObjectWriter.Prefetch

Description

The problem is that an Inline Variable refactoring has been reported within the bodyMapper of the aforementioned Extract and Move Method. But, it has not been reported in the original list of refactorings (modelDiff.getRefactorings()). The Inline Variable refactoring is as follows:

Inline Variable ser : JsonSerializer in method public writeValue(gen JsonGenerator, value Object) : void from class com.fasterxml.jackson.databind.ObjectWriter

Also note that the information of this refactoring is crucial to report the Extract and Move method as a pure case (to justify the ser -> valueSerializer replacement). So far, I handled this issue on my side by iterating over the refactorings reported in the bodyMappers. Since I found this refactoring as a valid case, I thought it would be better to report this refactoring within the actual list.

tsantalis added a commit that referenced this issue May 18, 2023
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

No branches or pull requests

2 participants