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

Comments

Projects
None yet
2 participants
@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

This comment has been minimized.

Show comment
Hide comment
@millencolin99

millencolin99 Aug 9, 2016

Anyone care to comment on this?

millencolin99 commented Aug 9, 2016

Anyone care to comment on this?

@slemesle

This comment has been minimized.

Show comment
Hide comment
@slemesle

slemesle 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 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

This comment has been minimized.

Show comment
Hide comment
@slemesle

slemesle Sep 20, 2016

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

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

This comment has been minimized.

Show comment
Hide comment
@slemesle

slemesle Nov 25, 2016

Fixed in master branch

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