podam icon indicating copy to clipboard operation
podam copied to clipboard

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

Open wubin1989 opened this issue 5 years ago • 5 comments

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 avatar Sep 15 '21 13:09 wubin1989

Any update?

wubin1989 avatar Nov 01 '21 05:11 wubin1989

Hi,

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

Thanks, Daniil

daivanov avatar Nov 06 '21 20:11 daivanov

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

Thanks, Will

wubin1989 avatar Dec 15 '21 01:12 wubin1989

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 avatar Dec 15 '21 20:12 daivanov

Fixed in Podam 7.2.8 or later.

daivanov avatar Dec 20 '21 15:12 daivanov