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 statement mapping (Extract And Move Method) #443

Closed
pedramnoori opened this issue Apr 4, 2023 · 0 comments
Closed

Missing statement mapping (Extract And Move Method) #443

pedramnoori opened this issue Apr 4, 2023 · 0 comments

Comments

@pedramnoori
Copy link

Problem

Two statement mapping are missing within the bodyMapper of an Extract and Move Method refactoring

Commit

Here

Refactoring

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

Explanation

Within the bodyMapper of the aforementioned refactoring (there are two other similar refactoring in this commit, within them the problem is the same), one pair of statements reported in non-mapped leaves and one pair reported in non-mapped nodes, which they should be matched together:

First (leaves):

  • _serializerProvider(cfg).serializePolymorphic(gen,value,_prefetch.rootType,_prefetch.typeSerializer); Line 1120 parent
  • prov.serializePolymorphic(gen,value,rootType,valueSerializer,typeSerializer); Line 1440 child

Second (nodes along with the corresponding blocks):

  • if(_prefetch.typeSerializer != null) Line 1119 parent
  • if(typeSerializer != null) Line 1439 child
@tsantalis tsantalis changed the title Missing statement mapping Missing statement mapping (Extract And Move Method) Aug 20, 2023
tsantalis added a commit that referenced this issue May 9, 2024
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