mtedone / podam

PODAM - POjo DAta Mocker
https://mtedone.github.io/podam
MIT License
323 stars 750 forks source link

GenericPojo is missing generic type arguments, expected [F, S], provided [] #293

Closed wubin1989 closed 2 years ago

wubin1989 commented 3 years ago

Thanks for this awesome project! I got an exception when I ran below code copied from https://mtedone.github.io/podam/index.html

ParameterizedType stringLongGenericPojoType =
        new PodamParameterizedType(GenericPojo.class, String.class, Long.class);

PodamParameterizedType listBooleanType = new PodamParameterizedType(List.class, Boolean.class);

ParameterizedType IntegerBooleanListMapType =
    new PodamParameterizedType(Map.class, Integer.class, listBooleanType);

PodamFactory factory = new PodamFactoryImpl();
GenericPojo<GenericPojo<String, Long>, Map<Integer, List<Boolean>>> pojo =
    factory.manufacturePojo(GenericPojo.class, stringLongGenericPojoType, IntegerBooleanListMapType);

Is it a bug? Or Am I missing something? Please kindly have a look. Thank you!

wubin1989 commented 2 years ago

Any update?

daivanov commented 2 years ago

Hi,

Sorry for a delay. Yes, this looks like a problem with nested GenericPojo types resolution.

Thanks, Daniil

wubin1989 commented 2 years ago

Hi Daniil, When will this bug be fixed? Do you have any plan in the near future?

Thanks, Will

daivanov commented 2 years ago

Hi,

This is pretty complex issue. I will try to look at that on weekend. But did you try alternative call without PodamParameterizedType and just provide list of generic types?

Thanks, Daniil

daivanov commented 2 years ago

Fixed in Podam 7.2.8 or later.