Hello. 2019-10-29 0:16 UTC+01:00, Claude Warren <cla...@xenei.com>: > Having "ImmutableBitSet" inherit from "BitSet" breaks the latter's > contract. >> >> > no more
Yes, more, AFAICT... > so than the ImmutableSet breaks the Set contract. ... because "Set" is an interface whose contract explicitly mentions some operations as "optional". Not so for the "BitSet" class. > Yes it does but > the pattern is well established. There will be practical problems (e.g. if the upstream class adds a mutating method, not yet overridden by this extension). Immutability cannot be added after the fact. Regards, Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org