As a general rule default implementations on an interface should only used when absolutely necessary because all the implementations are out of your control. For example, the collection interfaces in the JDK all gained new APIs but Java doesn’t implement every instance of them so a default is necessary for forward progress. However, if you own all instances you should not need to use default. So in this particular PR the use of default in the InternalCache in my opinion is wrong. We should control all internal interfaces and therefor can update them all with the correct implementation.
-Jake > On May 8, 2020, at 9:49 AM, Kirk Lund <kl...@apache.org> wrote: > > I believe some of the Geode community has already decided that we shouldn't > overuse default methods in interfaces. Dan and others were the ones who > decided this and thus I can't really explain to folks in PRs why it's bad > to overuse default methods. Could some of the folks with strong > understanding of why we should avoid making every method default empty > please speak up here and/or in https://github.com/apache/geode/pull/5014? > > My understanding is that default implementations should only be provided in > interfaces when it's important to do so for facilitating some sort of > deprecation and replacing a deprecated method. > > Thanks, > Kirk