fluflu
fluflu copied to clipboard
Cloneable semantics / promise might not be correct
Hi Peter,
So I'll just tell you my thoughts through issues, I guess that's the easiest and most trackable way to communicate. BTW, too bad you already released 1.0.0 to Maven Central. Maybe you could add a disclaimer that fluflu doesn't (yet?) follow semantic versioning: http://semver.org/
About Cloneable
, your example contains a reference to:
protected List<byte[]> b = new LinkedList<>();
This list, when cloned, will not deep-clone all the byte arrays. Note, that it works for this Set
:
Set<Integer> j = new HashSet<>();
... because Integer
is immutable.
So I think that the promise of supporting Cloneable
might be a false one. What do you think?
Perhaps the documentation should be extended a bit, but generally this is how cloning generally works in Java.