mtedone / podam

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

Optional<List<String>> generated as Optional<List<Object>> #303

Closed kortov closed 2 years ago

kortov commented 2 years ago

Hello, I stumbled upon a bug, where Optional<List> as field is manufactured as Optional<List>. I expected Optional<List> there. Here's a repro https://github.com/kortov/podam-list-bug-repro/blob/main/bug-repro/src/test/java/org/example/OptionalTest.java#L21

image

I know that Optional as a field is a bad practice but actually, I wrote for my purposes a similar to Optional generic class and found this bug with podam and I changed class to Optional for clarity.

daivanov commented 2 years ago

Fixed in podam 7.2.9

kortov commented 2 years ago

Thank you!