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

Out parameter generated as method #109

Closed
millencolin99 opened this issue Aug 8, 2016 · 4 comments
Closed

Out parameter generated as method #109

millencolin99 opened this issue Aug 8, 2016 · 4 comments
Labels
bug
Milestone

Comments

@millencolin99
Copy link

@millencolin99 millencolin99 commented Aug 8, 2016

I have the following mapper:

@Mapper(withCustom = StoreVisitRawDataCustomMapper.class, withIgnoreMissing = IgnoreMissing.ALL)
public interface StoreVisitRawDataMapper
{
    StoreAddedToCartProduct toAddedToCartProduct(StoreVisitRawData storeVisitRawData);
    StoreAddedToCartProduct toAddedToCartProduct(Customer customer, StoreAddedToCartProduct storeAddedToCartProduct);
}

Bizarrely for the second method Selma generates this:

@Override
  public final com.storakle.databaseinterfaces.models.StoreAddedToCartProduct toAddedToCartProduct(com.storakle.databaseinterfaces.models.Customer in, com.storakle.databaseinterfaces.models.StoreAddedToCartProduct out) {
    if (in != null) {
      out = customMapperStoreVisitRawDataCustomMapper.toAddedToCartProduct(in, out());
    } else {
      out = null;
    }
    return out;
  }

Notice the out parameter is passed in as out(), which generates a compile error.

Am I doing something wrong or this is a bug?

@millencolin99
Copy link
Author

@millencolin99 millencolin99 commented Aug 9, 2016

Anyone care to comment on this?

@slemesle
Copy link
Collaborator

@slemesle slemesle commented Aug 10, 2016

Hi, this looks like a bug yes.
Can you provide the StoreVisitRawDataCustomMapper class.
I am sorry but I am on holidays for now and have no time to fix this.
I'll give it a look later.

@slemesle
Copy link
Collaborator

@slemesle slemesle commented Sep 20, 2016

Hi, I really need a complete code sample to analyse this.

@slemesle slemesle added the bug label Sep 20, 2016
@slemesle slemesle added this to the 1.0 Final milestone Sep 20, 2016
slemesle added a commit that referenced this issue Nov 25, 2016
@slemesle
Copy link
Collaborator

@slemesle slemesle commented Nov 25, 2016

Fixed in master branch

@slemesle slemesle closed this Nov 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.