podam
podam copied to clipboard
Issue with resolving parameters of generic types in constructor arguments
Hi,
There is an error in how PODAM resolves generic parameters of types in constructors. For example for this POJO it will produce two (or one list in case memoization is enabled) List
public class Pojo {
private List<Long> list1;
private List<String> list2;
public GenericInConstructorPojo(List<Long> list1, List<String> list2) {
this.list1 = list1;
this.list2 = list2;
}
public Vector<Long> getList1() {
return list1;
}
public Vector<String> getList2() {
return list2;
}
}
Best regards, Daniil
This is not a bug. It works as expected: https://jemos.ci.cloudbees.com/job/podam-develop/351/console
Check two additional tests in the develop branch:
ConstructorUnitTest.podamShouldHandleGenericCollectionsInConstructorWithMemoizationDisabled
And
ConstructorUnitTest.podamShouldHandleGenericCollectionsInConstructorWithMemoizationEnabled