Adding default methods in a 100% binary compatible way
Jaroslav Tulach
jaroslav.tulach at oracle.com
Tue Sep 29 12:31:38 UTC 2020
Hi.
I took a part in a tweetting about incompatibilities related to
`CharSequence.isEmpty()` over the weekend and Claes Redestad suggested I share
a summary of my findings at this mailing list.
I asked a simple question: Is it possible to add a default method in a 100%
binary compatible way? The following post provides the answer:
http://wiki.apidesign.org/wiki/BinaryCompatibleDefaultMethods
I am sure almost everyone on this mailing list is aware of the individual
observations made in my post. They are colloquially known. However it is not
common to see them combined together as far as I can say. When I composed
them, I got relatively surprising answer: Yes, adding default methods to
interfaces in a 100% binary compatible way is possible at the end!
Best regards.
Jaroslav Tulach
NetBeans Founder and initial architect
Author of Practical API Design book
OracleLabs
More information about the core-libs-dev
mailing list