hrldcpr / pcollections

A Persistent Java Collections Library
Other
765 stars 79 forks source link

HashPMap is not serializable after call to entrySet #71

Closed mpdn closed 6 years ago

mpdn commented 6 years ago

As entrySet is not serializable, it will make serialization fail if it is set (ie. after the first call to entrySet()). Since it is set lazily and has no state, it might as well just be transient.

https://github.com/hrldcpr/pcollections/blob/097b7a2cb30cf12f8aece9ed62d20b4ef48b95ea/src/main/java/org/pcollections/HashPMap.java#L62

hrldcpr commented 6 years ago

Thanks, good point! I'll merge #72 to fix soon

hrldcpr commented 6 years ago

v3.0.3 (which is making its ponderous way through the maven release process now…) includes this fix, thanks again for the bug report!