Closed Otanikotani closed 7 years ago
And then someone will try to produce non-generic Vector and this won't work :)
Well, I can merge your tests, but now this is not super easy due to conflict in AbstractRandomDataProviderStrategy. Could you please amend your commit for this?
And then someone will try to produce non-generic Vector and this won't work :)
Yeah, you are right. Well, there is still a fallback with CollectionTypeManufacturer for other collection types, and of course someone who still uses Vector class is able to add the custom typemanufacturer. Maybe it will make them realize that those days are gone!
Now Vector should be fine. The main problem here is that using ArrayList instead of List is a coupling problem as it imposes unnecessary constraint on a POJO's interface.
This is one possible solution to fix the bug with raw ArrayList. This adds type manufacturers for ArrayList, LinkedList and HashSet, so those manufacturers will take precedence over the Cloneable manufacturer.