RFR (M): JDK-6394757: rev1: AbstractSet.removeAll semantics are surprisingly dependent on relative sizes
peter.levart at gmail.com
Mon May 27 08:35:33 UTC 2019
On 5/26/19 6:25 PM, Martin Buchholz wrote:
> On Mon, May 13, 2019 at 5:29 PM Stuart Marks <stuart.marks at oracle.com>
>> - addition of FIXME comment and reference to javadoc bug report, where
>> comment from interface cannot be inherited
> This is yet another symptom of Java's fundamental design mistake of being
> unable to simply inherit implementation, that we have learned to live with.
> "Inheritance is not subtyping"
One way of inheriting "only implementation" is to have a package-private
superclass with public methods. (AbstractStringBuilder for example). It
confines all implementations (subclasses) to the same package though, so
it is not a universal tool. With jigsaw there is another possibility: a
public but internal (confined) superclass which is exported just to
modules that need to subclass it.
More information about the core-libs-dev